tcMenu
Public Member Functions | Protected Attributes | List of all members
tcremote::BaseBufferedRemoteTransport Class Referenceabstract

#include <BaseBufferedRemoteTransport.h>

Inheritance diagram for tcremote::BaseBufferedRemoteTransport:
TagValueTransport

Public Member Functions

 BaseBufferedRemoteTransport (BufferingMode bufferMode, uint8_t readBufferSize, uint8_t writeBufferSize, EncryptionHandler *encHandler=nullptr)
 
void endMsg () override
 
int writeChar (char data) override
 
int writeStr (const char *data) override
 
uint8_t readByte () override
 
bool readAvailable () override
 
void close () override
 
void flushIfRequired ()
 
void flushInternal ()
 
virtual int fillReadBuffer (uint8_t *dataBuffer, int maxSize)=0
 
- Public Member Functions inherited from TagValueTransport
 TagValueTransport (TagValueTransportType type)
 
virtual void startMsg (uint16_t msgType)
 
void startBinMsg (uint16_t msgType, uint16_t byteLen)
 
void writeField (uint16_t field, const char *value)
 
void writeFieldInt (uint16_t field, int value)
 
void writeFieldLong (uint16_t field, long value)
 
FieldAndValuefieldIfAvailable ()
 
void clearFieldStatus (FieldValueType ty=FVAL_PROCESSING)
 
TagValueTransportType getTransportType ()
 
virtual void flush ()=0
 
virtual bool available ()=0
 
virtual bool connected ()=0
 

Protected Attributes

const uint16_t writeBufferSize
 
const uint16_t readBufferSize
 
uint8_t * readBuffer
 
uint8_t * writeBuffer
 
uint8_t * encryptionBuffer
 
uint16_t writeBufferPos
 
uint16_t readBufferPos
 
uint16_t encryptionBufferPos
 
uint16_t readBufferAvail
 
EncryptionHandlerencryptionHandler
 
BufferingMode mode
 
uint8_t ticksSinceWrite
 
- Protected Attributes inherited from TagValueTransport
FieldAndValue currentField
 
TagValueTransportType transportType
 
uint8_t protocolUsed
 

Detailed Description

Many transports need buffering of messages, for example the regular Ethernet2 library will send a character at a time with no buffering. The BLE driver requires buffering because it is only legal to send single full messages at a time. Some other drivers can benefit from some level of buffering. To avoid writing this code many times in different contexts it is available in this core package.


The documentation for this class was generated from the following files: