Initial release commit
This commit is contained in:
commit
0e25af7ef8
15 changed files with 12511 additions and 0 deletions
38
inc/hoymiles/port.h
Normal file
38
inc/hoymiles/port.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#ifndef PORT_H
|
||||
#define PORT_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "portParametersGeneric.h"
|
||||
#include "modbus.h"
|
||||
|
||||
class Port {
|
||||
private:
|
||||
std::shared_ptr<class modbus> modbus;
|
||||
|
||||
uint16_t portStartAddress;
|
||||
|
||||
void populateParameters();
|
||||
|
||||
std::pair<std::shared_ptr<PortParameter>, bool> getParameterByName(std::string name);
|
||||
|
||||
void fixCurrent();
|
||||
bool currentFixed;
|
||||
|
||||
public:
|
||||
Port(std::shared_ptr<class modbus> modbus, uint16_t portStartAddress);
|
||||
|
||||
std::vector<std::shared_ptr<PortParameter>> parameters;
|
||||
|
||||
// void updateParameters();
|
||||
|
||||
void updateParameters(std::vector<std::string> ¶metersToGet, bool allParameters);
|
||||
|
||||
// void printParameters();
|
||||
|
||||
void printParameters(std::vector<std::string> ¶metersToGet, bool allParameters);
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue