Relase 2.5 #21
2 changed files with 20 additions and 1 deletions
|
|
@ -14,6 +14,10 @@ class Dtu {
|
||||||
|
|
||||||
std::vector<Microinverter> microinverters;
|
std::vector<Microinverter> microinverters;
|
||||||
|
|
||||||
|
Port dtuPort;
|
||||||
|
|
||||||
|
int rtuId;
|
||||||
|
|
||||||
bool connected;
|
bool connected;
|
||||||
|
|
||||||
void populateMicroinverters();
|
void populateMicroinverters();
|
||||||
|
|
@ -21,6 +25,8 @@ class Dtu {
|
||||||
public:
|
public:
|
||||||
Dtu(const char *address, int id, bool rtu, bool tcp);
|
Dtu(const char *address, int id, bool rtu, bool tcp);
|
||||||
|
|
||||||
|
Dtu(modbus_t *modbus, int id);
|
||||||
|
|
||||||
std::pair<Microinverter *, bool> getMicroinverterBySerialNumber(long long serialNumber);
|
std::pair<Microinverter *, bool> getMicroinverterBySerialNumber(long long serialNumber);
|
||||||
|
|
||||||
bool isConnected();
|
bool isConnected();
|
||||||
|
|
@ -35,6 +41,15 @@ class Dtu {
|
||||||
|
|
||||||
void listOfMicroinverters();
|
void listOfMicroinverters();
|
||||||
|
|
||||||
|
float getCurrentPower();
|
||||||
|
|
||||||
|
int getCurrentOnOff();
|
||||||
|
|
||||||
|
void turnOffMicroinverters();
|
||||||
|
void turnOnMicroinverters();
|
||||||
|
|
||||||
|
void limitMicroinverters(uint16_t limit);
|
||||||
|
|
||||||
~Dtu();
|
~Dtu();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ class Microinverter {
|
||||||
private:
|
private:
|
||||||
modbus_t *modbus;
|
modbus_t *modbus;
|
||||||
|
|
||||||
Sunspec sunspec;
|
// Sunspec sunspec;
|
||||||
|
|
||||||
int startAddress;
|
int startAddress;
|
||||||
|
|
||||||
|
|
@ -43,6 +43,10 @@ class Microinverter {
|
||||||
void setStatus(std::vector<std::pair<int, uint16_t>> portsToSet, std::string statusName);
|
void setStatus(std::vector<std::pair<int, uint16_t>> portsToSet, std::string statusName);
|
||||||
|
|
||||||
void setStatusWholeMicroinverter(uint16_t value, std::string statusName);
|
void setStatusWholeMicroinverter(uint16_t value, std::string statusName);
|
||||||
|
|
||||||
|
float getCurrentPower();
|
||||||
|
|
||||||
|
int getCurrentOnOff();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Loading…
Add table
Add a link
Reference in a new issue