nl::Weave::Profiles::ReferencedString
#include <src/lib/profiles/common/WeaveMessage.h>
Here's how to handle strings in Weave.
Summary
This class has 8-bit and 16-bit variants.
Inheritance
Inherits from:
nl::Weave::Profiles::RetainedPacketBuffer
Constructors and Destructors
|
ReferencedString(void)
The no-arg constructor for referenced strings.
|
Public attributes
theLength
uint16_t theLength
theString
char * theString
Public functions
ReferencedString
ReferencedString(
void
)
The no-arg constructor for referenced strings.
init
WEAVE_ERROR init(
uint16_t aLength,
char *aString
)
init
WEAVE_ERROR init(
uint8_t aLength,
char *aString
)
operator==
bool operator==(
const ReferencedString &
) const
Details |
Parameters |
&aReferencedString
|
A string to check against.
|
|
Return Values |
true
|
The strings are equal.
|
false
|
The strings are not equal.
|
|
printString
char * printString(
void
)
Details |
Returns
|
A printable string
|
Public static functions
parse
WEAVE_ERROR parse(
MessageIterator &,
ReferencedString &
)
Details |
Parameters |
&i
|
An iterator over the message being parsed.
|
&aString
|
A place to put the result of parsing.
|
|
Return Values |
WEAVE_NO_ERROR
|
String parsed successfully.
|
WEAVE_ERROR_INVALID_STRING_LENGTH
|
The string is too long for the buffer (this should never happen).
|
|