|
| template<typename T > |
| static uint8_t * | encode_varint_raw_loop (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, T value) |
| | Write a multi-byte varint directly through a pos pointer.
|
| |
| static uint8_t *ESPHOME_ALWAYS_INLINE | encode_varint_raw (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t value) |
| |
| static uint8_t *ESPHOME_ALWAYS_INLINE | encode_varint_raw_short (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t value) |
| | Encode a varint that is expected to be 1-2 bytes (e.g. zigzag RSSI, small lengths).
|
| |
| static uint8_t *ESPHOME_ALWAYS_INLINE | encode_varint_raw_64 (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint64_t value) |
| |
| static uint8_t *ESPHOME_ALWAYS_INLINE | encode_varint_raw_48bit (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint64_t value) |
| | Encode a 48-bit MAC address (stored in a uint64) as varint.
|
| |
| static uint8_t *ESPHOME_ALWAYS_INLINE | encode_field_raw (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, uint32_t type) |
| |
| static uint8_t *ESPHOME_ALWAYS_INLINE | write_raw_byte (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint8_t b) |
| | Write a single precomputed tag byte. Tag must be < 128.
|
| |
| static uint8_t *ESPHOME_ALWAYS_INLINE | reserve_byte (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM) |
| | Reserve one byte for later backpatch (e.g., sub-message length).
|
| |
| static uint8_t *ESPHOME_ALWAYS_INLINE | encode_raw (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, const void *data, size_t len) |
| | Write raw bytes to the buffer (no tag, no length prefix).
|
| |
| static uint8_t * | encode_short_string_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint8_t tag, const StringRef &ref) |
| | Encode tag + 1-byte length + raw string data.
|
| |
| static uint8_t * | encode_short_progmem_string_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint8_t tag, const ProgmemStringRef &ref) |
| | encode_short_string_force for a string that may be in flash (PROGMEM).
|
| |
| static PROTO_OUTLINE_FOR_SIZE uint8_t * | write_tag_and_fixed32 (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint8_t tag, uint32_t value) |
| | Write a precomputed tag byte + 32-bit value. Outlined on embedded: one copy beats inline stores per field.
|
| |
| static uint8_t * | encode_string_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, const char *string, size_t len) |
| |
| static uint8_t * | encode_string (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, const char *string, size_t len) |
| |
| static uint8_t * | encode_string_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, const std::string &value) |
| |
| static uint8_t * | encode_string (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, const StringRef &ref) |
| |
| static uint8_t * | encode_string_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, const StringRef &ref) |
| |
| static uint8_t * | encode_bytes (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, const uint8_t *data, size_t len) |
| |
| static uint8_t * | encode_bytes_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, const uint8_t *data, size_t len) |
| |
| static uint8_t * | encode_progmem_bytes (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, const uint8_t *data, size_t len) |
| | encode_bytes for data in flash (PROGMEM), which ESP8266 can only read with progmem_memcpy.
|
| |
| static uint8_t * | encode_progmem_bytes_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, const uint8_t *data, size_t len) |
| |
| static uint8_t * | encode_progmem_string (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, const ProgmemStringRef &ref) |
| | encode_progmem_bytes for a string field that may be in flash.
|
| |
| static uint8_t * | encode_progmem_string_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, const ProgmemStringRef &ref) |
| |
| static uint8_t * | encode_uint32_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, uint32_t value) |
| |
| static uint8_t * | encode_uint32 (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, uint32_t value) |
| |
| static uint8_t * | encode_uint64_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, uint64_t value) |
| |
| static uint8_t * | encode_uint64 (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, uint64_t value) |
| |
| static uint8_t * | encode_bool_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, bool value) |
| |
| static uint8_t * | encode_bool (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, bool value) |
| |
| static PROTO_OUTLINE_FOR_SIZE uint8_t * | encode_fixed32_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, uint32_t value) |
| | Tag + fixed32 for multi-byte tags; single-byte tags use write_tag_and_fixed32.
|
| |
| static uint8_t * | encode_fixed32 (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, uint32_t value) |
| |
| static uint8_t * | encode_float (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, float value) |
| |
| static uint8_t * | encode_float_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, float value) |
| |
| static uint8_t * | encode_int32_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, int32_t value) |
| |
| static uint8_t * | encode_int32 (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, int32_t value) |
| |
| static uint8_t * | encode_int64 (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, int64_t value) |
| |
| static uint8_t * | encode_int64_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, int64_t value) |
| |
| static uint8_t * | encode_sint32 (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, int32_t value) |
| |
| static uint8_t * | encode_sint32_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, int32_t value) |
| |
| static uint8_t * | encode_sint64 (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, int64_t value) |
| |
| static uint8_t * | encode_sint64_force (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, int64_t value) |
| |
| template<typename T > |
| static uint8_t * | encode_sub_message (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, const T &value) |
| | Repeated sub-message element; the constant tag is written inline.
|
| |
| template<typename T > |
| static uint8_t * | encode_optional_sub_message (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, const T &value) |
| | Singular sub-message field, skipped when it encodes to nothing.
|
| |
| static uint8_t * | encode_sub_message_body (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, const void *value, ProtoEncodeFn encode_fn) |
| | Length and body, length backpatched after the body is written.
|
| |
| static uint8_t * | encode_sized_sub_message_body (uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t nested_size, const void *value, ProtoEncodeFn encode_fn) |
| | Length and body for a precomputed size.
|
| |
Static encode helpers for the generated encode bodies.
Each takes the write cursor by value and returns it advanced, so outlined calls at -Os chain through the return register instead of a stack slot. Helpers without a _force suffix skip fields holding the proto3 default.
Definition at line 309 of file proto.h.