Astarte device API for Zephyr 0.7.2
Astarte device SDK for Zephyr RTOS
Loading...
Searching...
No Matches
astarte_device_config_t Struct Reference

Configuration struct for an Astarte device. More...

#include <device.h>

Data Fields

int32_t http_timeout_ms
 Timeout for HTTP requests.
 
int32_t mqtt_connection_timeout_ms
 Connection timeout period.
 
int32_t mqtt_poll_timeout_ms
 Polling timeout for the MQTT client.
 
char device_id [ASTARTE_DEVICE_ID_LEN+1]
 Unique 128 bits, base64 URL encoded, identifier to associate to a device instance.
 
char cred_secr [ASTARTE_PAIRING_CRED_SECR_LEN+1]
 Credential secret to be used for connecting to Astarte.
 
astarte_device_connection_cbk_t connection_cbk
 Optional callback for a connection event.
 
astarte_device_disconnection_cbk_t disconnection_cbk
 Optional callback for a disconnection event.
 
astarte_device_datastream_individual_cbk_t datastream_individual_cbk
 Optional callback for a datastream individual reception event.
 
astarte_device_datastream_object_cbk_t datastream_object_cbk
 Optional callback for a datastream object reception event.
 
astarte_device_property_set_cbk_t property_set_cbk
 Optional callback for a set property event.
 
astarte_device_property_unset_cbk_t property_unset_cbk
 Optional callback for a unset property event.
 
void * cbk_user_data
 User data passed to each callback function.
 
const astarte_interface_t ** interfaces
 Array of interfaces to be added to the device.
 
size_t interfaces_size
 Number of elements in the interfaces array.
 

Detailed Description

Configuration struct for an Astarte device.

This configuration struct might be used to create a new instance of a device using the init function.

Field Documentation

◆ cbk_user_data

void* astarte_device_config_t::cbk_user_data

User data passed to each callback function.

◆ connection_cbk

astarte_device_connection_cbk_t astarte_device_config_t::connection_cbk

Optional callback for a connection event.

◆ cred_secr

char astarte_device_config_t::cred_secr[ASTARTE_PAIRING_CRED_SECR_LEN+1]

Credential secret to be used for connecting to Astarte.

◆ datastream_individual_cbk

astarte_device_datastream_individual_cbk_t astarte_device_config_t::datastream_individual_cbk

Optional callback for a datastream individual reception event.

◆ datastream_object_cbk

astarte_device_datastream_object_cbk_t astarte_device_config_t::datastream_object_cbk

Optional callback for a datastream object reception event.

◆ device_id

char astarte_device_config_t::device_id[ASTARTE_DEVICE_ID_LEN+1]

Unique 128 bits, base64 URL encoded, identifier to associate to a device instance.

◆ disconnection_cbk

astarte_device_disconnection_cbk_t astarte_device_config_t::disconnection_cbk

Optional callback for a disconnection event.

◆ http_timeout_ms

int32_t astarte_device_config_t::http_timeout_ms

Timeout for HTTP requests.

◆ interfaces

const astarte_interface_t** astarte_device_config_t::interfaces

Array of interfaces to be added to the device.

◆ interfaces_size

size_t astarte_device_config_t::interfaces_size

Number of elements in the interfaces array.

◆ mqtt_connection_timeout_ms

int32_t astarte_device_config_t::mqtt_connection_timeout_ms

Connection timeout period.

This is the maximum amount of time that the device will wait for a MQTT connack message. After this timeout has elapsed the device will attempt a reconnection.

◆ mqtt_poll_timeout_ms

int32_t astarte_device_config_t::mqtt_poll_timeout_ms

Polling timeout for the MQTT client.

◆ property_set_cbk

astarte_device_property_set_cbk_t astarte_device_config_t::property_set_cbk

Optional callback for a set property event.

◆ property_unset_cbk

astarte_device_property_unset_cbk_t astarte_device_config_t::property_unset_cbk

Optional callback for a unset property event.


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