Polymorphism "works"

This commit is contained in:
TraYali 2024-03-16 21:15:15 +01:00
parent b0e50c140e
commit d0f8e5b885
10 changed files with 274 additions and 287 deletions

View 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