|
IoT managed integrations End Device SDK
|
Go to the source code of this file.
Classes | |
| struct | iotmiDev_Agent_Config |
| The struct to hold the configuration of the agent. More... | |
| struct | iotmiDev_Agent_ClusterInfo |
| The struct to hold the information for a cluster. More... | |
Macros | |
| #define | EVENT_NOT_SUPPORTED 0x01 |
| Bit mask indicating which events are not supported in allEventFlags. | |
Functions | |
| struct iotmiDev_Agent * | iotmiDev_Agent_new (const struct iotmiDev_Agent_Config *config) |
| Create a device agent. | |
| void | iotmiDev_Agent_free (struct iotmiDev_Agent *agent) |
| Destroy the agent and free all occupied resources. | |
| struct iotmiDev_Endpoint * | iotmiDev_Agent_addEndpoint (struct iotmiDev_Agent *agent, uint16_t id, const char *name, const char *deviceTypes[], size_t deviceTypesLen) |
| Add an endpoint with an empty set of capabilities. | |
| struct iotmiDev_Endpoint * | iotmiDev_Agent_getEndpoint (struct iotmiDev_Agent *agent, uint16_t id) |
| Get an endpoint within an agent. | |
| uint16_t | iotmiDev_Endpoint_getId (const struct iotmiDev_Endpoint *endpoint) |
| Get the endpoint ID of an endpoint. | |
| const char * | iotmiDev_Endpoint_getName (const struct iotmiDev_Endpoint *endpoint) |
| Get the endpoint Name of an endpoint. | |
| struct iotmiDev_Agent * | iotmiDev_Endpoint_getAgent (const struct iotmiDev_Endpoint *endpoint) |
| Get the agent which contains the given endpoint. | |
| iotmiDev_DMStatus | iotmiDev_Endpoint_registerClusterInfo (struct iotmiDev_Endpoint *endpoint, const struct iotmiDev_Agent_ClusterInfo *info) |
| This API registers the necessary information for a cluster. | |
| void | iotmiDev_Agent_initDefaultConfig (struct iotmiDev_Agent_Config *config) |
| This API initializes a default agent config. | |
This file defines the API for common agent operations that are specific to clusters.
| #define EVENT_NOT_SUPPORTED 0x01 |
Bit mask indicating which events are not supported in allEventFlags.
This variable holds the event support status where each bit represents an event. If a bit is set (1), the corresponding event is NOT supported. If a bit is clear (0), the corresponding event is supported.
Bit positions:
| struct iotmiDev_Endpoint * iotmiDev_Agent_addEndpoint | ( | struct iotmiDev_Agent * | agent, |
| uint16_t | id, | ||
| const char * | name, | ||
| const char * | deviceTypes[], | ||
| size_t | deviceTypesLen | ||
| ) |
Add an endpoint with an empty set of capabilities.
| [in] | agent | Pointer to the device agent. |
| [in] | id | The endpoint ID. |
| [in] | name | The endpoint name. |
| [in] | deviceTypes | An array of device type names. Note the names should conform to device types defined in the AWS data model. |
| [in] | deviceTypesLen | The length of deviceTypes array. |
| void iotmiDev_Agent_free | ( | struct iotmiDev_Agent * | agent | ) |
Destroy the agent and free all occupied resources.
| [in] | agent | Pointer to the device agent to be destroyed. |
| struct iotmiDev_Endpoint * iotmiDev_Agent_getEndpoint | ( | struct iotmiDev_Agent * | agent, |
| uint16_t | id | ||
| ) |
Get an endpoint within an agent.
| [in] | agent | Pointer to the device agent. |
| [in] | id | The endpoint ID. |
| void iotmiDev_Agent_initDefaultConfig | ( | struct iotmiDev_Agent_Config * | config | ) |
This API initializes a default agent config.
This function fills the config with default reasonable values. We suggest to use the function to get the default values and then tweak values if necessary.
| [in] | config | Pointer to the config |
| struct iotmiDev_Agent * iotmiDev_Agent_new | ( | const struct iotmiDev_Agent_Config * | config | ) |
Create a device agent.
| [in] | config | Pointer to the configuration for the new agent. |
| struct iotmiDev_Agent * iotmiDev_Endpoint_getAgent | ( | const struct iotmiDev_Endpoint * | endpoint | ) |
Get the agent which contains the given endpoint.
| [in] | endpoint | Pointer to the endpoint. |
| uint16_t iotmiDev_Endpoint_getId | ( | const struct iotmiDev_Endpoint * | endpoint | ) |
Get the endpoint ID of an endpoint.
| [in] | endpoint | Pointer to the endpoint. |
| const char * iotmiDev_Endpoint_getName | ( | const struct iotmiDev_Endpoint * | endpoint | ) |
Get the endpoint Name of an endpoint.
| [in] | endpoint | Pointer to the endpoint. |
| iotmiDev_DMStatus iotmiDev_Endpoint_registerClusterInfo | ( | struct iotmiDev_Endpoint * | endpoint, |
| const struct iotmiDev_Agent_ClusterInfo * | info | ||
| ) |
This API registers the necessary information for a cluster.
This registers the necessary cluster informat needed by the data model handler. It is supported to be called within the cluster register function provided in cluster-specific sources.
| [in] | endpoint | Pointer to the endpoint. |
| [in] | info | The information for the cluster. |