* when printing a message, tell the name of the derived class. * print total power only when state SML_FINAL reached. * tell if a checksum verification error occurred.
20 lines
400 B
C++
20 lines
400 B
C++
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
#pragma once
|
|
|
|
#include "PowerMeterSml.h"
|
|
#include <SoftwareSerial.h>
|
|
|
|
class PowerMeterSerialSml : public PowerMeterSml {
|
|
public:
|
|
PowerMeterSerialSml()
|
|
: PowerMeterSml("PowerMeterSerialSml") { }
|
|
|
|
~PowerMeterSerialSml();
|
|
|
|
bool init() final;
|
|
void loop() final;
|
|
|
|
private:
|
|
std::unique_ptr<SoftwareSerial> _upSmlSerial = nullptr;
|
|
};
|