2024-03-29 21:40:50 +01:00
|
|
|
#ifndef SUNSPEC_H
|
|
|
|
|
#define SUNSPEC_H
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
#include <memory>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
#include "modbus.h"
|
|
|
|
|
#include "sunspecParametersGeneric.h"
|
|
|
|
|
|
|
|
|
|
class Sunspec {
|
|
|
|
|
protected:
|
2024-04-09 12:21:21 +02:00
|
|
|
modbus_t *modbus;
|
2024-03-29 21:40:50 +01:00
|
|
|
|
|
|
|
|
std::vector<std::shared_ptr<SunspecParameter>> parameters;
|
|
|
|
|
|
|
|
|
|
std::string manufacturer;
|
|
|
|
|
std::string model;
|
|
|
|
|
std::string version;
|
|
|
|
|
|
|
|
|
|
std::string serialNumber;
|
|
|
|
|
uint16_t deviceAddress;
|
|
|
|
|
|
|
|
|
|
int sunspecAddress;
|
|
|
|
|
|
|
|
|
|
void setValues();
|
|
|
|
|
|
|
|
|
|
void populateParameters();
|
|
|
|
|
|
|
|
|
|
public:
|
2024-04-09 12:21:21 +02:00
|
|
|
Sunspec(int address, modbus_t *modbus);
|
2024-03-29 21:40:50 +01:00
|
|
|
|
|
|
|
|
uint16_t getAddress();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|