mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2026-02-11 07:03:07 +01:00
correctly set the mode/type for serial channels
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "GwBuffer.h"
|
||||
#include "GwSocketConnection.h"
|
||||
#include "GwSocketHelper.h"
|
||||
#include "GwHardware.h"
|
||||
|
||||
GwSocketServer::GwSocketServer(const GwConfigHandler *config, GwLog *logger, int minId)
|
||||
{
|
||||
@@ -185,4 +186,6 @@ int GwSocketServer::numClients()
|
||||
}
|
||||
GwSocketServer::~GwSocketServer()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
int GwSocketServer::getType() {return GWSERIAL_TYPE_BI;}
|
||||
@@ -27,5 +27,6 @@ class GwSocketServer: public GwChannelInterface{
|
||||
virtual size_t sendToClients(const char *buf,int sourceId, bool partialWrite=false);
|
||||
int numClients();
|
||||
virtual void readMessages(GwMessageFetcher *writer);
|
||||
virtual int getType() override;
|
||||
};
|
||||
#endif
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <functional>
|
||||
#include <ESPmDNS.h>
|
||||
#include "GwSocketHelper.h"
|
||||
#include "GwHardware.h"
|
||||
|
||||
class ResolveArgs{
|
||||
public:
|
||||
@@ -291,4 +292,6 @@ void GwTcpClient::setResolved(IPAddress addr, bool valid){
|
||||
GwTcpClient::ResolvedAddress GwTcpClient::getResolved(){
|
||||
GWSYNCHRONIZED(locker);
|
||||
return resolvedAddress;
|
||||
}
|
||||
}
|
||||
|
||||
int GwTcpClient::getType(){return GWSERIAL_TYPE_BI;}
|
||||
@@ -53,4 +53,5 @@ public:
|
||||
virtual void readMessages(GwMessageFetcher *writer);
|
||||
bool isConnected();
|
||||
String getError(){return error;}
|
||||
virtual int getType() override;
|
||||
};
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "GwSocketConnection.h"
|
||||
#include "GwSocketHelper.h"
|
||||
#include "GWWifi.h"
|
||||
#include "GwHardware.h"
|
||||
|
||||
|
||||
GwUdpReader::GwUdpReader(const GwConfigHandler *config, GwLog *logger, int minId)
|
||||
@@ -164,4 +165,5 @@ size_t GwUdpReader::sendToClients(const char *buf, int source,bool partial)
|
||||
|
||||
GwUdpReader::~GwUdpReader()
|
||||
{
|
||||
}
|
||||
}
|
||||
int GwUdpReader::getType(){return GWSERIAL_TYPE_BI;}
|
||||
@@ -41,5 +41,6 @@ class GwUdpReader: public GwChannelInterface{
|
||||
virtual void loop(bool handleRead=true,bool handleWrite=true);
|
||||
virtual size_t sendToClients(const char *buf,int sourceId, bool partialWrite=false);
|
||||
virtual void readMessages(GwMessageFetcher *writer);
|
||||
virtual int getType() override;
|
||||
};
|
||||
#endif
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "GwSocketConnection.h"
|
||||
#include "GwSocketHelper.h"
|
||||
#include "GWWifi.h"
|
||||
#include "GwHardware.h"
|
||||
|
||||
GwUdpWriter::WriterSocket::WriterSocket(GwLog *l,int p,const String &src,const String &dst, SourceMode sm) :
|
||||
sourceMode(sm), source(src), destination(dst), port(p),logger(l)
|
||||
@@ -200,4 +201,6 @@ size_t GwUdpWriter::sendToClients(const char *buf, int source,bool partial)
|
||||
|
||||
GwUdpWriter::~GwUdpWriter()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
int GwUdpWriter::getType() {return GWSERIAL_TYPE_BI;}
|
||||
@@ -69,5 +69,6 @@ class GwUdpWriter: public GwChannelInterface{
|
||||
virtual void loop(bool handleRead=true,bool handleWrite=true);
|
||||
virtual size_t sendToClients(const char *buf,int sourceId, bool partialWrite=false);
|
||||
virtual void readMessages(GwMessageFetcher *writer);
|
||||
virtual int getType() override;
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user