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.
55 lines
1.6 KiB
C++
55 lines
1.6 KiB
C++
/*
|
|
* WeinbusBufferOutputRegister.h
|
|
*
|
|
* Author: Aleksey Gerasimenko
|
|
* gerasimenko.aleksey.n@gmail.com
|
|
*/
|
|
|
|
#include "WEINBUS/WeinbusBufferRegister.h"
|
|
#include "WEINBUS/WeinbusTableRegister.h"
|
|
|
|
|
|
#ifndef WEINBUS_WEINBUSBUFFEROUTPUTREGISTER_H_
|
|
#define WEINBUS_WEINBUSBUFFEROUTPUTREGISTER_H_
|
|
|
|
namespace WEINBUS
|
|
{
|
|
|
|
|
|
class WeinbusBufferOutputRegister:public WEINBUS:: WeinbusBufferRegister
|
|
{
|
|
private:
|
|
WEINBUS::WeinbusTableRegister m_registers[WEINBUS_OUTPUT_REGISTERS_SIZE];
|
|
private:
|
|
WEINBUS::WeinbusTableRegister m_aux_register;
|
|
uint16_t m_iterator;
|
|
public:
|
|
WeinbusBufferOutputRegister();
|
|
public:
|
|
void add(uint16_t offset, uint16_t *param);
|
|
void add(uint16_t offset, int16_t *param);
|
|
void add(uint16_t offset, uint32_t *param);
|
|
void add(uint16_t offset, int32_t *param);
|
|
void add(uint16_t offset, float *param);
|
|
public:
|
|
WEINBUS::WeinbusTableRegister get_register_address(uint16_t address);
|
|
WEINBUS::WeinbusTableRegister get_register_cursor(uint16_t cursor);
|
|
public:
|
|
void read(uint16_t address, uint16_t &data);
|
|
void read(uint16_t address, int16_t &data);
|
|
void read(uint16_t address, uint32_t &data);
|
|
void read(uint16_t address, int32_t &data);
|
|
void read(uint16_t address, float &data);
|
|
public:
|
|
uint16_t get_cursor(uint16_t address);
|
|
void read_cursor(uint16_t cursor, uint16_t &data);
|
|
void read_cursor(uint16_t cursor, int16_t &data);
|
|
void read_cursor(uint16_t cursor, uint32_t &data);
|
|
void read_cursor(uint16_t cursor, int32_t &data);
|
|
void read_cursor(uint16_t cursor, float &data);
|
|
};
|
|
|
|
} /* namespace WEINBUS */
|
|
|
|
#endif /* WEINBUS_WEINBUSBUFFEROUTPUTREGISTER_H_ */
|