mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-10-25 11:23:22 +00:00 
			
		
		
		
	 b75f8b1b20
			
		
	
	b75f8b1b20
	
	
	
		
			
			List of changes: * New component esp_local_ctrl added * Example added under examples/protocols/esp_local_ctrl * Documentation added under protocols/esp_local_ctrl * Demo client side app esp_local_ctrl.py added under examples/protocols/esp_local_ctrl/scripts * protocomm_ble : protocomm_ble_config_t given struct name for allowing forward declaration * esp_prov/transport_softap renamed to transport_http * transport_http module supports verification of server certificate * transport_http module performs name resolution before connection
		
			
				
	
	
		
			384 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			384 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| /* Generated by the protocol buffer compiler.  DO NOT EDIT! */
 | |
| /* Generated from: esp_local_ctrl.proto */
 | |
| 
 | |
| #ifndef PROTOBUF_C_esp_5flocal_5fctrl_2eproto__INCLUDED
 | |
| #define PROTOBUF_C_esp_5flocal_5fctrl_2eproto__INCLUDED
 | |
| 
 | |
| #include <protobuf-c/protobuf-c.h>
 | |
| 
 | |
| 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 1003001 < 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
 | |
| 
 | |
| #include "constants.pb-c.h"
 | |
| 
 | |
| typedef struct _CmdGetPropertyCount CmdGetPropertyCount;
 | |
| typedef struct _RespGetPropertyCount RespGetPropertyCount;
 | |
| typedef struct _PropertyInfo PropertyInfo;
 | |
| typedef struct _CmdGetPropertyValues CmdGetPropertyValues;
 | |
| typedef struct _RespGetPropertyValues RespGetPropertyValues;
 | |
| typedef struct _PropertyValue PropertyValue;
 | |
| typedef struct _CmdSetPropertyValues CmdSetPropertyValues;
 | |
| typedef struct _RespSetPropertyValues RespSetPropertyValues;
 | |
| typedef struct _LocalCtrlMessage LocalCtrlMessage;
 | |
| 
 | |
| 
 | |
| /* --- enums --- */
 | |
| 
 | |
| typedef enum _LocalCtrlMsgType {
 | |
|   LOCAL_CTRL_MSG_TYPE__TypeCmdGetPropertyCount = 0,
 | |
|   LOCAL_CTRL_MSG_TYPE__TypeRespGetPropertyCount = 1,
 | |
|   LOCAL_CTRL_MSG_TYPE__TypeCmdGetPropertyValues = 4,
 | |
|   LOCAL_CTRL_MSG_TYPE__TypeRespGetPropertyValues = 5,
 | |
|   LOCAL_CTRL_MSG_TYPE__TypeCmdSetPropertyValues = 6,
 | |
|   LOCAL_CTRL_MSG_TYPE__TypeRespSetPropertyValues = 7
 | |
|     PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(LOCAL_CTRL_MSG_TYPE)
 | |
| } LocalCtrlMsgType;
 | |
| 
 | |
| /* --- messages --- */
 | |
| 
 | |
| struct  _CmdGetPropertyCount
 | |
| {
 | |
|   ProtobufCMessage base;
 | |
| };
 | |
| #define CMD_GET_PROPERTY_COUNT__INIT \
 | |
|  { PROTOBUF_C_MESSAGE_INIT (&cmd_get_property_count__descriptor) \
 | |
|      }
 | |
| 
 | |
| 
 | |
| struct  _RespGetPropertyCount
 | |
| {
 | |
|   ProtobufCMessage base;
 | |
|   Status status;
 | |
|   uint32_t count;
 | |
| };
 | |
| #define RESP_GET_PROPERTY_COUNT__INIT \
 | |
|  { PROTOBUF_C_MESSAGE_INIT (&resp_get_property_count__descriptor) \
 | |
|     , STATUS__Success, 0 }
 | |
| 
 | |
| 
 | |
| struct  _PropertyInfo
 | |
| {
 | |
|   ProtobufCMessage base;
 | |
|   Status status;
 | |
|   char *name;
 | |
|   uint32_t type;
 | |
|   uint32_t flags;
 | |
|   ProtobufCBinaryData value;
 | |
| };
 | |
| #define PROPERTY_INFO__INIT \
 | |
|  { PROTOBUF_C_MESSAGE_INIT (&property_info__descriptor) \
 | |
|     , STATUS__Success, (char *)protobuf_c_empty_string, 0, 0, {0,NULL} }
 | |
| 
 | |
| 
 | |
| struct  _CmdGetPropertyValues
 | |
| {
 | |
|   ProtobufCMessage base;
 | |
|   size_t n_indices;
 | |
|   uint32_t *indices;
 | |
| };
 | |
| #define CMD_GET_PROPERTY_VALUES__INIT \
 | |
|  { PROTOBUF_C_MESSAGE_INIT (&cmd_get_property_values__descriptor) \
 | |
|     , 0,NULL }
 | |
| 
 | |
| 
 | |
| struct  _RespGetPropertyValues
 | |
| {
 | |
|   ProtobufCMessage base;
 | |
|   Status status;
 | |
|   size_t n_props;
 | |
|   PropertyInfo **props;
 | |
| };
 | |
| #define RESP_GET_PROPERTY_VALUES__INIT \
 | |
|  { PROTOBUF_C_MESSAGE_INIT (&resp_get_property_values__descriptor) \
 | |
|     , STATUS__Success, 0,NULL }
 | |
| 
 | |
| 
 | |
| struct  _PropertyValue
 | |
| {
 | |
|   ProtobufCMessage base;
 | |
|   uint32_t index;
 | |
|   ProtobufCBinaryData value;
 | |
| };
 | |
| #define PROPERTY_VALUE__INIT \
 | |
|  { PROTOBUF_C_MESSAGE_INIT (&property_value__descriptor) \
 | |
|     , 0, {0,NULL} }
 | |
| 
 | |
| 
 | |
| struct  _CmdSetPropertyValues
 | |
| {
 | |
|   ProtobufCMessage base;
 | |
|   size_t n_props;
 | |
|   PropertyValue **props;
 | |
| };
 | |
| #define CMD_SET_PROPERTY_VALUES__INIT \
 | |
|  { PROTOBUF_C_MESSAGE_INIT (&cmd_set_property_values__descriptor) \
 | |
|     , 0,NULL }
 | |
| 
 | |
| 
 | |
| struct  _RespSetPropertyValues
 | |
| {
 | |
|   ProtobufCMessage base;
 | |
|   Status status;
 | |
| };
 | |
| #define RESP_SET_PROPERTY_VALUES__INIT \
 | |
|  { PROTOBUF_C_MESSAGE_INIT (&resp_set_property_values__descriptor) \
 | |
|     , STATUS__Success }
 | |
| 
 | |
| 
 | |
| typedef enum {
 | |
|   LOCAL_CTRL_MESSAGE__PAYLOAD__NOT_SET = 0,
 | |
|   LOCAL_CTRL_MESSAGE__PAYLOAD_CMD_GET_PROP_COUNT = 10,
 | |
|   LOCAL_CTRL_MESSAGE__PAYLOAD_RESP_GET_PROP_COUNT = 11,
 | |
|   LOCAL_CTRL_MESSAGE__PAYLOAD_CMD_GET_PROP_VALS = 12,
 | |
|   LOCAL_CTRL_MESSAGE__PAYLOAD_RESP_GET_PROP_VALS = 13,
 | |
|   LOCAL_CTRL_MESSAGE__PAYLOAD_CMD_SET_PROP_VALS = 14,
 | |
|   LOCAL_CTRL_MESSAGE__PAYLOAD_RESP_SET_PROP_VALS = 15
 | |
|     PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(LOCAL_CTRL_MESSAGE__PAYLOAD)
 | |
| } LocalCtrlMessage__PayloadCase;
 | |
| 
 | |
| struct  _LocalCtrlMessage
 | |
| {
 | |
|   ProtobufCMessage base;
 | |
|   LocalCtrlMsgType msg;
 | |
|   LocalCtrlMessage__PayloadCase payload_case;
 | |
|   union {
 | |
|     CmdGetPropertyCount *cmd_get_prop_count;
 | |
|     RespGetPropertyCount *resp_get_prop_count;
 | |
|     CmdGetPropertyValues *cmd_get_prop_vals;
 | |
|     RespGetPropertyValues *resp_get_prop_vals;
 | |
|     CmdSetPropertyValues *cmd_set_prop_vals;
 | |
|     RespSetPropertyValues *resp_set_prop_vals;
 | |
|   };
 | |
| };
 | |
| #define LOCAL_CTRL_MESSAGE__INIT \
 | |
|  { PROTOBUF_C_MESSAGE_INIT (&local_ctrl_message__descriptor) \
 | |
|     , LOCAL_CTRL_MSG_TYPE__TypeCmdGetPropertyCount, LOCAL_CTRL_MESSAGE__PAYLOAD__NOT_SET, {0} }
 | |
| 
 | |
| 
 | |
| /* CmdGetPropertyCount methods */
 | |
| void   cmd_get_property_count__init
 | |
|                      (CmdGetPropertyCount         *message);
 | |
| size_t cmd_get_property_count__get_packed_size
 | |
|                      (const CmdGetPropertyCount   *message);
 | |
| size_t cmd_get_property_count__pack
 | |
|                      (const CmdGetPropertyCount   *message,
 | |
|                       uint8_t             *out);
 | |
| size_t cmd_get_property_count__pack_to_buffer
 | |
|                      (const CmdGetPropertyCount   *message,
 | |
|                       ProtobufCBuffer     *buffer);
 | |
| CmdGetPropertyCount *
 | |
|        cmd_get_property_count__unpack
 | |
|                      (ProtobufCAllocator  *allocator,
 | |
|                       size_t               len,
 | |
|                       const uint8_t       *data);
 | |
| void   cmd_get_property_count__free_unpacked
 | |
|                      (CmdGetPropertyCount *message,
 | |
|                       ProtobufCAllocator *allocator);
 | |
| /* RespGetPropertyCount methods */
 | |
| void   resp_get_property_count__init
 | |
|                      (RespGetPropertyCount         *message);
 | |
| size_t resp_get_property_count__get_packed_size
 | |
|                      (const RespGetPropertyCount   *message);
 | |
| size_t resp_get_property_count__pack
 | |
|                      (const RespGetPropertyCount   *message,
 | |
|                       uint8_t             *out);
 | |
| size_t resp_get_property_count__pack_to_buffer
 | |
|                      (const RespGetPropertyCount   *message,
 | |
|                       ProtobufCBuffer     *buffer);
 | |
| RespGetPropertyCount *
 | |
|        resp_get_property_count__unpack
 | |
|                      (ProtobufCAllocator  *allocator,
 | |
|                       size_t               len,
 | |
|                       const uint8_t       *data);
 | |
| void   resp_get_property_count__free_unpacked
 | |
|                      (RespGetPropertyCount *message,
 | |
|                       ProtobufCAllocator *allocator);
 | |
| /* PropertyInfo methods */
 | |
| void   property_info__init
 | |
|                      (PropertyInfo         *message);
 | |
| size_t property_info__get_packed_size
 | |
|                      (const PropertyInfo   *message);
 | |
| size_t property_info__pack
 | |
|                      (const PropertyInfo   *message,
 | |
|                       uint8_t             *out);
 | |
| size_t property_info__pack_to_buffer
 | |
|                      (const PropertyInfo   *message,
 | |
|                       ProtobufCBuffer     *buffer);
 | |
| PropertyInfo *
 | |
|        property_info__unpack
 | |
|                      (ProtobufCAllocator  *allocator,
 | |
|                       size_t               len,
 | |
|                       const uint8_t       *data);
 | |
| void   property_info__free_unpacked
 | |
|                      (PropertyInfo *message,
 | |
|                       ProtobufCAllocator *allocator);
 | |
| /* CmdGetPropertyValues methods */
 | |
| void   cmd_get_property_values__init
 | |
|                      (CmdGetPropertyValues         *message);
 | |
| size_t cmd_get_property_values__get_packed_size
 | |
|                      (const CmdGetPropertyValues   *message);
 | |
| size_t cmd_get_property_values__pack
 | |
|                      (const CmdGetPropertyValues   *message,
 | |
|                       uint8_t             *out);
 | |
| size_t cmd_get_property_values__pack_to_buffer
 | |
|                      (const CmdGetPropertyValues   *message,
 | |
|                       ProtobufCBuffer     *buffer);
 | |
| CmdGetPropertyValues *
 | |
|        cmd_get_property_values__unpack
 | |
|                      (ProtobufCAllocator  *allocator,
 | |
|                       size_t               len,
 | |
|                       const uint8_t       *data);
 | |
| void   cmd_get_property_values__free_unpacked
 | |
|                      (CmdGetPropertyValues *message,
 | |
|                       ProtobufCAllocator *allocator);
 | |
| /* RespGetPropertyValues methods */
 | |
| void   resp_get_property_values__init
 | |
|                      (RespGetPropertyValues         *message);
 | |
| size_t resp_get_property_values__get_packed_size
 | |
|                      (const RespGetPropertyValues   *message);
 | |
| size_t resp_get_property_values__pack
 | |
|                      (const RespGetPropertyValues   *message,
 | |
|                       uint8_t             *out);
 | |
| size_t resp_get_property_values__pack_to_buffer
 | |
|                      (const RespGetPropertyValues   *message,
 | |
|                       ProtobufCBuffer     *buffer);
 | |
| RespGetPropertyValues *
 | |
|        resp_get_property_values__unpack
 | |
|                      (ProtobufCAllocator  *allocator,
 | |
|                       size_t               len,
 | |
|                       const uint8_t       *data);
 | |
| void   resp_get_property_values__free_unpacked
 | |
|                      (RespGetPropertyValues *message,
 | |
|                       ProtobufCAllocator *allocator);
 | |
| /* PropertyValue methods */
 | |
| void   property_value__init
 | |
|                      (PropertyValue         *message);
 | |
| size_t property_value__get_packed_size
 | |
|                      (const PropertyValue   *message);
 | |
| size_t property_value__pack
 | |
|                      (const PropertyValue   *message,
 | |
|                       uint8_t             *out);
 | |
| size_t property_value__pack_to_buffer
 | |
|                      (const PropertyValue   *message,
 | |
|                       ProtobufCBuffer     *buffer);
 | |
| PropertyValue *
 | |
|        property_value__unpack
 | |
|                      (ProtobufCAllocator  *allocator,
 | |
|                       size_t               len,
 | |
|                       const uint8_t       *data);
 | |
| void   property_value__free_unpacked
 | |
|                      (PropertyValue *message,
 | |
|                       ProtobufCAllocator *allocator);
 | |
| /* CmdSetPropertyValues methods */
 | |
| void   cmd_set_property_values__init
 | |
|                      (CmdSetPropertyValues         *message);
 | |
| size_t cmd_set_property_values__get_packed_size
 | |
|                      (const CmdSetPropertyValues   *message);
 | |
| size_t cmd_set_property_values__pack
 | |
|                      (const CmdSetPropertyValues   *message,
 | |
|                       uint8_t             *out);
 | |
| size_t cmd_set_property_values__pack_to_buffer
 | |
|                      (const CmdSetPropertyValues   *message,
 | |
|                       ProtobufCBuffer     *buffer);
 | |
| CmdSetPropertyValues *
 | |
|        cmd_set_property_values__unpack
 | |
|                      (ProtobufCAllocator  *allocator,
 | |
|                       size_t               len,
 | |
|                       const uint8_t       *data);
 | |
| void   cmd_set_property_values__free_unpacked
 | |
|                      (CmdSetPropertyValues *message,
 | |
|                       ProtobufCAllocator *allocator);
 | |
| /* RespSetPropertyValues methods */
 | |
| void   resp_set_property_values__init
 | |
|                      (RespSetPropertyValues         *message);
 | |
| size_t resp_set_property_values__get_packed_size
 | |
|                      (const RespSetPropertyValues   *message);
 | |
| size_t resp_set_property_values__pack
 | |
|                      (const RespSetPropertyValues   *message,
 | |
|                       uint8_t             *out);
 | |
| size_t resp_set_property_values__pack_to_buffer
 | |
|                      (const RespSetPropertyValues   *message,
 | |
|                       ProtobufCBuffer     *buffer);
 | |
| RespSetPropertyValues *
 | |
|        resp_set_property_values__unpack
 | |
|                      (ProtobufCAllocator  *allocator,
 | |
|                       size_t               len,
 | |
|                       const uint8_t       *data);
 | |
| void   resp_set_property_values__free_unpacked
 | |
|                      (RespSetPropertyValues *message,
 | |
|                       ProtobufCAllocator *allocator);
 | |
| /* LocalCtrlMessage methods */
 | |
| void   local_ctrl_message__init
 | |
|                      (LocalCtrlMessage         *message);
 | |
| size_t local_ctrl_message__get_packed_size
 | |
|                      (const LocalCtrlMessage   *message);
 | |
| size_t local_ctrl_message__pack
 | |
|                      (const LocalCtrlMessage   *message,
 | |
|                       uint8_t             *out);
 | |
| size_t local_ctrl_message__pack_to_buffer
 | |
|                      (const LocalCtrlMessage   *message,
 | |
|                       ProtobufCBuffer     *buffer);
 | |
| LocalCtrlMessage *
 | |
|        local_ctrl_message__unpack
 | |
|                      (ProtobufCAllocator  *allocator,
 | |
|                       size_t               len,
 | |
|                       const uint8_t       *data);
 | |
| void   local_ctrl_message__free_unpacked
 | |
|                      (LocalCtrlMessage *message,
 | |
|                       ProtobufCAllocator *allocator);
 | |
| /* --- per-message closures --- */
 | |
| 
 | |
| typedef void (*CmdGetPropertyCount_Closure)
 | |
|                  (const CmdGetPropertyCount *message,
 | |
|                   void *closure_data);
 | |
| typedef void (*RespGetPropertyCount_Closure)
 | |
|                  (const RespGetPropertyCount *message,
 | |
|                   void *closure_data);
 | |
| typedef void (*PropertyInfo_Closure)
 | |
|                  (const PropertyInfo *message,
 | |
|                   void *closure_data);
 | |
| typedef void (*CmdGetPropertyValues_Closure)
 | |
|                  (const CmdGetPropertyValues *message,
 | |
|                   void *closure_data);
 | |
| typedef void (*RespGetPropertyValues_Closure)
 | |
|                  (const RespGetPropertyValues *message,
 | |
|                   void *closure_data);
 | |
| typedef void (*PropertyValue_Closure)
 | |
|                  (const PropertyValue *message,
 | |
|                   void *closure_data);
 | |
| typedef void (*CmdSetPropertyValues_Closure)
 | |
|                  (const CmdSetPropertyValues *message,
 | |
|                   void *closure_data);
 | |
| typedef void (*RespSetPropertyValues_Closure)
 | |
|                  (const RespSetPropertyValues *message,
 | |
|                   void *closure_data);
 | |
| typedef void (*LocalCtrlMessage_Closure)
 | |
|                  (const LocalCtrlMessage *message,
 | |
|                   void *closure_data);
 | |
| 
 | |
| /* --- services --- */
 | |
| 
 | |
| 
 | |
| /* --- descriptors --- */
 | |
| 
 | |
| extern const ProtobufCEnumDescriptor    local_ctrl_msg_type__descriptor;
 | |
| extern const ProtobufCMessageDescriptor cmd_get_property_count__descriptor;
 | |
| extern const ProtobufCMessageDescriptor resp_get_property_count__descriptor;
 | |
| extern const ProtobufCMessageDescriptor property_info__descriptor;
 | |
| extern const ProtobufCMessageDescriptor cmd_get_property_values__descriptor;
 | |
| extern const ProtobufCMessageDescriptor resp_get_property_values__descriptor;
 | |
| extern const ProtobufCMessageDescriptor property_value__descriptor;
 | |
| extern const ProtobufCMessageDescriptor cmd_set_property_values__descriptor;
 | |
| extern const ProtobufCMessageDescriptor resp_set_property_values__descriptor;
 | |
| extern const ProtobufCMessageDescriptor local_ctrl_message__descriptor;
 | |
| 
 | |
| PROTOBUF_C__END_DECLS
 | |
| 
 | |
| 
 | |
| #endif  /* PROTOBUF_C_esp_5flocal_5fctrl_2eproto__INCLUDED */
 |