Starting rework of reading data

This commit is contained in:
TraYali 2024-03-28 11:05:07 +01:00
parent 22289f25bb
commit 4209d2767e
5 changed files with 21 additions and 15 deletions

View file

@ -14,8 +14,6 @@ class Dtu {
std::vector<Microinverter> microinverters;
bool connected;
void populateMicroinverters();
std::pair<Microinverter *, bool> getMicroinverterBySerialNumber(long long serialNumber);
@ -25,6 +23,10 @@ class Dtu {
bool isConnected();
bool modbusError();
std::string modbusErrorMessage();
// void updateMicroinverters();
void updateMicroinverters(std::vector<std::string> &parametersToGet, bool allParameters, std::vector<long long> &microinvertersToGet);

View file

@ -20,9 +20,9 @@ class Port {
void increaseParametersAge();
public:
Port(std::shared_ptr<class modbus> modbus, uint16_t portStartAddress);
Port(std::shared_ptr<class modbus> modbus, int portStartAddress);
uint16_t portStartAddress;
int portStartAddress;
std::vector<std::shared_ptr<PortParameter>> parameters;