2024-03-16 21:15:15 +01:00
|
|
|
#ifndef MICROINVERTER_H
|
|
|
|
|
#define MICROINVERTER_H
|
|
|
|
|
|
2024-03-17 21:33:21 +01:00
|
|
|
#include <memory>
|
2024-03-20 11:28:43 +01:00
|
|
|
#include <string>
|
2024-03-20 19:55:36 +01:00
|
|
|
#include <vector>
|
2024-03-16 21:15:15 +01:00
|
|
|
|
2024-03-19 16:59:41 +01:00
|
|
|
#include "modbus.h"
|
2024-03-20 19:55:36 +01:00
|
|
|
#include "port.h"
|
2024-03-16 21:15:15 +01:00
|
|
|
|
|
|
|
|
class Microinverter {
|
|
|
|
|
private:
|
2024-03-19 18:13:27 +01:00
|
|
|
std::shared_ptr<class modbus> modbus;
|
2024-03-19 16:59:41 +01:00
|
|
|
|
2024-03-16 21:15:15 +01:00
|
|
|
public:
|
2024-03-20 19:55:36 +01:00
|
|
|
Microinverter(std::shared_ptr<class modbus> modbus, long long serialNumber);
|
2024-03-18 22:49:32 +01:00
|
|
|
|
2024-03-20 16:39:25 +01:00
|
|
|
long long serialNumber;
|
2024-03-18 22:49:32 +01:00
|
|
|
|
|
|
|
|
std::vector<Port> ports;
|
2024-03-16 21:15:15 +01:00
|
|
|
|
2024-03-20 14:40:02 +01:00
|
|
|
void updatePorts(std::vector<std::string> ¶metersToGet, bool allParameters);
|
2024-03-20 11:28:43 +01:00
|
|
|
|
2024-03-20 19:55:36 +01:00
|
|
|
void printPorts(std::vector<std::string> ¶metersToGet, bool allParameters);
|
2024-03-18 23:48:37 +01:00
|
|
|
|
2024-03-20 19:55:36 +01:00
|
|
|
long long getTodayProduction();
|
2024-03-20 11:28:43 +01:00
|
|
|
|
2024-03-20 19:55:36 +01:00
|
|
|
long long getTotalProduction();
|
2024-03-16 21:15:15 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|