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

Builds the data part of an RPC result: a list of length prefixed strings. More...

#include <JBImprovProtocol.h>

Public Member Functions

void clear ()
 Remove all strings.
bool add (const char *value)
 Append a string.
bool add (const char *value, size_t length)
 Append a string of a given length.
bool addNumber (long value)
 Append an integer as a decimal string.
size_t remaining () const
 Bytes left for more strings, including their length prefixes.
const uint8_t * data () const
 The encoded strings.
uint8_t length () const
 Number of bytes in data().

Detailed Description

Builds the data part of an RPC result: a list of length prefixed strings.

Member Function Documentation

◆ add() [1/2]

bool JBImprovResultBuilder::add ( const char * value)

Append a string.

Returns
false if it doesn't fit; the result is unchanged then.

◆ add() [2/2]

bool JBImprovResultBuilder::add ( const char * value,
size_t length )

Append a string of a given length.

Returns
false if it doesn't fit.

◆ addNumber()

bool JBImprovResultBuilder::addNumber ( long value)

Append an integer as a decimal string.

Returns
false if it doesn't fit.

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