279 const char* username,
const char* password,
280 const char* client_id,
281 uint16_t connection_timeout,
282 uint16_t keepalive_timeout,
298 const char* host, uint16_t port,
299 const char* username,
const char* password,
300 const char* client_id,
301 uint16_t connection_timeout,
302 uint16_t keepalive_timeout,
350 const char* topic,
const char* msg,
379 const char* topic,
const uint8_t* data,
502 const iotc_time_t seconds_from_now,
const uint8_t repeats_forever,
621 #ifdef IOTC_EXPOSE_FS 622 #include "iotc_fs_api.h" 628 iotc_state_t iotc_set_fs_functions(
const iotc_fs_functions_t fs_functions);
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)
iotc_state_t iotc_events_process_tick()
Invokes the IOTC Client Event Processing loop.
iotc_state_t iotc_initialize()
Required before use of the IoTC Client library.
iotc_state_t iotc_shutdown()
Signals the IoTC Client library to cleanup any internal memory.
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)
Schedule a task for timed execution Using the provided context, this function adds a task to the int...
iotc_state_t iotc_get_heap_usage(size_t *const heap_usage)
Fetches the IoTC Client's current amount of heap usage This function is part of an optional configur...
const uint16_t iotc_revision
Contains the revsion number of the IoTC Client library.
uint8_t iotc_is_context_connected(iotc_context_handle_t context_handle)
Used to determine the state of a IoTC Client context's connection to the remote service.
const uint16_t iotc_major
Contains the major version number of the IoTC Client library.
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)
const char iotc_cilent_version_str[]
String representation of the Major.Minor.Revision version of the IoTC Client library.
void iotc_set_network_timeout(uint32_t timeout)
Timeout value that's passed to the networking implementation This function configures how long a soc...
void iotc_events_process_blocking()
Invokes the IoTC Client Event Processing loop.
iotc_context_handle_t iotc_create_context()
Creates a connection context for subscriptions and publications This should by invoked following a s...
void() iotc_user_callback_t(iotc_context_handle_t in_context_handle, void *data, iotc_state_t state)
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)
Opens a MQTT connection to a custom service endpoint using the provided context, host and port...
void iotc_events_stop()
Causes the IoTC Client event loop to exit.
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)
enum iotc_mqtt_qos_e iotc_mqtt_qos_t
const uint16_t iotc_minor
Contains the minor version number of the IoTC Client library.
int32_t iotc_timed_task_handle_t
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)
Opens a connection to the Google Cloud IoT Core service using the provided context.
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 the Google Cloud IoT service on the given topic.
iotc_state_t iotc_delete_context(iotc_context_handle_t context_handle)
Frees the provided connection context This should by invoked to free up memory when your applicaiton...
iotc_state_t iotc_shutdown_connection(iotc_context_handle_t iotc_h)
Closes the connection associated with the provide context.
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 notifications if a message from the Google Cloud IoT Core service is posted to the give...
int32_t iotc_context_handle_t
uint32_t iotc_get_network_timeout(void)
Returns the timeout value for socket connections.
iotc_state_t iotc_set_maximum_heap_usage(const size_t max_bytes)
Sets Maximum Amount of Heap Allocated Memory the IoTC Client may use.
void iotc_cancel_timed_task(iotc_timed_task_handle_t timed_task_handle)
Cancel a timed task This function cancels the timed execution of the task specified by the given han...