Initial lib commit with cmake
This commit is contained in:
commit
e39d6cda18
31 changed files with 7172 additions and 0 deletions
48
inc/microinverter.h
Normal file
48
inc/microinverter.h
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
#ifndef MICROINVERTER_H
|
||||
#define MICROINVERTER_H
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "modbus.h"
|
||||
#include "port.h"
|
||||
#include "sunspec.h"
|
||||
|
||||
class Microinverter {
|
||||
private:
|
||||
modbus_t *modbus;
|
||||
|
||||
Sunspec sunspec;
|
||||
|
||||
int startAddress;
|
||||
|
||||
int statusStartAddress;
|
||||
|
||||
public:
|
||||
Microinverter(modbus_t *modbus, int startAddress, long long serialNumber);
|
||||
|
||||
long long serialNumber;
|
||||
|
||||
int age;
|
||||
|
||||
std::vector<Port> ports;
|
||||
|
||||
// void updatePorts(std::vector<std::string> ¶metersToGet, bool allParameters);
|
||||
|
||||
void updateParameters(std::vector<std::string> ¶metersToGet, bool allParameters);
|
||||
|
||||
void updateStatusParameters();
|
||||
|
||||
void printPorts(std::vector<std::string> ¶metersToGet, bool allParameters, bool shortNames);
|
||||
|
||||
long long getTodayProduction();
|
||||
|
||||
long long getTotalProduction();
|
||||
|
||||
void setStatus(std::vector<std::pair<int, uint16_t>> portsToSet, std::string statusName);
|
||||
|
||||
void setStatusWholeMicroinverter(uint16_t value, std::string statusName);
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue