ArduinoDumbDisplay v0.9.9-r34
DumbDisplay Arduino Library -- https://github.com/trevorwslee/Arduino-DumbDisplay
 
Loading...
Searching...
No Matches
DDBufferedTunnel Class Reference

Class for DD "tunnel", with buffering support; created with DumbDisplay::createBasicTunnel() More...

#include <dumbdisplay.h>

Inheritance diagram for DDBufferedTunnel:
DDTunnel DDObject GpsServiceDDTunnel ImageRetrieverDDTunnel ObjectDetectDemoServiceDDTunnel SimpleToolDDTunnel

Public Member Functions

 DDBufferedTunnel (const String &type, int8_t tunnelId, const String &params, const String &endPoint, int8_t bufferSize)
 for internal use only
 
virtual void release ()
 
virtual void reconnect ()
 
virtual void handleInput (const String &data, uint8_t *fbBytes, bool final)
 
bool pending ()
 
int count ()
 count buffer ready read
 
bool eof (long timeoutMillis=DD_DEF_TUNNEL_TIMEOUT)
 
bool timedOut ()
 check whether EOF caused by timeout or not; note that timeout is only due to check of EOF with DDBufferedTunnel::eof() with timeoutMillis set
 
String readLine ()
 read a line from buffer
 
bool readLine (String &buffer)
 read a line from buffer, in to the buffer passed in
 
void writeLine (const String &data)
 write a line
 
bool read (String &fieldId, String &fieldValue)
 read a piece of JSON data
 
- Public Member Functions inherited from DDTunnel
 DDTunnel (const String &type, int8_t tunnelId, const String &params, const String &endPoint)
 for internal use only
 
void afterConstruct (bool connectNow)
 
const String & getEndpoint ()
 
virtual void release ()
 
virtual void reconnect ()
 
void reconnectTo (const String &endPoint)
 
void reconnectToSetParams (const String &endPoint, const String &params)
 
void reconnectToEndpoint (const DDTunnelEndpoint endpoint)
 reconnect to specified endpoint. See DDTunnelEndpoint.
 
const String & getTunnelId () const
 
virtual void handleInput (const String &data, uint8_t *fbBytes, bool final)
 

Protected Member Functions

int _count ()
 
virtual bool _eof (long timeoutMillis)
 
bool _readLine (String &buffer, uint8_t **pFBBytes=NULL)
 
- Protected Member Functions inherited from DDTunnel
bool _pending ()
 
bool _timedOut ()
 
virtual bool _eof (long timeoutMillis)
 
void _writeLine (const String &data)
 
void _writeSound (const String &soundName)
 
void doneHandleInput (bool final)
 

Additional Inherited Members

- Public Attributes inherited from DDObject
int8_t objectType
 object type – DD_OBJECT_TYPE_LAYER or DD_OBJECT_TYPE_TUNNEL
 
String customData
 custom data
 
- Protected Attributes inherited from DDTunnel
String type
 
String tunnelId
 
String endPoint
 
String headers
 
String attachmentId
 
String params
 
unsigned long connectMillis
 

Detailed Description

Class for DD "tunnel", with buffering support; created with DumbDisplay::createBasicTunnel()

Member Function Documentation

◆ _eof()

virtual bool DDBufferedTunnel::_eof ( long  timeoutMillis)
protectedvirtual

Reimplemented from DDTunnel.

◆ eof()

bool DDBufferedTunnel::eof ( long  timeoutMillis = DD_DEF_TUNNEL_TIMEOUT)
inline

reached EOF?

Parameters
timeoutMillistimeout in millis; see DDTunnel::timedOut()
Returns
true if EOF (or timed out)

◆ handleInput()

virtual void DDBufferedTunnel::handleInput ( const String &  data,
uint8_t *  fbBytes,
bool  final 
)
virtual
Attention
for internal use only

Reimplemented from DDTunnel.

◆ reconnect()

virtual void DDBufferedTunnel::reconnect ( )
virtual

Reimplemented from DDTunnel.

◆ release()

virtual void DDBufferedTunnel::release ( )
virtual

Reimplemented from DDTunnel.