start integrating MeterBus client
This commit is contained in:
46
meterBusClient.h
Normal file
46
meterBusClient.h
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* meterBusClient.h
|
||||
*
|
||||
* Created on: 08.03.2014
|
||||
* Author: wn
|
||||
*/
|
||||
|
||||
#ifndef METERBUSCLIENT_H_
|
||||
#define METERBUSCLIENT_H_
|
||||
|
||||
|
||||
#include "cmd.h"
|
||||
#include "Config.h"
|
||||
#include "Resources.h"
|
||||
|
||||
class MeterBusClient;
|
||||
|
||||
|
||||
|
||||
class MeterBusClientConfig : public Cmd {
|
||||
public:
|
||||
MeterBusClientConfig(MeterBusClient *meterBusClient) : m_meterBusClient(meterBusClient) {};
|
||||
virtual String getCmdName() { return "MBCC"; }
|
||||
virtual String getHelp() { return getResource(MBC_CONFIG_HELP_KEY); }
|
||||
virtual String exec(String params);
|
||||
private:
|
||||
MeterBusClient *m_meterBusClient;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
class MeterBusClient {
|
||||
public:
|
||||
MeterBusClient();
|
||||
void begin(CmdServer *cmdServer);
|
||||
void exec();
|
||||
friend class MeterBusClientConfig;
|
||||
private:
|
||||
unsigned char m_address;
|
||||
void setAddress(unsigned char address);
|
||||
unsigned char getAddress();
|
||||
};
|
||||
|
||||
|
||||
#endif /* METERBUSCLIENT_H_ */
|
Reference in New Issue
Block a user