21#ifndef IOTMI_DEVICE_AGENT_H_
22#define IOTMI_DEVICE_AGENT_H_
46#define EVENT_NOT_SUPPORTED 0x01
119 size_t allAttrIdsLen;
123 size_t allCommandIdsLen;
127 const uint8_t *allEventFlags;
128 size_t allEventIdsLen;
177 const char *deviceTypes[],
size_t deviceTypesLen);
void iotmiDev_Agent_initDefaultConfig(struct iotmiDev_Agent_Config *config)
This API initializes a default agent config.
Definition iotmi_device_agent.c:126
iotmiDev_DMStatus iotmiDev_Endpoint_registerClusterInfo(struct iotmiDev_Endpoint *endpoint, const struct iotmiDev_Agent_ClusterInfo *info)
This API registers the necessary information for a cluster.
Definition iotmi_device_agent.c:268
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.
Definition iotmi_device_agent.c:230
void iotmiDev_Agent_free(struct iotmiDev_Agent *agent)
Destroy the agent and free all occupied resources.
Definition iotmi_device_agent.c:183
const char * iotmiDev_Endpoint_getName(const struct iotmiDev_Endpoint *endpoint)
Get the endpoint Name of an endpoint.
Definition iotmi_device_agent.c:254
struct iotmiDev_Agent * iotmiDev_Agent_new(const struct iotmiDev_Agent_Config *config)
Create a device agent.
Definition iotmi_device_agent.c:136
struct iotmiDev_Endpoint * iotmiDev_Agent_getEndpoint(struct iotmiDev_Agent *agent, uint16_t id)
Get an endpoint within an agent.
Definition iotmi_device_agent.c:201
struct iotmiDev_Agent * iotmiDev_Endpoint_getAgent(const struct iotmiDev_Endpoint *endpoint)
Get the agent which contains the given endpoint.
Definition iotmi_device_agent.c:261
uint16_t iotmiDev_Endpoint_getId(const struct iotmiDev_Endpoint *endpoint)
Get the endpoint ID of an endpoint.
Definition iotmi_device_agent.c:248
iotmiDev_DMStatus
Return code for data model related API.
Definition iotmi_device_types.h:32
void(* iotmiDev_GetCallback)(void)
Definition iotmi_device_types.h:83
void(* iotmiDev_CommandCallback)(void)
Definition iotmi_device_types.h:87
void(* iotmiDev_SetCallback)(void)
Definition iotmi_device_types.h:85
The struct to hold the information for a cluster.
Definition iotmi_device_agent.h:107
iotmiDev_CommandCallback(* getCommandCallback)(void *clusterSet, uint32_t commandId)
Definition iotmi_device_agent.h:143
const uint32_t * allCommandIds
Definition iotmi_device_agent.h:122
void * clusterSet
Definition iotmi_device_agent.h:112
void * user
Definition iotmi_device_agent.h:115
iotmiDev_SetCallback(* getSetCallback)(void *clusterSet, uint32_t attrId)
Definition iotmi_device_agent.h:138
const uint32_t * allEventIds
Definition iotmi_device_agent.h:126
iotmiDev_GetCallback(* getGetCallback)(void *clusterSet, uint32_t attrId)
Definition iotmi_device_agent.h:133
const uint32_t * allAttrIds
Definition iotmi_device_agent.h:118
The struct to hold the configuration of the agent.
Definition iotmi_device_agent.h:64
uint8_t maxNumberOfEndpoints
How many endpoints could a agent hold?
Definition iotmi_device_agent.h:69
uint8_t maxNumberOfPendingNorthboundRequests
How many pending northbound requests could be there at the same time?
Definition iotmi_device_agent.h:92
uint8_t outgoingQueueSize
How many messages could be held in the outgoing message queue?
Definition iotmi_device_agent.h:80
const char * thingId
Definition iotmi_device_agent.h:95
const char * clientId
Definition iotmi_device_agent.h:98
uint8_t dataModelHandlerRequestQueueSize
How many message could be held in request queue before data model handler handles them.
Definition iotmi_device_agent.h:86
uint8_t maxNumberOfClustersPerEndpoint
How many clusters could an endpoint hold?
Definition iotmi_device_agent.h:75
The opaque type to represent an instance of the device agent.
The opaque type to represent an endpoint.