Kii Thing SDK Embedded
 All Classes Files Functions Variables Typedefs
Public Attributes | List of all members
kii_t Struct Reference

Public Attributes

kii_core_t kii_core
 
kii_socket_context_t mqtt_socket_context
 
KII_SOCKET_CONNECT_CB mqtt_socket_connect_cb
 
KII_SOCKET_SEND_CB mqtt_socket_send_cb
 
KII_SOCKET_RECV_CB mqtt_socket_recv_cb
 
KII_SOCKET_CLOSE_CB mqtt_socket_close_cb
 
KII_TASK_CREATE task_create_cb
 
KII_DELAY_MS delay_ms_cb
 
KII_PUSH_RECEIVED_CB push_received_cb
 
int _mqtt_connected
 
char * mqtt_buffer
 
size_t mqtt_buffer_size
 
void * app_context
 
kii_json_resource_t kii_json_resource
 
KII_JSON_RESOURCE_CB kii_json_resource_cb
 

Member Data Documentation

kii_json_resource_t kii_t::kii_json_resource

Resource used by KII JSON library.

This field is optional. If KII_JSON_FIXED_TOKEN_NUM macro is defined, KII JSON library takes resources by myself on stack memory. In KII_JSON_FIXED_TOKEN_NUM case, token size of Kii JSON library is number defined by KII_JSON_FIXED_TOKEN_NUM. If your environment has small stack size, you should use this field and manage this resources by yourself.

This field is not managed by this SDK. If kii_json_resource_t::tokens is allocated from heap memory, you must free these by yourself before applications are terminated.

Value of this field is not thread safe. You must not share kii_json_resource_t::tokens instance with two or more kii_t instance.

KII_JSON_RESOURCE_CB kii_t::kii_json_resource_cb

Callback to resize to kii_json_resource contents.

This field is optional. If this field is NULL. This SDK does not try to allocate kii_t::kii_json_resource. As a result, Some APIs may fail with KII_JSON_PARSE_SHORTAGE_TOKENS.

kii_socket_context_t kii_t::mqtt_socket_context

Socket context for MQTT client.

If you want to use MQTT client, You must set this socket context. If You want to use ping req, you need to define KII_PUSH_KEEP_ALIVE_INTERVAL_SECONDS macro. KII_PUSH_KEEP_ALIVE_INTERVAL_SECONDS is interval of sending ping request. KII_PUSH_KEEP_ALIVE_INTERVAL_SECONDS requires seconds of ping request interval. If the interval is too short, MQTT client often disconnect connection to a MQTT server. We recommend 30 seconds or upper.


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