1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-16 07:23:07 +01:00

intermediate,untested: reorganize channel handling

This commit is contained in:
andreas
2024-11-03 16:15:52 +01:00
parent 56ec7a0406
commit c6f601377c
8 changed files with 249 additions and 224 deletions

View File

@@ -28,13 +28,10 @@ class GwChannelList{
GwConfigHandler *config;
typedef std::vector<GwChannel *> ChannelList;
ChannelList theChannels;
std::map<int,String> modes;
GwSocketServer *sockets;
GwTcpClient *client;
void addSerial(GwSerial::SerialWrapperBase *stream,const String &mode,int rx,int tx);
void addSerial(GwSerial::SerialWrapperBase *stream,int type,int rx,int tx);
public:
void addSerial(int id, int rx, int tx, int type);
void addChannel(GwChannel *);
GwChannelList(GwLog *logger, GwConfigHandler *config);
typedef std::function<void(GwChannel *)> ChannelAction;
void allChannels(ChannelAction action);