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