48 lines
856 B
C++
48 lines
856 B
C++
/*
|
|
* 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_ */
|