Implemented parameters, made it granular
This commit is contained in:
parent
70b27a0c07
commit
2c27810dfe
7 changed files with 84 additions and 123 deletions
|
|
@ -4,22 +4,14 @@
|
|||
#include <vector>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
// #include <mutex>
|
||||
|
||||
#include "microinverter.h"
|
||||
#include "modbus.h"
|
||||
|
||||
// struct _modbus;
|
||||
// typedef _modbus modbus_t;
|
||||
|
||||
class Dtu {
|
||||
private:
|
||||
// std::shared_ptr<modbus_t*> modbus_context;
|
||||
|
||||
std::shared_ptr<class modbus> modbus;
|
||||
|
||||
// std::mutex modbus_context_mutex;
|
||||
|
||||
std::vector<Microinverter> microinverters;
|
||||
|
||||
bool connected;
|
||||
|
|
@ -33,13 +25,13 @@ class Dtu {
|
|||
|
||||
bool isConnected();
|
||||
|
||||
void updateMicroinverters();
|
||||
// void updateMicroinverters();
|
||||
|
||||
void updateMicroinverters(std::vector<std::string> ¶metersToGet);
|
||||
void updateMicroinverters(std::vector<std::string> ¶metersToGet, bool allParameters, std::vector<long> µinvertersToGet);
|
||||
|
||||
void printMicroinverters();
|
||||
// void printMicroinverters();
|
||||
|
||||
void printMicroinverters(std::vector<std::string> ¶metersToGet);
|
||||
void printMicroinverters(std::vector<std::string> ¶metersToGet, bool allParameters, std::vector<long> µinvertersToGet);
|
||||
|
||||
~Dtu();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -30,17 +30,17 @@ class Microinverter {
|
|||
|
||||
std::vector<Port> ports;
|
||||
|
||||
void updatePorts();
|
||||
// void updatePorts();
|
||||
|
||||
void updatePorts(std::vector<std::string> ¶metersToGet);
|
||||
void updatePorts(std::vector<std::string> ¶metersToGet, bool allParameters);
|
||||
|
||||
void updatePort(int i);
|
||||
|
||||
Port getPort(int i);
|
||||
|
||||
void printPorts();
|
||||
// void printPorts();
|
||||
|
||||
void printPorts(std::vector<std::string> ¶metersToGet);
|
||||
void printPorts(std::vector<std::string> ¶metersToGet, bool allParameters);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -26,13 +26,13 @@ class Port {
|
|||
|
||||
std::vector<std::shared_ptr<PortParameter>> parameters;
|
||||
|
||||
void updateParameters();
|
||||
// void updateParameters();
|
||||
|
||||
void updateParameters(std::vector<std::string> ¶metersToGet);
|
||||
void updateParameters(std::vector<std::string> ¶metersToGet, bool allParameters);
|
||||
|
||||
void printParameters();
|
||||
// void printParameters();
|
||||
|
||||
void printParameters(std::vector<std::string> ¶metersToGet);
|
||||
void printParameters(std::vector<std::string> ¶metersToGet, bool allParameters);
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue