|
Astarte device API for Zephyr 0.8.0
Astarte device SDK for Zephyr RTOS
|
Device management. More...
#include <zephyr/kernel.h>#include "astarte_device_sdk/astarte.h"#include "astarte_device_sdk/data.h"#include "astarte_device_sdk/device_id.h"#include "astarte_device_sdk/interface.h"#include "astarte_device_sdk/object.h"#include "astarte_device_sdk/pairing.h"#include "astarte_device_sdk/result.h"Go to the source code of this file.
Data Structures | |
| struct | astarte_device_connection_event_t |
| Context for a single connection event. More... | |
| struct | astarte_device_disconnection_event_t |
| Context for a single disconnection event. More... | |
| struct | astarte_device_data_event_t |
| Common context for all data events. More... | |
| struct | astarte_device_datastream_individual_event_t |
| Context for a single datastream individual event. More... | |
| struct | astarte_device_datastream_object_event_t |
| Context for a single datastream object event. More... | |
| struct | astarte_device_property_set_event_t |
| Context for a single property set event. More... | |
| struct | astarte_device_config_t |
| Configuration struct for an Astarte device. More... | |
Typedefs | |
| typedef struct astarte_device * | astarte_device_handle_t |
| Handle for an instance of an Astarte device. | |
| typedef void(* | astarte_device_connection_cbk_t) (astarte_device_connection_event_t event) |
| Function pointer for connection events. | |
| typedef void(* | astarte_device_disconnection_cbk_t) (astarte_device_disconnection_event_t event) |
| Function pointer for disconnection events. | |
| typedef void(* | astarte_device_datastream_individual_cbk_t) (astarte_device_datastream_individual_event_t event) |
| Function pointer for datastream individual events. | |
| typedef void(* | astarte_device_datastream_object_cbk_t) (astarte_device_datastream_object_event_t event) |
| Function pointer for datastream object events. | |
| typedef void(* | astarte_device_property_set_cbk_t) (astarte_device_property_set_event_t event) |
| Function pointer for property set events. | |
| typedef void(* | astarte_device_property_unset_cbk_t) (astarte_device_data_event_t event) |
| Function pointer for property unset events. | |
Functions | |
| astarte_result_t | astarte_device_new (astarte_device_config_t *cfg, astarte_device_handle_t *device) |
| Allocate a new instance of an Astarte device. | |
| astarte_result_t | astarte_device_destroy (astarte_device_handle_t device) |
| Destroy the Astarte device instance. | |
| astarte_result_t | astarte_device_add_interface (astarte_device_handle_t device, const astarte_interface_t *interface) |
| add an interface to the device. | |
| astarte_result_t | astarte_device_connect (astarte_device_handle_t device) |
| Connect a device to Astarte. | |
| astarte_result_t | astarte_device_disconnect (astarte_device_handle_t device, k_timeout_t timeout) |
| Disconnect the Astarte device instance. | |
| astarte_result_t | astarte_device_force_disconnect (astarte_device_handle_t device) |
| Force a disconnection for the Astarte device instance. | |
| astarte_result_t | astarte_device_poll (astarte_device_handle_t device) |
| Poll data from Astarte. | |
| astarte_result_t | astarte_device_send_individual (astarte_device_handle_t device, const char *interface_name, const char *path, astarte_data_t data, const int64_t *timestamp) |
| Send a value through the device connection. | |
| astarte_result_t | astarte_device_send_object (astarte_device_handle_t device, const char *interface_name, const char *path, astarte_object_entry_t *entries, size_t entries_len, const int64_t *timestamp) |
| Send an aggregated object through the device connection. | |
| astarte_result_t | astarte_device_set_property (astarte_device_handle_t device, const char *interface_name, const char *path, astarte_data_t data) |
| Set a device property to the provided value. | |
| astarte_result_t | astarte_device_unset_property (astarte_device_handle_t device, const char *interface_name, const char *path) |
| Unset a device property. | |
Device management.