Header: utils/inc/qshPb.h
Structures
qshPb::pb_buffer_arg
Simple buffer descriptor used by nanopb callbacks.
Members
Pointer to input/output buffer.
Length of buffer in bytes.
qshPb::decode_context_data
Members
Functions
encode_bytes_callback
----------------- Encoding callbacks -----------------
Encode bytes field from a provided buffer.
Parameters
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
Returns
true on success, false otherwise.
encode_nowakeup_msg_ids
Encode repeated fixed32 message IDs (no-wakeup IDs).
Parameters
Target field metadata (repeated fixed32).
Pointer to const std::vector<uint32_t>.
Returns
true on success, false otherwise.
encode_string_cb
Encode repeated strings.
Parameters
Target field metadata (repeated fixed32).
Pointer to const std::vector<uint32_t>.
Returns
true on success, false otherwise.
decode_payload
----------------- Decoding callbacks -----------------
Parameters
Pointer to pb_buffer_arg*.
Returns
true on success, false otherwise.
decode_string
Decode a string field to a std::string.
Parameters
Returns
true on success, false otherwise.
decode_suid
Decode sns_std_suid entries into a vector.
Parameters
Source field metadata (submessage).
Pointer to std::vector<sns_std_suid>*.
Returns
true on success, false otherwise.
decode_float_array
Decode repeated float values into a vector.
Parameters
Source field metadata (repeated fixed32 or float).
Pointer to std::vector<float>*.
Returns
true on success, false otherwise.
decode_repeated_enum
Decode repeated enum values into a vector.
Parameters
Source field metadata (repeated fixed32 or float).
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
Optional label printed before the dump.
Macros
PB_DEBUG