Polymorphism "works"
This commit is contained in:
parent
b0e50c140e
commit
d0f8e5b885
10 changed files with 274 additions and 287 deletions
29
inc/hoymiles/microinverter.h
Normal file
29
inc/hoymiles/microinverter.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#ifndef MICROINVERTER_H
|
||||
#define MICROINVERTER_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "port.h"
|
||||
|
||||
struct _modbus;
|
||||
typedef _modbus modbus_t;
|
||||
|
||||
class Microinverter {
|
||||
private:
|
||||
modbus_t *modbus_context;
|
||||
|
||||
std::vector<Port> ports;
|
||||
|
||||
void populatePorts();
|
||||
|
||||
public:
|
||||
Microinverter(modbus_t *modbus_t);
|
||||
|
||||
void updatePorts();
|
||||
|
||||
void updatePort(int i);
|
||||
|
||||
Port getPort(int i);
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue