247 const char* username,
const char* password,
248 const char* client_id,
249 uint16_t connection_timeout,
250 uint16_t keepalive_timeout,
278 const char* host, uint16_t port,
279 const char* username,
const char* password,
280 const char* client_id,
281 uint16_t connection_timeout,
282 uint16_t keepalive_timeout,
301 const char* topic,
const char* msg,
324 const char* topic,
const uint8_t* data,
379 const iotc_time_t seconds_from_now,
const uint8_t repeats_forever,
455 #ifdef IOTC_EXPOSE_FS 456 #include "iotc_fs_api.h" iotc_state_t iotc_events_process_tick()
iotc_state_t iotc_initialize()
iotc_state_t iotc_shutdown()
iotc_timed_task_handle_t iotc_schedule_timed_task(iotc_context_handle_t iotc_h, iotc_user_task_callback_t *callback, const iotc_time_t seconds_from_now, const uint8_t repeats_forever, void *data)
Returns a unique ID for the scheduled task and invokes a callback after an interval.
iotc_state_t iotc_get_heap_usage(size_t *const heap_usage)
const uint16_t iotc_revision
The SDK revision number.
uint8_t iotc_is_context_connected(iotc_context_handle_t context_handle)
Checks if a context is connected to Cloud IoT Core.
enum iotc_mqtt_qos_e iotc_mqtt_qos_t
The MQTT Quality of Service levels.
void() iotc_user_task_callback_t(const iotc_context_handle_t context_handle, const iotc_timed_task_handle_t timed_task_handle, void *user_data)
A custom callback for timed tasks.
const uint16_t iotc_major
The SDK major version number.
Defines connection states.
iotc_state_t iotc_publish(iotc_context_handle_t iotc_h, const char *topic, const char *msg, const iotc_mqtt_qos_t qos, iotc_user_callback_t *callback, void *user_data)
Publishes a message to an MQTT topic.
const char iotc_cilent_version_str[]
The SDK "{@link ::iotc_major major}.{@link ::iotc_minor minor}.{@link ::iotc_revision revision}" vers...
void iotc_set_network_timeout(uint32_t timeout)
Sets the connection timeout.
void iotc_events_process_blocking()
iotc_context_handle_t iotc_create_context()
iotc_state_t
The state of the client application.
iotc_state_t iotc_connect_to(iotc_context_handle_t iotc_h, const char *host, uint16_t port, const char *username, const char *password, const char *client_id, uint16_t connection_timeout, uint16_t keepalive_timeout, iotc_user_callback_t *client_callback)
Connects to a custom MQTT broker endpoint.
void iotc_events_stop()
Shuts down the event engine.
const uint16_t iotc_minor
The SDK minor version number.
int32_t iotc_context_handle_t
An internal context handle.
Defines the time storage type.
Defines custom data formats.
iotc_state_t iotc_connect(iotc_context_handle_t iotc_h, const char *username, const char *password, const char *client_id, uint16_t connection_timeout, uint16_t keepalive_timeout, iotc_user_callback_t *client_callback)
Connects to Cloud IoT Core.
iotc_state_t iotc_publish_data(iotc_context_handle_t iotc_h, const char *topic, const uint8_t *data, size_t data_len, const iotc_mqtt_qos_t qos, iotc_user_callback_t *callback, void *user_data)
Publishes binary data to an MQTT topic.
iotc_state_t iotc_delete_context(iotc_context_handle_t context_handle)
Frees the provided context.
void() iotc_user_subscription_callback_t(iotc_context_handle_t in_context_handle, iotc_sub_call_type_t call_type, const iotc_sub_call_params_t *const params, iotc_state_t state, void *user_data)
The subscription callback.
iotc_state_t iotc_shutdown_connection(iotc_context_handle_t iotc_h)
Disconnects asynchronously from an MQTT broker.
iotc_state_t iotc_subscribe(iotc_context_handle_t iotc_h, const char *topic, const iotc_mqtt_qos_t qos, iotc_user_subscription_callback_t *callback, void *user_data)
Subscribes to an MQTT topic.
void() iotc_user_callback_t(iotc_context_handle_t in_context_handle, void *data, iotc_state_t state)
int32_t iotc_timed_task_handle_t
The handle to identify timed tasks.
uint32_t iotc_get_network_timeout(void)
Gets the connection timeout.
iotc_state_t iotc_set_fs_functions(const iotc_fs_functions_t fs_functions)
Sets the file operations to the custom file management functions in the BSP.
iotc_state_t iotc_set_maximum_heap_usage(const size_t max_bytes)
void iotc_cancel_timed_task(iotc_timed_task_handle_t timed_task_handle)
Removes a scheduled task from the internal event system.