18 msg.api_version_major = value.
as_varint();
21 msg.api_version_minor = value.
as_varint();
23#ifdef USE_API_OUTGOING_CONNECTION
25 msg.outgoing_connection_target = value.
as_bool();
43 size += 2 + msg.server_info.size();
44 size += 2 + msg.name.size();
69 const auto &msg = *
static_cast<const AreaInfo *
>(self);
75 const auto &msg = *
static_cast<const AreaInfo *
>(self);
78 size += 2 + msg.name.size();
84 const auto &msg = *
static_cast<const DeviceInfo *
>(self);
91 const auto &msg = *
static_cast<const DeviceInfo *
>(self);
94 size += 2 + msg.name.size();
99#ifdef USE_SERIAL_PROXY
111 size += msg.port_type ? 2 : 0;
126#ifdef ESPHOME_PROJECT_NAME
129#ifdef ESPHOME_PROJECT_NAME
135#ifdef USE_BLUETOOTH_PROXY
140#ifdef USE_VOICE_ASSISTANT
146#ifdef USE_BLUETOOTH_PROXY
153 for (
const auto &it : msg.devices) {
158 for (
const auto &it : msg.areas) {
165#ifdef USE_ZWAVE_PROXY
168#ifdef USE_ZWAVE_PROXY
171#ifdef USE_SERIAL_PROXY
172 for (
const auto &it : msg.serial_proxies) {
179#ifdef USE_API_OUTGOING_CONNECTION
188 size += 2 + msg.mac_address.size();
189 size += 2 + msg.esphome_version.size();
190 size += 2 + msg.compilation_time.size();
191 size += 2 + msg.model.size();
195#ifdef ESPHOME_PROJECT_NAME
196 size += 2 + msg.project_name.size();
198#ifdef ESPHOME_PROJECT_NAME
199 size += 2 + msg.project_version.size();
204#ifdef USE_BLUETOOTH_PROXY
207 size += 2 + msg.manufacturer.size();
208 size += 2 + msg.friendly_name.size();
209#ifdef USE_VOICE_ASSISTANT
213 size += 3 + msg.suggested_area.size();
215#ifdef USE_BLUETOOTH_PROXY
216 size += 3 + msg.bluetooth_mac_address.size();
222 for (
const auto &it : msg.devices) {
227 for (
const auto &it : msg.areas) {
234#ifdef USE_ZWAVE_PROXY
237#ifdef USE_ZWAVE_PROXY
240#ifdef USE_SERIAL_PROXY
241 for (
const auto &it : msg.serial_proxies) {
248#ifdef USE_API_OUTGOING_CONNECTION
253#ifdef USE_BLUETOOTH_PROXY
264 size += 2 + msg.mac_address.size();
268#ifdef USE_VOICE_ASSISTANT
281#ifdef USE_ZWAVE_PROXY
320 size += !msg.client_id.empty() ? 2 + msg.client_id.size() : 0;
326#ifdef USE_BLUETOOTH_PROXY
329#ifdef USE_VOICE_ASSISTANT
332#ifdef USE_ZWAVE_PROXY
335#ifdef USE_SERIAL_PROXY
336 for (
const auto &it : msg.serial_proxies) {
351#ifdef USE_BLUETOOTH_PROXY
354#ifdef USE_VOICE_ASSISTANT
357#ifdef USE_ZWAVE_PROXY
360#ifdef USE_SERIAL_PROXY
361 for (
const auto &it : msg.serial_proxies) {
386#ifdef USE_API_WIZARD_INPUTS
400#ifdef USE_BINARY_SENSOR
402 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
410#ifdef USE_ENTITY_ICON
424 size += 2 + msg.name.size();
425 size += !msg.device_class.empty() ? 2 + msg.device_class.size() : 0;
428#ifdef USE_ENTITY_ICON
429 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
431 size += msg.entity_category ? 2 : 0;
470#ifdef USE_ENTITY_ICON
485 size += 2 + msg.name.size();
489 size += !msg.device_class.empty() ? 2 + msg.device_class.size() : 0;
491#ifdef USE_ENTITY_ICON
492 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
494 size += msg.entity_category ? 2 : 0;
522 size += msg.current_operation ? 2 : 0;
536 msg.has_position = value.
as_bool();
542 msg.has_tilt = value.
as_bool();
569#ifdef USE_ENTITY_ICON
573 for (
const char *it : *msg.supported_preset_modes) {
586 size += 2 + msg.name.size();
592#ifdef USE_ENTITY_ICON
593 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
595 size += msg.entity_category ? 2 : 0;
596 if (!msg.supported_preset_modes->empty()) {
597 for (
const char *it : *msg.supported_preset_modes) {
625 size += msg.direction ? 2 : 0;
641 msg.has_state = value.
as_bool();
647 msg.has_oscillating = value.
as_bool();
650 msg.oscillating = value.
as_bool();
653 msg.has_direction = value.
as_bool();
659 msg.has_speed_level = value.
as_bool();
662 msg.speed_level =
static_cast<int32_t
>(value.
as_varint());
665 msg.has_preset_mode = value.
as_bool();
684 for (
const auto &it : *msg.supported_color_modes) {
693 for (
const char *it : *msg.effects) {
697#ifdef USE_ENTITY_ICON
711 size += 2 + msg.name.size();
712 if (!msg.supported_color_modes->empty()) {
713 size += msg.supported_color_modes->size() * 2;
717 if (!msg.effects->empty()) {
718 for (
const char *it : *msg.effects) {
723#ifdef USE_ENTITY_ICON
724 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
726 size += msg.entity_category ? 2 : 0;
776 size += msg.color_mode ? 2 : 0;
799 msg.has_state = value.
as_bool();
805 msg.has_brightness = value.
as_bool();
811 msg.has_color_mode = value.
as_bool();
817 msg.has_color_brightness = value.
as_bool();
820 msg.color_brightness = value.
as_float();
835 msg.has_white = value.
as_bool();
841 msg.has_color_temperature = value.
as_bool();
844 msg.color_temperature = value.
as_float();
847 msg.has_cold_white = value.
as_bool();
853 msg.has_warm_white = value.
as_bool();
859 msg.has_transition_length = value.
as_bool();
862 msg.transition_length = value.
as_varint();
865 msg.has_flash_length = value.
as_bool();
871 msg.has_effect = value.
as_bool();
890#ifdef USE_ENTITY_ICON
910 size += 2 + msg.name.size();
911#ifdef USE_ENTITY_ICON
912 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
914 size += !msg.unit_of_measurement.empty() ? 2 + msg.unit_of_measurement.size() : 0;
917 size += !msg.device_class.empty() ? 2 + msg.device_class.size() : 0;
918 size += msg.state_class ? 2 : 0;
920 size += msg.entity_category ? 2 : 0;
942SensorStateResponse::calc_size_msg(const
void *self) {
943 const auto &msg = *
static_cast<const SensorStateResponse *
>(self);
960#ifdef USE_ENTITY_ICON
977 size += 2 + msg.name.size();
978#ifdef USE_ENTITY_ICON
979 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
983 size += msg.entity_category ? 2 : 0;
984 size += !msg.device_class.empty() ? 2 + msg.device_class.size() : 0;
1029#ifdef USE_TEXT_SENSOR
1031 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
1036#ifdef USE_ENTITY_ICON
1052 size += 2 + msg.name.size();
1053#ifdef USE_ENTITY_ICON
1054 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
1057 size += msg.entity_category ? 2 : 0;
1058 size += !msg.device_class.empty() ? 2 + msg.device_class.size() : 0;
1094 msg.dump_config = value.
as_bool();
1110SubscribeLogsResponse::calc_size_msg(const
void *self) {
1111 const auto &msg = *
static_cast<const SubscribeLogsResponse *
>(self);
1124 msg.key = value.
data();
1125 msg.key_len = value.
size();
1130 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
1142#ifdef USE_API_HOMEASSISTANT_SERVICES
1159 for (
auto &it : msg.data) {
1162 for (
auto &it : msg.data_template) {
1165 for (
auto &it : msg.variables) {
1169#ifdef USE_API_HOMEASSISTANT_ACTION_RESPONSES
1172#ifdef USE_API_HOMEASSISTANT_ACTION_RESPONSES_JSON
1175#ifdef USE_API_HOMEASSISTANT_ACTION_RESPONSES_JSON
1184 if (!msg.data.empty()) {
1185 for (
const auto &it : msg.data) {
1189 if (!msg.data_template.empty()) {
1190 for (
const auto &it : msg.data_template) {
1194 if (!msg.variables.empty()) {
1195 for (
const auto &it : msg.variables) {
1200#ifdef USE_API_HOMEASSISTANT_ACTION_RESPONSES
1203#ifdef USE_API_HOMEASSISTANT_ACTION_RESPONSES_JSON
1206#ifdef USE_API_HOMEASSISTANT_ACTION_RESPONSES_JSON
1212#ifdef USE_API_HOMEASSISTANT_ACTION_RESPONSES
1222 msg.success = value.
as_bool();
1227#ifdef USE_API_HOMEASSISTANT_ACTION_RESPONSES_JSON
1229 msg.response_data = value.
data();
1230 msg.response_data_len = value.
size();
1236#ifdef USE_API_HOMEASSISTANT_STATES
1238 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
1271 auto &msg = *
static_cast<DSTRule *
>(self);
1321 msg.has_parsed_timezone =
true;
1325#ifdef USE_API_USER_DEFINED_ACTIONS
1327 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
1331#ifdef USE_API_USER_DEFINED_ACTION_METADATA
1334#ifdef USE_API_USER_DEFINED_ACTION_METADATA
1343 size += msg.type ? 2 : 0;
1344#ifdef USE_API_USER_DEFINED_ACTION_METADATA
1347#ifdef USE_API_USER_DEFINED_ACTION_METADATA
1353 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
1357 for (
auto &it : msg.args) {
1361#ifdef USE_API_USER_DEFINED_ACTION_METADATA
1371 if (!msg.args.empty()) {
1372 for (
const auto &it : msg.args) {
1376 size += msg.supports_response ? 2 : 0;
1377#ifdef USE_API_USER_DEFINED_ACTION_METADATA
1390 msg.legacy_int =
static_cast<int32_t
>(value.
as_varint());
1402 msg.bool_array.push_back(value.
as_bool());
1408 msg.float_array.push_back(value.
as_float());
1411 msg.string_array.push_back(value.
as_string());
1434 msg.args.emplace_back();
1437#ifdef USE_API_USER_DEFINED_ACTION_RESPONSES
1442#ifdef USE_API_USER_DEFINED_ACTION_RESPONSES
1444 msg.return_response = value.
as_bool();
1451 this->
args.init(count_args);
1455#ifdef USE_API_USER_DEFINED_ACTION_RESPONSES
1461#ifdef USE_API_USER_DEFINED_ACTION_RESPONSES_JSON
1472#ifdef USE_API_USER_DEFINED_ACTION_RESPONSES_JSON
1485#ifdef USE_ENTITY_ICON
1499 size += 2 + msg.name.size();
1501#ifdef USE_ENTITY_ICON
1502 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
1504 size += msg.entity_category ? 2 : 0;
1552 for (
const auto &it : *msg.supported_modes) {
1565 for (
const auto &it : *msg.supported_fan_modes) {
1568 for (
const auto &it : *msg.supported_swing_modes) {
1571 for (
const char *it : *msg.supported_custom_fan_modes) {
1574 for (
const auto &it : *msg.supported_presets) {
1577 for (
const char *it : *msg.supported_custom_presets) {
1581#ifdef USE_ENTITY_ICON
1602 size += 2 + msg.name.size();
1605 if (!msg.supported_modes->empty()) {
1606 size += msg.supported_modes->size() * 2;
1612 if (!msg.supported_fan_modes->empty()) {
1613 size += msg.supported_fan_modes->size() * 2;
1615 if (!msg.supported_swing_modes->empty()) {
1616 size += msg.supported_swing_modes->size() * 2;
1618 if (!msg.supported_custom_fan_modes->empty()) {
1619 for (
const char *it : *msg.supported_custom_fan_modes) {
1623 if (!msg.supported_presets->empty()) {
1624 size += msg.supported_presets->size() * 3;
1626 if (!msg.supported_custom_presets->empty()) {
1627 for (
const char *it : *msg.supported_custom_presets) {
1632#ifdef USE_ENTITY_ICON
1633 size += !msg.icon.empty() ? 3 + msg.icon.size() : 0;
1635 size += msg.entity_category ? 3 : 0;
1645 size += msg.temperature_unit ? 3 : 0;
1691 size += msg.action ? 2 : 0;
1692 size += msg.fan_mode ? 2 : 0;
1693 size += msg.swing_mode ? 2 : 0;
1695 size += msg.preset ? 2 : 0;
1713 msg.has_mode = value.
as_bool();
1719 msg.has_target_temperature = value.
as_bool();
1722 msg.target_temperature = value.
as_float();
1725 msg.has_target_temperature_low = value.
as_bool();
1728 msg.target_temperature_low = value.
as_float();
1731 msg.has_target_temperature_high = value.
as_bool();
1734 msg.target_temperature_high = value.
as_float();
1737 msg.has_fan_mode = value.
as_bool();
1743 msg.has_swing_mode = value.
as_bool();
1749 msg.has_custom_fan_mode = value.
as_bool();
1755 msg.has_preset = value.
as_bool();
1761 msg.has_custom_preset = value.
as_bool();
1767 msg.has_target_humidity = value.
as_bool();
1770 msg.target_humidity = value.
as_float();
1780#ifdef USE_WATER_HEATER
1782 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
1787#ifdef USE_ENTITY_ICON
1804 for (
const auto &it : *msg.supported_modes) {
1816 size += 2 + msg.name.size();
1817#ifdef USE_ENTITY_ICON
1818 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
1821 size += msg.entity_category ? 2 : 0;
1828 if (!msg.supported_modes->empty()) {
1829 size += msg.supported_modes->size() * 2;
1832 size += msg.temperature_unit ? 2 : 0;
1864 size += msg.mode ? 2 : 0;
1889 msg.target_temperature = value.
as_float();
1900 msg.target_temperature_low = value.
as_float();
1903 msg.target_temperature_high = value.
as_float();
1914#ifdef USE_ENTITY_ICON
1941 size += 2 + msg.name.size();
1942#ifdef USE_ENTITY_ICON
1943 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
1949 size += msg.entity_category ? 2 : 0;
1950 size += !msg.unit_of_measurement.empty() ? 2 + msg.unit_of_measurement.size() : 0;
1951 size += msg.mode ? 2 : 0;
1952 size += !msg.device_class.empty() ? 2 + msg.device_class.size() : 0;
2005#ifdef USE_ENTITY_ICON
2008 for (
const char *it : *msg.options) {
2023 size += 2 + msg.name.size();
2024#ifdef USE_ENTITY_ICON
2025 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
2027 if (!msg.options->empty()) {
2028 for (
const char *it : *msg.options) {
2033 size += msg.entity_category ? 2 : 0;
2084#ifdef USE_ENTITY_ICON
2088 for (
const char *it : *msg.tones) {
2104 size += 2 + msg.name.size();
2105#ifdef USE_ENTITY_ICON
2106 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
2109 if (!msg.tones->empty()) {
2110 for (
const char *it : *msg.tones) {
2116 size += msg.entity_category ? 2 : 0;
2149 msg.has_state = value.
as_bool();
2155 msg.has_tone = value.
as_bool();
2161 msg.has_duration = value.
as_bool();
2167 msg.has_volume = value.
as_bool();
2186#ifdef USE_ENTITY_ICON
2205 size += 2 + msg.name.size();
2206#ifdef USE_ENTITY_ICON
2207 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
2210 size += msg.entity_category ? 2 : 0;
2250 msg.has_code = value.
as_bool();
2269#ifdef USE_ENTITY_ICON
2285 size += 2 + msg.name.size();
2286#ifdef USE_ENTITY_ICON
2287 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
2290 size += msg.entity_category ? 2 : 0;
2291 size += !msg.device_class.empty() ? 2 + msg.device_class.size() : 0;
2312#ifdef USE_MEDIA_PLAYER
2328 size += msg.purpose ? 2 : 0;
2333 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
2338#ifdef USE_ENTITY_ICON
2343 for (
auto &it : msg.supported_formats) {
2357 size += 2 + msg.name.size();
2358#ifdef USE_ENTITY_ICON
2359 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
2362 size += msg.entity_category ? 2 : 0;
2363 if (!msg.supported_formats.empty()) {
2364 for (
const auto &it : msg.supported_formats) {
2408 msg.has_command = value.
as_bool();
2414 msg.has_volume = value.
as_bool();
2420 msg.has_media_url = value.
as_bool();
2426 msg.has_announcement = value.
as_bool();
2429 msg.announcement = value.
as_bool();
2439#ifdef USE_BLUETOOTH_PROXY
2454 for (uint16_t i = 0; i < msg.advertisements_len; i++) {
2455 auto &sub_msg = msg.advertisements[i];
2457 uint8_t *len_pos =
pos;
2463 if (sub_msg.address_type) {
2470 *len_pos =
static_cast<uint8_t
>(
pos - len_pos - 1);
2476BluetoothLERawAdvertisementsResponse::calc_size_msg(const
void *self) {
2477 const auto &msg = *
static_cast<const BluetoothLERawAdvertisementsResponse *
>(self);
2479 for (uint16_t i = 0; i < msg.advertisements_len; i++) {
2480 auto &sub_msg = msg.advertisements[i];
2484 size += sub_msg.address_type ? 2 : 0;
2485 size += 2 + sub_msg.data_len;
2490#ifdef USE_BLUETOOTH_PROXY_CONNECTIONS
2502 msg.has_address_type = value.
as_bool();
2510 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
2539 if (msg.uuid[0] != 0 || msg.uuid[1] != 0) {
2550 if (msg.uuid[0] != 0 || msg.uuid[1] != 0) {
2560 if (msg.uuid[0] != 0 || msg.uuid[1] != 0) {
2566 for (
auto &it : msg.descriptors) {
2575 if (msg.uuid[0] != 0 || msg.uuid[1] != 0) {
2581 if (!msg.descriptors.empty()) {
2582 for (
const auto &it : msg.descriptors) {
2591 if (msg.uuid[0] != 0 || msg.uuid[1] != 0) {
2596 for (
auto &it : msg.characteristics) {
2605 if (msg.uuid[0] != 0 || msg.uuid[1] != 0) {
2610 if (!msg.characteristics.empty()) {
2611 for (
const auto &it : msg.characteristics) {
2619 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
2622 for (
auto &it : msg.services) {
2631 if (!msg.services.empty()) {
2632 for (
const auto &it : msg.services) {
2639 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
2690 msg.response = value.
as_bool();
2693 msg.data = value.
data();
2694 msg.data_len = value.
size();
2723 msg.data = value.
data();
2724 msg.data_len = value.
size();
2745 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
2761 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
2765 for (
const auto &it : msg.allocated) {
2777 for (
const auto &it : msg.allocated) {
2826 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
2842 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
2858 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
2874#ifdef USE_BLUETOOTH_PROXY
2876 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
2887 size += msg.mode ? 2 : 0;
2888 size += msg.configured_mode ? 2 : 0;
2902#ifdef USE_VOICE_ASSISTANT
2909 msg.subscribe = value.
as_bool();
2985 msg.data.emplace_back();
2995 msg.data = value.
data();
2996 msg.data_len = value.
size();
3002 msg.data2 = value.
data();
3003 msg.data2_len = value.
size();
3043 msg.is_active = value.
as_bool();
3062 msg.start_conversation = value.
as_bool();
3067 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
3082 for (
auto &it : msg.trained_languages) {
3092 if (!msg.trained_languages.empty()) {
3093 for (
const auto &it : msg.trained_languages) {
3111 msg.trained_languages.push_back(value.
as_string());
3133 msg.external_wake_words.emplace_back();
3139 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
3141 for (
auto &it : msg.available_wake_words) {
3144 for (
const auto &it : *msg.active_wake_words) {
3153 if (!msg.available_wake_words.empty()) {
3154 for (
const auto &it : msg.available_wake_words) {
3158 if (!msg.active_wake_words->empty()) {
3159 for (
const auto &it : *msg.active_wake_words) {
3172 msg.active_wake_words.push_back(value.
as_string());
3177#ifdef USE_ALARM_CONTROL_PANEL
3179 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
3184#ifdef USE_ENTITY_ICON
3202 size += 2 + msg.name.size();
3203#ifdef USE_ENTITY_ICON
3204 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
3207 size += msg.entity_category ? 2 : 0;
3217 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
3264#ifdef USE_ENTITY_ICON
3283 size += 2 + msg.name.size();
3284#ifdef USE_ENTITY_ICON
3285 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
3288 size += msg.entity_category ? 2 : 0;
3292 size += msg.mode ? 2 : 0;
3337#ifdef USE_DATETIME_DATE
3343#ifdef USE_ENTITY_ICON
3358 size += 2 + msg.name.size();
3359#ifdef USE_ENTITY_ICON
3360 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
3363 size += msg.entity_category ? 2 : 0;
3418#ifdef USE_DATETIME_TIME
3424#ifdef USE_ENTITY_ICON
3439 size += 2 + msg.name.size();
3440#ifdef USE_ENTITY_ICON
3441 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
3444 size += msg.entity_category ? 2 : 0;
3505#ifdef USE_ENTITY_ICON
3511 for (
const char *it : *msg.event_types) {
3524 size += 2 + msg.name.size();
3525#ifdef USE_ENTITY_ICON
3526 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
3529 size += msg.entity_category ? 2 : 0;
3530 size += !msg.device_class.empty() ? 2 + msg.device_class.size() : 0;
3531 if (!msg.event_types->empty()) {
3532 for (
const char *it : *msg.event_types) {
3542 const auto &msg = *
static_cast<const EventResponse *
>(self);
3551 const auto &msg = *
static_cast<const EventResponse *
>(self);
3567#ifdef USE_ENTITY_ICON
3586 size += 2 + msg.name.size();
3587#ifdef USE_ENTITY_ICON
3588 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
3591 size += msg.entity_category ? 2 : 0;
3592 size += !msg.device_class.empty() ? 2 + msg.device_class.size() : 0;
3618 size += msg.current_operation ? 2 : 0;
3632 msg.has_position = value.
as_bool();
3648#ifdef USE_DATETIME_DATETIME
3650 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
3655#ifdef USE_ENTITY_ICON
3670 size += 2 + msg.name.size();
3671#ifdef USE_ENTITY_ICON
3672 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
3675 size += msg.entity_category ? 2 : 0;
3728#ifdef USE_ENTITY_ICON
3744 size += 2 + msg.name.size();
3745#ifdef USE_ENTITY_ICON
3746 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
3749 size += msg.entity_category ? 2 : 0;
3750 size += !msg.device_class.empty() ? 2 + msg.device_class.size() : 0;
3811#ifdef USE_ZWAVE_PROXY
3817 msg.data = value.
data();
3818 msg.data_len = value.
size();
3824ZWaveProxyFrame::encode_msg(const
void *self, uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
3831ZWaveProxyFrame::calc_size_msg(const
void *self) {
3832 const auto &msg = *
static_cast<const ZWaveProxyFrame *
>(self);
3845 msg.data = value.
data();
3846 msg.data_len = value.
size();
3873 size += msg.status ? 2 : 0;
3879 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
3884#ifdef USE_ENTITY_ICON
3901 size += 2 + msg.name.size();
3902#ifdef USE_ENTITY_ICON
3903 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
3906 size += msg.entity_category ? 2 : 0;
3930 msg.carrier_frequency = value.
as_varint();
3936 msg.timings_data_ = value.
data();
3937 msg.timings_length_ = value.
size();
3953 for (
const auto &it : *msg.timings) {
3960InfraredRFReceiveEvent::calc_size_msg(const
void *self) {
3961 const auto &msg = *
static_cast<const InfraredRFReceiveEvent *
>(self);
3967 if (!msg.timings->empty()) {
3968 for (
const auto &it : *msg.timings) {
3975 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
3995#ifdef USE_RADIO_FREQUENCY
3997 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
4002#ifdef USE_ENTITY_ICON
4021 size += 2 + msg.name.size();
4022#ifdef USE_ENTITY_ICON
4023 size += !msg.icon.empty() ? 2 + msg.icon.size() : 0;
4026 size += msg.entity_category ? 2 : 0;
4037#ifdef USE_SERIAL_PROXY
4050 msg.flow_control = value.
as_bool();
4073SerialProxyDataReceived::calc_size_msg(const
void *self) {
4074 const auto &msg = *
static_cast<const SerialProxyDataReceived *
>(self);
4088 msg.data = value.
data();
4089 msg.data_len = value.
size();
4117 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
4129 size += msg.status ? 2 : 0;
4156 size += msg.type ? 2 : 0;
4157 size += msg.status ? 2 : 0;
4210 size += msg.source ? 2 : 0;
4219#ifdef USE_BLUETOOTH_PROXY_CONNECTIONS
4243 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
4259 uint8_t *__restrict__
pos PROTO_ENCODE_DEBUG_PARAM) {
4269 size += !msg.token.empty() ? 2 + msg.token.size() : 0;
4273#ifndef HAS_PROTO_MESSAGE_DUMP
4274static_assert(!std::is_polymorphic_v<HelloRequest>,
"decodable messages carry no vtable");
4275static_assert(!std::is_polymorphic_v<DisconnectRequest>,
"decodable messages carry no vtable");
4276#ifdef USE_API_WIZARD_INPUTS
4277static_assert(!std::is_polymorphic_v<WizardInputSetRequest>,
"decodable messages carry no vtable");
4280static_assert(!std::is_polymorphic_v<CoverCommandRequest>,
"decodable messages carry no vtable");
4283static_assert(!std::is_polymorphic_v<FanCommandRequest>,
"decodable messages carry no vtable");
4286static_assert(!std::is_polymorphic_v<LightCommandRequest>,
"decodable messages carry no vtable");
4289static_assert(!std::is_polymorphic_v<SwitchCommandRequest>,
"decodable messages carry no vtable");
4291static_assert(!std::is_polymorphic_v<SubscribeLogsRequest>,
"decodable messages carry no vtable");
4293static_assert(!std::is_polymorphic_v<NoiseEncryptionSetKeyRequest>,
"decodable messages carry no vtable");
4295#ifdef USE_API_HOMEASSISTANT_ACTION_RESPONSES
4296static_assert(!std::is_polymorphic_v<HomeassistantActionResponse>,
"decodable messages carry no vtable");
4298#ifdef USE_API_HOMEASSISTANT_STATES
4299static_assert(!std::is_polymorphic_v<HomeAssistantStateResponse>,
"decodable messages carry no vtable");
4301static_assert(!std::is_polymorphic_v<DSTRule>,
"decodable messages carry no vtable");
4302static_assert(!std::is_polymorphic_v<ParsedTimezone>,
"decodable messages carry no vtable");
4303static_assert(!std::is_polymorphic_v<GetTimeResponse>,
"decodable messages carry no vtable");
4304#ifdef USE_API_USER_DEFINED_ACTIONS
4305static_assert(!std::is_polymorphic_v<ExecuteServiceArgument>,
"decodable messages carry no vtable");
4306static_assert(!std::is_polymorphic_v<ExecuteServiceRequest>,
"decodable messages carry no vtable");
4309static_assert(!std::is_polymorphic_v<CameraImageRequest>,
"decodable messages carry no vtable");
4312static_assert(!std::is_polymorphic_v<ClimateCommandRequest>,
"decodable messages carry no vtable");
4314#ifdef USE_WATER_HEATER
4315static_assert(!std::is_polymorphic_v<WaterHeaterCommandRequest>,
"decodable messages carry no vtable");
4318static_assert(!std::is_polymorphic_v<NumberCommandRequest>,
"decodable messages carry no vtable");
4321static_assert(!std::is_polymorphic_v<SelectCommandRequest>,
"decodable messages carry no vtable");
4324static_assert(!std::is_polymorphic_v<SirenCommandRequest>,
"decodable messages carry no vtable");
4327static_assert(!std::is_polymorphic_v<LockCommandRequest>,
"decodable messages carry no vtable");
4330static_assert(!std::is_polymorphic_v<ButtonCommandRequest>,
"decodable messages carry no vtable");
4332#ifdef USE_MEDIA_PLAYER
4333static_assert(!std::is_polymorphic_v<MediaPlayerCommandRequest>,
"decodable messages carry no vtable");
4335#ifdef USE_BLUETOOTH_PROXY
4336static_assert(!std::is_polymorphic_v<SubscribeBluetoothLEAdvertisementsRequest>,
"decodable messages carry no vtable");
4338#ifdef USE_BLUETOOTH_PROXY_CONNECTIONS
4339static_assert(!std::is_polymorphic_v<BluetoothDeviceRequest>,
"decodable messages carry no vtable");
4340static_assert(!std::is_polymorphic_v<BluetoothGATTGetServicesRequest>,
"decodable messages carry no vtable");
4341static_assert(!std::is_polymorphic_v<BluetoothGATTReadRequest>,
"decodable messages carry no vtable");
4342static_assert(!std::is_polymorphic_v<BluetoothGATTWriteRequest>,
"decodable messages carry no vtable");
4343static_assert(!std::is_polymorphic_v<BluetoothGATTReadDescriptorRequest>,
"decodable messages carry no vtable");
4344static_assert(!std::is_polymorphic_v<BluetoothGATTWriteDescriptorRequest>,
"decodable messages carry no vtable");
4345static_assert(!std::is_polymorphic_v<BluetoothGATTNotifyRequest>,
"decodable messages carry no vtable");
4347#ifdef USE_BLUETOOTH_PROXY
4348static_assert(!std::is_polymorphic_v<BluetoothScannerSetModeRequest>,
"decodable messages carry no vtable");
4350#ifdef USE_VOICE_ASSISTANT
4351static_assert(!std::is_polymorphic_v<SubscribeVoiceAssistantRequest>,
"decodable messages carry no vtable");
4352static_assert(!std::is_polymorphic_v<VoiceAssistantResponse>,
"decodable messages carry no vtable");
4353static_assert(!std::is_polymorphic_v<VoiceAssistantEventData>,
"decodable messages carry no vtable");
4354static_assert(!std::is_polymorphic_v<VoiceAssistantEventResponse>,
"decodable messages carry no vtable");
4355static_assert(!std::is_polymorphic_v<VoiceAssistantAudio>,
"decodable messages carry no vtable");
4356static_assert(!std::is_polymorphic_v<VoiceAssistantTimerEventResponse>,
"decodable messages carry no vtable");
4357static_assert(!std::is_polymorphic_v<VoiceAssistantAnnounceRequest>,
"decodable messages carry no vtable");
4358static_assert(!std::is_polymorphic_v<VoiceAssistantExternalWakeWord>,
"decodable messages carry no vtable");
4359static_assert(!std::is_polymorphic_v<VoiceAssistantConfigurationRequest>,
"decodable messages carry no vtable");
4360static_assert(!std::is_polymorphic_v<VoiceAssistantSetConfiguration>,
"decodable messages carry no vtable");
4362#ifdef USE_ALARM_CONTROL_PANEL
4363static_assert(!std::is_polymorphic_v<AlarmControlPanelCommandRequest>,
"decodable messages carry no vtable");
4366static_assert(!std::is_polymorphic_v<TextCommandRequest>,
"decodable messages carry no vtable");
4368#ifdef USE_DATETIME_DATE
4369static_assert(!std::is_polymorphic_v<DateCommandRequest>,
"decodable messages carry no vtable");
4371#ifdef USE_DATETIME_TIME
4372static_assert(!std::is_polymorphic_v<TimeCommandRequest>,
"decodable messages carry no vtable");
4375static_assert(!std::is_polymorphic_v<ValveCommandRequest>,
"decodable messages carry no vtable");
4377#ifdef USE_DATETIME_DATETIME
4378static_assert(!std::is_polymorphic_v<DateTimeCommandRequest>,
"decodable messages carry no vtable");
4381static_assert(!std::is_polymorphic_v<UpdateCommandRequest>,
"decodable messages carry no vtable");
4383#ifdef USE_ZWAVE_PROXY
4384static_assert(!std::is_polymorphic_v<ZWaveProxyFrame>,
"decodable messages carry no vtable");
4385static_assert(!std::is_polymorphic_v<ZWaveProxyRequest>,
"decodable messages carry no vtable");
4388static_assert(!std::is_polymorphic_v<InfraredRFTransmitRawTimingsRequest>,
"decodable messages carry no vtable");
4390#ifdef USE_SERIAL_PROXY
4391static_assert(!std::is_polymorphic_v<SerialProxyConfigureRequest>,
"decodable messages carry no vtable");
4392static_assert(!std::is_polymorphic_v<SerialProxyWriteRequest>,
"decodable messages carry no vtable");
4393static_assert(!std::is_polymorphic_v<SerialProxySetModemPinsRequest>,
"decodable messages carry no vtable");
4394static_assert(!std::is_polymorphic_v<SerialProxyGetModemPinsRequest>,
"decodable messages carry no vtable");
4395static_assert(!std::is_polymorphic_v<SerialProxyRequest>,
"decodable messages carry no vtable");
4396static_assert(!std::is_polymorphic_v<SerialProxySetModeRequest>,
"decodable messages carry no vtable");
4398#ifdef USE_BLUETOOTH_PROXY_CONNECTIONS
4399static_assert(!std::is_polymorphic_v<BluetoothSetConnectionParamsRequest>,
"decodable messages carry no vtable");
StringRef is a reference to a string owned by something else.
constexpr size_type size() const
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
enums::AlarmControlPanelState state
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
enums::BluetoothScannerState state
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
enums::DisconnectReason reason
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
FixedVector< bool > bool_array
FixedVector< float > float_array
FixedVector< std::string > string_array
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
void decode(const uint8_t *buffer, size_t length)
FixedVector< int32_t > int_array
FixedVector< ExecuteServiceArgument > args
void decode(const uint8_t *buffer, size_t length)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static void decode_fields(void *msg, const uint8_t *buffer, size_t length, DecodeFieldFn field)
Walk buffer and hand every field to field.
static uint32_t count_repeated_field(const uint8_t *buffer, size_t length, uint32_t target_field_id)
Count occurrences of a repeated field in a protobuf buffer.
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 *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 * 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_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.
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_int32(uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, int32_t value)
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 encode_varint_raw(uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t value)
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_uint32(uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, uint32_t value)
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 *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 * encode_sint32_force(uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, int32_t value)
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 f...
static uint8_t * encode_bool(uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, bool value)
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 *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 *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 * encode_uint64(uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, uint64_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_float(uint8_t *__restrict__ pos PROTO_ENCODE_DEBUG_PARAM, uint32_t field_id, float value)
One decoded field: the payload pointer and a scalar holding the varint or fixed32 value,...
void decode_to_message(T &msg) const
Decode the length-delimited payload into a message instance.
std::string as_string() const
uint32_t as_fixed32() const
const uint8_t * data() const
proto_varint_value_t as_varint() const
static constexpr uint32_t calc_uint64(uint32_t field_id_size, uint64_t value)
static constexpr uint32_t calc_bool(uint32_t field_id_size, bool value)
static constexpr uint32_t calc_message(uint32_t field_id_size, uint32_t nested_size)
static constexpr uint32_t ESPHOME_ALWAYS_INLINE calc_uint64_force(uint32_t field_id_size, uint64_t value)
static constexpr uint32_t ESPHOME_ALWAYS_INLINE calc_uint64_48bit_force(uint32_t field_id_size, uint64_t value)
48-bit MAC address variant: matches encode_varint_raw_48bit's fast path.
static constexpr uint32_t calc_uint32(uint32_t field_id_size, uint32_t value)
static constexpr uint32_t calc_length(uint32_t field_id_size, size_t len)
static constexpr uint32_t calc_int32(uint32_t field_id_size, int32_t value)
static constexpr uint32_t ESPHOME_ALWAYS_INLINE calc_length_force(uint32_t field_id_size, size_t len)
static uint32_t calc_float(uint32_t field_id_size, float value)
static constexpr uint32_t calc_fixed32(uint32_t field_id_size, uint32_t value)
static constexpr uint32_t ESPHOME_ALWAYS_INLINE calc_message_force(uint32_t field_id_size, uint32_t nested_size)
static constexpr uint32_t ESPHOME_ALWAYS_INLINE calc_sint32_force(uint32_t field_id_size, int32_t value)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
enums::SendspinPairingTokenStatus status
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
std::vector< VoiceAssistantEventData > data
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint32_t calc_size_msg(const void *self)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
static uint32_t calc_size_msg(const void *self)
static void decode_field(void *self, uint32_t tag, const uint8_t *data, proto_varint_value_t scalar)
enums::ZWaveProxyRequestType type
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
static uint8_t * encode_msg(const void *self, uint8_t *pos PROTO_ENCODE_DEBUG_PARAM)
enums::ZWaveProxyRequestType type
static uint32_t calc_size_msg(const void *self)
struct @66::@67 __attribute__
Wake the main loop task from an ISR. ISR-safe.
BluetoothDeviceRequestType
AlarmControlPanelStateCommand
uint16_t count_packed_varints(const uint8_t *data, size_t len)
Count varints in a packed buffer: len minus bytes with the continuation bit, summed a word at a time.
constexpr uint32_t encode_zigzag32(int32_t value)
constexpr uint8_t WIRE_TYPE_VARINT
constexpr uint32_t proto_tag(uint32_t field_id, uint32_t wire_type)
Case label for decode_field(): the wire tag of a field, so a field that arrives with another wire typ...
uint64_t proto_varint_value_t
Type used for decoded varint values - uint64_t when BLE needs 64-bit addresses, uint32_t otherwise.
constexpr uint8_t WIRE_TYPE_LENGTH_DELIMITED
constexpr int32_t decode_zigzag32(uint32_t value)
constexpr uint8_t WIRE_TYPE_FIXED32
uint32_t float_to_raw(float value)