start integrating MeterBus client

This commit is contained in:
hg
2014-03-08 13:23:09 +01:00
parent 89771e70d1
commit d3d2c75541
7 changed files with 200 additions and 18 deletions

View File

@ -39,6 +39,11 @@ typedef union {
uint8_t e[sizeof(bool)];
} u_bool;
typedef union {
unsigned char c;
uint8_t e[sizeof(unsigned char)];
} u_uchar;
namespace Config {
const unsigned int MAGIC_TOKEN = 0xDEADBEEF;
@ -49,6 +54,8 @@ namespace Config {
const int THERMOMETER_CAL[4] = {12, 16, 20, 24}; // 4 x 4
const int THERMOMETER_DEBUG = 28; // 1
const int THERMOMETER_INFO = 29; // 1
const int METERBUSCLIENT_ADDRESS = 30; // 1
bool getBool(int pos);
void setBool(int pos, bool value);
@ -58,6 +65,10 @@ namespace Config {
void setUInt(int pos, unsigned int value);
unsigned long getULong(int pos);
void setULong(int pos, unsigned long value);
unsigned char getUChar(int pos);
void setUChar(int pos, unsigned char value);
void initialize();
bool isInitialized();