#include <kii_thing_if.h>
Data Fields | |
char * | buffer |
size_t | buffer_size |
int | period |
KII_THING_IF_STATE_HANDLER | state_handler |
Resource for state updater. Invocation of state_handler callback inside this struct is serialized since it called from single task/thraed.
However, state_handler and callbacks inside kii_thing_if_command_handler_resource_t would be 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.
char* kii_thing_if_state_updater_resource_t::buffer |
HTTP request and response buffer for state updater.
size_t kii_thing_if_state_updater_resource_t::buffer_size |
HTTP request and response buffer size for state updater.
int kii_thing_if_state_updater_resource_t::period |
the period of updating state in seconds.
KII_THING_IF_STATE_HANDLER kii_thing_if_state_updater_resource_t::state_handler |
callback function to write thing state. called in every period.