You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CCS-COMM_BOARD/WEINBUS/WeinbusBuffer.h

40 lines
718 B
C++

/*
* WeinbusBuffer.h
*
* Author: Aleksey Gerasimenko
* gerasimenko.aleksey.n@gmail.com
*/
#include <math.h>
#include <stdint.h>
#include "WEINBUS/WeinbusDefines.h"
#ifndef WEINBUS_WEINBUSBUFFER_H_
#define WEINBUS_WEINBUSBUFFER_H_
namespace WEINBUS
{
class WeinbusBuffer
{
protected:
WEINBUS::buffer_type_t m_type;
uint16_t m_length;
uint16_t m_start_addr;
uint16_t m_end_addr;
uint16_t m_addr;
protected:
uint16_t m_counter;
uint16_t m_quantity;
uint16_t m_size;
public:
WeinbusBuffer();
void set(WEINBUS::buffer_type_t type, uint16_t startAddr);
bool address_range(uint16_t address);
};
} /* namespace WEINBUS */
#endif /* WEINBUS_WEINBUSBUFFER_H_ */