Skip to main content
Header: utils/inc/qshPb.h

Structures

qshPb::pb_buffer_arg

Simple buffer descriptor used by nanopb callbacks. Members
const void *
Pointer to input/output buffer.
size_t
Length of buffer in bytes.

qshPb::decode_context_data

Members
float *
size_t
size_t

Functions

encode_bytes_callback

----------------- Encoding callbacks ----------------- Encode bytes field from a provided buffer.
Parameters
pb_ostream_t *
Nanopb output stream.
const pb_field_t *
Target field metadata.
void *const *
Pointer to pb_buffer_arg (const void*).
Returns true on success, false otherwise.

encode_cstring_cb

Encode a C-string (UTF-8) for a string field.
Parameters
pb_ostream_t *
Nanopb output stream.
const pb_field_t *
Target field metadata.
void *const *
Pointer to const char*.
Returns true on success, false otherwise.

encode_nowakeup_msg_ids

Encode repeated fixed32 message IDs (no-wakeup IDs).
Parameters
pb_ostream_t *
Nanopb output stream.
const pb_field_t *
Target field metadata (repeated fixed32).
void *const *
Pointer to const std::vector<uint32_t>.
Returns true on success, false otherwise.

encode_string_cb

Encode repeated strings.
Parameters
pb_ostream_t *
Nanopb output stream.
const pb_field_t *
Target field metadata (repeated fixed32).
void *const *
Pointer to const std::vector<uint32_t>.
Returns true on success, false otherwise.

decode_payload

----------------- Decoding callbacks -----------------
Parameters
pb_istream_t *
Nanopb input stream.
const pb_field_t *
Source field metadata.
void **
Pointer to pb_buffer_arg*.
Returns true on success, false otherwise.

decode_string

Decode a string field to a std::string.
Parameters
pb_istream_t *
Nanopb input stream.
const pb_field_t *
Source field metadata.
void **
Pointer to std::string*.
Returns true on success, false otherwise.

decode_suid

Decode sns_std_suid entries into a vector.
Parameters
pb_istream_t *
Nanopb input stream.
const pb_field_t *
Source field metadata (submessage).
void **
Pointer to std::vector<sns_std_suid>*.
Returns true on success, false otherwise.

decode_float_array

Decode repeated float values into a vector.
Parameters
pb_istream_t *
Nanopb input stream.
const pb_field_t *
Source field metadata (repeated fixed32 or float).
void **
Pointer to std::vector<float>*.
Returns true on success, false otherwise.

decode_repeated_enum

Decode repeated enum values into a vector.
Parameters
pb_istream_t *
Nanopb input stream.
Source field metadata (repeated fixed32 or float).
void **
Pointer to std::vector<float>*.
Returns true on success, false otherwise.

printHex

----------------- Utilities ----------------- Print a hex dump of the given buffer (16 bytes per row).
Parameters
const pb_byte_t *
Pointer to data.
size_t
Size in bytes.
const char *
Optional label printed before the dump.

Macros

PB_DEBUG