Polymorphism "works"
This commit is contained in:
parent
b0e50c140e
commit
d0f8e5b885
10 changed files with 274 additions and 287 deletions
27
inc/hoymiles/dtu.h
Normal file
27
inc/hoymiles/dtu.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef DTU_H
|
||||
#define DTU_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "microinverter.h"
|
||||
|
||||
struct _modbus;
|
||||
typedef _modbus modbus_t;
|
||||
|
||||
class Dtu {
|
||||
private:
|
||||
modbus_t *modbus_context;
|
||||
|
||||
std::vector<Microinverter> microinverters;
|
||||
|
||||
void populateMicroinverters();
|
||||
|
||||
public:
|
||||
Dtu(const char *ip_address, int port);
|
||||
|
||||
void updateMicroinverters();
|
||||
|
||||
~Dtu();
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue