Restructuring to be able to include precompiled kmp lib

This commit is contained in:
Gunnar Skjold
2024-07-11 13:15:22 +02:00
parent 4407526d96
commit 8a4efd0047
32 changed files with 105 additions and 25 deletions

View File

@@ -0,0 +1,45 @@
/**
* @copyright Utilitech AS 2023
* License: Fair Source
*
*/
#include "PassthroughMqttHandler.h"
#include "hexutils.h"
bool PassthroughMqttHandler::publish(AmsData* data, AmsData* previousState, EnergyAccounting* ea, PriceService* ps) {
return false;
}
bool PassthroughMqttHandler::publishTemperatures(AmsConfiguration*, HwTools*) {
return false;
}
bool PassthroughMqttHandler::publishPrices(PriceService*) {
return false;
}
bool PassthroughMqttHandler::publishSystem(HwTools* hw, PriceService* ps, EnergyAccounting* ea) {
return false;
}
bool PassthroughMqttHandler::publishBytes(uint8_t* buf, uint16_t len) {
mqtt.publish(topic.c_str(), toHex(buf, len));
bool ret = mqtt.loop();
delay(10);
return ret;
}
bool PassthroughMqttHandler::publishString(char* str) {
mqtt.publish(topic.c_str(), str);
bool ret = mqtt.loop();
delay(10);
return ret;
}
uint8_t PassthroughMqttHandler::getFormat() {
return 255;
}
void PassthroughMqttHandler::onMessage(String &topic, String &payload) {
}