OpenDTU-old/lib/VeDirectFrameHandler/VeDirectShuntController.h
Bernhard Kirchen ad125ea804 Fix: properly handle fragmented VE.Direct messages
queue every text event until the frame was checked by it checksum. then
process the data directly into the buffer struct. do not clear the
buffer struct, so it will always include the most recent value of a
particular data point.
2024-04-02 21:05:59 +02:00

22 lines
537 B
C++

#pragma once
#include <Arduino.h>
#include "VeDirectData.h"
#include "VeDirectFrameHandler.h"
class VeDirectShuntController : public VeDirectFrameHandler<veShuntStruct> {
public:
VeDirectShuntController() = default;
void init(int8_t rx, int8_t tx, Print* msgOut, bool verboseLogging);
using data_t = veShuntStruct;
data_t veFrame{};
private:
bool processTextDataDerived(std::string const& name, std::string const& value) final;
void frameValidEvent() final;
};
extern VeDirectShuntController VeDirectShunt;