JBImprov
Improv Wi-Fi provisioning over serial and Bluetooth LE
Loading...
Searching...
No Matches
JBImprovStringReader Class Reference

Reads length prefixed strings from RPC command data. More...

#include <JBImprovProtocol.h>

Public Member Functions

 JBImprovStringReader (const uint8_t *data, size_t length)
 Read from length bytes at data. The data is not copied.
bool next (const char *&value, size_t &length)
 Read the next string. The string is not null terminated.
bool next (char *buffer, size_t size)
 Read the next string into a null terminated buffer.
bool atEnd () const
 true when all data has been read.

Detailed Description

Reads length prefixed strings from RPC command data.

Member Function Documentation

◆ next() [1/2]

bool JBImprovStringReader::next ( char * buffer,
size_t size )

Read the next string into a null terminated buffer.

Returns
false if there is no more data, the string is truncated or it doesn't fit in size - 1 bytes.

◆ next() [2/2]

bool JBImprovStringReader::next ( const char *& value,
size_t & length )

Read the next string. The string is not null terminated.

Returns
false if there is no more data or the string is truncated.

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