meterbus integrated but not working

This commit is contained in:
hg
2014-03-08 19:24:27 +01:00
parent d3d2c75541
commit b333be0cd9
5 changed files with 224 additions and 29 deletions

View File

@ -9,6 +9,8 @@
#define METERBUSCLIENT_H_
#if 0
#include "cmd.h"
#include "Config.h"
#include "Resources.h"
@ -29,6 +31,38 @@ private:
struct MeterBusFrame {
/*
* Short Frame:
* Start 10h
* C-Field
* A-Field
* Check-Sum
* Stop 16h
*
* Long Frame:
* Start 68h
* Length
* Length
* Start 68h
* C-Field
* A-Field
* CI-Field
* User-Data
* Check-Sum
* Stop 16h
*
*/
unsigned char startDelimiter;
unsigned char length;
unsigned char cField;
unsigned char aField;
unsigned char ciField;
unsigned char userData[255];
unsigned char checksum;
bool valid;
};
class MeterBusClient {
public:
@ -40,7 +74,11 @@ private:
unsigned char m_address;
void setAddress(unsigned char address);
unsigned char getAddress();
void handleFrame();
MeterBusFrame m_frame;
};
#endif
#endif /* METERBUSCLIENT_H_ */