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.
50 lines
1.2 KiB
C++
50 lines
1.2 KiB
C++
/*
|
|
* WeinbusTableRegister.h
|
|
*
|
|
* Author: Aleksey Gerasimenko
|
|
* gerasimenko.aleksey.n@gmail.com
|
|
*/
|
|
#include <math.h>
|
|
#include <stdint.h>
|
|
|
|
#include "WEINBUS/WeinbusDefines.h"
|
|
#include "WEINBUS/WeinbusTableUnit.h"
|
|
|
|
#ifndef WEINBUS_WEINBUSTABLEREGISTER_H_
|
|
#define WEINBUS_WEINBUSTABLEREGISTER_H_
|
|
|
|
namespace WEINBUS
|
|
{
|
|
|
|
class WeinbusTableRegister: public WEINBUS::WeinbusTableUnit
|
|
{
|
|
protected:
|
|
WEINBUS::data_variant_type_t t;
|
|
public:
|
|
WeinbusTableRegister();
|
|
public:
|
|
WEINBUS::data_variant_type_t get_type();
|
|
public:
|
|
void add(uint16_t address, uint16_t *param);
|
|
void add(uint16_t address, int16_t *param);
|
|
void add(uint16_t address, uint32_t *param);
|
|
void add(uint16_t address, int32_t *param);
|
|
void add(uint16_t address, float *param);
|
|
public:
|
|
void read(uint16_t &data);
|
|
void read(int16_t &data);
|
|
void read(uint32_t &data);
|
|
void read(int32_t &data);
|
|
void read(float &data);
|
|
public:
|
|
void write(uint16_t data);
|
|
void write(int16_t data);
|
|
void write(uint32_t data);
|
|
void write(int32_t data);
|
|
void write(float data);
|
|
};
|
|
|
|
} /* namespace WEINBUS */
|
|
|
|
#endif /* WEINBUS_WEINBUSTABLEREGISTER_H_ */
|