mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-16 07:23:07 +01:00
intermediate: restructure buffer handling
This commit is contained in:
@@ -3,14 +3,12 @@
|
||||
#include "HardwareSerial.h"
|
||||
#include "GwLog.h"
|
||||
#include "GwBuffer.h"
|
||||
class SerialWriter;
|
||||
class GwSerialStream;
|
||||
class GwSerial{
|
||||
private:
|
||||
GwBuffer *buffer;
|
||||
GwBuffer *readBuffer=NULL;
|
||||
GwLog *logger;
|
||||
SerialWriter *writer;
|
||||
int num;
|
||||
bool initialized=false;
|
||||
bool allowRead=true;
|
||||
@@ -27,7 +25,7 @@ class GwSerial{
|
||||
bool isInitialized();
|
||||
size_t sendToClients(const char *buf,int sourceId,bool partial=false);
|
||||
void loop(bool handleRead=true);
|
||||
bool readMessages(GwBufferWriter *writer);
|
||||
bool readMessages(GwMessageFetcher *writer);
|
||||
void flush();
|
||||
Stream *getStream(bool partialWrites);
|
||||
friend GwSerialStream;
|
||||
|
||||
Reference in New Issue
Block a user