Backend is mostly done, mapping out the plant automagically works
This commit is contained in:
parent
ce64341ccc
commit
b48d2241d2
5 changed files with 64 additions and 27 deletions
|
|
@ -19,6 +19,8 @@ class Dtu {
|
|||
|
||||
void populateMicroinverters();
|
||||
|
||||
std::pair<bool, Microinverter*> getMicroinverterBySerialNumber(long serialNumber);
|
||||
|
||||
public:
|
||||
Dtu(const char *ip_address, int port);
|
||||
|
||||
|
|
|
|||
|
|
@ -15,12 +15,14 @@ class Microinverter {
|
|||
std::shared_ptr<modbus_t*> modbus_context;
|
||||
std::mutex *modbus_context_mutex;
|
||||
|
||||
std::vector<Port> ports;
|
||||
|
||||
void populatePorts();
|
||||
|
||||
|
||||
public:
|
||||
Microinverter(std::shared_ptr<modbus_t*> modbus_context, std::mutex *modbus_context_mutex);
|
||||
Microinverter(std::shared_ptr<modbus_t*> modbus_context, std::mutex *modbus_context_mutex, long serialNumber);
|
||||
|
||||
long serialNumber;
|
||||
|
||||
std::vector<Port> ports;
|
||||
|
||||
void updatePorts();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue