From 59d47eb3427e730ccc94c2ec3ce05ce074a29c41 Mon Sep 17 00:00:00 2001 From: Yilin Sun Date: Wed, 11 Jan 2023 09:28:31 +0800 Subject: [PATCH] Removed nanopb, use protobuf-c for nested decoding. Signed-off-by: Yilin Sun --- .gitmodules | 6 +- CMakeLists.txt | 7 +- lib/nanopb | 1 - lib/protobuf-c | 1 + proto/esp_hosted_config.pb-c.c | 5087 ++++++++++++++++++++++++++++++++ proto/esp_hosted_config.pb-c.h | 1849 ++++++++++++ proto/esp_hosted_config.pb.c | 150 - proto/esp_hosted_config.pb.h | 1242 -------- proto/esp_hosted_config.proto | 4 - src/nh_ctrl_api.c | 19 +- 10 files changed, 6948 insertions(+), 1418 deletions(-) delete mode 160000 lib/nanopb create mode 160000 lib/protobuf-c create mode 100644 proto/esp_hosted_config.pb-c.c create mode 100644 proto/esp_hosted_config.pb-c.h delete mode 100644 proto/esp_hosted_config.pb.c delete mode 100644 proto/esp_hosted_config.pb.h diff --git a/.gitmodules b/.gitmodules index a0ebf94..efc7ecb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "lib/nanopb"] - path = lib/nanopb - url = https://github.com/nanopb/nanopb.git +[submodule "lib/protobuf-c"] + path = lib/protobuf-c + url = https://github.com/protobuf-c/protobuf-c.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 249a308..4f16f0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,8 @@ cmake_minimum_required(VERSION 3.10) project(esp_nano_hosted) set(NH_SOURCES - "proto/esp_hosted_config.pb.c" + "lib/protobuf-c/protobuf-c/protobuf-c.c" + "proto/esp_hosted_config.pb-c.c" "src/nh_ctrl_api.c" "src/nh_helper_event.c" "src/nh_helper_serial.c" @@ -12,15 +13,13 @@ set(NH_SOURCES set(NH_INCLUDES "include" + "lib/protobuf-c" "proto" ) set(NH_LIBS - "protobuf-nanopb-static" ) -add_subdirectory(lib/nanopb) - add_library(${PROJECT_NAME} ${NH_SOURCES}) target_include_directories(${PROJECT_NAME} PUBLIC ${NH_INCLUDES}) target_link_libraries(${PROJECT_NAME} PUBLIC ${NH_LIBS}) \ No newline at end of file diff --git a/lib/nanopb b/lib/nanopb deleted file mode 160000 index b97aa65..0000000 --- a/lib/nanopb +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b97aa657a706d3ba4a9a6ccca7043c9d6fe41cba diff --git a/lib/protobuf-c b/lib/protobuf-c new file mode 160000 index 0000000..abc67a1 --- /dev/null +++ b/lib/protobuf-c @@ -0,0 +1 @@ +Subproject commit abc67a11c6db271bedbb9f58be85d6f4e2ea8389 diff --git a/proto/esp_hosted_config.pb-c.c b/proto/esp_hosted_config.pb-c.c new file mode 100644 index 0000000..72e3ffe --- /dev/null +++ b/proto/esp_hosted_config.pb-c.c @@ -0,0 +1,5087 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: esp_hosted_config.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "esp_hosted_config.pb-c.h" +void scan_result__init + (ScanResult *message) +{ + static const ScanResult init_value = SCAN_RESULT__INIT; + *message = init_value; +} +size_t scan_result__get_packed_size + (const ScanResult *message) +{ + assert(message->base.descriptor == &scan_result__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t scan_result__pack + (const ScanResult *message, + uint8_t *out) +{ + assert(message->base.descriptor == &scan_result__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t scan_result__pack_to_buffer + (const ScanResult *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &scan_result__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +ScanResult * + scan_result__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (ScanResult *) + protobuf_c_message_unpack (&scan_result__descriptor, + allocator, len, data); +} +void scan_result__free_unpacked + (ScanResult *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &scan_result__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void connected_stalist__init + (ConnectedSTAList *message) +{ + static const ConnectedSTAList init_value = CONNECTED_STALIST__INIT; + *message = init_value; +} +size_t connected_stalist__get_packed_size + (const ConnectedSTAList *message) +{ + assert(message->base.descriptor == &connected_stalist__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t connected_stalist__pack + (const ConnectedSTAList *message, + uint8_t *out) +{ + assert(message->base.descriptor == &connected_stalist__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t connected_stalist__pack_to_buffer + (const ConnectedSTAList *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &connected_stalist__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +ConnectedSTAList * + connected_stalist__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (ConnectedSTAList *) + protobuf_c_message_unpack (&connected_stalist__descriptor, + allocator, len, data); +} +void connected_stalist__free_unpacked + (ConnectedSTAList *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &connected_stalist__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__get_mac_address__init + (CtrlMsgReqGetMacAddress *message) +{ + static const CtrlMsgReqGetMacAddress init_value = CTRL_MSG__REQ__GET_MAC_ADDRESS__INIT; + *message = init_value; +} +size_t ctrl_msg__req__get_mac_address__get_packed_size + (const CtrlMsgReqGetMacAddress *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_mac_address__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__get_mac_address__pack + (const CtrlMsgReqGetMacAddress *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_mac_address__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__get_mac_address__pack_to_buffer + (const CtrlMsgReqGetMacAddress *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_mac_address__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqGetMacAddress * + ctrl_msg__req__get_mac_address__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqGetMacAddress *) + protobuf_c_message_unpack (&ctrl_msg__req__get_mac_address__descriptor, + allocator, len, data); +} +void ctrl_msg__req__get_mac_address__free_unpacked + (CtrlMsgReqGetMacAddress *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__get_mac_address__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__get_mac_address__init + (CtrlMsgRespGetMacAddress *message) +{ + static const CtrlMsgRespGetMacAddress init_value = CTRL_MSG__RESP__GET_MAC_ADDRESS__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__get_mac_address__get_packed_size + (const CtrlMsgRespGetMacAddress *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_mac_address__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__get_mac_address__pack + (const CtrlMsgRespGetMacAddress *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_mac_address__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__get_mac_address__pack_to_buffer + (const CtrlMsgRespGetMacAddress *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_mac_address__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespGetMacAddress * + ctrl_msg__resp__get_mac_address__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespGetMacAddress *) + protobuf_c_message_unpack (&ctrl_msg__resp__get_mac_address__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__get_mac_address__free_unpacked + (CtrlMsgRespGetMacAddress *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__get_mac_address__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__get_mode__init + (CtrlMsgReqGetMode *message) +{ + static const CtrlMsgReqGetMode init_value = CTRL_MSG__REQ__GET_MODE__INIT; + *message = init_value; +} +size_t ctrl_msg__req__get_mode__get_packed_size + (const CtrlMsgReqGetMode *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_mode__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__get_mode__pack + (const CtrlMsgReqGetMode *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_mode__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__get_mode__pack_to_buffer + (const CtrlMsgReqGetMode *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_mode__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqGetMode * + ctrl_msg__req__get_mode__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqGetMode *) + protobuf_c_message_unpack (&ctrl_msg__req__get_mode__descriptor, + allocator, len, data); +} +void ctrl_msg__req__get_mode__free_unpacked + (CtrlMsgReqGetMode *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__get_mode__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__get_mode__init + (CtrlMsgRespGetMode *message) +{ + static const CtrlMsgRespGetMode init_value = CTRL_MSG__RESP__GET_MODE__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__get_mode__get_packed_size + (const CtrlMsgRespGetMode *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_mode__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__get_mode__pack + (const CtrlMsgRespGetMode *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_mode__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__get_mode__pack_to_buffer + (const CtrlMsgRespGetMode *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_mode__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespGetMode * + ctrl_msg__resp__get_mode__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespGetMode *) + protobuf_c_message_unpack (&ctrl_msg__resp__get_mode__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__get_mode__free_unpacked + (CtrlMsgRespGetMode *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__get_mode__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__set_mode__init + (CtrlMsgReqSetMode *message) +{ + static const CtrlMsgReqSetMode init_value = CTRL_MSG__REQ__SET_MODE__INIT; + *message = init_value; +} +size_t ctrl_msg__req__set_mode__get_packed_size + (const CtrlMsgReqSetMode *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__set_mode__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__set_mode__pack + (const CtrlMsgReqSetMode *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__set_mode__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__set_mode__pack_to_buffer + (const CtrlMsgReqSetMode *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__set_mode__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqSetMode * + ctrl_msg__req__set_mode__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqSetMode *) + protobuf_c_message_unpack (&ctrl_msg__req__set_mode__descriptor, + allocator, len, data); +} +void ctrl_msg__req__set_mode__free_unpacked + (CtrlMsgReqSetMode *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__set_mode__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__set_mode__init + (CtrlMsgRespSetMode *message) +{ + static const CtrlMsgRespSetMode init_value = CTRL_MSG__RESP__SET_MODE__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__set_mode__get_packed_size + (const CtrlMsgRespSetMode *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__set_mode__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__set_mode__pack + (const CtrlMsgRespSetMode *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__set_mode__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__set_mode__pack_to_buffer + (const CtrlMsgRespSetMode *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__set_mode__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespSetMode * + ctrl_msg__resp__set_mode__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespSetMode *) + protobuf_c_message_unpack (&ctrl_msg__resp__set_mode__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__set_mode__free_unpacked + (CtrlMsgRespSetMode *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__set_mode__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__get_status__init + (CtrlMsgReqGetStatus *message) +{ + static const CtrlMsgReqGetStatus init_value = CTRL_MSG__REQ__GET_STATUS__INIT; + *message = init_value; +} +size_t ctrl_msg__req__get_status__get_packed_size + (const CtrlMsgReqGetStatus *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_status__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__get_status__pack + (const CtrlMsgReqGetStatus *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_status__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__get_status__pack_to_buffer + (const CtrlMsgReqGetStatus *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_status__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqGetStatus * + ctrl_msg__req__get_status__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqGetStatus *) + protobuf_c_message_unpack (&ctrl_msg__req__get_status__descriptor, + allocator, len, data); +} +void ctrl_msg__req__get_status__free_unpacked + (CtrlMsgReqGetStatus *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__get_status__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__get_status__init + (CtrlMsgRespGetStatus *message) +{ + static const CtrlMsgRespGetStatus init_value = CTRL_MSG__RESP__GET_STATUS__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__get_status__get_packed_size + (const CtrlMsgRespGetStatus *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_status__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__get_status__pack + (const CtrlMsgRespGetStatus *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_status__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__get_status__pack_to_buffer + (const CtrlMsgRespGetStatus *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_status__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespGetStatus * + ctrl_msg__resp__get_status__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespGetStatus *) + protobuf_c_message_unpack (&ctrl_msg__resp__get_status__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__get_status__free_unpacked + (CtrlMsgRespGetStatus *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__get_status__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__set_mac_address__init + (CtrlMsgReqSetMacAddress *message) +{ + static const CtrlMsgReqSetMacAddress init_value = CTRL_MSG__REQ__SET_MAC_ADDRESS__INIT; + *message = init_value; +} +size_t ctrl_msg__req__set_mac_address__get_packed_size + (const CtrlMsgReqSetMacAddress *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__set_mac_address__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__set_mac_address__pack + (const CtrlMsgReqSetMacAddress *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__set_mac_address__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__set_mac_address__pack_to_buffer + (const CtrlMsgReqSetMacAddress *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__set_mac_address__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqSetMacAddress * + ctrl_msg__req__set_mac_address__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqSetMacAddress *) + protobuf_c_message_unpack (&ctrl_msg__req__set_mac_address__descriptor, + allocator, len, data); +} +void ctrl_msg__req__set_mac_address__free_unpacked + (CtrlMsgReqSetMacAddress *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__set_mac_address__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__set_mac_address__init + (CtrlMsgRespSetMacAddress *message) +{ + static const CtrlMsgRespSetMacAddress init_value = CTRL_MSG__RESP__SET_MAC_ADDRESS__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__set_mac_address__get_packed_size + (const CtrlMsgRespSetMacAddress *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__set_mac_address__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__set_mac_address__pack + (const CtrlMsgRespSetMacAddress *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__set_mac_address__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__set_mac_address__pack_to_buffer + (const CtrlMsgRespSetMacAddress *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__set_mac_address__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespSetMacAddress * + ctrl_msg__resp__set_mac_address__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespSetMacAddress *) + protobuf_c_message_unpack (&ctrl_msg__resp__set_mac_address__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__set_mac_address__free_unpacked + (CtrlMsgRespSetMacAddress *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__set_mac_address__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__get_apconfig__init + (CtrlMsgReqGetAPConfig *message) +{ + static const CtrlMsgReqGetAPConfig init_value = CTRL_MSG__REQ__GET_APCONFIG__INIT; + *message = init_value; +} +size_t ctrl_msg__req__get_apconfig__get_packed_size + (const CtrlMsgReqGetAPConfig *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_apconfig__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__get_apconfig__pack + (const CtrlMsgReqGetAPConfig *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_apconfig__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__get_apconfig__pack_to_buffer + (const CtrlMsgReqGetAPConfig *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_apconfig__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqGetAPConfig * + ctrl_msg__req__get_apconfig__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqGetAPConfig *) + protobuf_c_message_unpack (&ctrl_msg__req__get_apconfig__descriptor, + allocator, len, data); +} +void ctrl_msg__req__get_apconfig__free_unpacked + (CtrlMsgReqGetAPConfig *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__get_apconfig__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__get_apconfig__init + (CtrlMsgRespGetAPConfig *message) +{ + static const CtrlMsgRespGetAPConfig init_value = CTRL_MSG__RESP__GET_APCONFIG__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__get_apconfig__get_packed_size + (const CtrlMsgRespGetAPConfig *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_apconfig__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__get_apconfig__pack + (const CtrlMsgRespGetAPConfig *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_apconfig__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__get_apconfig__pack_to_buffer + (const CtrlMsgRespGetAPConfig *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_apconfig__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespGetAPConfig * + ctrl_msg__resp__get_apconfig__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespGetAPConfig *) + protobuf_c_message_unpack (&ctrl_msg__resp__get_apconfig__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__get_apconfig__free_unpacked + (CtrlMsgRespGetAPConfig *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__get_apconfig__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__connect_ap__init + (CtrlMsgReqConnectAP *message) +{ + static const CtrlMsgReqConnectAP init_value = CTRL_MSG__REQ__CONNECT_AP__INIT; + *message = init_value; +} +size_t ctrl_msg__req__connect_ap__get_packed_size + (const CtrlMsgReqConnectAP *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__connect_ap__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__connect_ap__pack + (const CtrlMsgReqConnectAP *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__connect_ap__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__connect_ap__pack_to_buffer + (const CtrlMsgReqConnectAP *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__connect_ap__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqConnectAP * + ctrl_msg__req__connect_ap__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqConnectAP *) + protobuf_c_message_unpack (&ctrl_msg__req__connect_ap__descriptor, + allocator, len, data); +} +void ctrl_msg__req__connect_ap__free_unpacked + (CtrlMsgReqConnectAP *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__connect_ap__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__connect_ap__init + (CtrlMsgRespConnectAP *message) +{ + static const CtrlMsgRespConnectAP init_value = CTRL_MSG__RESP__CONNECT_AP__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__connect_ap__get_packed_size + (const CtrlMsgRespConnectAP *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__connect_ap__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__connect_ap__pack + (const CtrlMsgRespConnectAP *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__connect_ap__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__connect_ap__pack_to_buffer + (const CtrlMsgRespConnectAP *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__connect_ap__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespConnectAP * + ctrl_msg__resp__connect_ap__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespConnectAP *) + protobuf_c_message_unpack (&ctrl_msg__resp__connect_ap__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__connect_ap__free_unpacked + (CtrlMsgRespConnectAP *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__connect_ap__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__get_soft_apconfig__init + (CtrlMsgReqGetSoftAPConfig *message) +{ + static const CtrlMsgReqGetSoftAPConfig init_value = CTRL_MSG__REQ__GET_SOFT_APCONFIG__INIT; + *message = init_value; +} +size_t ctrl_msg__req__get_soft_apconfig__get_packed_size + (const CtrlMsgReqGetSoftAPConfig *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_soft_apconfig__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__get_soft_apconfig__pack + (const CtrlMsgReqGetSoftAPConfig *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_soft_apconfig__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__get_soft_apconfig__pack_to_buffer + (const CtrlMsgReqGetSoftAPConfig *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_soft_apconfig__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqGetSoftAPConfig * + ctrl_msg__req__get_soft_apconfig__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqGetSoftAPConfig *) + protobuf_c_message_unpack (&ctrl_msg__req__get_soft_apconfig__descriptor, + allocator, len, data); +} +void ctrl_msg__req__get_soft_apconfig__free_unpacked + (CtrlMsgReqGetSoftAPConfig *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__get_soft_apconfig__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__get_soft_apconfig__init + (CtrlMsgRespGetSoftAPConfig *message) +{ + static const CtrlMsgRespGetSoftAPConfig init_value = CTRL_MSG__RESP__GET_SOFT_APCONFIG__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__get_soft_apconfig__get_packed_size + (const CtrlMsgRespGetSoftAPConfig *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_soft_apconfig__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__get_soft_apconfig__pack + (const CtrlMsgRespGetSoftAPConfig *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_soft_apconfig__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__get_soft_apconfig__pack_to_buffer + (const CtrlMsgRespGetSoftAPConfig *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_soft_apconfig__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespGetSoftAPConfig * + ctrl_msg__resp__get_soft_apconfig__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespGetSoftAPConfig *) + protobuf_c_message_unpack (&ctrl_msg__resp__get_soft_apconfig__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__get_soft_apconfig__free_unpacked + (CtrlMsgRespGetSoftAPConfig *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__get_soft_apconfig__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__start_soft_ap__init + (CtrlMsgReqStartSoftAP *message) +{ + static const CtrlMsgReqStartSoftAP init_value = CTRL_MSG__REQ__START_SOFT_AP__INIT; + *message = init_value; +} +size_t ctrl_msg__req__start_soft_ap__get_packed_size + (const CtrlMsgReqStartSoftAP *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__start_soft_ap__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__start_soft_ap__pack + (const CtrlMsgReqStartSoftAP *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__start_soft_ap__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__start_soft_ap__pack_to_buffer + (const CtrlMsgReqStartSoftAP *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__start_soft_ap__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqStartSoftAP * + ctrl_msg__req__start_soft_ap__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqStartSoftAP *) + protobuf_c_message_unpack (&ctrl_msg__req__start_soft_ap__descriptor, + allocator, len, data); +} +void ctrl_msg__req__start_soft_ap__free_unpacked + (CtrlMsgReqStartSoftAP *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__start_soft_ap__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__start_soft_ap__init + (CtrlMsgRespStartSoftAP *message) +{ + static const CtrlMsgRespStartSoftAP init_value = CTRL_MSG__RESP__START_SOFT_AP__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__start_soft_ap__get_packed_size + (const CtrlMsgRespStartSoftAP *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__start_soft_ap__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__start_soft_ap__pack + (const CtrlMsgRespStartSoftAP *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__start_soft_ap__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__start_soft_ap__pack_to_buffer + (const CtrlMsgRespStartSoftAP *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__start_soft_ap__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespStartSoftAP * + ctrl_msg__resp__start_soft_ap__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespStartSoftAP *) + protobuf_c_message_unpack (&ctrl_msg__resp__start_soft_ap__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__start_soft_ap__free_unpacked + (CtrlMsgRespStartSoftAP *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__start_soft_ap__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__scan_result__init + (CtrlMsgReqScanResult *message) +{ + static const CtrlMsgReqScanResult init_value = CTRL_MSG__REQ__SCAN_RESULT__INIT; + *message = init_value; +} +size_t ctrl_msg__req__scan_result__get_packed_size + (const CtrlMsgReqScanResult *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__scan_result__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__scan_result__pack + (const CtrlMsgReqScanResult *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__scan_result__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__scan_result__pack_to_buffer + (const CtrlMsgReqScanResult *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__scan_result__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqScanResult * + ctrl_msg__req__scan_result__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqScanResult *) + protobuf_c_message_unpack (&ctrl_msg__req__scan_result__descriptor, + allocator, len, data); +} +void ctrl_msg__req__scan_result__free_unpacked + (CtrlMsgReqScanResult *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__scan_result__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__scan_result__init + (CtrlMsgRespScanResult *message) +{ + static const CtrlMsgRespScanResult init_value = CTRL_MSG__RESP__SCAN_RESULT__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__scan_result__get_packed_size + (const CtrlMsgRespScanResult *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__scan_result__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__scan_result__pack + (const CtrlMsgRespScanResult *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__scan_result__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__scan_result__pack_to_buffer + (const CtrlMsgRespScanResult *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__scan_result__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespScanResult * + ctrl_msg__resp__scan_result__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespScanResult *) + protobuf_c_message_unpack (&ctrl_msg__resp__scan_result__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__scan_result__free_unpacked + (CtrlMsgRespScanResult *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__scan_result__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__soft_apconnected_sta__init + (CtrlMsgReqSoftAPConnectedSTA *message) +{ + static const CtrlMsgReqSoftAPConnectedSTA init_value = CTRL_MSG__REQ__SOFT_APCONNECTED_STA__INIT; + *message = init_value; +} +size_t ctrl_msg__req__soft_apconnected_sta__get_packed_size + (const CtrlMsgReqSoftAPConnectedSTA *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__soft_apconnected_sta__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__soft_apconnected_sta__pack + (const CtrlMsgReqSoftAPConnectedSTA *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__soft_apconnected_sta__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__soft_apconnected_sta__pack_to_buffer + (const CtrlMsgReqSoftAPConnectedSTA *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__soft_apconnected_sta__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqSoftAPConnectedSTA * + ctrl_msg__req__soft_apconnected_sta__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqSoftAPConnectedSTA *) + protobuf_c_message_unpack (&ctrl_msg__req__soft_apconnected_sta__descriptor, + allocator, len, data); +} +void ctrl_msg__req__soft_apconnected_sta__free_unpacked + (CtrlMsgReqSoftAPConnectedSTA *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__soft_apconnected_sta__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__soft_apconnected_sta__init + (CtrlMsgRespSoftAPConnectedSTA *message) +{ + static const CtrlMsgRespSoftAPConnectedSTA init_value = CTRL_MSG__RESP__SOFT_APCONNECTED_STA__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__soft_apconnected_sta__get_packed_size + (const CtrlMsgRespSoftAPConnectedSTA *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__soft_apconnected_sta__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__soft_apconnected_sta__pack + (const CtrlMsgRespSoftAPConnectedSTA *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__soft_apconnected_sta__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__soft_apconnected_sta__pack_to_buffer + (const CtrlMsgRespSoftAPConnectedSTA *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__soft_apconnected_sta__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespSoftAPConnectedSTA * + ctrl_msg__resp__soft_apconnected_sta__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespSoftAPConnectedSTA *) + protobuf_c_message_unpack (&ctrl_msg__resp__soft_apconnected_sta__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__soft_apconnected_sta__free_unpacked + (CtrlMsgRespSoftAPConnectedSTA *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__soft_apconnected_sta__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__otabegin__init + (CtrlMsgReqOTABegin *message) +{ + static const CtrlMsgReqOTABegin init_value = CTRL_MSG__REQ__OTABEGIN__INIT; + *message = init_value; +} +size_t ctrl_msg__req__otabegin__get_packed_size + (const CtrlMsgReqOTABegin *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__otabegin__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__otabegin__pack + (const CtrlMsgReqOTABegin *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__otabegin__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__otabegin__pack_to_buffer + (const CtrlMsgReqOTABegin *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__otabegin__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqOTABegin * + ctrl_msg__req__otabegin__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqOTABegin *) + protobuf_c_message_unpack (&ctrl_msg__req__otabegin__descriptor, + allocator, len, data); +} +void ctrl_msg__req__otabegin__free_unpacked + (CtrlMsgReqOTABegin *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__otabegin__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__otabegin__init + (CtrlMsgRespOTABegin *message) +{ + static const CtrlMsgRespOTABegin init_value = CTRL_MSG__RESP__OTABEGIN__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__otabegin__get_packed_size + (const CtrlMsgRespOTABegin *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__otabegin__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__otabegin__pack + (const CtrlMsgRespOTABegin *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__otabegin__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__otabegin__pack_to_buffer + (const CtrlMsgRespOTABegin *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__otabegin__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespOTABegin * + ctrl_msg__resp__otabegin__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespOTABegin *) + protobuf_c_message_unpack (&ctrl_msg__resp__otabegin__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__otabegin__free_unpacked + (CtrlMsgRespOTABegin *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__otabegin__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__otawrite__init + (CtrlMsgReqOTAWrite *message) +{ + static const CtrlMsgReqOTAWrite init_value = CTRL_MSG__REQ__OTAWRITE__INIT; + *message = init_value; +} +size_t ctrl_msg__req__otawrite__get_packed_size + (const CtrlMsgReqOTAWrite *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__otawrite__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__otawrite__pack + (const CtrlMsgReqOTAWrite *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__otawrite__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__otawrite__pack_to_buffer + (const CtrlMsgReqOTAWrite *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__otawrite__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqOTAWrite * + ctrl_msg__req__otawrite__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqOTAWrite *) + protobuf_c_message_unpack (&ctrl_msg__req__otawrite__descriptor, + allocator, len, data); +} +void ctrl_msg__req__otawrite__free_unpacked + (CtrlMsgReqOTAWrite *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__otawrite__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__otawrite__init + (CtrlMsgRespOTAWrite *message) +{ + static const CtrlMsgRespOTAWrite init_value = CTRL_MSG__RESP__OTAWRITE__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__otawrite__get_packed_size + (const CtrlMsgRespOTAWrite *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__otawrite__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__otawrite__pack + (const CtrlMsgRespOTAWrite *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__otawrite__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__otawrite__pack_to_buffer + (const CtrlMsgRespOTAWrite *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__otawrite__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespOTAWrite * + ctrl_msg__resp__otawrite__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespOTAWrite *) + protobuf_c_message_unpack (&ctrl_msg__resp__otawrite__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__otawrite__free_unpacked + (CtrlMsgRespOTAWrite *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__otawrite__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__otaend__init + (CtrlMsgReqOTAEnd *message) +{ + static const CtrlMsgReqOTAEnd init_value = CTRL_MSG__REQ__OTAEND__INIT; + *message = init_value; +} +size_t ctrl_msg__req__otaend__get_packed_size + (const CtrlMsgReqOTAEnd *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__otaend__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__otaend__pack + (const CtrlMsgReqOTAEnd *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__otaend__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__otaend__pack_to_buffer + (const CtrlMsgReqOTAEnd *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__otaend__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqOTAEnd * + ctrl_msg__req__otaend__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqOTAEnd *) + protobuf_c_message_unpack (&ctrl_msg__req__otaend__descriptor, + allocator, len, data); +} +void ctrl_msg__req__otaend__free_unpacked + (CtrlMsgReqOTAEnd *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__otaend__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__otaend__init + (CtrlMsgRespOTAEnd *message) +{ + static const CtrlMsgRespOTAEnd init_value = CTRL_MSG__RESP__OTAEND__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__otaend__get_packed_size + (const CtrlMsgRespOTAEnd *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__otaend__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__otaend__pack + (const CtrlMsgRespOTAEnd *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__otaend__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__otaend__pack_to_buffer + (const CtrlMsgRespOTAEnd *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__otaend__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespOTAEnd * + ctrl_msg__resp__otaend__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespOTAEnd *) + protobuf_c_message_unpack (&ctrl_msg__resp__otaend__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__otaend__free_unpacked + (CtrlMsgRespOTAEnd *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__otaend__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__vendor_iedata__init + (CtrlMsgReqVendorIEData *message) +{ + static const CtrlMsgReqVendorIEData init_value = CTRL_MSG__REQ__VENDOR_IEDATA__INIT; + *message = init_value; +} +size_t ctrl_msg__req__vendor_iedata__get_packed_size + (const CtrlMsgReqVendorIEData *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__vendor_iedata__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__vendor_iedata__pack + (const CtrlMsgReqVendorIEData *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__vendor_iedata__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__vendor_iedata__pack_to_buffer + (const CtrlMsgReqVendorIEData *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__vendor_iedata__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqVendorIEData * + ctrl_msg__req__vendor_iedata__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqVendorIEData *) + protobuf_c_message_unpack (&ctrl_msg__req__vendor_iedata__descriptor, + allocator, len, data); +} +void ctrl_msg__req__vendor_iedata__free_unpacked + (CtrlMsgReqVendorIEData *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__vendor_iedata__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__set_soft_apvendor_specific_ie__init + (CtrlMsgReqSetSoftAPVendorSpecificIE *message) +{ + static const CtrlMsgReqSetSoftAPVendorSpecificIE init_value = CTRL_MSG__REQ__SET_SOFT_APVENDOR_SPECIFIC_IE__INIT; + *message = init_value; +} +size_t ctrl_msg__req__set_soft_apvendor_specific_ie__get_packed_size + (const CtrlMsgReqSetSoftAPVendorSpecificIE *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__set_soft_apvendor_specific_ie__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__set_soft_apvendor_specific_ie__pack + (const CtrlMsgReqSetSoftAPVendorSpecificIE *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__set_soft_apvendor_specific_ie__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__set_soft_apvendor_specific_ie__pack_to_buffer + (const CtrlMsgReqSetSoftAPVendorSpecificIE *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__set_soft_apvendor_specific_ie__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqSetSoftAPVendorSpecificIE * + ctrl_msg__req__set_soft_apvendor_specific_ie__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqSetSoftAPVendorSpecificIE *) + protobuf_c_message_unpack (&ctrl_msg__req__set_soft_apvendor_specific_ie__descriptor, + allocator, len, data); +} +void ctrl_msg__req__set_soft_apvendor_specific_ie__free_unpacked + (CtrlMsgReqSetSoftAPVendorSpecificIE *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__set_soft_apvendor_specific_ie__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__set_soft_apvendor_specific_ie__init + (CtrlMsgRespSetSoftAPVendorSpecificIE *message) +{ + static const CtrlMsgRespSetSoftAPVendorSpecificIE init_value = CTRL_MSG__RESP__SET_SOFT_APVENDOR_SPECIFIC_IE__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__set_soft_apvendor_specific_ie__get_packed_size + (const CtrlMsgRespSetSoftAPVendorSpecificIE *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__set_soft_apvendor_specific_ie__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__set_soft_apvendor_specific_ie__pack + (const CtrlMsgRespSetSoftAPVendorSpecificIE *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__set_soft_apvendor_specific_ie__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__set_soft_apvendor_specific_ie__pack_to_buffer + (const CtrlMsgRespSetSoftAPVendorSpecificIE *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__set_soft_apvendor_specific_ie__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespSetSoftAPVendorSpecificIE * + ctrl_msg__resp__set_soft_apvendor_specific_ie__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespSetSoftAPVendorSpecificIE *) + protobuf_c_message_unpack (&ctrl_msg__resp__set_soft_apvendor_specific_ie__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__set_soft_apvendor_specific_ie__free_unpacked + (CtrlMsgRespSetSoftAPVendorSpecificIE *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__set_soft_apvendor_specific_ie__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__set_wifi_max_tx_power__init + (CtrlMsgReqSetWifiMaxTxPower *message) +{ + static const CtrlMsgReqSetWifiMaxTxPower init_value = CTRL_MSG__REQ__SET_WIFI_MAX_TX_POWER__INIT; + *message = init_value; +} +size_t ctrl_msg__req__set_wifi_max_tx_power__get_packed_size + (const CtrlMsgReqSetWifiMaxTxPower *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__set_wifi_max_tx_power__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__set_wifi_max_tx_power__pack + (const CtrlMsgReqSetWifiMaxTxPower *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__set_wifi_max_tx_power__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__set_wifi_max_tx_power__pack_to_buffer + (const CtrlMsgReqSetWifiMaxTxPower *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__set_wifi_max_tx_power__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqSetWifiMaxTxPower * + ctrl_msg__req__set_wifi_max_tx_power__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqSetWifiMaxTxPower *) + protobuf_c_message_unpack (&ctrl_msg__req__set_wifi_max_tx_power__descriptor, + allocator, len, data); +} +void ctrl_msg__req__set_wifi_max_tx_power__free_unpacked + (CtrlMsgReqSetWifiMaxTxPower *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__set_wifi_max_tx_power__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__set_wifi_max_tx_power__init + (CtrlMsgRespSetWifiMaxTxPower *message) +{ + static const CtrlMsgRespSetWifiMaxTxPower init_value = CTRL_MSG__RESP__SET_WIFI_MAX_TX_POWER__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__set_wifi_max_tx_power__get_packed_size + (const CtrlMsgRespSetWifiMaxTxPower *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__set_wifi_max_tx_power__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__set_wifi_max_tx_power__pack + (const CtrlMsgRespSetWifiMaxTxPower *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__set_wifi_max_tx_power__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__set_wifi_max_tx_power__pack_to_buffer + (const CtrlMsgRespSetWifiMaxTxPower *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__set_wifi_max_tx_power__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespSetWifiMaxTxPower * + ctrl_msg__resp__set_wifi_max_tx_power__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespSetWifiMaxTxPower *) + protobuf_c_message_unpack (&ctrl_msg__resp__set_wifi_max_tx_power__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__set_wifi_max_tx_power__free_unpacked + (CtrlMsgRespSetWifiMaxTxPower *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__set_wifi_max_tx_power__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__get_wifi_curr_tx_power__init + (CtrlMsgReqGetWifiCurrTxPower *message) +{ + static const CtrlMsgReqGetWifiCurrTxPower init_value = CTRL_MSG__REQ__GET_WIFI_CURR_TX_POWER__INIT; + *message = init_value; +} +size_t ctrl_msg__req__get_wifi_curr_tx_power__get_packed_size + (const CtrlMsgReqGetWifiCurrTxPower *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_wifi_curr_tx_power__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__get_wifi_curr_tx_power__pack + (const CtrlMsgReqGetWifiCurrTxPower *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_wifi_curr_tx_power__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__get_wifi_curr_tx_power__pack_to_buffer + (const CtrlMsgReqGetWifiCurrTxPower *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__get_wifi_curr_tx_power__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqGetWifiCurrTxPower * + ctrl_msg__req__get_wifi_curr_tx_power__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqGetWifiCurrTxPower *) + protobuf_c_message_unpack (&ctrl_msg__req__get_wifi_curr_tx_power__descriptor, + allocator, len, data); +} +void ctrl_msg__req__get_wifi_curr_tx_power__free_unpacked + (CtrlMsgReqGetWifiCurrTxPower *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__get_wifi_curr_tx_power__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__get_wifi_curr_tx_power__init + (CtrlMsgRespGetWifiCurrTxPower *message) +{ + static const CtrlMsgRespGetWifiCurrTxPower init_value = CTRL_MSG__RESP__GET_WIFI_CURR_TX_POWER__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__get_wifi_curr_tx_power__get_packed_size + (const CtrlMsgRespGetWifiCurrTxPower *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_wifi_curr_tx_power__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__get_wifi_curr_tx_power__pack + (const CtrlMsgRespGetWifiCurrTxPower *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_wifi_curr_tx_power__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__get_wifi_curr_tx_power__pack_to_buffer + (const CtrlMsgRespGetWifiCurrTxPower *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__get_wifi_curr_tx_power__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespGetWifiCurrTxPower * + ctrl_msg__resp__get_wifi_curr_tx_power__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespGetWifiCurrTxPower *) + protobuf_c_message_unpack (&ctrl_msg__resp__get_wifi_curr_tx_power__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__get_wifi_curr_tx_power__free_unpacked + (CtrlMsgRespGetWifiCurrTxPower *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__get_wifi_curr_tx_power__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__req__config_heartbeat__init + (CtrlMsgReqConfigHeartbeat *message) +{ + static const CtrlMsgReqConfigHeartbeat init_value = CTRL_MSG__REQ__CONFIG_HEARTBEAT__INIT; + *message = init_value; +} +size_t ctrl_msg__req__config_heartbeat__get_packed_size + (const CtrlMsgReqConfigHeartbeat *message) +{ + assert(message->base.descriptor == &ctrl_msg__req__config_heartbeat__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__req__config_heartbeat__pack + (const CtrlMsgReqConfigHeartbeat *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__req__config_heartbeat__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__req__config_heartbeat__pack_to_buffer + (const CtrlMsgReqConfigHeartbeat *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__req__config_heartbeat__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgReqConfigHeartbeat * + ctrl_msg__req__config_heartbeat__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgReqConfigHeartbeat *) + protobuf_c_message_unpack (&ctrl_msg__req__config_heartbeat__descriptor, + allocator, len, data); +} +void ctrl_msg__req__config_heartbeat__free_unpacked + (CtrlMsgReqConfigHeartbeat *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__req__config_heartbeat__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__resp__config_heartbeat__init + (CtrlMsgRespConfigHeartbeat *message) +{ + static const CtrlMsgRespConfigHeartbeat init_value = CTRL_MSG__RESP__CONFIG_HEARTBEAT__INIT; + *message = init_value; +} +size_t ctrl_msg__resp__config_heartbeat__get_packed_size + (const CtrlMsgRespConfigHeartbeat *message) +{ + assert(message->base.descriptor == &ctrl_msg__resp__config_heartbeat__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__resp__config_heartbeat__pack + (const CtrlMsgRespConfigHeartbeat *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__resp__config_heartbeat__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__resp__config_heartbeat__pack_to_buffer + (const CtrlMsgRespConfigHeartbeat *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__resp__config_heartbeat__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgRespConfigHeartbeat * + ctrl_msg__resp__config_heartbeat__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgRespConfigHeartbeat *) + protobuf_c_message_unpack (&ctrl_msg__resp__config_heartbeat__descriptor, + allocator, len, data); +} +void ctrl_msg__resp__config_heartbeat__free_unpacked + (CtrlMsgRespConfigHeartbeat *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__resp__config_heartbeat__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__event__espinit__init + (CtrlMsgEventESPInit *message) +{ + static const CtrlMsgEventESPInit init_value = CTRL_MSG__EVENT__ESPINIT__INIT; + *message = init_value; +} +size_t ctrl_msg__event__espinit__get_packed_size + (const CtrlMsgEventESPInit *message) +{ + assert(message->base.descriptor == &ctrl_msg__event__espinit__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__event__espinit__pack + (const CtrlMsgEventESPInit *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__event__espinit__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__event__espinit__pack_to_buffer + (const CtrlMsgEventESPInit *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__event__espinit__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgEventESPInit * + ctrl_msg__event__espinit__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgEventESPInit *) + protobuf_c_message_unpack (&ctrl_msg__event__espinit__descriptor, + allocator, len, data); +} +void ctrl_msg__event__espinit__free_unpacked + (CtrlMsgEventESPInit *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__event__espinit__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__event__heartbeat__init + (CtrlMsgEventHeartbeat *message) +{ + static const CtrlMsgEventHeartbeat init_value = CTRL_MSG__EVENT__HEARTBEAT__INIT; + *message = init_value; +} +size_t ctrl_msg__event__heartbeat__get_packed_size + (const CtrlMsgEventHeartbeat *message) +{ + assert(message->base.descriptor == &ctrl_msg__event__heartbeat__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__event__heartbeat__pack + (const CtrlMsgEventHeartbeat *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__event__heartbeat__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__event__heartbeat__pack_to_buffer + (const CtrlMsgEventHeartbeat *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__event__heartbeat__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgEventHeartbeat * + ctrl_msg__event__heartbeat__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgEventHeartbeat *) + protobuf_c_message_unpack (&ctrl_msg__event__heartbeat__descriptor, + allocator, len, data); +} +void ctrl_msg__event__heartbeat__free_unpacked + (CtrlMsgEventHeartbeat *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__event__heartbeat__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__event__station_disconnect_from_ap__init + (CtrlMsgEventStationDisconnectFromAP *message) +{ + static const CtrlMsgEventStationDisconnectFromAP init_value = CTRL_MSG__EVENT__STATION_DISCONNECT_FROM_AP__INIT; + *message = init_value; +} +size_t ctrl_msg__event__station_disconnect_from_ap__get_packed_size + (const CtrlMsgEventStationDisconnectFromAP *message) +{ + assert(message->base.descriptor == &ctrl_msg__event__station_disconnect_from_ap__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__event__station_disconnect_from_ap__pack + (const CtrlMsgEventStationDisconnectFromAP *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__event__station_disconnect_from_ap__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__event__station_disconnect_from_ap__pack_to_buffer + (const CtrlMsgEventStationDisconnectFromAP *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__event__station_disconnect_from_ap__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgEventStationDisconnectFromAP * + ctrl_msg__event__station_disconnect_from_ap__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgEventStationDisconnectFromAP *) + protobuf_c_message_unpack (&ctrl_msg__event__station_disconnect_from_ap__descriptor, + allocator, len, data); +} +void ctrl_msg__event__station_disconnect_from_ap__free_unpacked + (CtrlMsgEventStationDisconnectFromAP *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__event__station_disconnect_from_ap__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__event__station_disconnect_from_espsoft_ap__init + (CtrlMsgEventStationDisconnectFromESPSoftAP *message) +{ + static const CtrlMsgEventStationDisconnectFromESPSoftAP init_value = CTRL_MSG__EVENT__STATION_DISCONNECT_FROM_ESPSOFT_AP__INIT; + *message = init_value; +} +size_t ctrl_msg__event__station_disconnect_from_espsoft_ap__get_packed_size + (const CtrlMsgEventStationDisconnectFromESPSoftAP *message) +{ + assert(message->base.descriptor == &ctrl_msg__event__station_disconnect_from_espsoft_ap__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__event__station_disconnect_from_espsoft_ap__pack + (const CtrlMsgEventStationDisconnectFromESPSoftAP *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__event__station_disconnect_from_espsoft_ap__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__event__station_disconnect_from_espsoft_ap__pack_to_buffer + (const CtrlMsgEventStationDisconnectFromESPSoftAP *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__event__station_disconnect_from_espsoft_ap__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsgEventStationDisconnectFromESPSoftAP * + ctrl_msg__event__station_disconnect_from_espsoft_ap__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsgEventStationDisconnectFromESPSoftAP *) + protobuf_c_message_unpack (&ctrl_msg__event__station_disconnect_from_espsoft_ap__descriptor, + allocator, len, data); +} +void ctrl_msg__event__station_disconnect_from_espsoft_ap__free_unpacked + (CtrlMsgEventStationDisconnectFromESPSoftAP *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__event__station_disconnect_from_espsoft_ap__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void ctrl_msg__init + (CtrlMsg *message) +{ + static const CtrlMsg init_value = CTRL_MSG__INIT; + *message = init_value; +} +size_t ctrl_msg__get_packed_size + (const CtrlMsg *message) +{ + assert(message->base.descriptor == &ctrl_msg__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t ctrl_msg__pack + (const CtrlMsg *message, + uint8_t *out) +{ + assert(message->base.descriptor == &ctrl_msg__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t ctrl_msg__pack_to_buffer + (const CtrlMsg *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &ctrl_msg__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CtrlMsg * + ctrl_msg__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CtrlMsg *) + protobuf_c_message_unpack (&ctrl_msg__descriptor, + allocator, len, data); +} +void ctrl_msg__free_unpacked + (CtrlMsg *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &ctrl_msg__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor scan_result__field_descriptors[5] = +{ + { + "ssid", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(ScanResult, ssid), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "chnl", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_UINT32, + 0, /* quantifier_offset */ + offsetof(ScanResult, chnl), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "rssi", + 3, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(ScanResult, rssi), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "bssid", + 4, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(ScanResult, bssid), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "sec_prot", + 5, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(ScanResult, sec_prot), + &ctrl__wifi_sec_prot__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned scan_result__field_indices_by_name[] = { + 3, /* field[3] = bssid */ + 1, /* field[1] = chnl */ + 2, /* field[2] = rssi */ + 4, /* field[4] = sec_prot */ + 0, /* field[0] = ssid */ +}; +static const ProtobufCIntRange scan_result__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 5 } +}; +const ProtobufCMessageDescriptor scan_result__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "ScanResult", + "ScanResult", + "ScanResult", + "", + sizeof(ScanResult), + 5, + scan_result__field_descriptors, + scan_result__field_indices_by_name, + 1, scan_result__number_ranges, + (ProtobufCMessageInit) scan_result__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor connected_stalist__field_descriptors[2] = +{ + { + "mac", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(ConnectedSTAList, mac), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "rssi", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(ConnectedSTAList, rssi), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned connected_stalist__field_indices_by_name[] = { + 0, /* field[0] = mac */ + 1, /* field[1] = rssi */ +}; +static const ProtobufCIntRange connected_stalist__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor connected_stalist__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "ConnectedSTAList", + "ConnectedSTAList", + "ConnectedSTAList", + "", + sizeof(ConnectedSTAList), + 2, + connected_stalist__field_descriptors, + connected_stalist__field_indices_by_name, + 1, connected_stalist__number_ranges, + (ProtobufCMessageInit) connected_stalist__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__req__get_mac_address__field_descriptors[1] = +{ + { + "mode", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqGetMacAddress, mode), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__req__get_mac_address__field_indices_by_name[] = { + 0, /* field[0] = mode */ +}; +static const ProtobufCIntRange ctrl_msg__req__get_mac_address__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor ctrl_msg__req__get_mac_address__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_GetMacAddress", + "CtrlMsgReqGetMacAddress", + "CtrlMsgReqGetMacAddress", + "", + sizeof(CtrlMsgReqGetMacAddress), + 1, + ctrl_msg__req__get_mac_address__field_descriptors, + ctrl_msg__req__get_mac_address__field_indices_by_name, + 1, ctrl_msg__req__get_mac_address__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__get_mac_address__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__get_mac_address__field_descriptors[2] = +{ + { + "mac", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetMacAddress, mac), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetMacAddress, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__get_mac_address__field_indices_by_name[] = { + 0, /* field[0] = mac */ + 1, /* field[1] = resp */ +}; +static const ProtobufCIntRange ctrl_msg__resp__get_mac_address__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__get_mac_address__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_GetMacAddress", + "CtrlMsgRespGetMacAddress", + "CtrlMsgRespGetMacAddress", + "", + sizeof(CtrlMsgRespGetMacAddress), + 2, + ctrl_msg__resp__get_mac_address__field_descriptors, + ctrl_msg__resp__get_mac_address__field_indices_by_name, + 1, ctrl_msg__resp__get_mac_address__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__get_mac_address__init, + NULL,NULL,NULL /* reserved[123] */ +}; +#define ctrl_msg__req__get_mode__field_descriptors NULL +#define ctrl_msg__req__get_mode__field_indices_by_name NULL +#define ctrl_msg__req__get_mode__number_ranges NULL +const ProtobufCMessageDescriptor ctrl_msg__req__get_mode__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_GetMode", + "CtrlMsgReqGetMode", + "CtrlMsgReqGetMode", + "", + sizeof(CtrlMsgReqGetMode), + 0, + ctrl_msg__req__get_mode__field_descriptors, + ctrl_msg__req__get_mode__field_indices_by_name, + 0, ctrl_msg__req__get_mode__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__get_mode__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__get_mode__field_descriptors[2] = +{ + { + "mode", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetMode, mode), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetMode, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__get_mode__field_indices_by_name[] = { + 0, /* field[0] = mode */ + 1, /* field[1] = resp */ +}; +static const ProtobufCIntRange ctrl_msg__resp__get_mode__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__get_mode__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_GetMode", + "CtrlMsgRespGetMode", + "CtrlMsgRespGetMode", + "", + sizeof(CtrlMsgRespGetMode), + 2, + ctrl_msg__resp__get_mode__field_descriptors, + ctrl_msg__resp__get_mode__field_indices_by_name, + 1, ctrl_msg__resp__get_mode__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__get_mode__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__req__set_mode__field_descriptors[1] = +{ + { + "mode", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqSetMode, mode), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__req__set_mode__field_indices_by_name[] = { + 0, /* field[0] = mode */ +}; +static const ProtobufCIntRange ctrl_msg__req__set_mode__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor ctrl_msg__req__set_mode__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_SetMode", + "CtrlMsgReqSetMode", + "CtrlMsgReqSetMode", + "", + sizeof(CtrlMsgReqSetMode), + 1, + ctrl_msg__req__set_mode__field_descriptors, + ctrl_msg__req__set_mode__field_indices_by_name, + 1, ctrl_msg__req__set_mode__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__set_mode__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__set_mode__field_descriptors[1] = +{ + { + "resp", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespSetMode, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__set_mode__field_indices_by_name[] = { + 0, /* field[0] = resp */ +}; +static const ProtobufCIntRange ctrl_msg__resp__set_mode__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__set_mode__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_SetMode", + "CtrlMsgRespSetMode", + "CtrlMsgRespSetMode", + "", + sizeof(CtrlMsgRespSetMode), + 1, + ctrl_msg__resp__set_mode__field_descriptors, + ctrl_msg__resp__set_mode__field_indices_by_name, + 1, ctrl_msg__resp__set_mode__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__set_mode__init, + NULL,NULL,NULL /* reserved[123] */ +}; +#define ctrl_msg__req__get_status__field_descriptors NULL +#define ctrl_msg__req__get_status__field_indices_by_name NULL +#define ctrl_msg__req__get_status__number_ranges NULL +const ProtobufCMessageDescriptor ctrl_msg__req__get_status__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_GetStatus", + "CtrlMsgReqGetStatus", + "CtrlMsgReqGetStatus", + "", + sizeof(CtrlMsgReqGetStatus), + 0, + ctrl_msg__req__get_status__field_descriptors, + ctrl_msg__req__get_status__field_indices_by_name, + 0, ctrl_msg__req__get_status__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__get_status__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__get_status__field_descriptors[1] = +{ + { + "resp", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetStatus, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__get_status__field_indices_by_name[] = { + 0, /* field[0] = resp */ +}; +static const ProtobufCIntRange ctrl_msg__resp__get_status__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__get_status__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_GetStatus", + "CtrlMsgRespGetStatus", + "CtrlMsgRespGetStatus", + "", + sizeof(CtrlMsgRespGetStatus), + 1, + ctrl_msg__resp__get_status__field_descriptors, + ctrl_msg__resp__get_status__field_indices_by_name, + 1, ctrl_msg__resp__get_status__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__get_status__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__req__set_mac_address__field_descriptors[2] = +{ + { + "mac", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqSetMacAddress, mac), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "mode", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqSetMacAddress, mode), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__req__set_mac_address__field_indices_by_name[] = { + 0, /* field[0] = mac */ + 1, /* field[1] = mode */ +}; +static const ProtobufCIntRange ctrl_msg__req__set_mac_address__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor ctrl_msg__req__set_mac_address__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_SetMacAddress", + "CtrlMsgReqSetMacAddress", + "CtrlMsgReqSetMacAddress", + "", + sizeof(CtrlMsgReqSetMacAddress), + 2, + ctrl_msg__req__set_mac_address__field_descriptors, + ctrl_msg__req__set_mac_address__field_indices_by_name, + 1, ctrl_msg__req__set_mac_address__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__set_mac_address__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__set_mac_address__field_descriptors[1] = +{ + { + "resp", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespSetMacAddress, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__set_mac_address__field_indices_by_name[] = { + 0, /* field[0] = resp */ +}; +static const ProtobufCIntRange ctrl_msg__resp__set_mac_address__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__set_mac_address__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_SetMacAddress", + "CtrlMsgRespSetMacAddress", + "CtrlMsgRespSetMacAddress", + "", + sizeof(CtrlMsgRespSetMacAddress), + 1, + ctrl_msg__resp__set_mac_address__field_descriptors, + ctrl_msg__resp__set_mac_address__field_indices_by_name, + 1, ctrl_msg__resp__set_mac_address__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__set_mac_address__init, + NULL,NULL,NULL /* reserved[123] */ +}; +#define ctrl_msg__req__get_apconfig__field_descriptors NULL +#define ctrl_msg__req__get_apconfig__field_indices_by_name NULL +#define ctrl_msg__req__get_apconfig__number_ranges NULL +const ProtobufCMessageDescriptor ctrl_msg__req__get_apconfig__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_GetAPConfig", + "CtrlMsgReqGetAPConfig", + "CtrlMsgReqGetAPConfig", + "", + sizeof(CtrlMsgReqGetAPConfig), + 0, + ctrl_msg__req__get_apconfig__field_descriptors, + ctrl_msg__req__get_apconfig__field_indices_by_name, + 0, ctrl_msg__req__get_apconfig__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__get_apconfig__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__get_apconfig__field_descriptors[6] = +{ + { + "ssid", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetAPConfig, ssid), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "bssid", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetAPConfig, bssid), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "rssi", + 3, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetAPConfig, rssi), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "chnl", + 4, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetAPConfig, chnl), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "sec_prot", + 5, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetAPConfig, sec_prot), + &ctrl__wifi_sec_prot__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp", + 6, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetAPConfig, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__get_apconfig__field_indices_by_name[] = { + 1, /* field[1] = bssid */ + 3, /* field[3] = chnl */ + 5, /* field[5] = resp */ + 2, /* field[2] = rssi */ + 4, /* field[4] = sec_prot */ + 0, /* field[0] = ssid */ +}; +static const ProtobufCIntRange ctrl_msg__resp__get_apconfig__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 6 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__get_apconfig__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_GetAPConfig", + "CtrlMsgRespGetAPConfig", + "CtrlMsgRespGetAPConfig", + "", + sizeof(CtrlMsgRespGetAPConfig), + 6, + ctrl_msg__resp__get_apconfig__field_descriptors, + ctrl_msg__resp__get_apconfig__field_indices_by_name, + 1, ctrl_msg__resp__get_apconfig__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__get_apconfig__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__req__connect_ap__field_descriptors[5] = +{ + { + "ssid", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqConnectAP, ssid), + NULL, + &protobuf_c_empty_string, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "pwd", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqConnectAP, pwd), + NULL, + &protobuf_c_empty_string, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "bssid", + 3, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqConnectAP, bssid), + NULL, + &protobuf_c_empty_string, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "is_wpa3_supported", + 4, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqConnectAP, is_wpa3_supported), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "listen_interval", + 5, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqConnectAP, listen_interval), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__req__connect_ap__field_indices_by_name[] = { + 2, /* field[2] = bssid */ + 3, /* field[3] = is_wpa3_supported */ + 4, /* field[4] = listen_interval */ + 1, /* field[1] = pwd */ + 0, /* field[0] = ssid */ +}; +static const ProtobufCIntRange ctrl_msg__req__connect_ap__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 5 } +}; +const ProtobufCMessageDescriptor ctrl_msg__req__connect_ap__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_ConnectAP", + "CtrlMsgReqConnectAP", + "CtrlMsgReqConnectAP", + "", + sizeof(CtrlMsgReqConnectAP), + 5, + ctrl_msg__req__connect_ap__field_descriptors, + ctrl_msg__req__connect_ap__field_indices_by_name, + 1, ctrl_msg__req__connect_ap__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__connect_ap__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__connect_ap__field_descriptors[2] = +{ + { + "resp", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespConnectAP, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "mac", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespConnectAP, mac), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__connect_ap__field_indices_by_name[] = { + 1, /* field[1] = mac */ + 0, /* field[0] = resp */ +}; +static const ProtobufCIntRange ctrl_msg__resp__connect_ap__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__connect_ap__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_ConnectAP", + "CtrlMsgRespConnectAP", + "CtrlMsgRespConnectAP", + "", + sizeof(CtrlMsgRespConnectAP), + 2, + ctrl_msg__resp__connect_ap__field_descriptors, + ctrl_msg__resp__connect_ap__field_indices_by_name, + 1, ctrl_msg__resp__connect_ap__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__connect_ap__init, + NULL,NULL,NULL /* reserved[123] */ +}; +#define ctrl_msg__req__get_soft_apconfig__field_descriptors NULL +#define ctrl_msg__req__get_soft_apconfig__field_indices_by_name NULL +#define ctrl_msg__req__get_soft_apconfig__number_ranges NULL +const ProtobufCMessageDescriptor ctrl_msg__req__get_soft_apconfig__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_GetSoftAPConfig", + "CtrlMsgReqGetSoftAPConfig", + "CtrlMsgReqGetSoftAPConfig", + "", + sizeof(CtrlMsgReqGetSoftAPConfig), + 0, + ctrl_msg__req__get_soft_apconfig__field_descriptors, + ctrl_msg__req__get_soft_apconfig__field_indices_by_name, + 0, ctrl_msg__req__get_soft_apconfig__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__get_soft_apconfig__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__get_soft_apconfig__field_descriptors[8] = +{ + { + "ssid", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetSoftAPConfig, ssid), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "pwd", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetSoftAPConfig, pwd), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "chnl", + 3, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetSoftAPConfig, chnl), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "sec_prot", + 4, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetSoftAPConfig, sec_prot), + &ctrl__wifi_sec_prot__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "max_conn", + 5, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetSoftAPConfig, max_conn), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "ssid_hidden", + 6, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetSoftAPConfig, ssid_hidden), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "bw", + 7, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetSoftAPConfig, bw), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp", + 8, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetSoftAPConfig, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__get_soft_apconfig__field_indices_by_name[] = { + 6, /* field[6] = bw */ + 2, /* field[2] = chnl */ + 4, /* field[4] = max_conn */ + 1, /* field[1] = pwd */ + 7, /* field[7] = resp */ + 3, /* field[3] = sec_prot */ + 0, /* field[0] = ssid */ + 5, /* field[5] = ssid_hidden */ +}; +static const ProtobufCIntRange ctrl_msg__resp__get_soft_apconfig__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 8 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__get_soft_apconfig__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_GetSoftAPConfig", + "CtrlMsgRespGetSoftAPConfig", + "CtrlMsgRespGetSoftAPConfig", + "", + sizeof(CtrlMsgRespGetSoftAPConfig), + 8, + ctrl_msg__resp__get_soft_apconfig__field_descriptors, + ctrl_msg__resp__get_soft_apconfig__field_indices_by_name, + 1, ctrl_msg__resp__get_soft_apconfig__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__get_soft_apconfig__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__req__start_soft_ap__field_descriptors[7] = +{ + { + "ssid", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqStartSoftAP, ssid), + NULL, + &protobuf_c_empty_string, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "pwd", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqStartSoftAP, pwd), + NULL, + &protobuf_c_empty_string, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "chnl", + 3, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqStartSoftAP, chnl), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "sec_prot", + 4, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqStartSoftAP, sec_prot), + &ctrl__wifi_sec_prot__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "max_conn", + 5, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqStartSoftAP, max_conn), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "ssid_hidden", + 6, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqStartSoftAP, ssid_hidden), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "bw", + 7, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqStartSoftAP, bw), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__req__start_soft_ap__field_indices_by_name[] = { + 6, /* field[6] = bw */ + 2, /* field[2] = chnl */ + 4, /* field[4] = max_conn */ + 1, /* field[1] = pwd */ + 3, /* field[3] = sec_prot */ + 0, /* field[0] = ssid */ + 5, /* field[5] = ssid_hidden */ +}; +static const ProtobufCIntRange ctrl_msg__req__start_soft_ap__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 7 } +}; +const ProtobufCMessageDescriptor ctrl_msg__req__start_soft_ap__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_StartSoftAP", + "CtrlMsgReqStartSoftAP", + "CtrlMsgReqStartSoftAP", + "", + sizeof(CtrlMsgReqStartSoftAP), + 7, + ctrl_msg__req__start_soft_ap__field_descriptors, + ctrl_msg__req__start_soft_ap__field_indices_by_name, + 1, ctrl_msg__req__start_soft_ap__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__start_soft_ap__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__start_soft_ap__field_descriptors[2] = +{ + { + "resp", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespStartSoftAP, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "mac", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespStartSoftAP, mac), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__start_soft_ap__field_indices_by_name[] = { + 1, /* field[1] = mac */ + 0, /* field[0] = resp */ +}; +static const ProtobufCIntRange ctrl_msg__resp__start_soft_ap__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__start_soft_ap__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_StartSoftAP", + "CtrlMsgRespStartSoftAP", + "CtrlMsgRespStartSoftAP", + "", + sizeof(CtrlMsgRespStartSoftAP), + 2, + ctrl_msg__resp__start_soft_ap__field_descriptors, + ctrl_msg__resp__start_soft_ap__field_indices_by_name, + 1, ctrl_msg__resp__start_soft_ap__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__start_soft_ap__init, + NULL,NULL,NULL /* reserved[123] */ +}; +#define ctrl_msg__req__scan_result__field_descriptors NULL +#define ctrl_msg__req__scan_result__field_indices_by_name NULL +#define ctrl_msg__req__scan_result__number_ranges NULL +const ProtobufCMessageDescriptor ctrl_msg__req__scan_result__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_ScanResult", + "CtrlMsgReqScanResult", + "CtrlMsgReqScanResult", + "", + sizeof(CtrlMsgReqScanResult), + 0, + ctrl_msg__req__scan_result__field_descriptors, + ctrl_msg__req__scan_result__field_indices_by_name, + 0, ctrl_msg__req__scan_result__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__scan_result__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__scan_result__field_descriptors[3] = +{ + { + "count", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_UINT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespScanResult, count), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "entries", + 2, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsgRespScanResult, n_entries), + offsetof(CtrlMsgRespScanResult, entries), + &scan_result__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp", + 3, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespScanResult, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__scan_result__field_indices_by_name[] = { + 0, /* field[0] = count */ + 1, /* field[1] = entries */ + 2, /* field[2] = resp */ +}; +static const ProtobufCIntRange ctrl_msg__resp__scan_result__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__scan_result__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_ScanResult", + "CtrlMsgRespScanResult", + "CtrlMsgRespScanResult", + "", + sizeof(CtrlMsgRespScanResult), + 3, + ctrl_msg__resp__scan_result__field_descriptors, + ctrl_msg__resp__scan_result__field_indices_by_name, + 1, ctrl_msg__resp__scan_result__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__scan_result__init, + NULL,NULL,NULL /* reserved[123] */ +}; +#define ctrl_msg__req__soft_apconnected_sta__field_descriptors NULL +#define ctrl_msg__req__soft_apconnected_sta__field_indices_by_name NULL +#define ctrl_msg__req__soft_apconnected_sta__number_ranges NULL +const ProtobufCMessageDescriptor ctrl_msg__req__soft_apconnected_sta__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_SoftAPConnectedSTA", + "CtrlMsgReqSoftAPConnectedSTA", + "CtrlMsgReqSoftAPConnectedSTA", + "", + sizeof(CtrlMsgReqSoftAPConnectedSTA), + 0, + ctrl_msg__req__soft_apconnected_sta__field_descriptors, + ctrl_msg__req__soft_apconnected_sta__field_indices_by_name, + 0, ctrl_msg__req__soft_apconnected_sta__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__soft_apconnected_sta__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__soft_apconnected_sta__field_descriptors[3] = +{ + { + "num", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_UINT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespSoftAPConnectedSTA, num), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "stations", + 2, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsgRespSoftAPConnectedSTA, n_stations), + offsetof(CtrlMsgRespSoftAPConnectedSTA, stations), + &connected_stalist__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp", + 3, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespSoftAPConnectedSTA, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__soft_apconnected_sta__field_indices_by_name[] = { + 0, /* field[0] = num */ + 2, /* field[2] = resp */ + 1, /* field[1] = stations */ +}; +static const ProtobufCIntRange ctrl_msg__resp__soft_apconnected_sta__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__soft_apconnected_sta__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_SoftAPConnectedSTA", + "CtrlMsgRespSoftAPConnectedSTA", + "CtrlMsgRespSoftAPConnectedSTA", + "", + sizeof(CtrlMsgRespSoftAPConnectedSTA), + 3, + ctrl_msg__resp__soft_apconnected_sta__field_descriptors, + ctrl_msg__resp__soft_apconnected_sta__field_indices_by_name, + 1, ctrl_msg__resp__soft_apconnected_sta__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__soft_apconnected_sta__init, + NULL,NULL,NULL /* reserved[123] */ +}; +#define ctrl_msg__req__otabegin__field_descriptors NULL +#define ctrl_msg__req__otabegin__field_indices_by_name NULL +#define ctrl_msg__req__otabegin__number_ranges NULL +const ProtobufCMessageDescriptor ctrl_msg__req__otabegin__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_OTABegin", + "CtrlMsgReqOTABegin", + "CtrlMsgReqOTABegin", + "", + sizeof(CtrlMsgReqOTABegin), + 0, + ctrl_msg__req__otabegin__field_descriptors, + ctrl_msg__req__otabegin__field_indices_by_name, + 0, ctrl_msg__req__otabegin__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__otabegin__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__otabegin__field_descriptors[1] = +{ + { + "resp", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespOTABegin, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__otabegin__field_indices_by_name[] = { + 0, /* field[0] = resp */ +}; +static const ProtobufCIntRange ctrl_msg__resp__otabegin__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__otabegin__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_OTABegin", + "CtrlMsgRespOTABegin", + "CtrlMsgRespOTABegin", + "", + sizeof(CtrlMsgRespOTABegin), + 1, + ctrl_msg__resp__otabegin__field_descriptors, + ctrl_msg__resp__otabegin__field_indices_by_name, + 1, ctrl_msg__resp__otabegin__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__otabegin__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__req__otawrite__field_descriptors[1] = +{ + { + "ota_data", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqOTAWrite, ota_data), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__req__otawrite__field_indices_by_name[] = { + 0, /* field[0] = ota_data */ +}; +static const ProtobufCIntRange ctrl_msg__req__otawrite__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor ctrl_msg__req__otawrite__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_OTAWrite", + "CtrlMsgReqOTAWrite", + "CtrlMsgReqOTAWrite", + "", + sizeof(CtrlMsgReqOTAWrite), + 1, + ctrl_msg__req__otawrite__field_descriptors, + ctrl_msg__req__otawrite__field_indices_by_name, + 1, ctrl_msg__req__otawrite__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__otawrite__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__otawrite__field_descriptors[1] = +{ + { + "resp", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespOTAWrite, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__otawrite__field_indices_by_name[] = { + 0, /* field[0] = resp */ +}; +static const ProtobufCIntRange ctrl_msg__resp__otawrite__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__otawrite__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_OTAWrite", + "CtrlMsgRespOTAWrite", + "CtrlMsgRespOTAWrite", + "", + sizeof(CtrlMsgRespOTAWrite), + 1, + ctrl_msg__resp__otawrite__field_descriptors, + ctrl_msg__resp__otawrite__field_indices_by_name, + 1, ctrl_msg__resp__otawrite__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__otawrite__init, + NULL,NULL,NULL /* reserved[123] */ +}; +#define ctrl_msg__req__otaend__field_descriptors NULL +#define ctrl_msg__req__otaend__field_indices_by_name NULL +#define ctrl_msg__req__otaend__number_ranges NULL +const ProtobufCMessageDescriptor ctrl_msg__req__otaend__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_OTAEnd", + "CtrlMsgReqOTAEnd", + "CtrlMsgReqOTAEnd", + "", + sizeof(CtrlMsgReqOTAEnd), + 0, + ctrl_msg__req__otaend__field_descriptors, + ctrl_msg__req__otaend__field_indices_by_name, + 0, ctrl_msg__req__otaend__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__otaend__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__otaend__field_descriptors[1] = +{ + { + "resp", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespOTAEnd, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__otaend__field_indices_by_name[] = { + 0, /* field[0] = resp */ +}; +static const ProtobufCIntRange ctrl_msg__resp__otaend__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__otaend__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_OTAEnd", + "CtrlMsgRespOTAEnd", + "CtrlMsgRespOTAEnd", + "", + sizeof(CtrlMsgRespOTAEnd), + 1, + ctrl_msg__resp__otaend__field_descriptors, + ctrl_msg__resp__otaend__field_indices_by_name, + 1, ctrl_msg__resp__otaend__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__otaend__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__req__vendor_iedata__field_descriptors[5] = +{ + { + "element_id", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqVendorIEData, element_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "length", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqVendorIEData, length), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "vendor_oui", + 3, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqVendorIEData, vendor_oui), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "vendor_oui_type", + 4, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqVendorIEData, vendor_oui_type), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "payload", + 5, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqVendorIEData, payload), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__req__vendor_iedata__field_indices_by_name[] = { + 0, /* field[0] = element_id */ + 1, /* field[1] = length */ + 4, /* field[4] = payload */ + 2, /* field[2] = vendor_oui */ + 3, /* field[3] = vendor_oui_type */ +}; +static const ProtobufCIntRange ctrl_msg__req__vendor_iedata__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 5 } +}; +const ProtobufCMessageDescriptor ctrl_msg__req__vendor_iedata__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_VendorIEData", + "CtrlMsgReqVendorIEData", + "CtrlMsgReqVendorIEData", + "", + sizeof(CtrlMsgReqVendorIEData), + 5, + ctrl_msg__req__vendor_iedata__field_descriptors, + ctrl_msg__req__vendor_iedata__field_indices_by_name, + 1, ctrl_msg__req__vendor_iedata__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__vendor_iedata__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__req__set_soft_apvendor_specific_ie__field_descriptors[4] = +{ + { + "enable", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqSetSoftAPVendorSpecificIE, enable), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "type", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqSetSoftAPVendorSpecificIE, type), + &ctrl__vendor_ietype__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "idx", + 3, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqSetSoftAPVendorSpecificIE, idx), + &ctrl__vendor_ieid__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "vendor_ie_data", + 4, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqSetSoftAPVendorSpecificIE, vendor_ie_data), + &ctrl_msg__req__vendor_iedata__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__req__set_soft_apvendor_specific_ie__field_indices_by_name[] = { + 0, /* field[0] = enable */ + 2, /* field[2] = idx */ + 1, /* field[1] = type */ + 3, /* field[3] = vendor_ie_data */ +}; +static const ProtobufCIntRange ctrl_msg__req__set_soft_apvendor_specific_ie__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 4 } +}; +const ProtobufCMessageDescriptor ctrl_msg__req__set_soft_apvendor_specific_ie__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_SetSoftAPVendorSpecificIE", + "CtrlMsgReqSetSoftAPVendorSpecificIE", + "CtrlMsgReqSetSoftAPVendorSpecificIE", + "", + sizeof(CtrlMsgReqSetSoftAPVendorSpecificIE), + 4, + ctrl_msg__req__set_soft_apvendor_specific_ie__field_descriptors, + ctrl_msg__req__set_soft_apvendor_specific_ie__field_indices_by_name, + 1, ctrl_msg__req__set_soft_apvendor_specific_ie__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__set_soft_apvendor_specific_ie__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__set_soft_apvendor_specific_ie__field_descriptors[1] = +{ + { + "resp", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespSetSoftAPVendorSpecificIE, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__set_soft_apvendor_specific_ie__field_indices_by_name[] = { + 0, /* field[0] = resp */ +}; +static const ProtobufCIntRange ctrl_msg__resp__set_soft_apvendor_specific_ie__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__set_soft_apvendor_specific_ie__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_SetSoftAPVendorSpecificIE", + "CtrlMsgRespSetSoftAPVendorSpecificIE", + "CtrlMsgRespSetSoftAPVendorSpecificIE", + "", + sizeof(CtrlMsgRespSetSoftAPVendorSpecificIE), + 1, + ctrl_msg__resp__set_soft_apvendor_specific_ie__field_descriptors, + ctrl_msg__resp__set_soft_apvendor_specific_ie__field_indices_by_name, + 1, ctrl_msg__resp__set_soft_apvendor_specific_ie__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__set_soft_apvendor_specific_ie__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__req__set_wifi_max_tx_power__field_descriptors[1] = +{ + { + "wifi_max_tx_power", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqSetWifiMaxTxPower, wifi_max_tx_power), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__req__set_wifi_max_tx_power__field_indices_by_name[] = { + 0, /* field[0] = wifi_max_tx_power */ +}; +static const ProtobufCIntRange ctrl_msg__req__set_wifi_max_tx_power__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor ctrl_msg__req__set_wifi_max_tx_power__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_SetWifiMaxTxPower", + "CtrlMsgReqSetWifiMaxTxPower", + "CtrlMsgReqSetWifiMaxTxPower", + "", + sizeof(CtrlMsgReqSetWifiMaxTxPower), + 1, + ctrl_msg__req__set_wifi_max_tx_power__field_descriptors, + ctrl_msg__req__set_wifi_max_tx_power__field_indices_by_name, + 1, ctrl_msg__req__set_wifi_max_tx_power__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__set_wifi_max_tx_power__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__set_wifi_max_tx_power__field_descriptors[1] = +{ + { + "resp", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespSetWifiMaxTxPower, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__set_wifi_max_tx_power__field_indices_by_name[] = { + 0, /* field[0] = resp */ +}; +static const ProtobufCIntRange ctrl_msg__resp__set_wifi_max_tx_power__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__set_wifi_max_tx_power__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_SetWifiMaxTxPower", + "CtrlMsgRespSetWifiMaxTxPower", + "CtrlMsgRespSetWifiMaxTxPower", + "", + sizeof(CtrlMsgRespSetWifiMaxTxPower), + 1, + ctrl_msg__resp__set_wifi_max_tx_power__field_descriptors, + ctrl_msg__resp__set_wifi_max_tx_power__field_indices_by_name, + 1, ctrl_msg__resp__set_wifi_max_tx_power__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__set_wifi_max_tx_power__init, + NULL,NULL,NULL /* reserved[123] */ +}; +#define ctrl_msg__req__get_wifi_curr_tx_power__field_descriptors NULL +#define ctrl_msg__req__get_wifi_curr_tx_power__field_indices_by_name NULL +#define ctrl_msg__req__get_wifi_curr_tx_power__number_ranges NULL +const ProtobufCMessageDescriptor ctrl_msg__req__get_wifi_curr_tx_power__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_GetWifiCurrTxPower", + "CtrlMsgReqGetWifiCurrTxPower", + "CtrlMsgReqGetWifiCurrTxPower", + "", + sizeof(CtrlMsgReqGetWifiCurrTxPower), + 0, + ctrl_msg__req__get_wifi_curr_tx_power__field_descriptors, + ctrl_msg__req__get_wifi_curr_tx_power__field_indices_by_name, + 0, ctrl_msg__req__get_wifi_curr_tx_power__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__get_wifi_curr_tx_power__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__get_wifi_curr_tx_power__field_descriptors[2] = +{ + { + "wifi_curr_tx_power", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetWifiCurrTxPower, wifi_curr_tx_power), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespGetWifiCurrTxPower, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__get_wifi_curr_tx_power__field_indices_by_name[] = { + 1, /* field[1] = resp */ + 0, /* field[0] = wifi_curr_tx_power */ +}; +static const ProtobufCIntRange ctrl_msg__resp__get_wifi_curr_tx_power__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__get_wifi_curr_tx_power__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_GetWifiCurrTxPower", + "CtrlMsgRespGetWifiCurrTxPower", + "CtrlMsgRespGetWifiCurrTxPower", + "", + sizeof(CtrlMsgRespGetWifiCurrTxPower), + 2, + ctrl_msg__resp__get_wifi_curr_tx_power__field_descriptors, + ctrl_msg__resp__get_wifi_curr_tx_power__field_indices_by_name, + 1, ctrl_msg__resp__get_wifi_curr_tx_power__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__get_wifi_curr_tx_power__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__req__config_heartbeat__field_descriptors[2] = +{ + { + "enable", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqConfigHeartbeat, enable), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "duration", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgReqConfigHeartbeat, duration), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__req__config_heartbeat__field_indices_by_name[] = { + 1, /* field[1] = duration */ + 0, /* field[0] = enable */ +}; +static const ProtobufCIntRange ctrl_msg__req__config_heartbeat__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor ctrl_msg__req__config_heartbeat__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Req_ConfigHeartbeat", + "CtrlMsgReqConfigHeartbeat", + "CtrlMsgReqConfigHeartbeat", + "", + sizeof(CtrlMsgReqConfigHeartbeat), + 2, + ctrl_msg__req__config_heartbeat__field_descriptors, + ctrl_msg__req__config_heartbeat__field_indices_by_name, + 1, ctrl_msg__req__config_heartbeat__number_ranges, + (ProtobufCMessageInit) ctrl_msg__req__config_heartbeat__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__resp__config_heartbeat__field_descriptors[1] = +{ + { + "resp", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgRespConfigHeartbeat, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__resp__config_heartbeat__field_indices_by_name[] = { + 0, /* field[0] = resp */ +}; +static const ProtobufCIntRange ctrl_msg__resp__config_heartbeat__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor ctrl_msg__resp__config_heartbeat__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Resp_ConfigHeartbeat", + "CtrlMsgRespConfigHeartbeat", + "CtrlMsgRespConfigHeartbeat", + "", + sizeof(CtrlMsgRespConfigHeartbeat), + 1, + ctrl_msg__resp__config_heartbeat__field_descriptors, + ctrl_msg__resp__config_heartbeat__field_indices_by_name, + 1, ctrl_msg__resp__config_heartbeat__number_ranges, + (ProtobufCMessageInit) ctrl_msg__resp__config_heartbeat__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__event__espinit__field_descriptors[1] = +{ + { + "init_data", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(CtrlMsgEventESPInit, init_data), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__event__espinit__field_indices_by_name[] = { + 0, /* field[0] = init_data */ +}; +static const ProtobufCIntRange ctrl_msg__event__espinit__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor ctrl_msg__event__espinit__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Event_ESPInit", + "CtrlMsgEventESPInit", + "CtrlMsgEventESPInit", + "", + sizeof(CtrlMsgEventESPInit), + 1, + ctrl_msg__event__espinit__field_descriptors, + ctrl_msg__event__espinit__field_indices_by_name, + 1, ctrl_msg__event__espinit__number_ranges, + (ProtobufCMessageInit) ctrl_msg__event__espinit__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__event__heartbeat__field_descriptors[1] = +{ + { + "hb_num", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgEventHeartbeat, hb_num), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__event__heartbeat__field_indices_by_name[] = { + 0, /* field[0] = hb_num */ +}; +static const ProtobufCIntRange ctrl_msg__event__heartbeat__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor ctrl_msg__event__heartbeat__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Event_Heartbeat", + "CtrlMsgEventHeartbeat", + "CtrlMsgEventHeartbeat", + "", + sizeof(CtrlMsgEventHeartbeat), + 1, + ctrl_msg__event__heartbeat__field_descriptors, + ctrl_msg__event__heartbeat__field_indices_by_name, + 1, ctrl_msg__event__heartbeat__number_ranges, + (ProtobufCMessageInit) ctrl_msg__event__heartbeat__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__event__station_disconnect_from_ap__field_descriptors[1] = +{ + { + "resp", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgEventStationDisconnectFromAP, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__event__station_disconnect_from_ap__field_indices_by_name[] = { + 0, /* field[0] = resp */ +}; +static const ProtobufCIntRange ctrl_msg__event__station_disconnect_from_ap__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor ctrl_msg__event__station_disconnect_from_ap__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Event_StationDisconnectFromAP", + "CtrlMsgEventStationDisconnectFromAP", + "CtrlMsgEventStationDisconnectFromAP", + "", + sizeof(CtrlMsgEventStationDisconnectFromAP), + 1, + ctrl_msg__event__station_disconnect_from_ap__field_descriptors, + ctrl_msg__event__station_disconnect_from_ap__field_indices_by_name, + 1, ctrl_msg__event__station_disconnect_from_ap__number_ranges, + (ProtobufCMessageInit) ctrl_msg__event__station_disconnect_from_ap__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__event__station_disconnect_from_espsoft_ap__field_descriptors[2] = +{ + { + "resp", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(CtrlMsgEventStationDisconnectFromESPSoftAP, resp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "mac", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_BYTES, + 0, /* quantifier_offset */ + offsetof(CtrlMsgEventStationDisconnectFromESPSoftAP, mac), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__event__station_disconnect_from_espsoft_ap__field_indices_by_name[] = { + 1, /* field[1] = mac */ + 0, /* field[0] = resp */ +}; +static const ProtobufCIntRange ctrl_msg__event__station_disconnect_from_espsoft_ap__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor ctrl_msg__event__station_disconnect_from_espsoft_ap__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg_Event_StationDisconnectFromESPSoftAP", + "CtrlMsgEventStationDisconnectFromESPSoftAP", + "CtrlMsgEventStationDisconnectFromESPSoftAP", + "", + sizeof(CtrlMsgEventStationDisconnectFromESPSoftAP), + 2, + ctrl_msg__event__station_disconnect_from_espsoft_ap__field_descriptors, + ctrl_msg__event__station_disconnect_from_espsoft_ap__field_indices_by_name, + 1, ctrl_msg__event__station_disconnect_from_espsoft_ap__number_ranges, + (ProtobufCMessageInit) ctrl_msg__event__station_disconnect_from_espsoft_ap__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor ctrl_msg__field_descriptors[48] = +{ + { + "msg_type", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(CtrlMsg, msg_type), + &ctrl_msg_type__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "msg_id", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(CtrlMsg, msg_id), + &ctrl_msg_id__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_get_mac_address", + 101, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_get_mac_address), + &ctrl_msg__req__get_mac_address__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_set_mac_address", + 102, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_set_mac_address), + &ctrl_msg__req__set_mac_address__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_get_wifi_mode", + 103, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_get_wifi_mode), + &ctrl_msg__req__get_mode__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_set_wifi_mode", + 104, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_set_wifi_mode), + &ctrl_msg__req__set_mode__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_scan_ap_list", + 105, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_scan_ap_list), + &ctrl_msg__req__scan_result__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_get_ap_config", + 106, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_get_ap_config), + &ctrl_msg__req__get_apconfig__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_connect_ap", + 107, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_connect_ap), + &ctrl_msg__req__connect_ap__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_disconnect_ap", + 108, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_disconnect_ap), + &ctrl_msg__req__get_status__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_get_softap_config", + 109, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_get_softap_config), + &ctrl_msg__req__get_soft_apconfig__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_set_softap_vendor_specific_ie", + 110, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_set_softap_vendor_specific_ie), + &ctrl_msg__req__set_soft_apvendor_specific_ie__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_start_softap", + 111, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_start_softap), + &ctrl_msg__req__start_soft_ap__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_softap_connected_stas_list", + 112, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_softap_connected_stas_list), + &ctrl_msg__req__soft_apconnected_sta__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_stop_softap", + 113, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_stop_softap), + &ctrl_msg__req__get_status__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_set_power_save_mode", + 114, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_set_power_save_mode), + &ctrl_msg__req__set_mode__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_get_power_save_mode", + 115, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_get_power_save_mode), + &ctrl_msg__req__get_mode__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_ota_begin", + 116, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_ota_begin), + &ctrl_msg__req__otabegin__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_ota_write", + 117, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_ota_write), + &ctrl_msg__req__otawrite__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_ota_end", + 118, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_ota_end), + &ctrl_msg__req__otaend__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_set_wifi_max_tx_power", + 119, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_set_wifi_max_tx_power), + &ctrl_msg__req__set_wifi_max_tx_power__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_get_wifi_curr_tx_power", + 120, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_get_wifi_curr_tx_power), + &ctrl_msg__req__get_wifi_curr_tx_power__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "req_config_heartbeat", + 121, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, req_config_heartbeat), + &ctrl_msg__req__config_heartbeat__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_get_mac_address", + 201, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_get_mac_address), + &ctrl_msg__resp__get_mac_address__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_set_mac_address", + 202, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_set_mac_address), + &ctrl_msg__resp__set_mac_address__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_get_wifi_mode", + 203, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_get_wifi_mode), + &ctrl_msg__resp__get_mode__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_set_wifi_mode", + 204, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_set_wifi_mode), + &ctrl_msg__resp__set_mode__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_scan_ap_list", + 205, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_scan_ap_list), + &ctrl_msg__resp__scan_result__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_get_ap_config", + 206, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_get_ap_config), + &ctrl_msg__resp__get_apconfig__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_connect_ap", + 207, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_connect_ap), + &ctrl_msg__resp__connect_ap__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_disconnect_ap", + 208, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_disconnect_ap), + &ctrl_msg__resp__get_status__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_get_softap_config", + 209, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_get_softap_config), + &ctrl_msg__resp__get_soft_apconfig__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_set_softap_vendor_specific_ie", + 210, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_set_softap_vendor_specific_ie), + &ctrl_msg__resp__set_soft_apvendor_specific_ie__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_start_softap", + 211, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_start_softap), + &ctrl_msg__resp__start_soft_ap__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_softap_connected_stas_list", + 212, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_softap_connected_stas_list), + &ctrl_msg__resp__soft_apconnected_sta__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_stop_softap", + 213, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_stop_softap), + &ctrl_msg__resp__get_status__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_set_power_save_mode", + 214, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_set_power_save_mode), + &ctrl_msg__resp__set_mode__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_get_power_save_mode", + 215, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_get_power_save_mode), + &ctrl_msg__resp__get_mode__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_ota_begin", + 216, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_ota_begin), + &ctrl_msg__resp__otabegin__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_ota_write", + 217, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_ota_write), + &ctrl_msg__resp__otawrite__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_ota_end", + 218, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_ota_end), + &ctrl_msg__resp__otaend__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_set_wifi_max_tx_power", + 219, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_set_wifi_max_tx_power), + &ctrl_msg__resp__set_wifi_max_tx_power__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_get_wifi_curr_tx_power", + 220, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_get_wifi_curr_tx_power), + &ctrl_msg__resp__get_wifi_curr_tx_power__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "resp_config_heartbeat", + 221, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, resp_config_heartbeat), + &ctrl_msg__resp__config_heartbeat__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "event_esp_init", + 301, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, event_esp_init), + &ctrl_msg__event__espinit__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "event_heartbeat", + 302, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, event_heartbeat), + &ctrl_msg__event__heartbeat__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "event_station_disconnect_from_AP", + 303, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, event_station_disconnect_from_ap), + &ctrl_msg__event__station_disconnect_from_ap__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "event_station_disconnect_from_ESP_SoftAP", + 304, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CtrlMsg, payload_case), + offsetof(CtrlMsg, event_station_disconnect_from_esp_softap), + &ctrl_msg__event__station_disconnect_from_espsoft_ap__descriptor, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned ctrl_msg__field_indices_by_name[] = { + 44, /* field[44] = event_esp_init */ + 45, /* field[45] = event_heartbeat */ + 46, /* field[46] = event_station_disconnect_from_AP */ + 47, /* field[47] = event_station_disconnect_from_ESP_SoftAP */ + 1, /* field[1] = msg_id */ + 0, /* field[0] = msg_type */ + 22, /* field[22] = req_config_heartbeat */ + 8, /* field[8] = req_connect_ap */ + 9, /* field[9] = req_disconnect_ap */ + 7, /* field[7] = req_get_ap_config */ + 2, /* field[2] = req_get_mac_address */ + 16, /* field[16] = req_get_power_save_mode */ + 10, /* field[10] = req_get_softap_config */ + 21, /* field[21] = req_get_wifi_curr_tx_power */ + 4, /* field[4] = req_get_wifi_mode */ + 17, /* field[17] = req_ota_begin */ + 19, /* field[19] = req_ota_end */ + 18, /* field[18] = req_ota_write */ + 6, /* field[6] = req_scan_ap_list */ + 3, /* field[3] = req_set_mac_address */ + 15, /* field[15] = req_set_power_save_mode */ + 11, /* field[11] = req_set_softap_vendor_specific_ie */ + 20, /* field[20] = req_set_wifi_max_tx_power */ + 5, /* field[5] = req_set_wifi_mode */ + 13, /* field[13] = req_softap_connected_stas_list */ + 12, /* field[12] = req_start_softap */ + 14, /* field[14] = req_stop_softap */ + 43, /* field[43] = resp_config_heartbeat */ + 29, /* field[29] = resp_connect_ap */ + 30, /* field[30] = resp_disconnect_ap */ + 28, /* field[28] = resp_get_ap_config */ + 23, /* field[23] = resp_get_mac_address */ + 37, /* field[37] = resp_get_power_save_mode */ + 31, /* field[31] = resp_get_softap_config */ + 42, /* field[42] = resp_get_wifi_curr_tx_power */ + 25, /* field[25] = resp_get_wifi_mode */ + 38, /* field[38] = resp_ota_begin */ + 40, /* field[40] = resp_ota_end */ + 39, /* field[39] = resp_ota_write */ + 27, /* field[27] = resp_scan_ap_list */ + 24, /* field[24] = resp_set_mac_address */ + 36, /* field[36] = resp_set_power_save_mode */ + 32, /* field[32] = resp_set_softap_vendor_specific_ie */ + 41, /* field[41] = resp_set_wifi_max_tx_power */ + 26, /* field[26] = resp_set_wifi_mode */ + 34, /* field[34] = resp_softap_connected_stas_list */ + 33, /* field[33] = resp_start_softap */ + 35, /* field[35] = resp_stop_softap */ +}; +static const ProtobufCIntRange ctrl_msg__number_ranges[4 + 1] = +{ + { 1, 0 }, + { 101, 2 }, + { 201, 23 }, + { 301, 44 }, + { 0, 48 } +}; +const ProtobufCMessageDescriptor ctrl_msg__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CtrlMsg", + "CtrlMsg", + "CtrlMsg", + "", + sizeof(CtrlMsg), + 48, + ctrl_msg__field_descriptors, + ctrl_msg__field_indices_by_name, + 4, ctrl_msg__number_ranges, + (ProtobufCMessageInit) ctrl_msg__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCEnumValue ctrl__vendor_ietype__enum_values_by_number[5] = +{ + { "Beacon", "CTRL__VENDOR_IETYPE__Beacon", 0 }, + { "Probe_req", "CTRL__VENDOR_IETYPE__Probe_req", 1 }, + { "Probe_resp", "CTRL__VENDOR_IETYPE__Probe_resp", 2 }, + { "Assoc_req", "CTRL__VENDOR_IETYPE__Assoc_req", 3 }, + { "Assoc_resp", "CTRL__VENDOR_IETYPE__Assoc_resp", 4 }, +}; +static const ProtobufCIntRange ctrl__vendor_ietype__value_ranges[] = { +{0, 0},{0, 5} +}; +static const ProtobufCEnumValueIndex ctrl__vendor_ietype__enum_values_by_name[5] = +{ + { "Assoc_req", 3 }, + { "Assoc_resp", 4 }, + { "Beacon", 0 }, + { "Probe_req", 1 }, + { "Probe_resp", 2 }, +}; +const ProtobufCEnumDescriptor ctrl__vendor_ietype__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "Ctrl_VendorIEType", + "Ctrl_VendorIEType", + "CtrlVendorIEType", + "", + 5, + ctrl__vendor_ietype__enum_values_by_number, + 5, + ctrl__vendor_ietype__enum_values_by_name, + 1, + ctrl__vendor_ietype__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const ProtobufCEnumValue ctrl__vendor_ieid__enum_values_by_number[2] = +{ + { "ID_0", "CTRL__VENDOR_IEID__ID_0", 0 }, + { "ID_1", "CTRL__VENDOR_IEID__ID_1", 1 }, +}; +static const ProtobufCIntRange ctrl__vendor_ieid__value_ranges[] = { +{0, 0},{0, 2} +}; +static const ProtobufCEnumValueIndex ctrl__vendor_ieid__enum_values_by_name[2] = +{ + { "ID_0", 0 }, + { "ID_1", 1 }, +}; +const ProtobufCEnumDescriptor ctrl__vendor_ieid__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "Ctrl_VendorIEID", + "Ctrl_VendorIEID", + "CtrlVendorIEID", + "", + 2, + ctrl__vendor_ieid__enum_values_by_number, + 2, + ctrl__vendor_ieid__enum_values_by_name, + 1, + ctrl__vendor_ieid__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const ProtobufCEnumValue ctrl__wifi_mode__enum_values_by_number[4] = +{ + { "NONE", "CTRL__WIFI_MODE__NONE", 0 }, + { "STA", "CTRL__WIFI_MODE__STA", 1 }, + { "AP", "CTRL__WIFI_MODE__AP", 2 }, + { "APSTA", "CTRL__WIFI_MODE__APSTA", 3 }, +}; +static const ProtobufCIntRange ctrl__wifi_mode__value_ranges[] = { +{0, 0},{0, 4} +}; +static const ProtobufCEnumValueIndex ctrl__wifi_mode__enum_values_by_name[4] = +{ + { "AP", 2 }, + { "APSTA", 3 }, + { "NONE", 0 }, + { "STA", 1 }, +}; +const ProtobufCEnumDescriptor ctrl__wifi_mode__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "Ctrl_WifiMode", + "Ctrl_WifiMode", + "CtrlWifiMode", + "", + 4, + ctrl__wifi_mode__enum_values_by_number, + 4, + ctrl__wifi_mode__enum_values_by_name, + 1, + ctrl__wifi_mode__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const ProtobufCEnumValue ctrl__wifi_bw__enum_values_by_number[3] = +{ + { "BW_Invalid", "CTRL__WIFI_BW__BW_Invalid", 0 }, + { "HT20", "CTRL__WIFI_BW__HT20", 1 }, + { "HT40", "CTRL__WIFI_BW__HT40", 2 }, +}; +static const ProtobufCIntRange ctrl__wifi_bw__value_ranges[] = { +{0, 0},{0, 3} +}; +static const ProtobufCEnumValueIndex ctrl__wifi_bw__enum_values_by_name[3] = +{ + { "BW_Invalid", 0 }, + { "HT20", 1 }, + { "HT40", 2 }, +}; +const ProtobufCEnumDescriptor ctrl__wifi_bw__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "Ctrl_WifiBw", + "Ctrl_WifiBw", + "CtrlWifiBw", + "", + 3, + ctrl__wifi_bw__enum_values_by_number, + 3, + ctrl__wifi_bw__enum_values_by_name, + 1, + ctrl__wifi_bw__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const ProtobufCEnumValue ctrl__wifi_power_save__enum_values_by_number[3] = +{ + { "PS_Invalid", "CTRL__WIFI_POWER_SAVE__PS_Invalid", 0 }, + { "MIN_MODEM", "CTRL__WIFI_POWER_SAVE__MIN_MODEM", 1 }, + { "MAX_MODEM", "CTRL__WIFI_POWER_SAVE__MAX_MODEM", 2 }, +}; +static const ProtobufCIntRange ctrl__wifi_power_save__value_ranges[] = { +{0, 0},{0, 3} +}; +static const ProtobufCEnumValueIndex ctrl__wifi_power_save__enum_values_by_name[3] = +{ + { "MAX_MODEM", 2 }, + { "MIN_MODEM", 1 }, + { "PS_Invalid", 0 }, +}; +const ProtobufCEnumDescriptor ctrl__wifi_power_save__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "Ctrl_WifiPowerSave", + "Ctrl_WifiPowerSave", + "CtrlWifiPowerSave", + "", + 3, + ctrl__wifi_power_save__enum_values_by_number, + 3, + ctrl__wifi_power_save__enum_values_by_name, + 1, + ctrl__wifi_power_save__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const ProtobufCEnumValue ctrl__wifi_sec_prot__enum_values_by_number[8] = +{ + { "Open", "CTRL__WIFI_SEC_PROT__Open", 0 }, + { "WEP", "CTRL__WIFI_SEC_PROT__WEP", 1 }, + { "WPA_PSK", "CTRL__WIFI_SEC_PROT__WPA_PSK", 2 }, + { "WPA2_PSK", "CTRL__WIFI_SEC_PROT__WPA2_PSK", 3 }, + { "WPA_WPA2_PSK", "CTRL__WIFI_SEC_PROT__WPA_WPA2_PSK", 4 }, + { "WPA2_ENTERPRISE", "CTRL__WIFI_SEC_PROT__WPA2_ENTERPRISE", 5 }, + { "WPA3_PSK", "CTRL__WIFI_SEC_PROT__WPA3_PSK", 6 }, + { "WPA2_WPA3_PSK", "CTRL__WIFI_SEC_PROT__WPA2_WPA3_PSK", 7 }, +}; +static const ProtobufCIntRange ctrl__wifi_sec_prot__value_ranges[] = { +{0, 0},{0, 8} +}; +static const ProtobufCEnumValueIndex ctrl__wifi_sec_prot__enum_values_by_name[8] = +{ + { "Open", 0 }, + { "WEP", 1 }, + { "WPA2_ENTERPRISE", 5 }, + { "WPA2_PSK", 3 }, + { "WPA2_WPA3_PSK", 7 }, + { "WPA3_PSK", 6 }, + { "WPA_PSK", 2 }, + { "WPA_WPA2_PSK", 4 }, +}; +const ProtobufCEnumDescriptor ctrl__wifi_sec_prot__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "Ctrl_WifiSecProt", + "Ctrl_WifiSecProt", + "CtrlWifiSecProt", + "", + 8, + ctrl__wifi_sec_prot__enum_values_by_number, + 8, + ctrl__wifi_sec_prot__enum_values_by_name, + 1, + ctrl__wifi_sec_prot__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const ProtobufCEnumValue ctrl__status__enum_values_by_number[6] = +{ + { "Connected", "CTRL__STATUS__Connected", 0 }, + { "Not_Connected", "CTRL__STATUS__Not_Connected", 1 }, + { "No_AP_Found", "CTRL__STATUS__No_AP_Found", 2 }, + { "Connection_Fail", "CTRL__STATUS__Connection_Fail", 3 }, + { "Invalid_Argument", "CTRL__STATUS__Invalid_Argument", 4 }, + { "Out_Of_Range", "CTRL__STATUS__Out_Of_Range", 5 }, +}; +static const ProtobufCIntRange ctrl__status__value_ranges[] = { +{0, 0},{0, 6} +}; +static const ProtobufCEnumValueIndex ctrl__status__enum_values_by_name[6] = +{ + { "Connected", 0 }, + { "Connection_Fail", 3 }, + { "Invalid_Argument", 4 }, + { "No_AP_Found", 2 }, + { "Not_Connected", 1 }, + { "Out_Of_Range", 5 }, +}; +const ProtobufCEnumDescriptor ctrl__status__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "Ctrl_Status", + "Ctrl_Status", + "CtrlStatus", + "", + 6, + ctrl__status__enum_values_by_number, + 6, + ctrl__status__enum_values_by_name, + 1, + ctrl__status__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const ProtobufCEnumValue ctrl_msg_type__enum_values_by_number[5] = +{ + { "MsgType_Invalid", "CTRL_MSG_TYPE__MsgType_Invalid", 0 }, + { "Req", "CTRL_MSG_TYPE__Req", 1 }, + { "Resp", "CTRL_MSG_TYPE__Resp", 2 }, + { "Event", "CTRL_MSG_TYPE__Event", 3 }, + { "MsgType_Max", "CTRL_MSG_TYPE__MsgType_Max", 4 }, +}; +static const ProtobufCIntRange ctrl_msg_type__value_ranges[] = { +{0, 0},{0, 5} +}; +static const ProtobufCEnumValueIndex ctrl_msg_type__enum_values_by_name[5] = +{ + { "Event", 3 }, + { "MsgType_Invalid", 0 }, + { "MsgType_Max", 4 }, + { "Req", 1 }, + { "Resp", 2 }, +}; +const ProtobufCEnumDescriptor ctrl_msg_type__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "CtrlMsgType", + "CtrlMsgType", + "CtrlMsgType", + "", + 5, + ctrl_msg_type__enum_values_by_number, + 5, + ctrl_msg_type__enum_values_by_name, + 1, + ctrl_msg_type__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const ProtobufCEnumValue ctrl_msg_id__enum_values_by_number[53] = +{ + { "MsgId_Invalid", "CTRL_MSG_ID__MsgId_Invalid", 0 }, + { "Req_Base", "CTRL_MSG_ID__Req_Base", 100 }, + { "Req_GetMACAddress", "CTRL_MSG_ID__Req_GetMACAddress", 101 }, + { "Req_SetMacAddress", "CTRL_MSG_ID__Req_SetMacAddress", 102 }, + { "Req_GetWifiMode", "CTRL_MSG_ID__Req_GetWifiMode", 103 }, + { "Req_SetWifiMode", "CTRL_MSG_ID__Req_SetWifiMode", 104 }, + { "Req_GetAPScanList", "CTRL_MSG_ID__Req_GetAPScanList", 105 }, + { "Req_GetAPConfig", "CTRL_MSG_ID__Req_GetAPConfig", 106 }, + { "Req_ConnectAP", "CTRL_MSG_ID__Req_ConnectAP", 107 }, + { "Req_DisconnectAP", "CTRL_MSG_ID__Req_DisconnectAP", 108 }, + { "Req_GetSoftAPConfig", "CTRL_MSG_ID__Req_GetSoftAPConfig", 109 }, + { "Req_SetSoftAPVendorSpecificIE", "CTRL_MSG_ID__Req_SetSoftAPVendorSpecificIE", 110 }, + { "Req_StartSoftAP", "CTRL_MSG_ID__Req_StartSoftAP", 111 }, + { "Req_GetSoftAPConnectedSTAList", "CTRL_MSG_ID__Req_GetSoftAPConnectedSTAList", 112 }, + { "Req_StopSoftAP", "CTRL_MSG_ID__Req_StopSoftAP", 113 }, + { "Req_SetPowerSaveMode", "CTRL_MSG_ID__Req_SetPowerSaveMode", 114 }, + { "Req_GetPowerSaveMode", "CTRL_MSG_ID__Req_GetPowerSaveMode", 115 }, + { "Req_OTABegin", "CTRL_MSG_ID__Req_OTABegin", 116 }, + { "Req_OTAWrite", "CTRL_MSG_ID__Req_OTAWrite", 117 }, + { "Req_OTAEnd", "CTRL_MSG_ID__Req_OTAEnd", 118 }, + { "Req_SetWifiMaxTxPower", "CTRL_MSG_ID__Req_SetWifiMaxTxPower", 119 }, + { "Req_GetWifiCurrTxPower", "CTRL_MSG_ID__Req_GetWifiCurrTxPower", 120 }, + { "Req_ConfigHeartbeat", "CTRL_MSG_ID__Req_ConfigHeartbeat", 121 }, + { "Req_Max", "CTRL_MSG_ID__Req_Max", 122 }, + { "Resp_Base", "CTRL_MSG_ID__Resp_Base", 200 }, + { "Resp_GetMACAddress", "CTRL_MSG_ID__Resp_GetMACAddress", 201 }, + { "Resp_SetMacAddress", "CTRL_MSG_ID__Resp_SetMacAddress", 202 }, + { "Resp_GetWifiMode", "CTRL_MSG_ID__Resp_GetWifiMode", 203 }, + { "Resp_SetWifiMode", "CTRL_MSG_ID__Resp_SetWifiMode", 204 }, + { "Resp_GetAPScanList", "CTRL_MSG_ID__Resp_GetAPScanList", 205 }, + { "Resp_GetAPConfig", "CTRL_MSG_ID__Resp_GetAPConfig", 206 }, + { "Resp_ConnectAP", "CTRL_MSG_ID__Resp_ConnectAP", 207 }, + { "Resp_DisconnectAP", "CTRL_MSG_ID__Resp_DisconnectAP", 208 }, + { "Resp_GetSoftAPConfig", "CTRL_MSG_ID__Resp_GetSoftAPConfig", 209 }, + { "Resp_SetSoftAPVendorSpecificIE", "CTRL_MSG_ID__Resp_SetSoftAPVendorSpecificIE", 210 }, + { "Resp_StartSoftAP", "CTRL_MSG_ID__Resp_StartSoftAP", 211 }, + { "Resp_GetSoftAPConnectedSTAList", "CTRL_MSG_ID__Resp_GetSoftAPConnectedSTAList", 212 }, + { "Resp_StopSoftAP", "CTRL_MSG_ID__Resp_StopSoftAP", 213 }, + { "Resp_SetPowerSaveMode", "CTRL_MSG_ID__Resp_SetPowerSaveMode", 214 }, + { "Resp_GetPowerSaveMode", "CTRL_MSG_ID__Resp_GetPowerSaveMode", 215 }, + { "Resp_OTABegin", "CTRL_MSG_ID__Resp_OTABegin", 216 }, + { "Resp_OTAWrite", "CTRL_MSG_ID__Resp_OTAWrite", 217 }, + { "Resp_OTAEnd", "CTRL_MSG_ID__Resp_OTAEnd", 218 }, + { "Resp_SetWifiMaxTxPower", "CTRL_MSG_ID__Resp_SetWifiMaxTxPower", 219 }, + { "Resp_GetWifiCurrTxPower", "CTRL_MSG_ID__Resp_GetWifiCurrTxPower", 220 }, + { "Resp_ConfigHeartbeat", "CTRL_MSG_ID__Resp_ConfigHeartbeat", 221 }, + { "Resp_Max", "CTRL_MSG_ID__Resp_Max", 222 }, + { "Event_Base", "CTRL_MSG_ID__Event_Base", 300 }, + { "Event_ESPInit", "CTRL_MSG_ID__Event_ESPInit", 301 }, + { "Event_Heartbeat", "CTRL_MSG_ID__Event_Heartbeat", 302 }, + { "Event_StationDisconnectFromAP", "CTRL_MSG_ID__Event_StationDisconnectFromAP", 303 }, + { "Event_StationDisconnectFromESPSoftAP", "CTRL_MSG_ID__Event_StationDisconnectFromESPSoftAP", 304 }, + { "Event_Max", "CTRL_MSG_ID__Event_Max", 305 }, +}; +static const ProtobufCIntRange ctrl_msg_id__value_ranges[] = { +{0, 0},{100, 1},{200, 24},{300, 47},{0, 53} +}; +static const ProtobufCEnumValueIndex ctrl_msg_id__enum_values_by_name[53] = +{ + { "Event_Base", 47 }, + { "Event_ESPInit", 48 }, + { "Event_Heartbeat", 49 }, + { "Event_Max", 52 }, + { "Event_StationDisconnectFromAP", 50 }, + { "Event_StationDisconnectFromESPSoftAP", 51 }, + { "MsgId_Invalid", 0 }, + { "Req_Base", 1 }, + { "Req_ConfigHeartbeat", 22 }, + { "Req_ConnectAP", 8 }, + { "Req_DisconnectAP", 9 }, + { "Req_GetAPConfig", 7 }, + { "Req_GetAPScanList", 6 }, + { "Req_GetMACAddress", 2 }, + { "Req_GetPowerSaveMode", 16 }, + { "Req_GetSoftAPConfig", 10 }, + { "Req_GetSoftAPConnectedSTAList", 13 }, + { "Req_GetWifiCurrTxPower", 21 }, + { "Req_GetWifiMode", 4 }, + { "Req_Max", 23 }, + { "Req_OTABegin", 17 }, + { "Req_OTAEnd", 19 }, + { "Req_OTAWrite", 18 }, + { "Req_SetMacAddress", 3 }, + { "Req_SetPowerSaveMode", 15 }, + { "Req_SetSoftAPVendorSpecificIE", 11 }, + { "Req_SetWifiMaxTxPower", 20 }, + { "Req_SetWifiMode", 5 }, + { "Req_StartSoftAP", 12 }, + { "Req_StopSoftAP", 14 }, + { "Resp_Base", 24 }, + { "Resp_ConfigHeartbeat", 45 }, + { "Resp_ConnectAP", 31 }, + { "Resp_DisconnectAP", 32 }, + { "Resp_GetAPConfig", 30 }, + { "Resp_GetAPScanList", 29 }, + { "Resp_GetMACAddress", 25 }, + { "Resp_GetPowerSaveMode", 39 }, + { "Resp_GetSoftAPConfig", 33 }, + { "Resp_GetSoftAPConnectedSTAList", 36 }, + { "Resp_GetWifiCurrTxPower", 44 }, + { "Resp_GetWifiMode", 27 }, + { "Resp_Max", 46 }, + { "Resp_OTABegin", 40 }, + { "Resp_OTAEnd", 42 }, + { "Resp_OTAWrite", 41 }, + { "Resp_SetMacAddress", 26 }, + { "Resp_SetPowerSaveMode", 38 }, + { "Resp_SetSoftAPVendorSpecificIE", 34 }, + { "Resp_SetWifiMaxTxPower", 43 }, + { "Resp_SetWifiMode", 28 }, + { "Resp_StartSoftAP", 35 }, + { "Resp_StopSoftAP", 37 }, +}; +const ProtobufCEnumDescriptor ctrl_msg_id__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "CtrlMsgId", + "CtrlMsgId", + "CtrlMsgId", + "", + 53, + ctrl_msg_id__enum_values_by_number, + 53, + ctrl_msg_id__enum_values_by_name, + 4, + ctrl_msg_id__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; diff --git a/proto/esp_hosted_config.pb-c.h b/proto/esp_hosted_config.pb-c.h new file mode 100644 index 0000000..403b77d --- /dev/null +++ b/proto/esp_hosted_config.pb-c.h @@ -0,0 +1,1849 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: esp_hosted_config.proto */ + +#ifndef PROTOBUF_C_esp_5fhosted_5fconfig_2eproto__INCLUDED +#define PROTOBUF_C_esp_5fhosted_5fconfig_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1004001 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + + +typedef struct ScanResult ScanResult; +typedef struct ConnectedSTAList ConnectedSTAList; +typedef struct CtrlMsgReqGetMacAddress CtrlMsgReqGetMacAddress; +typedef struct CtrlMsgRespGetMacAddress CtrlMsgRespGetMacAddress; +typedef struct CtrlMsgReqGetMode CtrlMsgReqGetMode; +typedef struct CtrlMsgRespGetMode CtrlMsgRespGetMode; +typedef struct CtrlMsgReqSetMode CtrlMsgReqSetMode; +typedef struct CtrlMsgRespSetMode CtrlMsgRespSetMode; +typedef struct CtrlMsgReqGetStatus CtrlMsgReqGetStatus; +typedef struct CtrlMsgRespGetStatus CtrlMsgRespGetStatus; +typedef struct CtrlMsgReqSetMacAddress CtrlMsgReqSetMacAddress; +typedef struct CtrlMsgRespSetMacAddress CtrlMsgRespSetMacAddress; +typedef struct CtrlMsgReqGetAPConfig CtrlMsgReqGetAPConfig; +typedef struct CtrlMsgRespGetAPConfig CtrlMsgRespGetAPConfig; +typedef struct CtrlMsgReqConnectAP CtrlMsgReqConnectAP; +typedef struct CtrlMsgRespConnectAP CtrlMsgRespConnectAP; +typedef struct CtrlMsgReqGetSoftAPConfig CtrlMsgReqGetSoftAPConfig; +typedef struct CtrlMsgRespGetSoftAPConfig CtrlMsgRespGetSoftAPConfig; +typedef struct CtrlMsgReqStartSoftAP CtrlMsgReqStartSoftAP; +typedef struct CtrlMsgRespStartSoftAP CtrlMsgRespStartSoftAP; +typedef struct CtrlMsgReqScanResult CtrlMsgReqScanResult; +typedef struct CtrlMsgRespScanResult CtrlMsgRespScanResult; +typedef struct CtrlMsgReqSoftAPConnectedSTA CtrlMsgReqSoftAPConnectedSTA; +typedef struct CtrlMsgRespSoftAPConnectedSTA CtrlMsgRespSoftAPConnectedSTA; +typedef struct CtrlMsgReqOTABegin CtrlMsgReqOTABegin; +typedef struct CtrlMsgRespOTABegin CtrlMsgRespOTABegin; +typedef struct CtrlMsgReqOTAWrite CtrlMsgReqOTAWrite; +typedef struct CtrlMsgRespOTAWrite CtrlMsgRespOTAWrite; +typedef struct CtrlMsgReqOTAEnd CtrlMsgReqOTAEnd; +typedef struct CtrlMsgRespOTAEnd CtrlMsgRespOTAEnd; +typedef struct CtrlMsgReqVendorIEData CtrlMsgReqVendorIEData; +typedef struct CtrlMsgReqSetSoftAPVendorSpecificIE CtrlMsgReqSetSoftAPVendorSpecificIE; +typedef struct CtrlMsgRespSetSoftAPVendorSpecificIE CtrlMsgRespSetSoftAPVendorSpecificIE; +typedef struct CtrlMsgReqSetWifiMaxTxPower CtrlMsgReqSetWifiMaxTxPower; +typedef struct CtrlMsgRespSetWifiMaxTxPower CtrlMsgRespSetWifiMaxTxPower; +typedef struct CtrlMsgReqGetWifiCurrTxPower CtrlMsgReqGetWifiCurrTxPower; +typedef struct CtrlMsgRespGetWifiCurrTxPower CtrlMsgRespGetWifiCurrTxPower; +typedef struct CtrlMsgReqConfigHeartbeat CtrlMsgReqConfigHeartbeat; +typedef struct CtrlMsgRespConfigHeartbeat CtrlMsgRespConfigHeartbeat; +typedef struct CtrlMsgEventESPInit CtrlMsgEventESPInit; +typedef struct CtrlMsgEventHeartbeat CtrlMsgEventHeartbeat; +typedef struct CtrlMsgEventStationDisconnectFromAP CtrlMsgEventStationDisconnectFromAP; +typedef struct CtrlMsgEventStationDisconnectFromESPSoftAP CtrlMsgEventStationDisconnectFromESPSoftAP; +typedef struct CtrlMsg CtrlMsg; + + +/* --- enums --- */ + +/* + * Enums similar to ESP IDF + */ +typedef enum _CtrlVendorIEType { + CTRL__VENDOR_IETYPE__Beacon = 0, + CTRL__VENDOR_IETYPE__Probe_req = 1, + CTRL__VENDOR_IETYPE__Probe_resp = 2, + CTRL__VENDOR_IETYPE__Assoc_req = 3, + CTRL__VENDOR_IETYPE__Assoc_resp = 4 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(CTRL__VENDOR_IETYPE) +} CtrlVendorIEType; +typedef enum _CtrlVendorIEID { + CTRL__VENDOR_IEID__ID_0 = 0, + CTRL__VENDOR_IEID__ID_1 = 1 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(CTRL__VENDOR_IEID) +} CtrlVendorIEID; +typedef enum _CtrlWifiMode { + CTRL__WIFI_MODE__NONE = 0, + CTRL__WIFI_MODE__STA = 1, + CTRL__WIFI_MODE__AP = 2, + CTRL__WIFI_MODE__APSTA = 3 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(CTRL__WIFI_MODE) +} CtrlWifiMode; +typedef enum _CtrlWifiBw { + CTRL__WIFI_BW__BW_Invalid = 0, + CTRL__WIFI_BW__HT20 = 1, + CTRL__WIFI_BW__HT40 = 2 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(CTRL__WIFI_BW) +} CtrlWifiBw; +typedef enum _CtrlWifiPowerSave { + CTRL__WIFI_POWER_SAVE__PS_Invalid = 0, + CTRL__WIFI_POWER_SAVE__MIN_MODEM = 1, + CTRL__WIFI_POWER_SAVE__MAX_MODEM = 2 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(CTRL__WIFI_POWER_SAVE) +} CtrlWifiPowerSave; +typedef enum _CtrlWifiSecProt { + CTRL__WIFI_SEC_PROT__Open = 0, + CTRL__WIFI_SEC_PROT__WEP = 1, + CTRL__WIFI_SEC_PROT__WPA_PSK = 2, + CTRL__WIFI_SEC_PROT__WPA2_PSK = 3, + CTRL__WIFI_SEC_PROT__WPA_WPA2_PSK = 4, + CTRL__WIFI_SEC_PROT__WPA2_ENTERPRISE = 5, + CTRL__WIFI_SEC_PROT__WPA3_PSK = 6, + CTRL__WIFI_SEC_PROT__WPA2_WPA3_PSK = 7 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(CTRL__WIFI_SEC_PROT) +} CtrlWifiSecProt; +/* + * enums for Control path + */ +typedef enum _CtrlStatus { + CTRL__STATUS__Connected = 0, + CTRL__STATUS__Not_Connected = 1, + CTRL__STATUS__No_AP_Found = 2, + CTRL__STATUS__Connection_Fail = 3, + CTRL__STATUS__Invalid_Argument = 4, + CTRL__STATUS__Out_Of_Range = 5 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(CTRL__STATUS) +} CtrlStatus; +typedef enum _CtrlMsgType { + CTRL_MSG_TYPE__MsgType_Invalid = 0, + CTRL_MSG_TYPE__Req = 1, + CTRL_MSG_TYPE__Resp = 2, + CTRL_MSG_TYPE__Event = 3, + CTRL_MSG_TYPE__MsgType_Max = 4 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(CTRL_MSG_TYPE) +} CtrlMsgType; +typedef enum _CtrlMsgId { + CTRL_MSG_ID__MsgId_Invalid = 0, + /* + ** Request Msgs * + */ + CTRL_MSG_ID__Req_Base = 100, + CTRL_MSG_ID__Req_GetMACAddress = 101, + CTRL_MSG_ID__Req_SetMacAddress = 102, + CTRL_MSG_ID__Req_GetWifiMode = 103, + CTRL_MSG_ID__Req_SetWifiMode = 104, + CTRL_MSG_ID__Req_GetAPScanList = 105, + CTRL_MSG_ID__Req_GetAPConfig = 106, + CTRL_MSG_ID__Req_ConnectAP = 107, + CTRL_MSG_ID__Req_DisconnectAP = 108, + CTRL_MSG_ID__Req_GetSoftAPConfig = 109, + CTRL_MSG_ID__Req_SetSoftAPVendorSpecificIE = 110, + CTRL_MSG_ID__Req_StartSoftAP = 111, + CTRL_MSG_ID__Req_GetSoftAPConnectedSTAList = 112, + CTRL_MSG_ID__Req_StopSoftAP = 113, + CTRL_MSG_ID__Req_SetPowerSaveMode = 114, + CTRL_MSG_ID__Req_GetPowerSaveMode = 115, + CTRL_MSG_ID__Req_OTABegin = 116, + CTRL_MSG_ID__Req_OTAWrite = 117, + CTRL_MSG_ID__Req_OTAEnd = 118, + CTRL_MSG_ID__Req_SetWifiMaxTxPower = 119, + CTRL_MSG_ID__Req_GetWifiCurrTxPower = 120, + CTRL_MSG_ID__Req_ConfigHeartbeat = 121, + /* + * Add new control path command response before Req_Max + * and update Req_Max + */ + CTRL_MSG_ID__Req_Max = 122, + /* + ** Response Msgs * + */ + CTRL_MSG_ID__Resp_Base = 200, + CTRL_MSG_ID__Resp_GetMACAddress = 201, + CTRL_MSG_ID__Resp_SetMacAddress = 202, + CTRL_MSG_ID__Resp_GetWifiMode = 203, + CTRL_MSG_ID__Resp_SetWifiMode = 204, + CTRL_MSG_ID__Resp_GetAPScanList = 205, + CTRL_MSG_ID__Resp_GetAPConfig = 206, + CTRL_MSG_ID__Resp_ConnectAP = 207, + CTRL_MSG_ID__Resp_DisconnectAP = 208, + CTRL_MSG_ID__Resp_GetSoftAPConfig = 209, + CTRL_MSG_ID__Resp_SetSoftAPVendorSpecificIE = 210, + CTRL_MSG_ID__Resp_StartSoftAP = 211, + CTRL_MSG_ID__Resp_GetSoftAPConnectedSTAList = 212, + CTRL_MSG_ID__Resp_StopSoftAP = 213, + CTRL_MSG_ID__Resp_SetPowerSaveMode = 214, + CTRL_MSG_ID__Resp_GetPowerSaveMode = 215, + CTRL_MSG_ID__Resp_OTABegin = 216, + CTRL_MSG_ID__Resp_OTAWrite = 217, + CTRL_MSG_ID__Resp_OTAEnd = 218, + CTRL_MSG_ID__Resp_SetWifiMaxTxPower = 219, + CTRL_MSG_ID__Resp_GetWifiCurrTxPower = 220, + CTRL_MSG_ID__Resp_ConfigHeartbeat = 221, + /* + * Add new control path command response before Resp_Max + * and update Resp_Max + */ + CTRL_MSG_ID__Resp_Max = 222, + /* + ** Event Msgs * + */ + CTRL_MSG_ID__Event_Base = 300, + CTRL_MSG_ID__Event_ESPInit = 301, + CTRL_MSG_ID__Event_Heartbeat = 302, + CTRL_MSG_ID__Event_StationDisconnectFromAP = 303, + CTRL_MSG_ID__Event_StationDisconnectFromESPSoftAP = 304, + /* + * Add new control path command notification before Event_Max + * and update Event_Max + */ + CTRL_MSG_ID__Event_Max = 305 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(CTRL_MSG_ID) +} CtrlMsgId; + +/* --- messages --- */ + +/* + * internal supporting structures for CtrlMsg + */ +struct ScanResult +{ + ProtobufCMessage base; + ProtobufCBinaryData ssid; + uint32_t chnl; + int32_t rssi; + ProtobufCBinaryData bssid; + CtrlWifiSecProt sec_prot; +}; +#define SCAN_RESULT__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&scan_result__descriptor) \ + , {0,NULL}, 0, 0, {0,NULL}, CTRL__WIFI_SEC_PROT__Open } + + +struct ConnectedSTAList +{ + ProtobufCMessage base; + ProtobufCBinaryData mac; + int32_t rssi; +}; +#define CONNECTED_STALIST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&connected_stalist__descriptor) \ + , {0,NULL}, 0 } + + +/* + ** Req/Resp structure * + */ +struct CtrlMsgReqGetMacAddress +{ + ProtobufCMessage base; + int32_t mode; +}; +#define CTRL_MSG__REQ__GET_MAC_ADDRESS__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__get_mac_address__descriptor) \ + , 0 } + + +struct CtrlMsgRespGetMacAddress +{ + ProtobufCMessage base; + ProtobufCBinaryData mac; + int32_t resp; +}; +#define CTRL_MSG__RESP__GET_MAC_ADDRESS__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__get_mac_address__descriptor) \ + , {0,NULL}, 0 } + + +struct CtrlMsgReqGetMode +{ + ProtobufCMessage base; +}; +#define CTRL_MSG__REQ__GET_MODE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__get_mode__descriptor) \ + } + + +struct CtrlMsgRespGetMode +{ + ProtobufCMessage base; + int32_t mode; + int32_t resp; +}; +#define CTRL_MSG__RESP__GET_MODE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__get_mode__descriptor) \ + , 0, 0 } + + +struct CtrlMsgReqSetMode +{ + ProtobufCMessage base; + int32_t mode; +}; +#define CTRL_MSG__REQ__SET_MODE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__set_mode__descriptor) \ + , 0 } + + +struct CtrlMsgRespSetMode +{ + ProtobufCMessage base; + int32_t resp; +}; +#define CTRL_MSG__RESP__SET_MODE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__set_mode__descriptor) \ + , 0 } + + +struct CtrlMsgReqGetStatus +{ + ProtobufCMessage base; +}; +#define CTRL_MSG__REQ__GET_STATUS__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__get_status__descriptor) \ + } + + +struct CtrlMsgRespGetStatus +{ + ProtobufCMessage base; + int32_t resp; +}; +#define CTRL_MSG__RESP__GET_STATUS__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__get_status__descriptor) \ + , 0 } + + +struct CtrlMsgReqSetMacAddress +{ + ProtobufCMessage base; + ProtobufCBinaryData mac; + int32_t mode; +}; +#define CTRL_MSG__REQ__SET_MAC_ADDRESS__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__set_mac_address__descriptor) \ + , {0,NULL}, 0 } + + +struct CtrlMsgRespSetMacAddress +{ + ProtobufCMessage base; + int32_t resp; +}; +#define CTRL_MSG__RESP__SET_MAC_ADDRESS__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__set_mac_address__descriptor) \ + , 0 } + + +struct CtrlMsgReqGetAPConfig +{ + ProtobufCMessage base; +}; +#define CTRL_MSG__REQ__GET_APCONFIG__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__get_apconfig__descriptor) \ + } + + +struct CtrlMsgRespGetAPConfig +{ + ProtobufCMessage base; + ProtobufCBinaryData ssid; + ProtobufCBinaryData bssid; + int32_t rssi; + int32_t chnl; + CtrlWifiSecProt sec_prot; + int32_t resp; +}; +#define CTRL_MSG__RESP__GET_APCONFIG__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__get_apconfig__descriptor) \ + , {0,NULL}, {0,NULL}, 0, 0, CTRL__WIFI_SEC_PROT__Open, 0 } + + +struct CtrlMsgReqConnectAP +{ + ProtobufCMessage base; + char *ssid; + char *pwd; + char *bssid; + protobuf_c_boolean is_wpa3_supported; + int32_t listen_interval; +}; +#define CTRL_MSG__REQ__CONNECT_AP__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__connect_ap__descriptor) \ + , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0, 0 } + + +struct CtrlMsgRespConnectAP +{ + ProtobufCMessage base; + int32_t resp; + ProtobufCBinaryData mac; +}; +#define CTRL_MSG__RESP__CONNECT_AP__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__connect_ap__descriptor) \ + , 0, {0,NULL} } + + +struct CtrlMsgReqGetSoftAPConfig +{ + ProtobufCMessage base; +}; +#define CTRL_MSG__REQ__GET_SOFT_APCONFIG__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__get_soft_apconfig__descriptor) \ + } + + +struct CtrlMsgRespGetSoftAPConfig +{ + ProtobufCMessage base; + ProtobufCBinaryData ssid; + ProtobufCBinaryData pwd; + int32_t chnl; + CtrlWifiSecProt sec_prot; + int32_t max_conn; + protobuf_c_boolean ssid_hidden; + int32_t bw; + int32_t resp; +}; +#define CTRL_MSG__RESP__GET_SOFT_APCONFIG__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__get_soft_apconfig__descriptor) \ + , {0,NULL}, {0,NULL}, 0, CTRL__WIFI_SEC_PROT__Open, 0, 0, 0, 0 } + + +struct CtrlMsgReqStartSoftAP +{ + ProtobufCMessage base; + char *ssid; + char *pwd; + int32_t chnl; + CtrlWifiSecProt sec_prot; + int32_t max_conn; + protobuf_c_boolean ssid_hidden; + int32_t bw; +}; +#define CTRL_MSG__REQ__START_SOFT_AP__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__start_soft_ap__descriptor) \ + , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0, CTRL__WIFI_SEC_PROT__Open, 0, 0, 0 } + + +struct CtrlMsgRespStartSoftAP +{ + ProtobufCMessage base; + int32_t resp; + ProtobufCBinaryData mac; +}; +#define CTRL_MSG__RESP__START_SOFT_AP__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__start_soft_ap__descriptor) \ + , 0, {0,NULL} } + + +struct CtrlMsgReqScanResult +{ + ProtobufCMessage base; +}; +#define CTRL_MSG__REQ__SCAN_RESULT__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__scan_result__descriptor) \ + } + + +struct CtrlMsgRespScanResult +{ + ProtobufCMessage base; + uint32_t count; + size_t n_entries; + ScanResult **entries; + int32_t resp; +}; +#define CTRL_MSG__RESP__SCAN_RESULT__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__scan_result__descriptor) \ + , 0, 0,NULL, 0 } + + +struct CtrlMsgReqSoftAPConnectedSTA +{ + ProtobufCMessage base; +}; +#define CTRL_MSG__REQ__SOFT_APCONNECTED_STA__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__soft_apconnected_sta__descriptor) \ + } + + +struct CtrlMsgRespSoftAPConnectedSTA +{ + ProtobufCMessage base; + uint32_t num; + size_t n_stations; + ConnectedSTAList **stations; + int32_t resp; +}; +#define CTRL_MSG__RESP__SOFT_APCONNECTED_STA__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__soft_apconnected_sta__descriptor) \ + , 0, 0,NULL, 0 } + + +struct CtrlMsgReqOTABegin +{ + ProtobufCMessage base; +}; +#define CTRL_MSG__REQ__OTABEGIN__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__otabegin__descriptor) \ + } + + +struct CtrlMsgRespOTABegin +{ + ProtobufCMessage base; + int32_t resp; +}; +#define CTRL_MSG__RESP__OTABEGIN__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__otabegin__descriptor) \ + , 0 } + + +struct CtrlMsgReqOTAWrite +{ + ProtobufCMessage base; + ProtobufCBinaryData ota_data; +}; +#define CTRL_MSG__REQ__OTAWRITE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__otawrite__descriptor) \ + , {0,NULL} } + + +struct CtrlMsgRespOTAWrite +{ + ProtobufCMessage base; + int32_t resp; +}; +#define CTRL_MSG__RESP__OTAWRITE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__otawrite__descriptor) \ + , 0 } + + +struct CtrlMsgReqOTAEnd +{ + ProtobufCMessage base; +}; +#define CTRL_MSG__REQ__OTAEND__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__otaend__descriptor) \ + } + + +struct CtrlMsgRespOTAEnd +{ + ProtobufCMessage base; + int32_t resp; +}; +#define CTRL_MSG__RESP__OTAEND__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__otaend__descriptor) \ + , 0 } + + +struct CtrlMsgReqVendorIEData +{ + ProtobufCMessage base; + int32_t element_id; + int32_t length; + ProtobufCBinaryData vendor_oui; + int32_t vendor_oui_type; + ProtobufCBinaryData payload; +}; +#define CTRL_MSG__REQ__VENDOR_IEDATA__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__vendor_iedata__descriptor) \ + , 0, 0, {0,NULL}, 0, {0,NULL} } + + +struct CtrlMsgReqSetSoftAPVendorSpecificIE +{ + ProtobufCMessage base; + protobuf_c_boolean enable; + CtrlVendorIEType type; + CtrlVendorIEID idx; + CtrlMsgReqVendorIEData *vendor_ie_data; +}; +#define CTRL_MSG__REQ__SET_SOFT_APVENDOR_SPECIFIC_IE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__set_soft_apvendor_specific_ie__descriptor) \ + , 0, CTRL__VENDOR_IETYPE__Beacon, CTRL__VENDOR_IEID__ID_0, NULL } + + +struct CtrlMsgRespSetSoftAPVendorSpecificIE +{ + ProtobufCMessage base; + int32_t resp; +}; +#define CTRL_MSG__RESP__SET_SOFT_APVENDOR_SPECIFIC_IE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__set_soft_apvendor_specific_ie__descriptor) \ + , 0 } + + +struct CtrlMsgReqSetWifiMaxTxPower +{ + ProtobufCMessage base; + int32_t wifi_max_tx_power; +}; +#define CTRL_MSG__REQ__SET_WIFI_MAX_TX_POWER__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__set_wifi_max_tx_power__descriptor) \ + , 0 } + + +struct CtrlMsgRespSetWifiMaxTxPower +{ + ProtobufCMessage base; + int32_t resp; +}; +#define CTRL_MSG__RESP__SET_WIFI_MAX_TX_POWER__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__set_wifi_max_tx_power__descriptor) \ + , 0 } + + +struct CtrlMsgReqGetWifiCurrTxPower +{ + ProtobufCMessage base; +}; +#define CTRL_MSG__REQ__GET_WIFI_CURR_TX_POWER__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__get_wifi_curr_tx_power__descriptor) \ + } + + +struct CtrlMsgRespGetWifiCurrTxPower +{ + ProtobufCMessage base; + int32_t wifi_curr_tx_power; + int32_t resp; +}; +#define CTRL_MSG__RESP__GET_WIFI_CURR_TX_POWER__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__get_wifi_curr_tx_power__descriptor) \ + , 0, 0 } + + +struct CtrlMsgReqConfigHeartbeat +{ + ProtobufCMessage base; + protobuf_c_boolean enable; + int32_t duration; +}; +#define CTRL_MSG__REQ__CONFIG_HEARTBEAT__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__req__config_heartbeat__descriptor) \ + , 0, 0 } + + +struct CtrlMsgRespConfigHeartbeat +{ + ProtobufCMessage base; + int32_t resp; +}; +#define CTRL_MSG__RESP__CONFIG_HEARTBEAT__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__resp__config_heartbeat__descriptor) \ + , 0 } + + +/* + ** Event structure * + */ +struct CtrlMsgEventESPInit +{ + ProtobufCMessage base; + ProtobufCBinaryData init_data; +}; +#define CTRL_MSG__EVENT__ESPINIT__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__event__espinit__descriptor) \ + , {0,NULL} } + + +struct CtrlMsgEventHeartbeat +{ + ProtobufCMessage base; + int32_t hb_num; +}; +#define CTRL_MSG__EVENT__HEARTBEAT__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__event__heartbeat__descriptor) \ + , 0 } + + +struct CtrlMsgEventStationDisconnectFromAP +{ + ProtobufCMessage base; + int32_t resp; +}; +#define CTRL_MSG__EVENT__STATION_DISCONNECT_FROM_AP__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__event__station_disconnect_from_ap__descriptor) \ + , 0 } + + +struct CtrlMsgEventStationDisconnectFromESPSoftAP +{ + ProtobufCMessage base; + int32_t resp; + ProtobufCBinaryData mac; +}; +#define CTRL_MSG__EVENT__STATION_DISCONNECT_FROM_ESPSOFT_AP__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__event__station_disconnect_from_espsoft_ap__descriptor) \ + , 0, {0,NULL} } + + +typedef enum { + CTRL_MSG__PAYLOAD__NOT_SET = 0, + CTRL_MSG__PAYLOAD_REQ_GET_MAC_ADDRESS = 101, + CTRL_MSG__PAYLOAD_REQ_SET_MAC_ADDRESS = 102, + CTRL_MSG__PAYLOAD_REQ_GET_WIFI_MODE = 103, + CTRL_MSG__PAYLOAD_REQ_SET_WIFI_MODE = 104, + CTRL_MSG__PAYLOAD_REQ_SCAN_AP_LIST = 105, + CTRL_MSG__PAYLOAD_REQ_GET_AP_CONFIG = 106, + CTRL_MSG__PAYLOAD_REQ_CONNECT_AP = 107, + CTRL_MSG__PAYLOAD_REQ_DISCONNECT_AP = 108, + CTRL_MSG__PAYLOAD_REQ_GET_SOFTAP_CONFIG = 109, + CTRL_MSG__PAYLOAD_REQ_SET_SOFTAP_VENDOR_SPECIFIC_IE = 110, + CTRL_MSG__PAYLOAD_REQ_START_SOFTAP = 111, + CTRL_MSG__PAYLOAD_REQ_SOFTAP_CONNECTED_STAS_LIST = 112, + CTRL_MSG__PAYLOAD_REQ_STOP_SOFTAP = 113, + CTRL_MSG__PAYLOAD_REQ_SET_POWER_SAVE_MODE = 114, + CTRL_MSG__PAYLOAD_REQ_GET_POWER_SAVE_MODE = 115, + CTRL_MSG__PAYLOAD_REQ_OTA_BEGIN = 116, + CTRL_MSG__PAYLOAD_REQ_OTA_WRITE = 117, + CTRL_MSG__PAYLOAD_REQ_OTA_END = 118, + CTRL_MSG__PAYLOAD_REQ_SET_WIFI_MAX_TX_POWER = 119, + CTRL_MSG__PAYLOAD_REQ_GET_WIFI_CURR_TX_POWER = 120, + CTRL_MSG__PAYLOAD_REQ_CONFIG_HEARTBEAT = 121, + CTRL_MSG__PAYLOAD_RESP_GET_MAC_ADDRESS = 201, + CTRL_MSG__PAYLOAD_RESP_SET_MAC_ADDRESS = 202, + CTRL_MSG__PAYLOAD_RESP_GET_WIFI_MODE = 203, + CTRL_MSG__PAYLOAD_RESP_SET_WIFI_MODE = 204, + CTRL_MSG__PAYLOAD_RESP_SCAN_AP_LIST = 205, + CTRL_MSG__PAYLOAD_RESP_GET_AP_CONFIG = 206, + CTRL_MSG__PAYLOAD_RESP_CONNECT_AP = 207, + CTRL_MSG__PAYLOAD_RESP_DISCONNECT_AP = 208, + CTRL_MSG__PAYLOAD_RESP_GET_SOFTAP_CONFIG = 209, + CTRL_MSG__PAYLOAD_RESP_SET_SOFTAP_VENDOR_SPECIFIC_IE = 210, + CTRL_MSG__PAYLOAD_RESP_START_SOFTAP = 211, + CTRL_MSG__PAYLOAD_RESP_SOFTAP_CONNECTED_STAS_LIST = 212, + CTRL_MSG__PAYLOAD_RESP_STOP_SOFTAP = 213, + CTRL_MSG__PAYLOAD_RESP_SET_POWER_SAVE_MODE = 214, + CTRL_MSG__PAYLOAD_RESP_GET_POWER_SAVE_MODE = 215, + CTRL_MSG__PAYLOAD_RESP_OTA_BEGIN = 216, + CTRL_MSG__PAYLOAD_RESP_OTA_WRITE = 217, + CTRL_MSG__PAYLOAD_RESP_OTA_END = 218, + CTRL_MSG__PAYLOAD_RESP_SET_WIFI_MAX_TX_POWER = 219, + CTRL_MSG__PAYLOAD_RESP_GET_WIFI_CURR_TX_POWER = 220, + CTRL_MSG__PAYLOAD_RESP_CONFIG_HEARTBEAT = 221, + CTRL_MSG__PAYLOAD_EVENT_ESP_INIT = 301, + CTRL_MSG__PAYLOAD_EVENT_HEARTBEAT = 302, + CTRL_MSG__PAYLOAD_EVENT_STATION_DISCONNECT_FROM__AP = 303, + CTRL_MSG__PAYLOAD_EVENT_STATION_DISCONNECT_FROM__ESP__SOFT_AP = 304 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(CTRL_MSG__PAYLOAD__CASE) +} CtrlMsg__PayloadCase; + +struct CtrlMsg +{ + ProtobufCMessage base; + /* + * msg_type could be req, resp or Event + */ + CtrlMsgType msg_type; + /* + * msg id + */ + CtrlMsgId msg_id; + CtrlMsg__PayloadCase payload_case; + union { + /* + ** Requests * + */ + CtrlMsgReqGetMacAddress *req_get_mac_address; + CtrlMsgReqSetMacAddress *req_set_mac_address; + CtrlMsgReqGetMode *req_get_wifi_mode; + CtrlMsgReqSetMode *req_set_wifi_mode; + CtrlMsgReqScanResult *req_scan_ap_list; + CtrlMsgReqGetAPConfig *req_get_ap_config; + CtrlMsgReqConnectAP *req_connect_ap; + CtrlMsgReqGetStatus *req_disconnect_ap; + CtrlMsgReqGetSoftAPConfig *req_get_softap_config; + CtrlMsgReqSetSoftAPVendorSpecificIE *req_set_softap_vendor_specific_ie; + CtrlMsgReqStartSoftAP *req_start_softap; + CtrlMsgReqSoftAPConnectedSTA *req_softap_connected_stas_list; + CtrlMsgReqGetStatus *req_stop_softap; + CtrlMsgReqSetMode *req_set_power_save_mode; + CtrlMsgReqGetMode *req_get_power_save_mode; + CtrlMsgReqOTABegin *req_ota_begin; + CtrlMsgReqOTAWrite *req_ota_write; + CtrlMsgReqOTAEnd *req_ota_end; + CtrlMsgReqSetWifiMaxTxPower *req_set_wifi_max_tx_power; + CtrlMsgReqGetWifiCurrTxPower *req_get_wifi_curr_tx_power; + CtrlMsgReqConfigHeartbeat *req_config_heartbeat; + /* + ** Responses * + */ + CtrlMsgRespGetMacAddress *resp_get_mac_address; + CtrlMsgRespSetMacAddress *resp_set_mac_address; + CtrlMsgRespGetMode *resp_get_wifi_mode; + CtrlMsgRespSetMode *resp_set_wifi_mode; + CtrlMsgRespScanResult *resp_scan_ap_list; + CtrlMsgRespGetAPConfig *resp_get_ap_config; + CtrlMsgRespConnectAP *resp_connect_ap; + CtrlMsgRespGetStatus *resp_disconnect_ap; + CtrlMsgRespGetSoftAPConfig *resp_get_softap_config; + CtrlMsgRespSetSoftAPVendorSpecificIE *resp_set_softap_vendor_specific_ie; + CtrlMsgRespStartSoftAP *resp_start_softap; + CtrlMsgRespSoftAPConnectedSTA *resp_softap_connected_stas_list; + CtrlMsgRespGetStatus *resp_stop_softap; + CtrlMsgRespSetMode *resp_set_power_save_mode; + CtrlMsgRespGetMode *resp_get_power_save_mode; + CtrlMsgRespOTABegin *resp_ota_begin; + CtrlMsgRespOTAWrite *resp_ota_write; + CtrlMsgRespOTAEnd *resp_ota_end; + CtrlMsgRespSetWifiMaxTxPower *resp_set_wifi_max_tx_power; + CtrlMsgRespGetWifiCurrTxPower *resp_get_wifi_curr_tx_power; + CtrlMsgRespConfigHeartbeat *resp_config_heartbeat; + /* + ** Notifications * + */ + CtrlMsgEventESPInit *event_esp_init; + CtrlMsgEventHeartbeat *event_heartbeat; + CtrlMsgEventStationDisconnectFromAP *event_station_disconnect_from_ap; + CtrlMsgEventStationDisconnectFromESPSoftAP *event_station_disconnect_from_esp_softap; + }; +}; +#define CTRL_MSG__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&ctrl_msg__descriptor) \ + , CTRL_MSG_TYPE__MsgType_Invalid, CTRL_MSG_ID__MsgId_Invalid, CTRL_MSG__PAYLOAD__NOT_SET, {0} } + + +/* ScanResult methods */ +void scan_result__init + (ScanResult *message); +size_t scan_result__get_packed_size + (const ScanResult *message); +size_t scan_result__pack + (const ScanResult *message, + uint8_t *out); +size_t scan_result__pack_to_buffer + (const ScanResult *message, + ProtobufCBuffer *buffer); +ScanResult * + scan_result__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void scan_result__free_unpacked + (ScanResult *message, + ProtobufCAllocator *allocator); +/* ConnectedSTAList methods */ +void connected_stalist__init + (ConnectedSTAList *message); +size_t connected_stalist__get_packed_size + (const ConnectedSTAList *message); +size_t connected_stalist__pack + (const ConnectedSTAList *message, + uint8_t *out); +size_t connected_stalist__pack_to_buffer + (const ConnectedSTAList *message, + ProtobufCBuffer *buffer); +ConnectedSTAList * + connected_stalist__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void connected_stalist__free_unpacked + (ConnectedSTAList *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqGetMacAddress methods */ +void ctrl_msg__req__get_mac_address__init + (CtrlMsgReqGetMacAddress *message); +size_t ctrl_msg__req__get_mac_address__get_packed_size + (const CtrlMsgReqGetMacAddress *message); +size_t ctrl_msg__req__get_mac_address__pack + (const CtrlMsgReqGetMacAddress *message, + uint8_t *out); +size_t ctrl_msg__req__get_mac_address__pack_to_buffer + (const CtrlMsgReqGetMacAddress *message, + ProtobufCBuffer *buffer); +CtrlMsgReqGetMacAddress * + ctrl_msg__req__get_mac_address__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__get_mac_address__free_unpacked + (CtrlMsgReqGetMacAddress *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespGetMacAddress methods */ +void ctrl_msg__resp__get_mac_address__init + (CtrlMsgRespGetMacAddress *message); +size_t ctrl_msg__resp__get_mac_address__get_packed_size + (const CtrlMsgRespGetMacAddress *message); +size_t ctrl_msg__resp__get_mac_address__pack + (const CtrlMsgRespGetMacAddress *message, + uint8_t *out); +size_t ctrl_msg__resp__get_mac_address__pack_to_buffer + (const CtrlMsgRespGetMacAddress *message, + ProtobufCBuffer *buffer); +CtrlMsgRespGetMacAddress * + ctrl_msg__resp__get_mac_address__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__get_mac_address__free_unpacked + (CtrlMsgRespGetMacAddress *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqGetMode methods */ +void ctrl_msg__req__get_mode__init + (CtrlMsgReqGetMode *message); +size_t ctrl_msg__req__get_mode__get_packed_size + (const CtrlMsgReqGetMode *message); +size_t ctrl_msg__req__get_mode__pack + (const CtrlMsgReqGetMode *message, + uint8_t *out); +size_t ctrl_msg__req__get_mode__pack_to_buffer + (const CtrlMsgReqGetMode *message, + ProtobufCBuffer *buffer); +CtrlMsgReqGetMode * + ctrl_msg__req__get_mode__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__get_mode__free_unpacked + (CtrlMsgReqGetMode *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespGetMode methods */ +void ctrl_msg__resp__get_mode__init + (CtrlMsgRespGetMode *message); +size_t ctrl_msg__resp__get_mode__get_packed_size + (const CtrlMsgRespGetMode *message); +size_t ctrl_msg__resp__get_mode__pack + (const CtrlMsgRespGetMode *message, + uint8_t *out); +size_t ctrl_msg__resp__get_mode__pack_to_buffer + (const CtrlMsgRespGetMode *message, + ProtobufCBuffer *buffer); +CtrlMsgRespGetMode * + ctrl_msg__resp__get_mode__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__get_mode__free_unpacked + (CtrlMsgRespGetMode *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqSetMode methods */ +void ctrl_msg__req__set_mode__init + (CtrlMsgReqSetMode *message); +size_t ctrl_msg__req__set_mode__get_packed_size + (const CtrlMsgReqSetMode *message); +size_t ctrl_msg__req__set_mode__pack + (const CtrlMsgReqSetMode *message, + uint8_t *out); +size_t ctrl_msg__req__set_mode__pack_to_buffer + (const CtrlMsgReqSetMode *message, + ProtobufCBuffer *buffer); +CtrlMsgReqSetMode * + ctrl_msg__req__set_mode__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__set_mode__free_unpacked + (CtrlMsgReqSetMode *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespSetMode methods */ +void ctrl_msg__resp__set_mode__init + (CtrlMsgRespSetMode *message); +size_t ctrl_msg__resp__set_mode__get_packed_size + (const CtrlMsgRespSetMode *message); +size_t ctrl_msg__resp__set_mode__pack + (const CtrlMsgRespSetMode *message, + uint8_t *out); +size_t ctrl_msg__resp__set_mode__pack_to_buffer + (const CtrlMsgRespSetMode *message, + ProtobufCBuffer *buffer); +CtrlMsgRespSetMode * + ctrl_msg__resp__set_mode__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__set_mode__free_unpacked + (CtrlMsgRespSetMode *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqGetStatus methods */ +void ctrl_msg__req__get_status__init + (CtrlMsgReqGetStatus *message); +size_t ctrl_msg__req__get_status__get_packed_size + (const CtrlMsgReqGetStatus *message); +size_t ctrl_msg__req__get_status__pack + (const CtrlMsgReqGetStatus *message, + uint8_t *out); +size_t ctrl_msg__req__get_status__pack_to_buffer + (const CtrlMsgReqGetStatus *message, + ProtobufCBuffer *buffer); +CtrlMsgReqGetStatus * + ctrl_msg__req__get_status__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__get_status__free_unpacked + (CtrlMsgReqGetStatus *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespGetStatus methods */ +void ctrl_msg__resp__get_status__init + (CtrlMsgRespGetStatus *message); +size_t ctrl_msg__resp__get_status__get_packed_size + (const CtrlMsgRespGetStatus *message); +size_t ctrl_msg__resp__get_status__pack + (const CtrlMsgRespGetStatus *message, + uint8_t *out); +size_t ctrl_msg__resp__get_status__pack_to_buffer + (const CtrlMsgRespGetStatus *message, + ProtobufCBuffer *buffer); +CtrlMsgRespGetStatus * + ctrl_msg__resp__get_status__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__get_status__free_unpacked + (CtrlMsgRespGetStatus *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqSetMacAddress methods */ +void ctrl_msg__req__set_mac_address__init + (CtrlMsgReqSetMacAddress *message); +size_t ctrl_msg__req__set_mac_address__get_packed_size + (const CtrlMsgReqSetMacAddress *message); +size_t ctrl_msg__req__set_mac_address__pack + (const CtrlMsgReqSetMacAddress *message, + uint8_t *out); +size_t ctrl_msg__req__set_mac_address__pack_to_buffer + (const CtrlMsgReqSetMacAddress *message, + ProtobufCBuffer *buffer); +CtrlMsgReqSetMacAddress * + ctrl_msg__req__set_mac_address__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__set_mac_address__free_unpacked + (CtrlMsgReqSetMacAddress *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespSetMacAddress methods */ +void ctrl_msg__resp__set_mac_address__init + (CtrlMsgRespSetMacAddress *message); +size_t ctrl_msg__resp__set_mac_address__get_packed_size + (const CtrlMsgRespSetMacAddress *message); +size_t ctrl_msg__resp__set_mac_address__pack + (const CtrlMsgRespSetMacAddress *message, + uint8_t *out); +size_t ctrl_msg__resp__set_mac_address__pack_to_buffer + (const CtrlMsgRespSetMacAddress *message, + ProtobufCBuffer *buffer); +CtrlMsgRespSetMacAddress * + ctrl_msg__resp__set_mac_address__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__set_mac_address__free_unpacked + (CtrlMsgRespSetMacAddress *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqGetAPConfig methods */ +void ctrl_msg__req__get_apconfig__init + (CtrlMsgReqGetAPConfig *message); +size_t ctrl_msg__req__get_apconfig__get_packed_size + (const CtrlMsgReqGetAPConfig *message); +size_t ctrl_msg__req__get_apconfig__pack + (const CtrlMsgReqGetAPConfig *message, + uint8_t *out); +size_t ctrl_msg__req__get_apconfig__pack_to_buffer + (const CtrlMsgReqGetAPConfig *message, + ProtobufCBuffer *buffer); +CtrlMsgReqGetAPConfig * + ctrl_msg__req__get_apconfig__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__get_apconfig__free_unpacked + (CtrlMsgReqGetAPConfig *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespGetAPConfig methods */ +void ctrl_msg__resp__get_apconfig__init + (CtrlMsgRespGetAPConfig *message); +size_t ctrl_msg__resp__get_apconfig__get_packed_size + (const CtrlMsgRespGetAPConfig *message); +size_t ctrl_msg__resp__get_apconfig__pack + (const CtrlMsgRespGetAPConfig *message, + uint8_t *out); +size_t ctrl_msg__resp__get_apconfig__pack_to_buffer + (const CtrlMsgRespGetAPConfig *message, + ProtobufCBuffer *buffer); +CtrlMsgRespGetAPConfig * + ctrl_msg__resp__get_apconfig__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__get_apconfig__free_unpacked + (CtrlMsgRespGetAPConfig *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqConnectAP methods */ +void ctrl_msg__req__connect_ap__init + (CtrlMsgReqConnectAP *message); +size_t ctrl_msg__req__connect_ap__get_packed_size + (const CtrlMsgReqConnectAP *message); +size_t ctrl_msg__req__connect_ap__pack + (const CtrlMsgReqConnectAP *message, + uint8_t *out); +size_t ctrl_msg__req__connect_ap__pack_to_buffer + (const CtrlMsgReqConnectAP *message, + ProtobufCBuffer *buffer); +CtrlMsgReqConnectAP * + ctrl_msg__req__connect_ap__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__connect_ap__free_unpacked + (CtrlMsgReqConnectAP *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespConnectAP methods */ +void ctrl_msg__resp__connect_ap__init + (CtrlMsgRespConnectAP *message); +size_t ctrl_msg__resp__connect_ap__get_packed_size + (const CtrlMsgRespConnectAP *message); +size_t ctrl_msg__resp__connect_ap__pack + (const CtrlMsgRespConnectAP *message, + uint8_t *out); +size_t ctrl_msg__resp__connect_ap__pack_to_buffer + (const CtrlMsgRespConnectAP *message, + ProtobufCBuffer *buffer); +CtrlMsgRespConnectAP * + ctrl_msg__resp__connect_ap__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__connect_ap__free_unpacked + (CtrlMsgRespConnectAP *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqGetSoftAPConfig methods */ +void ctrl_msg__req__get_soft_apconfig__init + (CtrlMsgReqGetSoftAPConfig *message); +size_t ctrl_msg__req__get_soft_apconfig__get_packed_size + (const CtrlMsgReqGetSoftAPConfig *message); +size_t ctrl_msg__req__get_soft_apconfig__pack + (const CtrlMsgReqGetSoftAPConfig *message, + uint8_t *out); +size_t ctrl_msg__req__get_soft_apconfig__pack_to_buffer + (const CtrlMsgReqGetSoftAPConfig *message, + ProtobufCBuffer *buffer); +CtrlMsgReqGetSoftAPConfig * + ctrl_msg__req__get_soft_apconfig__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__get_soft_apconfig__free_unpacked + (CtrlMsgReqGetSoftAPConfig *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespGetSoftAPConfig methods */ +void ctrl_msg__resp__get_soft_apconfig__init + (CtrlMsgRespGetSoftAPConfig *message); +size_t ctrl_msg__resp__get_soft_apconfig__get_packed_size + (const CtrlMsgRespGetSoftAPConfig *message); +size_t ctrl_msg__resp__get_soft_apconfig__pack + (const CtrlMsgRespGetSoftAPConfig *message, + uint8_t *out); +size_t ctrl_msg__resp__get_soft_apconfig__pack_to_buffer + (const CtrlMsgRespGetSoftAPConfig *message, + ProtobufCBuffer *buffer); +CtrlMsgRespGetSoftAPConfig * + ctrl_msg__resp__get_soft_apconfig__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__get_soft_apconfig__free_unpacked + (CtrlMsgRespGetSoftAPConfig *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqStartSoftAP methods */ +void ctrl_msg__req__start_soft_ap__init + (CtrlMsgReqStartSoftAP *message); +size_t ctrl_msg__req__start_soft_ap__get_packed_size + (const CtrlMsgReqStartSoftAP *message); +size_t ctrl_msg__req__start_soft_ap__pack + (const CtrlMsgReqStartSoftAP *message, + uint8_t *out); +size_t ctrl_msg__req__start_soft_ap__pack_to_buffer + (const CtrlMsgReqStartSoftAP *message, + ProtobufCBuffer *buffer); +CtrlMsgReqStartSoftAP * + ctrl_msg__req__start_soft_ap__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__start_soft_ap__free_unpacked + (CtrlMsgReqStartSoftAP *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespStartSoftAP methods */ +void ctrl_msg__resp__start_soft_ap__init + (CtrlMsgRespStartSoftAP *message); +size_t ctrl_msg__resp__start_soft_ap__get_packed_size + (const CtrlMsgRespStartSoftAP *message); +size_t ctrl_msg__resp__start_soft_ap__pack + (const CtrlMsgRespStartSoftAP *message, + uint8_t *out); +size_t ctrl_msg__resp__start_soft_ap__pack_to_buffer + (const CtrlMsgRespStartSoftAP *message, + ProtobufCBuffer *buffer); +CtrlMsgRespStartSoftAP * + ctrl_msg__resp__start_soft_ap__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__start_soft_ap__free_unpacked + (CtrlMsgRespStartSoftAP *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqScanResult methods */ +void ctrl_msg__req__scan_result__init + (CtrlMsgReqScanResult *message); +size_t ctrl_msg__req__scan_result__get_packed_size + (const CtrlMsgReqScanResult *message); +size_t ctrl_msg__req__scan_result__pack + (const CtrlMsgReqScanResult *message, + uint8_t *out); +size_t ctrl_msg__req__scan_result__pack_to_buffer + (const CtrlMsgReqScanResult *message, + ProtobufCBuffer *buffer); +CtrlMsgReqScanResult * + ctrl_msg__req__scan_result__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__scan_result__free_unpacked + (CtrlMsgReqScanResult *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespScanResult methods */ +void ctrl_msg__resp__scan_result__init + (CtrlMsgRespScanResult *message); +size_t ctrl_msg__resp__scan_result__get_packed_size + (const CtrlMsgRespScanResult *message); +size_t ctrl_msg__resp__scan_result__pack + (const CtrlMsgRespScanResult *message, + uint8_t *out); +size_t ctrl_msg__resp__scan_result__pack_to_buffer + (const CtrlMsgRespScanResult *message, + ProtobufCBuffer *buffer); +CtrlMsgRespScanResult * + ctrl_msg__resp__scan_result__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__scan_result__free_unpacked + (CtrlMsgRespScanResult *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqSoftAPConnectedSTA methods */ +void ctrl_msg__req__soft_apconnected_sta__init + (CtrlMsgReqSoftAPConnectedSTA *message); +size_t ctrl_msg__req__soft_apconnected_sta__get_packed_size + (const CtrlMsgReqSoftAPConnectedSTA *message); +size_t ctrl_msg__req__soft_apconnected_sta__pack + (const CtrlMsgReqSoftAPConnectedSTA *message, + uint8_t *out); +size_t ctrl_msg__req__soft_apconnected_sta__pack_to_buffer + (const CtrlMsgReqSoftAPConnectedSTA *message, + ProtobufCBuffer *buffer); +CtrlMsgReqSoftAPConnectedSTA * + ctrl_msg__req__soft_apconnected_sta__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__soft_apconnected_sta__free_unpacked + (CtrlMsgReqSoftAPConnectedSTA *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespSoftAPConnectedSTA methods */ +void ctrl_msg__resp__soft_apconnected_sta__init + (CtrlMsgRespSoftAPConnectedSTA *message); +size_t ctrl_msg__resp__soft_apconnected_sta__get_packed_size + (const CtrlMsgRespSoftAPConnectedSTA *message); +size_t ctrl_msg__resp__soft_apconnected_sta__pack + (const CtrlMsgRespSoftAPConnectedSTA *message, + uint8_t *out); +size_t ctrl_msg__resp__soft_apconnected_sta__pack_to_buffer + (const CtrlMsgRespSoftAPConnectedSTA *message, + ProtobufCBuffer *buffer); +CtrlMsgRespSoftAPConnectedSTA * + ctrl_msg__resp__soft_apconnected_sta__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__soft_apconnected_sta__free_unpacked + (CtrlMsgRespSoftAPConnectedSTA *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqOTABegin methods */ +void ctrl_msg__req__otabegin__init + (CtrlMsgReqOTABegin *message); +size_t ctrl_msg__req__otabegin__get_packed_size + (const CtrlMsgReqOTABegin *message); +size_t ctrl_msg__req__otabegin__pack + (const CtrlMsgReqOTABegin *message, + uint8_t *out); +size_t ctrl_msg__req__otabegin__pack_to_buffer + (const CtrlMsgReqOTABegin *message, + ProtobufCBuffer *buffer); +CtrlMsgReqOTABegin * + ctrl_msg__req__otabegin__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__otabegin__free_unpacked + (CtrlMsgReqOTABegin *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespOTABegin methods */ +void ctrl_msg__resp__otabegin__init + (CtrlMsgRespOTABegin *message); +size_t ctrl_msg__resp__otabegin__get_packed_size + (const CtrlMsgRespOTABegin *message); +size_t ctrl_msg__resp__otabegin__pack + (const CtrlMsgRespOTABegin *message, + uint8_t *out); +size_t ctrl_msg__resp__otabegin__pack_to_buffer + (const CtrlMsgRespOTABegin *message, + ProtobufCBuffer *buffer); +CtrlMsgRespOTABegin * + ctrl_msg__resp__otabegin__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__otabegin__free_unpacked + (CtrlMsgRespOTABegin *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqOTAWrite methods */ +void ctrl_msg__req__otawrite__init + (CtrlMsgReqOTAWrite *message); +size_t ctrl_msg__req__otawrite__get_packed_size + (const CtrlMsgReqOTAWrite *message); +size_t ctrl_msg__req__otawrite__pack + (const CtrlMsgReqOTAWrite *message, + uint8_t *out); +size_t ctrl_msg__req__otawrite__pack_to_buffer + (const CtrlMsgReqOTAWrite *message, + ProtobufCBuffer *buffer); +CtrlMsgReqOTAWrite * + ctrl_msg__req__otawrite__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__otawrite__free_unpacked + (CtrlMsgReqOTAWrite *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespOTAWrite methods */ +void ctrl_msg__resp__otawrite__init + (CtrlMsgRespOTAWrite *message); +size_t ctrl_msg__resp__otawrite__get_packed_size + (const CtrlMsgRespOTAWrite *message); +size_t ctrl_msg__resp__otawrite__pack + (const CtrlMsgRespOTAWrite *message, + uint8_t *out); +size_t ctrl_msg__resp__otawrite__pack_to_buffer + (const CtrlMsgRespOTAWrite *message, + ProtobufCBuffer *buffer); +CtrlMsgRespOTAWrite * + ctrl_msg__resp__otawrite__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__otawrite__free_unpacked + (CtrlMsgRespOTAWrite *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqOTAEnd methods */ +void ctrl_msg__req__otaend__init + (CtrlMsgReqOTAEnd *message); +size_t ctrl_msg__req__otaend__get_packed_size + (const CtrlMsgReqOTAEnd *message); +size_t ctrl_msg__req__otaend__pack + (const CtrlMsgReqOTAEnd *message, + uint8_t *out); +size_t ctrl_msg__req__otaend__pack_to_buffer + (const CtrlMsgReqOTAEnd *message, + ProtobufCBuffer *buffer); +CtrlMsgReqOTAEnd * + ctrl_msg__req__otaend__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__otaend__free_unpacked + (CtrlMsgReqOTAEnd *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespOTAEnd methods */ +void ctrl_msg__resp__otaend__init + (CtrlMsgRespOTAEnd *message); +size_t ctrl_msg__resp__otaend__get_packed_size + (const CtrlMsgRespOTAEnd *message); +size_t ctrl_msg__resp__otaend__pack + (const CtrlMsgRespOTAEnd *message, + uint8_t *out); +size_t ctrl_msg__resp__otaend__pack_to_buffer + (const CtrlMsgRespOTAEnd *message, + ProtobufCBuffer *buffer); +CtrlMsgRespOTAEnd * + ctrl_msg__resp__otaend__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__otaend__free_unpacked + (CtrlMsgRespOTAEnd *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqVendorIEData methods */ +void ctrl_msg__req__vendor_iedata__init + (CtrlMsgReqVendorIEData *message); +size_t ctrl_msg__req__vendor_iedata__get_packed_size + (const CtrlMsgReqVendorIEData *message); +size_t ctrl_msg__req__vendor_iedata__pack + (const CtrlMsgReqVendorIEData *message, + uint8_t *out); +size_t ctrl_msg__req__vendor_iedata__pack_to_buffer + (const CtrlMsgReqVendorIEData *message, + ProtobufCBuffer *buffer); +CtrlMsgReqVendorIEData * + ctrl_msg__req__vendor_iedata__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__vendor_iedata__free_unpacked + (CtrlMsgReqVendorIEData *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqSetSoftAPVendorSpecificIE methods */ +void ctrl_msg__req__set_soft_apvendor_specific_ie__init + (CtrlMsgReqSetSoftAPVendorSpecificIE *message); +size_t ctrl_msg__req__set_soft_apvendor_specific_ie__get_packed_size + (const CtrlMsgReqSetSoftAPVendorSpecificIE *message); +size_t ctrl_msg__req__set_soft_apvendor_specific_ie__pack + (const CtrlMsgReqSetSoftAPVendorSpecificIE *message, + uint8_t *out); +size_t ctrl_msg__req__set_soft_apvendor_specific_ie__pack_to_buffer + (const CtrlMsgReqSetSoftAPVendorSpecificIE *message, + ProtobufCBuffer *buffer); +CtrlMsgReqSetSoftAPVendorSpecificIE * + ctrl_msg__req__set_soft_apvendor_specific_ie__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__set_soft_apvendor_specific_ie__free_unpacked + (CtrlMsgReqSetSoftAPVendorSpecificIE *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespSetSoftAPVendorSpecificIE methods */ +void ctrl_msg__resp__set_soft_apvendor_specific_ie__init + (CtrlMsgRespSetSoftAPVendorSpecificIE *message); +size_t ctrl_msg__resp__set_soft_apvendor_specific_ie__get_packed_size + (const CtrlMsgRespSetSoftAPVendorSpecificIE *message); +size_t ctrl_msg__resp__set_soft_apvendor_specific_ie__pack + (const CtrlMsgRespSetSoftAPVendorSpecificIE *message, + uint8_t *out); +size_t ctrl_msg__resp__set_soft_apvendor_specific_ie__pack_to_buffer + (const CtrlMsgRespSetSoftAPVendorSpecificIE *message, + ProtobufCBuffer *buffer); +CtrlMsgRespSetSoftAPVendorSpecificIE * + ctrl_msg__resp__set_soft_apvendor_specific_ie__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__set_soft_apvendor_specific_ie__free_unpacked + (CtrlMsgRespSetSoftAPVendorSpecificIE *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqSetWifiMaxTxPower methods */ +void ctrl_msg__req__set_wifi_max_tx_power__init + (CtrlMsgReqSetWifiMaxTxPower *message); +size_t ctrl_msg__req__set_wifi_max_tx_power__get_packed_size + (const CtrlMsgReqSetWifiMaxTxPower *message); +size_t ctrl_msg__req__set_wifi_max_tx_power__pack + (const CtrlMsgReqSetWifiMaxTxPower *message, + uint8_t *out); +size_t ctrl_msg__req__set_wifi_max_tx_power__pack_to_buffer + (const CtrlMsgReqSetWifiMaxTxPower *message, + ProtobufCBuffer *buffer); +CtrlMsgReqSetWifiMaxTxPower * + ctrl_msg__req__set_wifi_max_tx_power__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__set_wifi_max_tx_power__free_unpacked + (CtrlMsgReqSetWifiMaxTxPower *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespSetWifiMaxTxPower methods */ +void ctrl_msg__resp__set_wifi_max_tx_power__init + (CtrlMsgRespSetWifiMaxTxPower *message); +size_t ctrl_msg__resp__set_wifi_max_tx_power__get_packed_size + (const CtrlMsgRespSetWifiMaxTxPower *message); +size_t ctrl_msg__resp__set_wifi_max_tx_power__pack + (const CtrlMsgRespSetWifiMaxTxPower *message, + uint8_t *out); +size_t ctrl_msg__resp__set_wifi_max_tx_power__pack_to_buffer + (const CtrlMsgRespSetWifiMaxTxPower *message, + ProtobufCBuffer *buffer); +CtrlMsgRespSetWifiMaxTxPower * + ctrl_msg__resp__set_wifi_max_tx_power__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__set_wifi_max_tx_power__free_unpacked + (CtrlMsgRespSetWifiMaxTxPower *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqGetWifiCurrTxPower methods */ +void ctrl_msg__req__get_wifi_curr_tx_power__init + (CtrlMsgReqGetWifiCurrTxPower *message); +size_t ctrl_msg__req__get_wifi_curr_tx_power__get_packed_size + (const CtrlMsgReqGetWifiCurrTxPower *message); +size_t ctrl_msg__req__get_wifi_curr_tx_power__pack + (const CtrlMsgReqGetWifiCurrTxPower *message, + uint8_t *out); +size_t ctrl_msg__req__get_wifi_curr_tx_power__pack_to_buffer + (const CtrlMsgReqGetWifiCurrTxPower *message, + ProtobufCBuffer *buffer); +CtrlMsgReqGetWifiCurrTxPower * + ctrl_msg__req__get_wifi_curr_tx_power__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__get_wifi_curr_tx_power__free_unpacked + (CtrlMsgReqGetWifiCurrTxPower *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespGetWifiCurrTxPower methods */ +void ctrl_msg__resp__get_wifi_curr_tx_power__init + (CtrlMsgRespGetWifiCurrTxPower *message); +size_t ctrl_msg__resp__get_wifi_curr_tx_power__get_packed_size + (const CtrlMsgRespGetWifiCurrTxPower *message); +size_t ctrl_msg__resp__get_wifi_curr_tx_power__pack + (const CtrlMsgRespGetWifiCurrTxPower *message, + uint8_t *out); +size_t ctrl_msg__resp__get_wifi_curr_tx_power__pack_to_buffer + (const CtrlMsgRespGetWifiCurrTxPower *message, + ProtobufCBuffer *buffer); +CtrlMsgRespGetWifiCurrTxPower * + ctrl_msg__resp__get_wifi_curr_tx_power__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__get_wifi_curr_tx_power__free_unpacked + (CtrlMsgRespGetWifiCurrTxPower *message, + ProtobufCAllocator *allocator); +/* CtrlMsgReqConfigHeartbeat methods */ +void ctrl_msg__req__config_heartbeat__init + (CtrlMsgReqConfigHeartbeat *message); +size_t ctrl_msg__req__config_heartbeat__get_packed_size + (const CtrlMsgReqConfigHeartbeat *message); +size_t ctrl_msg__req__config_heartbeat__pack + (const CtrlMsgReqConfigHeartbeat *message, + uint8_t *out); +size_t ctrl_msg__req__config_heartbeat__pack_to_buffer + (const CtrlMsgReqConfigHeartbeat *message, + ProtobufCBuffer *buffer); +CtrlMsgReqConfigHeartbeat * + ctrl_msg__req__config_heartbeat__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__req__config_heartbeat__free_unpacked + (CtrlMsgReqConfigHeartbeat *message, + ProtobufCAllocator *allocator); +/* CtrlMsgRespConfigHeartbeat methods */ +void ctrl_msg__resp__config_heartbeat__init + (CtrlMsgRespConfigHeartbeat *message); +size_t ctrl_msg__resp__config_heartbeat__get_packed_size + (const CtrlMsgRespConfigHeartbeat *message); +size_t ctrl_msg__resp__config_heartbeat__pack + (const CtrlMsgRespConfigHeartbeat *message, + uint8_t *out); +size_t ctrl_msg__resp__config_heartbeat__pack_to_buffer + (const CtrlMsgRespConfigHeartbeat *message, + ProtobufCBuffer *buffer); +CtrlMsgRespConfigHeartbeat * + ctrl_msg__resp__config_heartbeat__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__resp__config_heartbeat__free_unpacked + (CtrlMsgRespConfigHeartbeat *message, + ProtobufCAllocator *allocator); +/* CtrlMsgEventESPInit methods */ +void ctrl_msg__event__espinit__init + (CtrlMsgEventESPInit *message); +size_t ctrl_msg__event__espinit__get_packed_size + (const CtrlMsgEventESPInit *message); +size_t ctrl_msg__event__espinit__pack + (const CtrlMsgEventESPInit *message, + uint8_t *out); +size_t ctrl_msg__event__espinit__pack_to_buffer + (const CtrlMsgEventESPInit *message, + ProtobufCBuffer *buffer); +CtrlMsgEventESPInit * + ctrl_msg__event__espinit__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__event__espinit__free_unpacked + (CtrlMsgEventESPInit *message, + ProtobufCAllocator *allocator); +/* CtrlMsgEventHeartbeat methods */ +void ctrl_msg__event__heartbeat__init + (CtrlMsgEventHeartbeat *message); +size_t ctrl_msg__event__heartbeat__get_packed_size + (const CtrlMsgEventHeartbeat *message); +size_t ctrl_msg__event__heartbeat__pack + (const CtrlMsgEventHeartbeat *message, + uint8_t *out); +size_t ctrl_msg__event__heartbeat__pack_to_buffer + (const CtrlMsgEventHeartbeat *message, + ProtobufCBuffer *buffer); +CtrlMsgEventHeartbeat * + ctrl_msg__event__heartbeat__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__event__heartbeat__free_unpacked + (CtrlMsgEventHeartbeat *message, + ProtobufCAllocator *allocator); +/* CtrlMsgEventStationDisconnectFromAP methods */ +void ctrl_msg__event__station_disconnect_from_ap__init + (CtrlMsgEventStationDisconnectFromAP *message); +size_t ctrl_msg__event__station_disconnect_from_ap__get_packed_size + (const CtrlMsgEventStationDisconnectFromAP *message); +size_t ctrl_msg__event__station_disconnect_from_ap__pack + (const CtrlMsgEventStationDisconnectFromAP *message, + uint8_t *out); +size_t ctrl_msg__event__station_disconnect_from_ap__pack_to_buffer + (const CtrlMsgEventStationDisconnectFromAP *message, + ProtobufCBuffer *buffer); +CtrlMsgEventStationDisconnectFromAP * + ctrl_msg__event__station_disconnect_from_ap__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__event__station_disconnect_from_ap__free_unpacked + (CtrlMsgEventStationDisconnectFromAP *message, + ProtobufCAllocator *allocator); +/* CtrlMsgEventStationDisconnectFromESPSoftAP methods */ +void ctrl_msg__event__station_disconnect_from_espsoft_ap__init + (CtrlMsgEventStationDisconnectFromESPSoftAP *message); +size_t ctrl_msg__event__station_disconnect_from_espsoft_ap__get_packed_size + (const CtrlMsgEventStationDisconnectFromESPSoftAP *message); +size_t ctrl_msg__event__station_disconnect_from_espsoft_ap__pack + (const CtrlMsgEventStationDisconnectFromESPSoftAP *message, + uint8_t *out); +size_t ctrl_msg__event__station_disconnect_from_espsoft_ap__pack_to_buffer + (const CtrlMsgEventStationDisconnectFromESPSoftAP *message, + ProtobufCBuffer *buffer); +CtrlMsgEventStationDisconnectFromESPSoftAP * + ctrl_msg__event__station_disconnect_from_espsoft_ap__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__event__station_disconnect_from_espsoft_ap__free_unpacked + (CtrlMsgEventStationDisconnectFromESPSoftAP *message, + ProtobufCAllocator *allocator); +/* CtrlMsg methods */ +void ctrl_msg__init + (CtrlMsg *message); +size_t ctrl_msg__get_packed_size + (const CtrlMsg *message); +size_t ctrl_msg__pack + (const CtrlMsg *message, + uint8_t *out); +size_t ctrl_msg__pack_to_buffer + (const CtrlMsg *message, + ProtobufCBuffer *buffer); +CtrlMsg * + ctrl_msg__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void ctrl_msg__free_unpacked + (CtrlMsg *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*ScanResult_Closure) + (const ScanResult *message, + void *closure_data); +typedef void (*ConnectedSTAList_Closure) + (const ConnectedSTAList *message, + void *closure_data); +typedef void (*CtrlMsgReqGetMacAddress_Closure) + (const CtrlMsgReqGetMacAddress *message, + void *closure_data); +typedef void (*CtrlMsgRespGetMacAddress_Closure) + (const CtrlMsgRespGetMacAddress *message, + void *closure_data); +typedef void (*CtrlMsgReqGetMode_Closure) + (const CtrlMsgReqGetMode *message, + void *closure_data); +typedef void (*CtrlMsgRespGetMode_Closure) + (const CtrlMsgRespGetMode *message, + void *closure_data); +typedef void (*CtrlMsgReqSetMode_Closure) + (const CtrlMsgReqSetMode *message, + void *closure_data); +typedef void (*CtrlMsgRespSetMode_Closure) + (const CtrlMsgRespSetMode *message, + void *closure_data); +typedef void (*CtrlMsgReqGetStatus_Closure) + (const CtrlMsgReqGetStatus *message, + void *closure_data); +typedef void (*CtrlMsgRespGetStatus_Closure) + (const CtrlMsgRespGetStatus *message, + void *closure_data); +typedef void (*CtrlMsgReqSetMacAddress_Closure) + (const CtrlMsgReqSetMacAddress *message, + void *closure_data); +typedef void (*CtrlMsgRespSetMacAddress_Closure) + (const CtrlMsgRespSetMacAddress *message, + void *closure_data); +typedef void (*CtrlMsgReqGetAPConfig_Closure) + (const CtrlMsgReqGetAPConfig *message, + void *closure_data); +typedef void (*CtrlMsgRespGetAPConfig_Closure) + (const CtrlMsgRespGetAPConfig *message, + void *closure_data); +typedef void (*CtrlMsgReqConnectAP_Closure) + (const CtrlMsgReqConnectAP *message, + void *closure_data); +typedef void (*CtrlMsgRespConnectAP_Closure) + (const CtrlMsgRespConnectAP *message, + void *closure_data); +typedef void (*CtrlMsgReqGetSoftAPConfig_Closure) + (const CtrlMsgReqGetSoftAPConfig *message, + void *closure_data); +typedef void (*CtrlMsgRespGetSoftAPConfig_Closure) + (const CtrlMsgRespGetSoftAPConfig *message, + void *closure_data); +typedef void (*CtrlMsgReqStartSoftAP_Closure) + (const CtrlMsgReqStartSoftAP *message, + void *closure_data); +typedef void (*CtrlMsgRespStartSoftAP_Closure) + (const CtrlMsgRespStartSoftAP *message, + void *closure_data); +typedef void (*CtrlMsgReqScanResult_Closure) + (const CtrlMsgReqScanResult *message, + void *closure_data); +typedef void (*CtrlMsgRespScanResult_Closure) + (const CtrlMsgRespScanResult *message, + void *closure_data); +typedef void (*CtrlMsgReqSoftAPConnectedSTA_Closure) + (const CtrlMsgReqSoftAPConnectedSTA *message, + void *closure_data); +typedef void (*CtrlMsgRespSoftAPConnectedSTA_Closure) + (const CtrlMsgRespSoftAPConnectedSTA *message, + void *closure_data); +typedef void (*CtrlMsgReqOTABegin_Closure) + (const CtrlMsgReqOTABegin *message, + void *closure_data); +typedef void (*CtrlMsgRespOTABegin_Closure) + (const CtrlMsgRespOTABegin *message, + void *closure_data); +typedef void (*CtrlMsgReqOTAWrite_Closure) + (const CtrlMsgReqOTAWrite *message, + void *closure_data); +typedef void (*CtrlMsgRespOTAWrite_Closure) + (const CtrlMsgRespOTAWrite *message, + void *closure_data); +typedef void (*CtrlMsgReqOTAEnd_Closure) + (const CtrlMsgReqOTAEnd *message, + void *closure_data); +typedef void (*CtrlMsgRespOTAEnd_Closure) + (const CtrlMsgRespOTAEnd *message, + void *closure_data); +typedef void (*CtrlMsgReqVendorIEData_Closure) + (const CtrlMsgReqVendorIEData *message, + void *closure_data); +typedef void (*CtrlMsgReqSetSoftAPVendorSpecificIE_Closure) + (const CtrlMsgReqSetSoftAPVendorSpecificIE *message, + void *closure_data); +typedef void (*CtrlMsgRespSetSoftAPVendorSpecificIE_Closure) + (const CtrlMsgRespSetSoftAPVendorSpecificIE *message, + void *closure_data); +typedef void (*CtrlMsgReqSetWifiMaxTxPower_Closure) + (const CtrlMsgReqSetWifiMaxTxPower *message, + void *closure_data); +typedef void (*CtrlMsgRespSetWifiMaxTxPower_Closure) + (const CtrlMsgRespSetWifiMaxTxPower *message, + void *closure_data); +typedef void (*CtrlMsgReqGetWifiCurrTxPower_Closure) + (const CtrlMsgReqGetWifiCurrTxPower *message, + void *closure_data); +typedef void (*CtrlMsgRespGetWifiCurrTxPower_Closure) + (const CtrlMsgRespGetWifiCurrTxPower *message, + void *closure_data); +typedef void (*CtrlMsgReqConfigHeartbeat_Closure) + (const CtrlMsgReqConfigHeartbeat *message, + void *closure_data); +typedef void (*CtrlMsgRespConfigHeartbeat_Closure) + (const CtrlMsgRespConfigHeartbeat *message, + void *closure_data); +typedef void (*CtrlMsgEventESPInit_Closure) + (const CtrlMsgEventESPInit *message, + void *closure_data); +typedef void (*CtrlMsgEventHeartbeat_Closure) + (const CtrlMsgEventHeartbeat *message, + void *closure_data); +typedef void (*CtrlMsgEventStationDisconnectFromAP_Closure) + (const CtrlMsgEventStationDisconnectFromAP *message, + void *closure_data); +typedef void (*CtrlMsgEventStationDisconnectFromESPSoftAP_Closure) + (const CtrlMsgEventStationDisconnectFromESPSoftAP *message, + void *closure_data); +typedef void (*CtrlMsg_Closure) + (const CtrlMsg *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCEnumDescriptor ctrl__vendor_ietype__descriptor; +extern const ProtobufCEnumDescriptor ctrl__vendor_ieid__descriptor; +extern const ProtobufCEnumDescriptor ctrl__wifi_mode__descriptor; +extern const ProtobufCEnumDescriptor ctrl__wifi_bw__descriptor; +extern const ProtobufCEnumDescriptor ctrl__wifi_power_save__descriptor; +extern const ProtobufCEnumDescriptor ctrl__wifi_sec_prot__descriptor; +extern const ProtobufCEnumDescriptor ctrl__status__descriptor; +extern const ProtobufCEnumDescriptor ctrl_msg_type__descriptor; +extern const ProtobufCEnumDescriptor ctrl_msg_id__descriptor; +extern const ProtobufCMessageDescriptor scan_result__descriptor; +extern const ProtobufCMessageDescriptor connected_stalist__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__get_mac_address__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__get_mac_address__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__get_mode__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__get_mode__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__set_mode__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__set_mode__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__get_status__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__get_status__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__set_mac_address__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__set_mac_address__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__get_apconfig__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__get_apconfig__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__connect_ap__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__connect_ap__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__get_soft_apconfig__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__get_soft_apconfig__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__start_soft_ap__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__start_soft_ap__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__scan_result__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__scan_result__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__soft_apconnected_sta__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__soft_apconnected_sta__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__otabegin__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__otabegin__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__otawrite__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__otawrite__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__otaend__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__otaend__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__vendor_iedata__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__set_soft_apvendor_specific_ie__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__set_soft_apvendor_specific_ie__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__set_wifi_max_tx_power__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__set_wifi_max_tx_power__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__get_wifi_curr_tx_power__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__get_wifi_curr_tx_power__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__req__config_heartbeat__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__resp__config_heartbeat__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__event__espinit__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__event__heartbeat__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__event__station_disconnect_from_ap__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__event__station_disconnect_from_espsoft_ap__descriptor; +extern const ProtobufCMessageDescriptor ctrl_msg__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_esp_5fhosted_5fconfig_2eproto__INCLUDED */ diff --git a/proto/esp_hosted_config.pb.c b/proto/esp_hosted_config.pb.c deleted file mode 100644 index 7d83b8e..0000000 --- a/proto/esp_hosted_config.pb.c +++ /dev/null @@ -1,150 +0,0 @@ -/* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.7 */ - -#include "esp_hosted_config.pb.h" -#if PB_PROTO_HEADER_VERSION != 40 -#error Regenerate this file with the current version of nanopb generator. -#endif - -PB_BIND(ScanResult, ScanResult, AUTO) - - -PB_BIND(ConnectedSTAList, ConnectedSTAList, AUTO) - - -PB_BIND(CtrlMsg_Req_GetMacAddress, CtrlMsg_Req_GetMacAddress, AUTO) - - -PB_BIND(CtrlMsg_Resp_GetMacAddress, CtrlMsg_Resp_GetMacAddress, AUTO) - - -PB_BIND(CtrlMsg_Req_GetMode, CtrlMsg_Req_GetMode, AUTO) - - -PB_BIND(CtrlMsg_Resp_GetMode, CtrlMsg_Resp_GetMode, AUTO) - - -PB_BIND(CtrlMsg_Req_SetMode, CtrlMsg_Req_SetMode, AUTO) - - -PB_BIND(CtrlMsg_Resp_SetMode, CtrlMsg_Resp_SetMode, AUTO) - - -PB_BIND(CtrlMsg_Req_GetStatus, CtrlMsg_Req_GetStatus, AUTO) - - -PB_BIND(CtrlMsg_Resp_GetStatus, CtrlMsg_Resp_GetStatus, AUTO) - - -PB_BIND(CtrlMsg_Req_SetMacAddress, CtrlMsg_Req_SetMacAddress, AUTO) - - -PB_BIND(CtrlMsg_Resp_SetMacAddress, CtrlMsg_Resp_SetMacAddress, AUTO) - - -PB_BIND(CtrlMsg_Req_GetAPConfig, CtrlMsg_Req_GetAPConfig, AUTO) - - -PB_BIND(CtrlMsg_Resp_GetAPConfig, CtrlMsg_Resp_GetAPConfig, AUTO) - - -PB_BIND(CtrlMsg_Req_ConnectAP, CtrlMsg_Req_ConnectAP, AUTO) - - -PB_BIND(CtrlMsg_Resp_ConnectAP, CtrlMsg_Resp_ConnectAP, AUTO) - - -PB_BIND(CtrlMsg_Req_GetSoftAPConfig, CtrlMsg_Req_GetSoftAPConfig, AUTO) - - -PB_BIND(CtrlMsg_Resp_GetSoftAPConfig, CtrlMsg_Resp_GetSoftAPConfig, AUTO) - - -PB_BIND(CtrlMsg_Req_StartSoftAP, CtrlMsg_Req_StartSoftAP, AUTO) - - -PB_BIND(CtrlMsg_Resp_StartSoftAP, CtrlMsg_Resp_StartSoftAP, AUTO) - - -PB_BIND(CtrlMsg_Req_ScanResult, CtrlMsg_Req_ScanResult, AUTO) - - -PB_BIND(CtrlMsg_Resp_ScanResult, CtrlMsg_Resp_ScanResult, AUTO) - - -PB_BIND(CtrlMsg_Req_SoftAPConnectedSTA, CtrlMsg_Req_SoftAPConnectedSTA, AUTO) - - -PB_BIND(CtrlMsg_Resp_SoftAPConnectedSTA, CtrlMsg_Resp_SoftAPConnectedSTA, AUTO) - - -PB_BIND(CtrlMsg_Req_OTABegin, CtrlMsg_Req_OTABegin, AUTO) - - -PB_BIND(CtrlMsg_Resp_OTABegin, CtrlMsg_Resp_OTABegin, AUTO) - - -PB_BIND(CtrlMsg_Req_OTAWrite, CtrlMsg_Req_OTAWrite, AUTO) - - -PB_BIND(CtrlMsg_Resp_OTAWrite, CtrlMsg_Resp_OTAWrite, AUTO) - - -PB_BIND(CtrlMsg_Req_OTAEnd, CtrlMsg_Req_OTAEnd, AUTO) - - -PB_BIND(CtrlMsg_Resp_OTAEnd, CtrlMsg_Resp_OTAEnd, AUTO) - - -PB_BIND(CtrlMsg_Req_VendorIEData, CtrlMsg_Req_VendorIEData, AUTO) - - -PB_BIND(CtrlMsg_Req_SetSoftAPVendorSpecificIE, CtrlMsg_Req_SetSoftAPVendorSpecificIE, AUTO) - - -PB_BIND(CtrlMsg_Resp_SetSoftAPVendorSpecificIE, CtrlMsg_Resp_SetSoftAPVendorSpecificIE, AUTO) - - -PB_BIND(CtrlMsg_Req_SetWifiMaxTxPower, CtrlMsg_Req_SetWifiMaxTxPower, AUTO) - - -PB_BIND(CtrlMsg_Resp_SetWifiMaxTxPower, CtrlMsg_Resp_SetWifiMaxTxPower, AUTO) - - -PB_BIND(CtrlMsg_Req_GetWifiCurrTxPower, CtrlMsg_Req_GetWifiCurrTxPower, AUTO) - - -PB_BIND(CtrlMsg_Resp_GetWifiCurrTxPower, CtrlMsg_Resp_GetWifiCurrTxPower, AUTO) - - -PB_BIND(CtrlMsg_Req_ConfigHeartbeat, CtrlMsg_Req_ConfigHeartbeat, AUTO) - - -PB_BIND(CtrlMsg_Resp_ConfigHeartbeat, CtrlMsg_Resp_ConfigHeartbeat, AUTO) - - -PB_BIND(CtrlMsg_Event_ESPInit, CtrlMsg_Event_ESPInit, AUTO) - - -PB_BIND(CtrlMsg_Event_Heartbeat, CtrlMsg_Event_Heartbeat, AUTO) - - -PB_BIND(CtrlMsg_Event_StationDisconnectFromAP, CtrlMsg_Event_StationDisconnectFromAP, AUTO) - - -PB_BIND(CtrlMsg_Event_StationDisconnectFromESPSoftAP, CtrlMsg_Event_StationDisconnectFromESPSoftAP, AUTO) - - -PB_BIND(CtrlMsg, CtrlMsg, 2) - - - - - - - - - - - - diff --git a/proto/esp_hosted_config.pb.h b/proto/esp_hosted_config.pb.h deleted file mode 100644 index 37087dc..0000000 --- a/proto/esp_hosted_config.pb.h +++ /dev/null @@ -1,1242 +0,0 @@ -/* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.7 */ - -#ifndef PB_ESP_HOSTED_CONFIG_PB_H_INCLUDED -#define PB_ESP_HOSTED_CONFIG_PB_H_INCLUDED -#include - -#if PB_PROTO_HEADER_VERSION != 40 -#error Regenerate this file with the current version of nanopb generator. -#endif - -/* Enum definitions */ -/* Enums similar to ESP IDF */ -typedef enum _Ctrl_VendorIEType { - Ctrl_VendorIEType_Beacon = 0, - Ctrl_VendorIEType_Probe_req = 1, - Ctrl_VendorIEType_Probe_resp = 2, - Ctrl_VendorIEType_Assoc_req = 3, - Ctrl_VendorIEType_Assoc_resp = 4 -} Ctrl_VendorIEType; - -typedef enum _Ctrl_VendorIEID { - Ctrl_VendorIEID_ID_0 = 0, - Ctrl_VendorIEID_ID_1 = 1 -} Ctrl_VendorIEID; - -typedef enum _Ctrl_WifiMode { - Ctrl_WifiMode_NONE = 0, - Ctrl_WifiMode_STA = 1, - Ctrl_WifiMode_AP = 2, - Ctrl_WifiMode_APSTA = 3 -} Ctrl_WifiMode; - -typedef enum _Ctrl_WifiBw { - Ctrl_WifiBw_BW_Invalid = 0, - Ctrl_WifiBw_HT20 = 1, - Ctrl_WifiBw_HT40 = 2 -} Ctrl_WifiBw; - -typedef enum _Ctrl_WifiPowerSave { - Ctrl_WifiPowerSave_PS_Invalid = 0, - Ctrl_WifiPowerSave_MIN_MODEM = 1, - Ctrl_WifiPowerSave_MAX_MODEM = 2 -} Ctrl_WifiPowerSave; - -typedef enum _Ctrl_WifiSecProt { - Ctrl_WifiSecProt_Open = 0, - Ctrl_WifiSecProt_WEP = 1, - Ctrl_WifiSecProt_WPA_PSK = 2, - Ctrl_WifiSecProt_WPA2_PSK = 3, - Ctrl_WifiSecProt_WPA_WPA2_PSK = 4, - Ctrl_WifiSecProt_WPA2_ENTERPRISE = 5, - Ctrl_WifiSecProt_WPA3_PSK = 6, - Ctrl_WifiSecProt_WPA2_WPA3_PSK = 7 -} Ctrl_WifiSecProt; - -/* enums for Control path */ -typedef enum _Ctrl_Status { - Ctrl_Status_Connected = 0, - Ctrl_Status_Not_Connected = 1, - Ctrl_Status_No_AP_Found = 2, - Ctrl_Status_Connection_Fail = 3, - Ctrl_Status_Invalid_Argument = 4, - Ctrl_Status_Out_Of_Range = 5 -} Ctrl_Status; - -typedef enum _CtrlMsgType { - CtrlMsgType_MsgType_Invalid = 0, - CtrlMsgType_Req = 1, - CtrlMsgType_Resp = 2, - CtrlMsgType_Event = 3, - CtrlMsgType_MsgType_Max = 4 -} CtrlMsgType; - -typedef enum _CtrlMsgId { - CtrlMsgId_MsgId_Invalid = 0, - /* * Request Msgs * */ - CtrlMsgId_Req_Base = 100, - CtrlMsgId_Req_GetMACAddress = 101, - CtrlMsgId_Req_SetMacAddress = 102, - CtrlMsgId_Req_GetWifiMode = 103, - CtrlMsgId_Req_SetWifiMode = 104, - CtrlMsgId_Req_GetAPScanList = 105, - CtrlMsgId_Req_GetAPConfig = 106, - CtrlMsgId_Req_ConnectAP = 107, - CtrlMsgId_Req_DisconnectAP = 108, - CtrlMsgId_Req_GetSoftAPConfig = 109, - CtrlMsgId_Req_SetSoftAPVendorSpecificIE = 110, - CtrlMsgId_Req_StartSoftAP = 111, - CtrlMsgId_Req_GetSoftAPConnectedSTAList = 112, - CtrlMsgId_Req_StopSoftAP = 113, - CtrlMsgId_Req_SetPowerSaveMode = 114, - CtrlMsgId_Req_GetPowerSaveMode = 115, - CtrlMsgId_Req_OTABegin = 116, - CtrlMsgId_Req_OTAWrite = 117, - CtrlMsgId_Req_OTAEnd = 118, - CtrlMsgId_Req_SetWifiMaxTxPower = 119, - CtrlMsgId_Req_GetWifiCurrTxPower = 120, - CtrlMsgId_Req_ConfigHeartbeat = 121, - /* Add new control path command response before Req_Max - and update Req_Max */ - CtrlMsgId_Req_Max = 122, - /* * Response Msgs * */ - CtrlMsgId_Resp_Base = 200, - CtrlMsgId_Resp_GetMACAddress = 201, - CtrlMsgId_Resp_SetMacAddress = 202, - CtrlMsgId_Resp_GetWifiMode = 203, - CtrlMsgId_Resp_SetWifiMode = 204, - CtrlMsgId_Resp_GetAPScanList = 205, - CtrlMsgId_Resp_GetAPConfig = 206, - CtrlMsgId_Resp_ConnectAP = 207, - CtrlMsgId_Resp_DisconnectAP = 208, - CtrlMsgId_Resp_GetSoftAPConfig = 209, - CtrlMsgId_Resp_SetSoftAPVendorSpecificIE = 210, - CtrlMsgId_Resp_StartSoftAP = 211, - CtrlMsgId_Resp_GetSoftAPConnectedSTAList = 212, - CtrlMsgId_Resp_StopSoftAP = 213, - CtrlMsgId_Resp_SetPowerSaveMode = 214, - CtrlMsgId_Resp_GetPowerSaveMode = 215, - CtrlMsgId_Resp_OTABegin = 216, - CtrlMsgId_Resp_OTAWrite = 217, - CtrlMsgId_Resp_OTAEnd = 218, - CtrlMsgId_Resp_SetWifiMaxTxPower = 219, - CtrlMsgId_Resp_GetWifiCurrTxPower = 220, - CtrlMsgId_Resp_ConfigHeartbeat = 221, - /* Add new control path command response before Resp_Max - and update Resp_Max */ - CtrlMsgId_Resp_Max = 222, - /* * Event Msgs * */ - CtrlMsgId_Event_Base = 300, - CtrlMsgId_Event_ESPInit = 301, - CtrlMsgId_Event_Heartbeat = 302, - CtrlMsgId_Event_StationDisconnectFromAP = 303, - CtrlMsgId_Event_StationDisconnectFromESPSoftAP = 304, - /* Add new control path command notification before Event_Max - and update Event_Max */ - CtrlMsgId_Event_Max = 305 -} CtrlMsgId; - -/* Struct definitions */ -/* internal supporting structures for CtrlMsg */ -typedef struct _ScanResult { - pb_callback_t ssid; - uint32_t chnl; - int32_t rssi; - pb_callback_t bssid; - Ctrl_WifiSecProt sec_prot; -} ScanResult; - -typedef struct _ConnectedSTAList { - pb_callback_t mac; - int32_t rssi; -} ConnectedSTAList; - -/* * Req/Resp structure * */ -typedef struct _CtrlMsg_Req_GetMacAddress { - int32_t mode; -} CtrlMsg_Req_GetMacAddress; - -typedef struct _CtrlMsg_Resp_GetMacAddress { - pb_callback_t mac; - int32_t resp; -} CtrlMsg_Resp_GetMacAddress; - -typedef struct _CtrlMsg_Req_GetMode { - char dummy_field; -} CtrlMsg_Req_GetMode; - -typedef struct _CtrlMsg_Resp_GetMode { - int32_t mode; - int32_t resp; -} CtrlMsg_Resp_GetMode; - -typedef struct _CtrlMsg_Req_SetMode { - int32_t mode; -} CtrlMsg_Req_SetMode; - -typedef struct _CtrlMsg_Resp_SetMode { - int32_t resp; -} CtrlMsg_Resp_SetMode; - -typedef struct _CtrlMsg_Req_GetStatus { - char dummy_field; -} CtrlMsg_Req_GetStatus; - -typedef struct _CtrlMsg_Resp_GetStatus { - int32_t resp; -} CtrlMsg_Resp_GetStatus; - -typedef struct _CtrlMsg_Req_SetMacAddress { - pb_callback_t mac; - int32_t mode; -} CtrlMsg_Req_SetMacAddress; - -typedef struct _CtrlMsg_Resp_SetMacAddress { - int32_t resp; -} CtrlMsg_Resp_SetMacAddress; - -typedef struct _CtrlMsg_Req_GetAPConfig { - char dummy_field; -} CtrlMsg_Req_GetAPConfig; - -typedef struct _CtrlMsg_Resp_GetAPConfig { - pb_callback_t ssid; - pb_callback_t bssid; - int32_t rssi; - int32_t chnl; - Ctrl_WifiSecProt sec_prot; - int32_t resp; -} CtrlMsg_Resp_GetAPConfig; - -typedef struct _CtrlMsg_Req_ConnectAP { - pb_callback_t ssid; - pb_callback_t pwd; - pb_callback_t bssid; - bool is_wpa3_supported; - int32_t listen_interval; -} CtrlMsg_Req_ConnectAP; - -typedef struct _CtrlMsg_Resp_ConnectAP { - int32_t resp; - pb_callback_t mac; -} CtrlMsg_Resp_ConnectAP; - -typedef struct _CtrlMsg_Req_GetSoftAPConfig { - char dummy_field; -} CtrlMsg_Req_GetSoftAPConfig; - -typedef struct _CtrlMsg_Resp_GetSoftAPConfig { - pb_callback_t ssid; - pb_callback_t pwd; - int32_t chnl; - Ctrl_WifiSecProt sec_prot; - int32_t max_conn; - bool ssid_hidden; - int32_t bw; - int32_t resp; -} CtrlMsg_Resp_GetSoftAPConfig; - -typedef struct _CtrlMsg_Req_StartSoftAP { - pb_callback_t ssid; - pb_callback_t pwd; - int32_t chnl; - Ctrl_WifiSecProt sec_prot; - int32_t max_conn; - bool ssid_hidden; - int32_t bw; -} CtrlMsg_Req_StartSoftAP; - -typedef struct _CtrlMsg_Resp_StartSoftAP { - int32_t resp; - pb_callback_t mac; -} CtrlMsg_Resp_StartSoftAP; - -typedef struct _CtrlMsg_Req_ScanResult { - char dummy_field; -} CtrlMsg_Req_ScanResult; - -typedef struct _CtrlMsg_Resp_ScanResult { - uint32_t count; - pb_callback_t entries; - int32_t resp; -} CtrlMsg_Resp_ScanResult; - -typedef struct _CtrlMsg_Req_SoftAPConnectedSTA { - char dummy_field; -} CtrlMsg_Req_SoftAPConnectedSTA; - -typedef struct _CtrlMsg_Resp_SoftAPConnectedSTA { - uint32_t num; - pb_callback_t stations; - int32_t resp; -} CtrlMsg_Resp_SoftAPConnectedSTA; - -typedef struct _CtrlMsg_Req_OTABegin { - char dummy_field; -} CtrlMsg_Req_OTABegin; - -typedef struct _CtrlMsg_Resp_OTABegin { - int32_t resp; -} CtrlMsg_Resp_OTABegin; - -typedef struct _CtrlMsg_Req_OTAWrite { - pb_callback_t ota_data; -} CtrlMsg_Req_OTAWrite; - -typedef struct _CtrlMsg_Resp_OTAWrite { - int32_t resp; -} CtrlMsg_Resp_OTAWrite; - -typedef struct _CtrlMsg_Req_OTAEnd { - char dummy_field; -} CtrlMsg_Req_OTAEnd; - -typedef struct _CtrlMsg_Resp_OTAEnd { - int32_t resp; -} CtrlMsg_Resp_OTAEnd; - -typedef struct _CtrlMsg_Req_VendorIEData { - int32_t element_id; - int32_t length; - pb_callback_t vendor_oui; - int32_t vendor_oui_type; - pb_callback_t payload; -} CtrlMsg_Req_VendorIEData; - -typedef struct _CtrlMsg_Req_SetSoftAPVendorSpecificIE { - bool enable; - Ctrl_VendorIEType type; - Ctrl_VendorIEID idx; - bool has_vendor_ie_data; - CtrlMsg_Req_VendorIEData vendor_ie_data; -} CtrlMsg_Req_SetSoftAPVendorSpecificIE; - -typedef struct _CtrlMsg_Resp_SetSoftAPVendorSpecificIE { - int32_t resp; -} CtrlMsg_Resp_SetSoftAPVendorSpecificIE; - -typedef struct _CtrlMsg_Req_SetWifiMaxTxPower { - int32_t wifi_max_tx_power; -} CtrlMsg_Req_SetWifiMaxTxPower; - -typedef struct _CtrlMsg_Resp_SetWifiMaxTxPower { - int32_t resp; -} CtrlMsg_Resp_SetWifiMaxTxPower; - -typedef struct _CtrlMsg_Req_GetWifiCurrTxPower { - char dummy_field; -} CtrlMsg_Req_GetWifiCurrTxPower; - -typedef struct _CtrlMsg_Resp_GetWifiCurrTxPower { - int32_t wifi_curr_tx_power; - int32_t resp; -} CtrlMsg_Resp_GetWifiCurrTxPower; - -typedef struct _CtrlMsg_Req_ConfigHeartbeat { - bool enable; - int32_t duration; -} CtrlMsg_Req_ConfigHeartbeat; - -typedef struct _CtrlMsg_Resp_ConfigHeartbeat { - int32_t resp; -} CtrlMsg_Resp_ConfigHeartbeat; - -/* * Event structure * */ -typedef struct _CtrlMsg_Event_ESPInit { - pb_callback_t init_data; -} CtrlMsg_Event_ESPInit; - -typedef struct _CtrlMsg_Event_Heartbeat { - int32_t hb_num; -} CtrlMsg_Event_Heartbeat; - -typedef struct _CtrlMsg_Event_StationDisconnectFromAP { - int32_t resp; -} CtrlMsg_Event_StationDisconnectFromAP; - -typedef struct _CtrlMsg_Event_StationDisconnectFromESPSoftAP { - int32_t resp; - pb_callback_t mac; -} CtrlMsg_Event_StationDisconnectFromESPSoftAP; - -typedef struct _CtrlMsg { - /* msg_type could be req, resp or Event */ - CtrlMsgType msg_type; - /* msg id */ - CtrlMsgId msg_id; - pb_callback_t cb_payload; - pb_size_t which_payload; - union { - /* * Requests * */ - CtrlMsg_Req_GetMacAddress req_get_mac_address; - CtrlMsg_Req_SetMacAddress req_set_mac_address; - CtrlMsg_Req_GetMode req_get_wifi_mode; - CtrlMsg_Req_SetMode req_set_wifi_mode; - CtrlMsg_Req_ScanResult req_scan_ap_list; - CtrlMsg_Req_GetAPConfig req_get_ap_config; - CtrlMsg_Req_ConnectAP req_connect_ap; - CtrlMsg_Req_GetStatus req_disconnect_ap; - CtrlMsg_Req_GetSoftAPConfig req_get_softap_config; - CtrlMsg_Req_SetSoftAPVendorSpecificIE req_set_softap_vendor_specific_ie; - CtrlMsg_Req_StartSoftAP req_start_softap; - CtrlMsg_Req_SoftAPConnectedSTA req_softap_connected_stas_list; - CtrlMsg_Req_GetStatus req_stop_softap; - CtrlMsg_Req_SetMode req_set_power_save_mode; - CtrlMsg_Req_GetMode req_get_power_save_mode; - CtrlMsg_Req_OTABegin req_ota_begin; - CtrlMsg_Req_OTAWrite req_ota_write; - CtrlMsg_Req_OTAEnd req_ota_end; - CtrlMsg_Req_SetWifiMaxTxPower req_set_wifi_max_tx_power; - CtrlMsg_Req_GetWifiCurrTxPower req_get_wifi_curr_tx_power; - CtrlMsg_Req_ConfigHeartbeat req_config_heartbeat; - /* * Responses * */ - CtrlMsg_Resp_GetMacAddress resp_get_mac_address; - CtrlMsg_Resp_SetMacAddress resp_set_mac_address; - CtrlMsg_Resp_GetMode resp_get_wifi_mode; - CtrlMsg_Resp_SetMode resp_set_wifi_mode; - CtrlMsg_Resp_ScanResult resp_scan_ap_list; - CtrlMsg_Resp_GetAPConfig resp_get_ap_config; - CtrlMsg_Resp_ConnectAP resp_connect_ap; - CtrlMsg_Resp_GetStatus resp_disconnect_ap; - CtrlMsg_Resp_GetSoftAPConfig resp_get_softap_config; - CtrlMsg_Resp_SetSoftAPVendorSpecificIE resp_set_softap_vendor_specific_ie; - CtrlMsg_Resp_StartSoftAP resp_start_softap; - CtrlMsg_Resp_SoftAPConnectedSTA resp_softap_connected_stas_list; - CtrlMsg_Resp_GetStatus resp_stop_softap; - CtrlMsg_Resp_SetMode resp_set_power_save_mode; - CtrlMsg_Resp_GetMode resp_get_power_save_mode; - CtrlMsg_Resp_OTABegin resp_ota_begin; - CtrlMsg_Resp_OTAWrite resp_ota_write; - CtrlMsg_Resp_OTAEnd resp_ota_end; - CtrlMsg_Resp_SetWifiMaxTxPower resp_set_wifi_max_tx_power; - CtrlMsg_Resp_GetWifiCurrTxPower resp_get_wifi_curr_tx_power; - CtrlMsg_Resp_ConfigHeartbeat resp_config_heartbeat; - /* * Notifications * */ - CtrlMsg_Event_ESPInit event_esp_init; - CtrlMsg_Event_Heartbeat event_heartbeat; - CtrlMsg_Event_StationDisconnectFromAP event_station_disconnect_from_AP; - CtrlMsg_Event_StationDisconnectFromESPSoftAP event_station_disconnect_from_ESP_SoftAP; - } payload; -} CtrlMsg; - - -#ifdef __cplusplus -extern "C" { -#endif - -/* Helper constants for enums */ -#define _Ctrl_VendorIEType_MIN Ctrl_VendorIEType_Beacon -#define _Ctrl_VendorIEType_MAX Ctrl_VendorIEType_Assoc_resp -#define _Ctrl_VendorIEType_ARRAYSIZE ((Ctrl_VendorIEType)(Ctrl_VendorIEType_Assoc_resp+1)) - -#define _Ctrl_VendorIEID_MIN Ctrl_VendorIEID_ID_0 -#define _Ctrl_VendorIEID_MAX Ctrl_VendorIEID_ID_1 -#define _Ctrl_VendorIEID_ARRAYSIZE ((Ctrl_VendorIEID)(Ctrl_VendorIEID_ID_1+1)) - -#define _Ctrl_WifiMode_MIN Ctrl_WifiMode_NONE -#define _Ctrl_WifiMode_MAX Ctrl_WifiMode_APSTA -#define _Ctrl_WifiMode_ARRAYSIZE ((Ctrl_WifiMode)(Ctrl_WifiMode_APSTA+1)) - -#define _Ctrl_WifiBw_MIN Ctrl_WifiBw_BW_Invalid -#define _Ctrl_WifiBw_MAX Ctrl_WifiBw_HT40 -#define _Ctrl_WifiBw_ARRAYSIZE ((Ctrl_WifiBw)(Ctrl_WifiBw_HT40+1)) - -#define _Ctrl_WifiPowerSave_MIN Ctrl_WifiPowerSave_PS_Invalid -#define _Ctrl_WifiPowerSave_MAX Ctrl_WifiPowerSave_MAX_MODEM -#define _Ctrl_WifiPowerSave_ARRAYSIZE ((Ctrl_WifiPowerSave)(Ctrl_WifiPowerSave_MAX_MODEM+1)) - -#define _Ctrl_WifiSecProt_MIN Ctrl_WifiSecProt_Open -#define _Ctrl_WifiSecProt_MAX Ctrl_WifiSecProt_WPA2_WPA3_PSK -#define _Ctrl_WifiSecProt_ARRAYSIZE ((Ctrl_WifiSecProt)(Ctrl_WifiSecProt_WPA2_WPA3_PSK+1)) - -#define _Ctrl_Status_MIN Ctrl_Status_Connected -#define _Ctrl_Status_MAX Ctrl_Status_Out_Of_Range -#define _Ctrl_Status_ARRAYSIZE ((Ctrl_Status)(Ctrl_Status_Out_Of_Range+1)) - -#define _CtrlMsgType_MIN CtrlMsgType_MsgType_Invalid -#define _CtrlMsgType_MAX CtrlMsgType_MsgType_Max -#define _CtrlMsgType_ARRAYSIZE ((CtrlMsgType)(CtrlMsgType_MsgType_Max+1)) - -#define _CtrlMsgId_MIN CtrlMsgId_MsgId_Invalid -#define _CtrlMsgId_MAX CtrlMsgId_Event_Max -#define _CtrlMsgId_ARRAYSIZE ((CtrlMsgId)(CtrlMsgId_Event_Max+1)) - -#define ScanResult_sec_prot_ENUMTYPE Ctrl_WifiSecProt - - - - - - - - - - - - - -#define CtrlMsg_Resp_GetAPConfig_sec_prot_ENUMTYPE Ctrl_WifiSecProt - - - - -#define CtrlMsg_Resp_GetSoftAPConfig_sec_prot_ENUMTYPE Ctrl_WifiSecProt - -#define CtrlMsg_Req_StartSoftAP_sec_prot_ENUMTYPE Ctrl_WifiSecProt - - - - - - - - - - - - - -#define CtrlMsg_Req_SetSoftAPVendorSpecificIE_type_ENUMTYPE Ctrl_VendorIEType -#define CtrlMsg_Req_SetSoftAPVendorSpecificIE_idx_ENUMTYPE Ctrl_VendorIEID - - - - - - - - - - - - -#define CtrlMsg_msg_type_ENUMTYPE CtrlMsgType -#define CtrlMsg_msg_id_ENUMTYPE CtrlMsgId - - -/* Initializer values for message structs */ -#define ScanResult_init_default {{{NULL}, NULL}, 0, 0, {{NULL}, NULL}, _Ctrl_WifiSecProt_MIN} -#define ConnectedSTAList_init_default {{{NULL}, NULL}, 0} -#define CtrlMsg_Req_GetMacAddress_init_default {0} -#define CtrlMsg_Resp_GetMacAddress_init_default {{{NULL}, NULL}, 0} -#define CtrlMsg_Req_GetMode_init_default {0} -#define CtrlMsg_Resp_GetMode_init_default {0, 0} -#define CtrlMsg_Req_SetMode_init_default {0} -#define CtrlMsg_Resp_SetMode_init_default {0} -#define CtrlMsg_Req_GetStatus_init_default {0} -#define CtrlMsg_Resp_GetStatus_init_default {0} -#define CtrlMsg_Req_SetMacAddress_init_default {{{NULL}, NULL}, 0} -#define CtrlMsg_Resp_SetMacAddress_init_default {0} -#define CtrlMsg_Req_GetAPConfig_init_default {0} -#define CtrlMsg_Resp_GetAPConfig_init_default {{{NULL}, NULL}, {{NULL}, NULL}, 0, 0, _Ctrl_WifiSecProt_MIN, 0} -#define CtrlMsg_Req_ConnectAP_init_default {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, 0, 0} -#define CtrlMsg_Resp_ConnectAP_init_default {0, {{NULL}, NULL}} -#define CtrlMsg_Req_GetSoftAPConfig_init_default {0} -#define CtrlMsg_Resp_GetSoftAPConfig_init_default {{{NULL}, NULL}, {{NULL}, NULL}, 0, _Ctrl_WifiSecProt_MIN, 0, 0, 0, 0} -#define CtrlMsg_Req_StartSoftAP_init_default {{{NULL}, NULL}, {{NULL}, NULL}, 0, _Ctrl_WifiSecProt_MIN, 0, 0, 0} -#define CtrlMsg_Resp_StartSoftAP_init_default {0, {{NULL}, NULL}} -#define CtrlMsg_Req_ScanResult_init_default {0} -#define CtrlMsg_Resp_ScanResult_init_default {0, {{NULL}, NULL}, 0} -#define CtrlMsg_Req_SoftAPConnectedSTA_init_default {0} -#define CtrlMsg_Resp_SoftAPConnectedSTA_init_default {0, {{NULL}, NULL}, 0} -#define CtrlMsg_Req_OTABegin_init_default {0} -#define CtrlMsg_Resp_OTABegin_init_default {0} -#define CtrlMsg_Req_OTAWrite_init_default {{{NULL}, NULL}} -#define CtrlMsg_Resp_OTAWrite_init_default {0} -#define CtrlMsg_Req_OTAEnd_init_default {0} -#define CtrlMsg_Resp_OTAEnd_init_default {0} -#define CtrlMsg_Req_VendorIEData_init_default {0, 0, {{NULL}, NULL}, 0, {{NULL}, NULL}} -#define CtrlMsg_Req_SetSoftAPVendorSpecificIE_init_default {0, _Ctrl_VendorIEType_MIN, _Ctrl_VendorIEID_MIN, false, CtrlMsg_Req_VendorIEData_init_default} -#define CtrlMsg_Resp_SetSoftAPVendorSpecificIE_init_default {0} -#define CtrlMsg_Req_SetWifiMaxTxPower_init_default {0} -#define CtrlMsg_Resp_SetWifiMaxTxPower_init_default {0} -#define CtrlMsg_Req_GetWifiCurrTxPower_init_default {0} -#define CtrlMsg_Resp_GetWifiCurrTxPower_init_default {0, 0} -#define CtrlMsg_Req_ConfigHeartbeat_init_default {0, 0} -#define CtrlMsg_Resp_ConfigHeartbeat_init_default {0} -#define CtrlMsg_Event_ESPInit_init_default {{{NULL}, NULL}} -#define CtrlMsg_Event_Heartbeat_init_default {0} -#define CtrlMsg_Event_StationDisconnectFromAP_init_default {0} -#define CtrlMsg_Event_StationDisconnectFromESPSoftAP_init_default {0, {{NULL}, NULL}} -#define CtrlMsg_init_default {_CtrlMsgType_MIN, _CtrlMsgId_MIN, {{NULL}, NULL}, 0, {CtrlMsg_Req_GetMacAddress_init_default}} -#define ScanResult_init_zero {{{NULL}, NULL}, 0, 0, {{NULL}, NULL}, _Ctrl_WifiSecProt_MIN} -#define ConnectedSTAList_init_zero {{{NULL}, NULL}, 0} -#define CtrlMsg_Req_GetMacAddress_init_zero {0} -#define CtrlMsg_Resp_GetMacAddress_init_zero {{{NULL}, NULL}, 0} -#define CtrlMsg_Req_GetMode_init_zero {0} -#define CtrlMsg_Resp_GetMode_init_zero {0, 0} -#define CtrlMsg_Req_SetMode_init_zero {0} -#define CtrlMsg_Resp_SetMode_init_zero {0} -#define CtrlMsg_Req_GetStatus_init_zero {0} -#define CtrlMsg_Resp_GetStatus_init_zero {0} -#define CtrlMsg_Req_SetMacAddress_init_zero {{{NULL}, NULL}, 0} -#define CtrlMsg_Resp_SetMacAddress_init_zero {0} -#define CtrlMsg_Req_GetAPConfig_init_zero {0} -#define CtrlMsg_Resp_GetAPConfig_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, 0, 0, _Ctrl_WifiSecProt_MIN, 0} -#define CtrlMsg_Req_ConnectAP_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, 0, 0} -#define CtrlMsg_Resp_ConnectAP_init_zero {0, {{NULL}, NULL}} -#define CtrlMsg_Req_GetSoftAPConfig_init_zero {0} -#define CtrlMsg_Resp_GetSoftAPConfig_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, 0, _Ctrl_WifiSecProt_MIN, 0, 0, 0, 0} -#define CtrlMsg_Req_StartSoftAP_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, 0, _Ctrl_WifiSecProt_MIN, 0, 0, 0} -#define CtrlMsg_Resp_StartSoftAP_init_zero {0, {{NULL}, NULL}} -#define CtrlMsg_Req_ScanResult_init_zero {0} -#define CtrlMsg_Resp_ScanResult_init_zero {0, {{NULL}, NULL}, 0} -#define CtrlMsg_Req_SoftAPConnectedSTA_init_zero {0} -#define CtrlMsg_Resp_SoftAPConnectedSTA_init_zero {0, {{NULL}, NULL}, 0} -#define CtrlMsg_Req_OTABegin_init_zero {0} -#define CtrlMsg_Resp_OTABegin_init_zero {0} -#define CtrlMsg_Req_OTAWrite_init_zero {{{NULL}, NULL}} -#define CtrlMsg_Resp_OTAWrite_init_zero {0} -#define CtrlMsg_Req_OTAEnd_init_zero {0} -#define CtrlMsg_Resp_OTAEnd_init_zero {0} -#define CtrlMsg_Req_VendorIEData_init_zero {0, 0, {{NULL}, NULL}, 0, {{NULL}, NULL}} -#define CtrlMsg_Req_SetSoftAPVendorSpecificIE_init_zero {0, _Ctrl_VendorIEType_MIN, _Ctrl_VendorIEID_MIN, false, CtrlMsg_Req_VendorIEData_init_zero} -#define CtrlMsg_Resp_SetSoftAPVendorSpecificIE_init_zero {0} -#define CtrlMsg_Req_SetWifiMaxTxPower_init_zero {0} -#define CtrlMsg_Resp_SetWifiMaxTxPower_init_zero {0} -#define CtrlMsg_Req_GetWifiCurrTxPower_init_zero {0} -#define CtrlMsg_Resp_GetWifiCurrTxPower_init_zero {0, 0} -#define CtrlMsg_Req_ConfigHeartbeat_init_zero {0, 0} -#define CtrlMsg_Resp_ConfigHeartbeat_init_zero {0} -#define CtrlMsg_Event_ESPInit_init_zero {{{NULL}, NULL}} -#define CtrlMsg_Event_Heartbeat_init_zero {0} -#define CtrlMsg_Event_StationDisconnectFromAP_init_zero {0} -#define CtrlMsg_Event_StationDisconnectFromESPSoftAP_init_zero {0, {{NULL}, NULL}} -#define CtrlMsg_init_zero {_CtrlMsgType_MIN, _CtrlMsgId_MIN, {{NULL}, NULL}, 0, {CtrlMsg_Req_GetMacAddress_init_zero}} - -/* Field tags (for use in manual encoding/decoding) */ -#define ScanResult_ssid_tag 1 -#define ScanResult_chnl_tag 2 -#define ScanResult_rssi_tag 3 -#define ScanResult_bssid_tag 4 -#define ScanResult_sec_prot_tag 5 -#define ConnectedSTAList_mac_tag 1 -#define ConnectedSTAList_rssi_tag 2 -#define CtrlMsg_Req_GetMacAddress_mode_tag 1 -#define CtrlMsg_Resp_GetMacAddress_mac_tag 1 -#define CtrlMsg_Resp_GetMacAddress_resp_tag 2 -#define CtrlMsg_Resp_GetMode_mode_tag 1 -#define CtrlMsg_Resp_GetMode_resp_tag 2 -#define CtrlMsg_Req_SetMode_mode_tag 1 -#define CtrlMsg_Resp_SetMode_resp_tag 1 -#define CtrlMsg_Resp_GetStatus_resp_tag 1 -#define CtrlMsg_Req_SetMacAddress_mac_tag 1 -#define CtrlMsg_Req_SetMacAddress_mode_tag 2 -#define CtrlMsg_Resp_SetMacAddress_resp_tag 1 -#define CtrlMsg_Resp_GetAPConfig_ssid_tag 1 -#define CtrlMsg_Resp_GetAPConfig_bssid_tag 2 -#define CtrlMsg_Resp_GetAPConfig_rssi_tag 3 -#define CtrlMsg_Resp_GetAPConfig_chnl_tag 4 -#define CtrlMsg_Resp_GetAPConfig_sec_prot_tag 5 -#define CtrlMsg_Resp_GetAPConfig_resp_tag 6 -#define CtrlMsg_Req_ConnectAP_ssid_tag 1 -#define CtrlMsg_Req_ConnectAP_pwd_tag 2 -#define CtrlMsg_Req_ConnectAP_bssid_tag 3 -#define CtrlMsg_Req_ConnectAP_is_wpa3_supported_tag 4 -#define CtrlMsg_Req_ConnectAP_listen_interval_tag 5 -#define CtrlMsg_Resp_ConnectAP_resp_tag 1 -#define CtrlMsg_Resp_ConnectAP_mac_tag 2 -#define CtrlMsg_Resp_GetSoftAPConfig_ssid_tag 1 -#define CtrlMsg_Resp_GetSoftAPConfig_pwd_tag 2 -#define CtrlMsg_Resp_GetSoftAPConfig_chnl_tag 3 -#define CtrlMsg_Resp_GetSoftAPConfig_sec_prot_tag 4 -#define CtrlMsg_Resp_GetSoftAPConfig_max_conn_tag 5 -#define CtrlMsg_Resp_GetSoftAPConfig_ssid_hidden_tag 6 -#define CtrlMsg_Resp_GetSoftAPConfig_bw_tag 7 -#define CtrlMsg_Resp_GetSoftAPConfig_resp_tag 8 -#define CtrlMsg_Req_StartSoftAP_ssid_tag 1 -#define CtrlMsg_Req_StartSoftAP_pwd_tag 2 -#define CtrlMsg_Req_StartSoftAP_chnl_tag 3 -#define CtrlMsg_Req_StartSoftAP_sec_prot_tag 4 -#define CtrlMsg_Req_StartSoftAP_max_conn_tag 5 -#define CtrlMsg_Req_StartSoftAP_ssid_hidden_tag 6 -#define CtrlMsg_Req_StartSoftAP_bw_tag 7 -#define CtrlMsg_Resp_StartSoftAP_resp_tag 1 -#define CtrlMsg_Resp_StartSoftAP_mac_tag 2 -#define CtrlMsg_Resp_ScanResult_count_tag 1 -#define CtrlMsg_Resp_ScanResult_entries_tag 2 -#define CtrlMsg_Resp_ScanResult_resp_tag 3 -#define CtrlMsg_Resp_SoftAPConnectedSTA_num_tag 1 -#define CtrlMsg_Resp_SoftAPConnectedSTA_stations_tag 2 -#define CtrlMsg_Resp_SoftAPConnectedSTA_resp_tag 3 -#define CtrlMsg_Resp_OTABegin_resp_tag 1 -#define CtrlMsg_Req_OTAWrite_ota_data_tag 1 -#define CtrlMsg_Resp_OTAWrite_resp_tag 1 -#define CtrlMsg_Resp_OTAEnd_resp_tag 1 -#define CtrlMsg_Req_VendorIEData_element_id_tag 1 -#define CtrlMsg_Req_VendorIEData_length_tag 2 -#define CtrlMsg_Req_VendorIEData_vendor_oui_tag 3 -#define CtrlMsg_Req_VendorIEData_vendor_oui_type_tag 4 -#define CtrlMsg_Req_VendorIEData_payload_tag 5 -#define CtrlMsg_Req_SetSoftAPVendorSpecificIE_enable_tag 1 -#define CtrlMsg_Req_SetSoftAPVendorSpecificIE_type_tag 2 -#define CtrlMsg_Req_SetSoftAPVendorSpecificIE_idx_tag 3 -#define CtrlMsg_Req_SetSoftAPVendorSpecificIE_vendor_ie_data_tag 4 -#define CtrlMsg_Resp_SetSoftAPVendorSpecificIE_resp_tag 1 -#define CtrlMsg_Req_SetWifiMaxTxPower_wifi_max_tx_power_tag 1 -#define CtrlMsg_Resp_SetWifiMaxTxPower_resp_tag 1 -#define CtrlMsg_Resp_GetWifiCurrTxPower_wifi_curr_tx_power_tag 1 -#define CtrlMsg_Resp_GetWifiCurrTxPower_resp_tag 2 -#define CtrlMsg_Req_ConfigHeartbeat_enable_tag 1 -#define CtrlMsg_Req_ConfigHeartbeat_duration_tag 2 -#define CtrlMsg_Resp_ConfigHeartbeat_resp_tag 1 -#define CtrlMsg_Event_ESPInit_init_data_tag 1 -#define CtrlMsg_Event_Heartbeat_hb_num_tag 1 -#define CtrlMsg_Event_StationDisconnectFromAP_resp_tag 1 -#define CtrlMsg_Event_StationDisconnectFromESPSoftAP_resp_tag 1 -#define CtrlMsg_Event_StationDisconnectFromESPSoftAP_mac_tag 2 -#define CtrlMsg_msg_type_tag 1 -#define CtrlMsg_msg_id_tag 2 -#define CtrlMsg_req_get_mac_address_tag 101 -#define CtrlMsg_req_set_mac_address_tag 102 -#define CtrlMsg_req_get_wifi_mode_tag 103 -#define CtrlMsg_req_set_wifi_mode_tag 104 -#define CtrlMsg_req_scan_ap_list_tag 105 -#define CtrlMsg_req_get_ap_config_tag 106 -#define CtrlMsg_req_connect_ap_tag 107 -#define CtrlMsg_req_disconnect_ap_tag 108 -#define CtrlMsg_req_get_softap_config_tag 109 -#define CtrlMsg_req_set_softap_vendor_specific_ie_tag 110 -#define CtrlMsg_req_start_softap_tag 111 -#define CtrlMsg_req_softap_connected_stas_list_tag 112 -#define CtrlMsg_req_stop_softap_tag 113 -#define CtrlMsg_req_set_power_save_mode_tag 114 -#define CtrlMsg_req_get_power_save_mode_tag 115 -#define CtrlMsg_req_ota_begin_tag 116 -#define CtrlMsg_req_ota_write_tag 117 -#define CtrlMsg_req_ota_end_tag 118 -#define CtrlMsg_req_set_wifi_max_tx_power_tag 119 -#define CtrlMsg_req_get_wifi_curr_tx_power_tag 120 -#define CtrlMsg_req_config_heartbeat_tag 121 -#define CtrlMsg_resp_get_mac_address_tag 201 -#define CtrlMsg_resp_set_mac_address_tag 202 -#define CtrlMsg_resp_get_wifi_mode_tag 203 -#define CtrlMsg_resp_set_wifi_mode_tag 204 -#define CtrlMsg_resp_scan_ap_list_tag 205 -#define CtrlMsg_resp_get_ap_config_tag 206 -#define CtrlMsg_resp_connect_ap_tag 207 -#define CtrlMsg_resp_disconnect_ap_tag 208 -#define CtrlMsg_resp_get_softap_config_tag 209 -#define CtrlMsg_resp_set_softap_vendor_specific_ie_tag 210 -#define CtrlMsg_resp_start_softap_tag 211 -#define CtrlMsg_resp_softap_connected_stas_list_tag 212 -#define CtrlMsg_resp_stop_softap_tag 213 -#define CtrlMsg_resp_set_power_save_mode_tag 214 -#define CtrlMsg_resp_get_power_save_mode_tag 215 -#define CtrlMsg_resp_ota_begin_tag 216 -#define CtrlMsg_resp_ota_write_tag 217 -#define CtrlMsg_resp_ota_end_tag 218 -#define CtrlMsg_resp_set_wifi_max_tx_power_tag 219 -#define CtrlMsg_resp_get_wifi_curr_tx_power_tag 220 -#define CtrlMsg_resp_config_heartbeat_tag 221 -#define CtrlMsg_event_esp_init_tag 301 -#define CtrlMsg_event_heartbeat_tag 302 -#define CtrlMsg_event_station_disconnect_from_AP_tag 303 -#define CtrlMsg_event_station_disconnect_from_ESP_SoftAP_tag 304 - -/* Struct field encoding specification for nanopb */ -#define ScanResult_FIELDLIST(X, a) \ -X(a, CALLBACK, SINGULAR, BYTES, ssid, 1) \ -X(a, STATIC, SINGULAR, UINT32, chnl, 2) \ -X(a, STATIC, SINGULAR, INT32, rssi, 3) \ -X(a, CALLBACK, SINGULAR, BYTES, bssid, 4) \ -X(a, STATIC, SINGULAR, UENUM, sec_prot, 5) -#define ScanResult_CALLBACK pb_default_field_callback -#define ScanResult_DEFAULT NULL - -#define ConnectedSTAList_FIELDLIST(X, a) \ -X(a, CALLBACK, SINGULAR, BYTES, mac, 1) \ -X(a, STATIC, SINGULAR, INT32, rssi, 2) -#define ConnectedSTAList_CALLBACK pb_default_field_callback -#define ConnectedSTAList_DEFAULT NULL - -#define CtrlMsg_Req_GetMacAddress_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, mode, 1) -#define CtrlMsg_Req_GetMacAddress_CALLBACK NULL -#define CtrlMsg_Req_GetMacAddress_DEFAULT NULL - -#define CtrlMsg_Resp_GetMacAddress_FIELDLIST(X, a) \ -X(a, CALLBACK, SINGULAR, BYTES, mac, 1) \ -X(a, STATIC, SINGULAR, INT32, resp, 2) -#define CtrlMsg_Resp_GetMacAddress_CALLBACK pb_default_field_callback -#define CtrlMsg_Resp_GetMacAddress_DEFAULT NULL - -#define CtrlMsg_Req_GetMode_FIELDLIST(X, a) \ - -#define CtrlMsg_Req_GetMode_CALLBACK NULL -#define CtrlMsg_Req_GetMode_DEFAULT NULL - -#define CtrlMsg_Resp_GetMode_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, mode, 1) \ -X(a, STATIC, SINGULAR, INT32, resp, 2) -#define CtrlMsg_Resp_GetMode_CALLBACK NULL -#define CtrlMsg_Resp_GetMode_DEFAULT NULL - -#define CtrlMsg_Req_SetMode_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, mode, 1) -#define CtrlMsg_Req_SetMode_CALLBACK NULL -#define CtrlMsg_Req_SetMode_DEFAULT NULL - -#define CtrlMsg_Resp_SetMode_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, resp, 1) -#define CtrlMsg_Resp_SetMode_CALLBACK NULL -#define CtrlMsg_Resp_SetMode_DEFAULT NULL - -#define CtrlMsg_Req_GetStatus_FIELDLIST(X, a) \ - -#define CtrlMsg_Req_GetStatus_CALLBACK NULL -#define CtrlMsg_Req_GetStatus_DEFAULT NULL - -#define CtrlMsg_Resp_GetStatus_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, resp, 1) -#define CtrlMsg_Resp_GetStatus_CALLBACK NULL -#define CtrlMsg_Resp_GetStatus_DEFAULT NULL - -#define CtrlMsg_Req_SetMacAddress_FIELDLIST(X, a) \ -X(a, CALLBACK, SINGULAR, BYTES, mac, 1) \ -X(a, STATIC, SINGULAR, INT32, mode, 2) -#define CtrlMsg_Req_SetMacAddress_CALLBACK pb_default_field_callback -#define CtrlMsg_Req_SetMacAddress_DEFAULT NULL - -#define CtrlMsg_Resp_SetMacAddress_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, resp, 1) -#define CtrlMsg_Resp_SetMacAddress_CALLBACK NULL -#define CtrlMsg_Resp_SetMacAddress_DEFAULT NULL - -#define CtrlMsg_Req_GetAPConfig_FIELDLIST(X, a) \ - -#define CtrlMsg_Req_GetAPConfig_CALLBACK NULL -#define CtrlMsg_Req_GetAPConfig_DEFAULT NULL - -#define CtrlMsg_Resp_GetAPConfig_FIELDLIST(X, a) \ -X(a, CALLBACK, SINGULAR, BYTES, ssid, 1) \ -X(a, CALLBACK, SINGULAR, BYTES, bssid, 2) \ -X(a, STATIC, SINGULAR, INT32, rssi, 3) \ -X(a, STATIC, SINGULAR, INT32, chnl, 4) \ -X(a, STATIC, SINGULAR, UENUM, sec_prot, 5) \ -X(a, STATIC, SINGULAR, INT32, resp, 6) -#define CtrlMsg_Resp_GetAPConfig_CALLBACK pb_default_field_callback -#define CtrlMsg_Resp_GetAPConfig_DEFAULT NULL - -#define CtrlMsg_Req_ConnectAP_FIELDLIST(X, a) \ -X(a, CALLBACK, SINGULAR, STRING, ssid, 1) \ -X(a, CALLBACK, SINGULAR, STRING, pwd, 2) \ -X(a, CALLBACK, SINGULAR, STRING, bssid, 3) \ -X(a, STATIC, SINGULAR, BOOL, is_wpa3_supported, 4) \ -X(a, STATIC, SINGULAR, INT32, listen_interval, 5) -#define CtrlMsg_Req_ConnectAP_CALLBACK pb_default_field_callback -#define CtrlMsg_Req_ConnectAP_DEFAULT NULL - -#define CtrlMsg_Resp_ConnectAP_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, resp, 1) \ -X(a, CALLBACK, SINGULAR, BYTES, mac, 2) -#define CtrlMsg_Resp_ConnectAP_CALLBACK pb_default_field_callback -#define CtrlMsg_Resp_ConnectAP_DEFAULT NULL - -#define CtrlMsg_Req_GetSoftAPConfig_FIELDLIST(X, a) \ - -#define CtrlMsg_Req_GetSoftAPConfig_CALLBACK NULL -#define CtrlMsg_Req_GetSoftAPConfig_DEFAULT NULL - -#define CtrlMsg_Resp_GetSoftAPConfig_FIELDLIST(X, a) \ -X(a, CALLBACK, SINGULAR, BYTES, ssid, 1) \ -X(a, CALLBACK, SINGULAR, BYTES, pwd, 2) \ -X(a, STATIC, SINGULAR, INT32, chnl, 3) \ -X(a, STATIC, SINGULAR, UENUM, sec_prot, 4) \ -X(a, STATIC, SINGULAR, INT32, max_conn, 5) \ -X(a, STATIC, SINGULAR, BOOL, ssid_hidden, 6) \ -X(a, STATIC, SINGULAR, INT32, bw, 7) \ -X(a, STATIC, SINGULAR, INT32, resp, 8) -#define CtrlMsg_Resp_GetSoftAPConfig_CALLBACK pb_default_field_callback -#define CtrlMsg_Resp_GetSoftAPConfig_DEFAULT NULL - -#define CtrlMsg_Req_StartSoftAP_FIELDLIST(X, a) \ -X(a, CALLBACK, SINGULAR, STRING, ssid, 1) \ -X(a, CALLBACK, SINGULAR, STRING, pwd, 2) \ -X(a, STATIC, SINGULAR, INT32, chnl, 3) \ -X(a, STATIC, SINGULAR, UENUM, sec_prot, 4) \ -X(a, STATIC, SINGULAR, INT32, max_conn, 5) \ -X(a, STATIC, SINGULAR, BOOL, ssid_hidden, 6) \ -X(a, STATIC, SINGULAR, INT32, bw, 7) -#define CtrlMsg_Req_StartSoftAP_CALLBACK pb_default_field_callback -#define CtrlMsg_Req_StartSoftAP_DEFAULT NULL - -#define CtrlMsg_Resp_StartSoftAP_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, resp, 1) \ -X(a, CALLBACK, SINGULAR, BYTES, mac, 2) -#define CtrlMsg_Resp_StartSoftAP_CALLBACK pb_default_field_callback -#define CtrlMsg_Resp_StartSoftAP_DEFAULT NULL - -#define CtrlMsg_Req_ScanResult_FIELDLIST(X, a) \ - -#define CtrlMsg_Req_ScanResult_CALLBACK NULL -#define CtrlMsg_Req_ScanResult_DEFAULT NULL - -#define CtrlMsg_Resp_ScanResult_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, UINT32, count, 1) \ -X(a, CALLBACK, REPEATED, MESSAGE, entries, 2) \ -X(a, STATIC, SINGULAR, INT32, resp, 3) -#define CtrlMsg_Resp_ScanResult_CALLBACK pb_default_field_callback -#define CtrlMsg_Resp_ScanResult_DEFAULT NULL -#define CtrlMsg_Resp_ScanResult_entries_MSGTYPE ScanResult - -#define CtrlMsg_Req_SoftAPConnectedSTA_FIELDLIST(X, a) \ - -#define CtrlMsg_Req_SoftAPConnectedSTA_CALLBACK NULL -#define CtrlMsg_Req_SoftAPConnectedSTA_DEFAULT NULL - -#define CtrlMsg_Resp_SoftAPConnectedSTA_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, UINT32, num, 1) \ -X(a, CALLBACK, REPEATED, MESSAGE, stations, 2) \ -X(a, STATIC, SINGULAR, INT32, resp, 3) -#define CtrlMsg_Resp_SoftAPConnectedSTA_CALLBACK pb_default_field_callback -#define CtrlMsg_Resp_SoftAPConnectedSTA_DEFAULT NULL -#define CtrlMsg_Resp_SoftAPConnectedSTA_stations_MSGTYPE ConnectedSTAList - -#define CtrlMsg_Req_OTABegin_FIELDLIST(X, a) \ - -#define CtrlMsg_Req_OTABegin_CALLBACK NULL -#define CtrlMsg_Req_OTABegin_DEFAULT NULL - -#define CtrlMsg_Resp_OTABegin_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, resp, 1) -#define CtrlMsg_Resp_OTABegin_CALLBACK NULL -#define CtrlMsg_Resp_OTABegin_DEFAULT NULL - -#define CtrlMsg_Req_OTAWrite_FIELDLIST(X, a) \ -X(a, CALLBACK, SINGULAR, BYTES, ota_data, 1) -#define CtrlMsg_Req_OTAWrite_CALLBACK pb_default_field_callback -#define CtrlMsg_Req_OTAWrite_DEFAULT NULL - -#define CtrlMsg_Resp_OTAWrite_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, resp, 1) -#define CtrlMsg_Resp_OTAWrite_CALLBACK NULL -#define CtrlMsg_Resp_OTAWrite_DEFAULT NULL - -#define CtrlMsg_Req_OTAEnd_FIELDLIST(X, a) \ - -#define CtrlMsg_Req_OTAEnd_CALLBACK NULL -#define CtrlMsg_Req_OTAEnd_DEFAULT NULL - -#define CtrlMsg_Resp_OTAEnd_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, resp, 1) -#define CtrlMsg_Resp_OTAEnd_CALLBACK NULL -#define CtrlMsg_Resp_OTAEnd_DEFAULT NULL - -#define CtrlMsg_Req_VendorIEData_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, element_id, 1) \ -X(a, STATIC, SINGULAR, INT32, length, 2) \ -X(a, CALLBACK, SINGULAR, BYTES, vendor_oui, 3) \ -X(a, STATIC, SINGULAR, INT32, vendor_oui_type, 4) \ -X(a, CALLBACK, SINGULAR, BYTES, payload, 5) -#define CtrlMsg_Req_VendorIEData_CALLBACK pb_default_field_callback -#define CtrlMsg_Req_VendorIEData_DEFAULT NULL - -#define CtrlMsg_Req_SetSoftAPVendorSpecificIE_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, BOOL, enable, 1) \ -X(a, STATIC, SINGULAR, UENUM, type, 2) \ -X(a, STATIC, SINGULAR, UENUM, idx, 3) \ -X(a, STATIC, OPTIONAL, MESSAGE, vendor_ie_data, 4) -#define CtrlMsg_Req_SetSoftAPVendorSpecificIE_CALLBACK NULL -#define CtrlMsg_Req_SetSoftAPVendorSpecificIE_DEFAULT NULL -#define CtrlMsg_Req_SetSoftAPVendorSpecificIE_vendor_ie_data_MSGTYPE CtrlMsg_Req_VendorIEData - -#define CtrlMsg_Resp_SetSoftAPVendorSpecificIE_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, resp, 1) -#define CtrlMsg_Resp_SetSoftAPVendorSpecificIE_CALLBACK NULL -#define CtrlMsg_Resp_SetSoftAPVendorSpecificIE_DEFAULT NULL - -#define CtrlMsg_Req_SetWifiMaxTxPower_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, wifi_max_tx_power, 1) -#define CtrlMsg_Req_SetWifiMaxTxPower_CALLBACK NULL -#define CtrlMsg_Req_SetWifiMaxTxPower_DEFAULT NULL - -#define CtrlMsg_Resp_SetWifiMaxTxPower_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, resp, 1) -#define CtrlMsg_Resp_SetWifiMaxTxPower_CALLBACK NULL -#define CtrlMsg_Resp_SetWifiMaxTxPower_DEFAULT NULL - -#define CtrlMsg_Req_GetWifiCurrTxPower_FIELDLIST(X, a) \ - -#define CtrlMsg_Req_GetWifiCurrTxPower_CALLBACK NULL -#define CtrlMsg_Req_GetWifiCurrTxPower_DEFAULT NULL - -#define CtrlMsg_Resp_GetWifiCurrTxPower_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, wifi_curr_tx_power, 1) \ -X(a, STATIC, SINGULAR, INT32, resp, 2) -#define CtrlMsg_Resp_GetWifiCurrTxPower_CALLBACK NULL -#define CtrlMsg_Resp_GetWifiCurrTxPower_DEFAULT NULL - -#define CtrlMsg_Req_ConfigHeartbeat_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, BOOL, enable, 1) \ -X(a, STATIC, SINGULAR, INT32, duration, 2) -#define CtrlMsg_Req_ConfigHeartbeat_CALLBACK NULL -#define CtrlMsg_Req_ConfigHeartbeat_DEFAULT NULL - -#define CtrlMsg_Resp_ConfigHeartbeat_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, resp, 1) -#define CtrlMsg_Resp_ConfigHeartbeat_CALLBACK NULL -#define CtrlMsg_Resp_ConfigHeartbeat_DEFAULT NULL - -#define CtrlMsg_Event_ESPInit_FIELDLIST(X, a) \ -X(a, CALLBACK, SINGULAR, BYTES, init_data, 1) -#define CtrlMsg_Event_ESPInit_CALLBACK pb_default_field_callback -#define CtrlMsg_Event_ESPInit_DEFAULT NULL - -#define CtrlMsg_Event_Heartbeat_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, hb_num, 1) -#define CtrlMsg_Event_Heartbeat_CALLBACK NULL -#define CtrlMsg_Event_Heartbeat_DEFAULT NULL - -#define CtrlMsg_Event_StationDisconnectFromAP_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, resp, 1) -#define CtrlMsg_Event_StationDisconnectFromAP_CALLBACK NULL -#define CtrlMsg_Event_StationDisconnectFromAP_DEFAULT NULL - -#define CtrlMsg_Event_StationDisconnectFromESPSoftAP_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, INT32, resp, 1) \ -X(a, CALLBACK, SINGULAR, BYTES, mac, 2) -#define CtrlMsg_Event_StationDisconnectFromESPSoftAP_CALLBACK pb_default_field_callback -#define CtrlMsg_Event_StationDisconnectFromESPSoftAP_DEFAULT NULL - -#define CtrlMsg_FIELDLIST(X, a) \ -X(a, STATIC, SINGULAR, UENUM, msg_type, 1) \ -X(a, STATIC, SINGULAR, UENUM, msg_id, 2) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_get_mac_address,payload.req_get_mac_address), 101) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_set_mac_address,payload.req_set_mac_address), 102) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_get_wifi_mode,payload.req_get_wifi_mode), 103) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_set_wifi_mode,payload.req_set_wifi_mode), 104) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_scan_ap_list,payload.req_scan_ap_list), 105) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_get_ap_config,payload.req_get_ap_config), 106) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_connect_ap,payload.req_connect_ap), 107) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_disconnect_ap,payload.req_disconnect_ap), 108) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_get_softap_config,payload.req_get_softap_config), 109) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_set_softap_vendor_specific_ie,payload.req_set_softap_vendor_specific_ie), 110) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_start_softap,payload.req_start_softap), 111) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_softap_connected_stas_list,payload.req_softap_connected_stas_list), 112) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_stop_softap,payload.req_stop_softap), 113) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_set_power_save_mode,payload.req_set_power_save_mode), 114) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_get_power_save_mode,payload.req_get_power_save_mode), 115) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_ota_begin,payload.req_ota_begin), 116) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_ota_write,payload.req_ota_write), 117) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_ota_end,payload.req_ota_end), 118) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_set_wifi_max_tx_power,payload.req_set_wifi_max_tx_power), 119) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_get_wifi_curr_tx_power,payload.req_get_wifi_curr_tx_power), 120) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,req_config_heartbeat,payload.req_config_heartbeat), 121) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_get_mac_address,payload.resp_get_mac_address), 201) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_set_mac_address,payload.resp_set_mac_address), 202) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_get_wifi_mode,payload.resp_get_wifi_mode), 203) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_set_wifi_mode,payload.resp_set_wifi_mode), 204) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_scan_ap_list,payload.resp_scan_ap_list), 205) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_get_ap_config,payload.resp_get_ap_config), 206) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_connect_ap,payload.resp_connect_ap), 207) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_disconnect_ap,payload.resp_disconnect_ap), 208) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_get_softap_config,payload.resp_get_softap_config), 209) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_set_softap_vendor_specific_ie,payload.resp_set_softap_vendor_specific_ie), 210) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_start_softap,payload.resp_start_softap), 211) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_softap_connected_stas_list,payload.resp_softap_connected_stas_list), 212) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_stop_softap,payload.resp_stop_softap), 213) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_set_power_save_mode,payload.resp_set_power_save_mode), 214) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_get_power_save_mode,payload.resp_get_power_save_mode), 215) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_ota_begin,payload.resp_ota_begin), 216) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_ota_write,payload.resp_ota_write), 217) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_ota_end,payload.resp_ota_end), 218) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_set_wifi_max_tx_power,payload.resp_set_wifi_max_tx_power), 219) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_get_wifi_curr_tx_power,payload.resp_get_wifi_curr_tx_power), 220) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,resp_config_heartbeat,payload.resp_config_heartbeat), 221) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,event_esp_init,payload.event_esp_init), 301) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,event_heartbeat,payload.event_heartbeat), 302) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,event_station_disconnect_from_AP,payload.event_station_disconnect_from_AP), 303) \ -X(a, STATIC, ONEOF, MSG_W_CB, (payload,event_station_disconnect_from_ESP_SoftAP,payload.event_station_disconnect_from_ESP_SoftAP), 304) -#define CtrlMsg_CALLBACK NULL -#define CtrlMsg_DEFAULT NULL -#define CtrlMsg_payload_req_get_mac_address_MSGTYPE CtrlMsg_Req_GetMacAddress -#define CtrlMsg_payload_req_set_mac_address_MSGTYPE CtrlMsg_Req_SetMacAddress -#define CtrlMsg_payload_req_get_wifi_mode_MSGTYPE CtrlMsg_Req_GetMode -#define CtrlMsg_payload_req_set_wifi_mode_MSGTYPE CtrlMsg_Req_SetMode -#define CtrlMsg_payload_req_scan_ap_list_MSGTYPE CtrlMsg_Req_ScanResult -#define CtrlMsg_payload_req_get_ap_config_MSGTYPE CtrlMsg_Req_GetAPConfig -#define CtrlMsg_payload_req_connect_ap_MSGTYPE CtrlMsg_Req_ConnectAP -#define CtrlMsg_payload_req_disconnect_ap_MSGTYPE CtrlMsg_Req_GetStatus -#define CtrlMsg_payload_req_get_softap_config_MSGTYPE CtrlMsg_Req_GetSoftAPConfig -#define CtrlMsg_payload_req_set_softap_vendor_specific_ie_MSGTYPE CtrlMsg_Req_SetSoftAPVendorSpecificIE -#define CtrlMsg_payload_req_start_softap_MSGTYPE CtrlMsg_Req_StartSoftAP -#define CtrlMsg_payload_req_softap_connected_stas_list_MSGTYPE CtrlMsg_Req_SoftAPConnectedSTA -#define CtrlMsg_payload_req_stop_softap_MSGTYPE CtrlMsg_Req_GetStatus -#define CtrlMsg_payload_req_set_power_save_mode_MSGTYPE CtrlMsg_Req_SetMode -#define CtrlMsg_payload_req_get_power_save_mode_MSGTYPE CtrlMsg_Req_GetMode -#define CtrlMsg_payload_req_ota_begin_MSGTYPE CtrlMsg_Req_OTABegin -#define CtrlMsg_payload_req_ota_write_MSGTYPE CtrlMsg_Req_OTAWrite -#define CtrlMsg_payload_req_ota_end_MSGTYPE CtrlMsg_Req_OTAEnd -#define CtrlMsg_payload_req_set_wifi_max_tx_power_MSGTYPE CtrlMsg_Req_SetWifiMaxTxPower -#define CtrlMsg_payload_req_get_wifi_curr_tx_power_MSGTYPE CtrlMsg_Req_GetWifiCurrTxPower -#define CtrlMsg_payload_req_config_heartbeat_MSGTYPE CtrlMsg_Req_ConfigHeartbeat -#define CtrlMsg_payload_resp_get_mac_address_MSGTYPE CtrlMsg_Resp_GetMacAddress -#define CtrlMsg_payload_resp_set_mac_address_MSGTYPE CtrlMsg_Resp_SetMacAddress -#define CtrlMsg_payload_resp_get_wifi_mode_MSGTYPE CtrlMsg_Resp_GetMode -#define CtrlMsg_payload_resp_set_wifi_mode_MSGTYPE CtrlMsg_Resp_SetMode -#define CtrlMsg_payload_resp_scan_ap_list_MSGTYPE CtrlMsg_Resp_ScanResult -#define CtrlMsg_payload_resp_get_ap_config_MSGTYPE CtrlMsg_Resp_GetAPConfig -#define CtrlMsg_payload_resp_connect_ap_MSGTYPE CtrlMsg_Resp_ConnectAP -#define CtrlMsg_payload_resp_disconnect_ap_MSGTYPE CtrlMsg_Resp_GetStatus -#define CtrlMsg_payload_resp_get_softap_config_MSGTYPE CtrlMsg_Resp_GetSoftAPConfig -#define CtrlMsg_payload_resp_set_softap_vendor_specific_ie_MSGTYPE CtrlMsg_Resp_SetSoftAPVendorSpecificIE -#define CtrlMsg_payload_resp_start_softap_MSGTYPE CtrlMsg_Resp_StartSoftAP -#define CtrlMsg_payload_resp_softap_connected_stas_list_MSGTYPE CtrlMsg_Resp_SoftAPConnectedSTA -#define CtrlMsg_payload_resp_stop_softap_MSGTYPE CtrlMsg_Resp_GetStatus -#define CtrlMsg_payload_resp_set_power_save_mode_MSGTYPE CtrlMsg_Resp_SetMode -#define CtrlMsg_payload_resp_get_power_save_mode_MSGTYPE CtrlMsg_Resp_GetMode -#define CtrlMsg_payload_resp_ota_begin_MSGTYPE CtrlMsg_Resp_OTABegin -#define CtrlMsg_payload_resp_ota_write_MSGTYPE CtrlMsg_Resp_OTAWrite -#define CtrlMsg_payload_resp_ota_end_MSGTYPE CtrlMsg_Resp_OTAEnd -#define CtrlMsg_payload_resp_set_wifi_max_tx_power_MSGTYPE CtrlMsg_Resp_SetWifiMaxTxPower -#define CtrlMsg_payload_resp_get_wifi_curr_tx_power_MSGTYPE CtrlMsg_Resp_GetWifiCurrTxPower -#define CtrlMsg_payload_resp_config_heartbeat_MSGTYPE CtrlMsg_Resp_ConfigHeartbeat -#define CtrlMsg_payload_event_esp_init_MSGTYPE CtrlMsg_Event_ESPInit -#define CtrlMsg_payload_event_heartbeat_MSGTYPE CtrlMsg_Event_Heartbeat -#define CtrlMsg_payload_event_station_disconnect_from_AP_MSGTYPE CtrlMsg_Event_StationDisconnectFromAP -#define CtrlMsg_payload_event_station_disconnect_from_ESP_SoftAP_MSGTYPE CtrlMsg_Event_StationDisconnectFromESPSoftAP - -extern const pb_msgdesc_t ScanResult_msg; -extern const pb_msgdesc_t ConnectedSTAList_msg; -extern const pb_msgdesc_t CtrlMsg_Req_GetMacAddress_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_GetMacAddress_msg; -extern const pb_msgdesc_t CtrlMsg_Req_GetMode_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_GetMode_msg; -extern const pb_msgdesc_t CtrlMsg_Req_SetMode_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_SetMode_msg; -extern const pb_msgdesc_t CtrlMsg_Req_GetStatus_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_GetStatus_msg; -extern const pb_msgdesc_t CtrlMsg_Req_SetMacAddress_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_SetMacAddress_msg; -extern const pb_msgdesc_t CtrlMsg_Req_GetAPConfig_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_GetAPConfig_msg; -extern const pb_msgdesc_t CtrlMsg_Req_ConnectAP_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_ConnectAP_msg; -extern const pb_msgdesc_t CtrlMsg_Req_GetSoftAPConfig_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_GetSoftAPConfig_msg; -extern const pb_msgdesc_t CtrlMsg_Req_StartSoftAP_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_StartSoftAP_msg; -extern const pb_msgdesc_t CtrlMsg_Req_ScanResult_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_ScanResult_msg; -extern const pb_msgdesc_t CtrlMsg_Req_SoftAPConnectedSTA_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_SoftAPConnectedSTA_msg; -extern const pb_msgdesc_t CtrlMsg_Req_OTABegin_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_OTABegin_msg; -extern const pb_msgdesc_t CtrlMsg_Req_OTAWrite_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_OTAWrite_msg; -extern const pb_msgdesc_t CtrlMsg_Req_OTAEnd_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_OTAEnd_msg; -extern const pb_msgdesc_t CtrlMsg_Req_VendorIEData_msg; -extern const pb_msgdesc_t CtrlMsg_Req_SetSoftAPVendorSpecificIE_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_SetSoftAPVendorSpecificIE_msg; -extern const pb_msgdesc_t CtrlMsg_Req_SetWifiMaxTxPower_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_SetWifiMaxTxPower_msg; -extern const pb_msgdesc_t CtrlMsg_Req_GetWifiCurrTxPower_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_GetWifiCurrTxPower_msg; -extern const pb_msgdesc_t CtrlMsg_Req_ConfigHeartbeat_msg; -extern const pb_msgdesc_t CtrlMsg_Resp_ConfigHeartbeat_msg; -extern const pb_msgdesc_t CtrlMsg_Event_ESPInit_msg; -extern const pb_msgdesc_t CtrlMsg_Event_Heartbeat_msg; -extern const pb_msgdesc_t CtrlMsg_Event_StationDisconnectFromAP_msg; -extern const pb_msgdesc_t CtrlMsg_Event_StationDisconnectFromESPSoftAP_msg; -extern const pb_msgdesc_t CtrlMsg_msg; - -/* Defines for backwards compatibility with code written before nanopb-0.4.0 */ -#define ScanResult_fields &ScanResult_msg -#define ConnectedSTAList_fields &ConnectedSTAList_msg -#define CtrlMsg_Req_GetMacAddress_fields &CtrlMsg_Req_GetMacAddress_msg -#define CtrlMsg_Resp_GetMacAddress_fields &CtrlMsg_Resp_GetMacAddress_msg -#define CtrlMsg_Req_GetMode_fields &CtrlMsg_Req_GetMode_msg -#define CtrlMsg_Resp_GetMode_fields &CtrlMsg_Resp_GetMode_msg -#define CtrlMsg_Req_SetMode_fields &CtrlMsg_Req_SetMode_msg -#define CtrlMsg_Resp_SetMode_fields &CtrlMsg_Resp_SetMode_msg -#define CtrlMsg_Req_GetStatus_fields &CtrlMsg_Req_GetStatus_msg -#define CtrlMsg_Resp_GetStatus_fields &CtrlMsg_Resp_GetStatus_msg -#define CtrlMsg_Req_SetMacAddress_fields &CtrlMsg_Req_SetMacAddress_msg -#define CtrlMsg_Resp_SetMacAddress_fields &CtrlMsg_Resp_SetMacAddress_msg -#define CtrlMsg_Req_GetAPConfig_fields &CtrlMsg_Req_GetAPConfig_msg -#define CtrlMsg_Resp_GetAPConfig_fields &CtrlMsg_Resp_GetAPConfig_msg -#define CtrlMsg_Req_ConnectAP_fields &CtrlMsg_Req_ConnectAP_msg -#define CtrlMsg_Resp_ConnectAP_fields &CtrlMsg_Resp_ConnectAP_msg -#define CtrlMsg_Req_GetSoftAPConfig_fields &CtrlMsg_Req_GetSoftAPConfig_msg -#define CtrlMsg_Resp_GetSoftAPConfig_fields &CtrlMsg_Resp_GetSoftAPConfig_msg -#define CtrlMsg_Req_StartSoftAP_fields &CtrlMsg_Req_StartSoftAP_msg -#define CtrlMsg_Resp_StartSoftAP_fields &CtrlMsg_Resp_StartSoftAP_msg -#define CtrlMsg_Req_ScanResult_fields &CtrlMsg_Req_ScanResult_msg -#define CtrlMsg_Resp_ScanResult_fields &CtrlMsg_Resp_ScanResult_msg -#define CtrlMsg_Req_SoftAPConnectedSTA_fields &CtrlMsg_Req_SoftAPConnectedSTA_msg -#define CtrlMsg_Resp_SoftAPConnectedSTA_fields &CtrlMsg_Resp_SoftAPConnectedSTA_msg -#define CtrlMsg_Req_OTABegin_fields &CtrlMsg_Req_OTABegin_msg -#define CtrlMsg_Resp_OTABegin_fields &CtrlMsg_Resp_OTABegin_msg -#define CtrlMsg_Req_OTAWrite_fields &CtrlMsg_Req_OTAWrite_msg -#define CtrlMsg_Resp_OTAWrite_fields &CtrlMsg_Resp_OTAWrite_msg -#define CtrlMsg_Req_OTAEnd_fields &CtrlMsg_Req_OTAEnd_msg -#define CtrlMsg_Resp_OTAEnd_fields &CtrlMsg_Resp_OTAEnd_msg -#define CtrlMsg_Req_VendorIEData_fields &CtrlMsg_Req_VendorIEData_msg -#define CtrlMsg_Req_SetSoftAPVendorSpecificIE_fields &CtrlMsg_Req_SetSoftAPVendorSpecificIE_msg -#define CtrlMsg_Resp_SetSoftAPVendorSpecificIE_fields &CtrlMsg_Resp_SetSoftAPVendorSpecificIE_msg -#define CtrlMsg_Req_SetWifiMaxTxPower_fields &CtrlMsg_Req_SetWifiMaxTxPower_msg -#define CtrlMsg_Resp_SetWifiMaxTxPower_fields &CtrlMsg_Resp_SetWifiMaxTxPower_msg -#define CtrlMsg_Req_GetWifiCurrTxPower_fields &CtrlMsg_Req_GetWifiCurrTxPower_msg -#define CtrlMsg_Resp_GetWifiCurrTxPower_fields &CtrlMsg_Resp_GetWifiCurrTxPower_msg -#define CtrlMsg_Req_ConfigHeartbeat_fields &CtrlMsg_Req_ConfigHeartbeat_msg -#define CtrlMsg_Resp_ConfigHeartbeat_fields &CtrlMsg_Resp_ConfigHeartbeat_msg -#define CtrlMsg_Event_ESPInit_fields &CtrlMsg_Event_ESPInit_msg -#define CtrlMsg_Event_Heartbeat_fields &CtrlMsg_Event_Heartbeat_msg -#define CtrlMsg_Event_StationDisconnectFromAP_fields &CtrlMsg_Event_StationDisconnectFromAP_msg -#define CtrlMsg_Event_StationDisconnectFromESPSoftAP_fields &CtrlMsg_Event_StationDisconnectFromESPSoftAP_msg -#define CtrlMsg_fields &CtrlMsg_msg - -/* Maximum encoded size of messages (where known) */ -/* ScanResult_size depends on runtime parameters */ -/* ConnectedSTAList_size depends on runtime parameters */ -/* CtrlMsg_Resp_GetMacAddress_size depends on runtime parameters */ -/* CtrlMsg_Req_SetMacAddress_size depends on runtime parameters */ -/* CtrlMsg_Resp_GetAPConfig_size depends on runtime parameters */ -/* CtrlMsg_Req_ConnectAP_size depends on runtime parameters */ -/* CtrlMsg_Resp_ConnectAP_size depends on runtime parameters */ -/* CtrlMsg_Resp_GetSoftAPConfig_size depends on runtime parameters */ -/* CtrlMsg_Req_StartSoftAP_size depends on runtime parameters */ -/* CtrlMsg_Resp_StartSoftAP_size depends on runtime parameters */ -/* CtrlMsg_Resp_ScanResult_size depends on runtime parameters */ -/* CtrlMsg_Resp_SoftAPConnectedSTA_size depends on runtime parameters */ -/* CtrlMsg_Req_OTAWrite_size depends on runtime parameters */ -/* CtrlMsg_Req_VendorIEData_size depends on runtime parameters */ -/* CtrlMsg_Req_SetSoftAPVendorSpecificIE_size depends on runtime parameters */ -/* CtrlMsg_Event_ESPInit_size depends on runtime parameters */ -/* CtrlMsg_Event_StationDisconnectFromESPSoftAP_size depends on runtime parameters */ -/* CtrlMsg_size depends on runtime parameters */ -#define CtrlMsg_Event_Heartbeat_size 11 -#define CtrlMsg_Event_StationDisconnectFromAP_size 11 -#define CtrlMsg_Req_ConfigHeartbeat_size 13 -#define CtrlMsg_Req_GetAPConfig_size 0 -#define CtrlMsg_Req_GetMacAddress_size 11 -#define CtrlMsg_Req_GetMode_size 0 -#define CtrlMsg_Req_GetSoftAPConfig_size 0 -#define CtrlMsg_Req_GetStatus_size 0 -#define CtrlMsg_Req_GetWifiCurrTxPower_size 0 -#define CtrlMsg_Req_OTABegin_size 0 -#define CtrlMsg_Req_OTAEnd_size 0 -#define CtrlMsg_Req_ScanResult_size 0 -#define CtrlMsg_Req_SetMode_size 11 -#define CtrlMsg_Req_SetWifiMaxTxPower_size 11 -#define CtrlMsg_Req_SoftAPConnectedSTA_size 0 -#define CtrlMsg_Resp_ConfigHeartbeat_size 11 -#define CtrlMsg_Resp_GetMode_size 22 -#define CtrlMsg_Resp_GetStatus_size 11 -#define CtrlMsg_Resp_GetWifiCurrTxPower_size 22 -#define CtrlMsg_Resp_OTABegin_size 11 -#define CtrlMsg_Resp_OTAEnd_size 11 -#define CtrlMsg_Resp_OTAWrite_size 11 -#define CtrlMsg_Resp_SetMacAddress_size 11 -#define CtrlMsg_Resp_SetMode_size 11 -#define CtrlMsg_Resp_SetSoftAPVendorSpecificIE_size 11 -#define CtrlMsg_Resp_SetWifiMaxTxPower_size 11 - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff --git a/proto/esp_hosted_config.proto b/proto/esp_hosted_config.proto index 8888a7b..158d244 100644 --- a/proto/esp_hosted_config.proto +++ b/proto/esp_hosted_config.proto @@ -1,7 +1,5 @@ syntax = "proto3"; -import 'nanopb.proto'; - /* Enums similar to ESP IDF */ enum Ctrl_VendorIEType { Beacon = 0; @@ -362,8 +360,6 @@ message CtrlMsg_Event_StationDisconnectFromESPSoftAP { } message CtrlMsg { - option (nanopb_msgopt).submsg_callback = true; - /* msg_type could be req, resp or Event */ CtrlMsgType msg_type = 1; diff --git a/src/nh_ctrl_api.c b/src/nh_ctrl_api.c index 49414e9..8fc1eba 100644 --- a/src/nh_ctrl_api.c +++ b/src/nh_ctrl_api.c @@ -1,12 +1,10 @@ /* Private */ #include "nh_ctrl_api.h" -/* Nano-PB */ -#include "pb_decode.h" -#include "pb_encode.h" +#include "protobuf-c/protobuf-c.h" /* PB config */ -#include "esp_hosted_config.pb.h" +#include "esp_hosted_config.pb-c.h" #define NH_COMMAND_TIMEOUT_MSEC 30000 #define NH_COMMAND_REQ_MEM_SIZE 256 @@ -55,21 +53,14 @@ nh_ret_t nh_ctrl_api_get_mac_address(nh_ctrl_api_t *api, uint8_t *mac_addr) { return ret; } - CtrlMsg tx_msg = CtrlMsg_init_zero; - - tx_msg.msg_type = CtrlMsgType_Req; - tx_msg.msg_id = CtrlMsgId_Req_GetMACAddress; - tx_msg.which_payload = CtrlMsg_req_get_mac_address_tag; - tx_msg.payload.req_get_mac_address.mode = Ctrl_WifiMode_STA; + CtrlMsg tx_msg; ret = nh_ctrl_api_general_request(api, &tx_msg); if (ret != NH_RET_SUCCESS) { goto give_sem_exit; } - CtrlMsg rx_msg = CtrlMsg_init_zero; - - rx_msg.cb_payload.arg = mac_addr; + CtrlMsg rx_msg; ret = nh_ctrl_api_general_response(api, &rx_msg); if (ret != NH_RET_SUCCESS) { @@ -132,7 +123,7 @@ static nh_ret_t nh_ctrl_api_parse_event(nh_ctrl_api_t *api, CtrlMsgId *event_id, static void nh_ctrl_api_dispatch_event(nh_ctrl_api_t *api, CtrlMsgId event_id) { switch (event_id) { - case CtrlMsgId_Event_ESPInit: { + case CTRL_MSG_ID__Event_ESPInit: { if (api->cb.init) { api->cb.init(api->user_data); }