Initial release commit

This commit is contained in:
TraYali 2024-03-20 19:08:13 +01:00
commit 0e25af7ef8
15 changed files with 12511 additions and 0 deletions

39
inc/hoymiles/dtu.h Normal file
View file

@ -0,0 +1,39 @@
#ifndef DTU_H
#define DTU_H
#include <vector>
#include <memory>
#include <string>
#include "microinverter.h"
#include "modbus.h"
class Dtu {
private:
std::shared_ptr<class modbus> modbus;
std::vector<Microinverter> microinverters;
bool connected;
void populateMicroinverters();
std::pair<bool, Microinverter*> getMicroinverterBySerialNumber(long long serialNumber);
public:
Dtu(const char *ip_address, int port);
bool isConnected();
// void updateMicroinverters();
void updateMicroinverters(std::vector<std::string> &parametersToGet, bool allParameters, std::vector<long long> &microinvertersToGet);
// void printMicroinverters();
void printMicroinverters(std::vector<std::string> &parametersToGet, bool allParameters, std::vector<long long> &microinvertersToGet);
~Dtu();
};
#endif