hoymilesClient/inc/hoymiles/microinverter.h
2024-03-29 21:40:50 +01:00

40 lines
No EOL
805 B
C++

#ifndef MICROINVERTER_H
#define MICROINVERTER_H
#include <memory>
#include <string>
#include <vector>
#include "modbus.h"
#include "port.h"
#include "sunspec.h"
class Microinverter {
private:
std::shared_ptr<class modbus> modbus;
Sunspec sunspec;
int startAddress;
public:
Microinverter(std::shared_ptr<class modbus> modbus, int startAddress, long long serialNumber);
long long serialNumber;
int age;
std::vector<Port> ports;
// void updatePorts(std::vector<std::string> &parametersToGet, bool allParameters);
void updateParameters(std::vector<std::string> &parametersToGet, bool allParameters);
void printPorts(std::vector<std::string> &parametersToGet, bool allParameters, bool shortNames);
long long getTodayProduction();
long long getTotalProduction();
};
#endif