mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-25 11:56:04 +00:00
31 lines
1.0 KiB
C++
31 lines
1.0 KiB
C++
#ifndef _RAWMQTTHANDLER_H
|
|
#define _RAWMQTTHANDLER_H
|
|
|
|
#include "AmsMqttHandler.h"
|
|
|
|
class RawMqttHandler : public AmsMqttHandler {
|
|
public:
|
|
RawMqttHandler(MqttConfig& mqttConfig, RemoteDebug* debugger, char* buf) : AmsMqttHandler(mqttConfig, debugger, buf) {
|
|
full = mqttConfig.payloadFormat == 2;
|
|
topic = String(mqttConfig.publishTopic);
|
|
};
|
|
bool publish(AmsData* data, AmsData* previousState, EnergyAccounting* ea, EntsoeApi* eapi);
|
|
bool publishTemperatures(AmsConfiguration*, HwTools*);
|
|
bool publishPrices(EntsoeApi*);
|
|
bool publishSystem(HwTools* hw, EntsoeApi* eapi, EnergyAccounting* ea);
|
|
bool publishRaw(String data);
|
|
|
|
uint8_t getFormat();
|
|
|
|
private:
|
|
bool full;
|
|
String topic;
|
|
|
|
bool publishList1(AmsData* data, AmsData* meterState);
|
|
bool publishList2(AmsData* data, AmsData* meterState);
|
|
bool publishList3(AmsData* data, AmsData* meterState);
|
|
bool publishList4(AmsData* data, AmsData* meterState);
|
|
bool publishRealtime(EnergyAccounting* ea);
|
|
};
|
|
#endif
|