Initial release commit
This commit is contained in:
commit
0e25af7ef8
15 changed files with 12511 additions and 0 deletions
39
inc/hoymiles/dtu.h
Normal file
39
inc/hoymiles/dtu.h
Normal 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> ¶metersToGet, bool allParameters, std::vector<long long> µinvertersToGet);
|
||||
|
||||
// void printMicroinverters();
|
||||
|
||||
void printMicroinverters(std::vector<std::string> ¶metersToGet, bool allParameters, std::vector<long long> µinvertersToGet);
|
||||
|
||||
~Dtu();
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue