Initial lib commit with cmake

This commit is contained in:
TraYali 2024-04-10 18:25:36 +02:00
commit e39d6cda18
31 changed files with 7172 additions and 0 deletions

37
inc/sunspec.h Normal file
View file

@ -0,0 +1,37 @@
#ifndef SUNSPEC_H
#define SUNSPEC_H
#include <string>
#include <stdint.h>
#include <memory>
#include <vector>
#include "modbus.h"
#include "sunspecParametersGeneric.h"
class Sunspec {
protected:
modbus_t *modbus;
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:
Sunspec(int address, modbus_t *modbus);
uint16_t getAddress();
};
#endif