thing-if SDK
 All Data Structures Files Functions Variables Typedefs Macros
Data Fields
kii_thing_if_command_handler_resource_t Struct Reference

#include <kii_thing_if.h>

Data Fields

char * buffer
 
size_t buffer_size
 
char * mqtt_buffer
 
size_t mqtt_buffer_size
 
KII_THING_IF_ACTION_HANDLER action_handler
 
KII_THING_IF_STATE_HANDLER state_handler
 
KII_THING_IF_CUSTOM_PUSH_HANDLER custom_push_handler
 

Detailed Description

Resource for command handler.

Invocation of action_handler, state_handler and custom_push_handler callback inside this struct is serialized since they are called from the single task/thread.

However, kii_thing_if_state_updater_resource_t::state_handler and callbacks inside this struct is invoked from different task/ thread. That means the invocation could be concurrent.

If you share the resources(memory, file, etc.) among the callbacks called concurrently, be aware for it and avoid deadlock when you implement synchronization for the resources.

Field Documentation

KII_THING_IF_ACTION_HANDLER kii_thing_if_command_handler_resource_t::action_handler

callback function to handle received action.

char* kii_thing_if_command_handler_resource_t::buffer

HTTP request and response buffer for command handler.

size_t kii_thing_if_command_handler_resource_t::buffer_size

HTTP request and response buffer size for command handler.

KII_THING_IF_CUSTOM_PUSH_HANDLER kii_thing_if_command_handler_resource_t::custom_push_handler

callback function to handle recived all push notifications. Normally you can left this field as NULL. Only required when you have to deal with push notification with your custom logic.

See Also
KII_THING_IF_CUSTOM_PUSH_HANDLER
char* kii_thing_if_command_handler_resource_t::mqtt_buffer

buffer for MQTT.

size_t kii_thing_if_command_handler_resource_t::mqtt_buffer_size

buffer size for MQTT.

KII_THING_IF_STATE_HANDLER kii_thing_if_command_handler_resource_t::state_handler

callback function to write the thing state after a command is processed.


The documentation for this struct was generated from the following file: