Modules#
Device Table#
API and Callbacks for the Device Table Component.
Simple C-based rules engine for demonstrating automatic control through a gateway.
API#
Send a message using the device table.
Send a message using the device table.
Send a CLI command based on an index and an endpoint.
Send an internally-generated command.
Send an internally-generated command.
Send an internally-generated command.
Compute the EUI64 from the node ID in the device table.
Compute the node ID from the device table index.
Find the endpoint index from node ID and endpoint number.
Find the index based on the node ID.
Find the index based on the EUI64.
Find the index based on the EUI64 and endpoint.
Find the node ID based on the EUI64.
Change the device status based on the last sent message.
Send a leave message to a device based on the index.
Inform the device table that a message was received.
Kick off device table route repair.
Return a pointer to the device table structure.
Return a pointer to the device table entry.
Inform the device table that a new device joined.
Calculate time since the device heard the last message.
Return true if the two EUI64 parameters match.
Clear the device table.
Called when a device has been removed from the device table.
Called when the device table has been initialized.
Enumerations#
Typedefs#
Macros#
API Documentation#
emberAfDeviceTableCliIndexSend#
void emberAfDeviceTableCliIndexSend (uint16_t index)
Send a message using the device table.
N/A | index | The index of the device to which to send the CLI command. |
Sends the current framework ZCL command to the device specified by an index.
79
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableSend#
void emberAfDeviceTableSend (EmberEUI64 eui64, uint8_t endpoint)
Send a message using the device table.
N/A | eui64 | EUI64 to which to send the CLI command. |
N/A | endpoint | Endpoint of the device to which to send the CLI command. |
Sends the current framework ZCL command using a device specified by the EUI64 and endpoint.
89
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableCliIndexSendWithEndpoint#
void emberAfDeviceTableCliIndexSendWithEndpoint (uint16_t index, uint8_t endpoint)
Send a CLI command based on an index and an endpoint.
N/A | index | The index of the device to which to send the command. |
N/A | endpoint | The endpoint of the device to which to send the command. |
Sends the current framework ZCL command using a device indexed in the device table.
99
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableCommandIndexSend#
void emberAfDeviceTableCommandIndexSend (uint16_t index)
Send an internally-generated command.
N/A | index | index of the device to which to send the command. |
Sends an internally-generated command, such as generated by the emberAfFillCommandOnOffClusterOn(); command. Note: this is different from the above send command, which works with the CLI-generated outgoing commands.
111
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableCommandSendWithEndpoint#
void emberAfDeviceTableCommandSendWithEndpoint (EmberEUI64 eui64, uint8_t endpoint)
Send an internally-generated command.
N/A | eui64 | EUI64 of the device to which to send the command. |
N/A | endpoint | The endpoint of the device to which to send the command. |
Sends an internally-generated command, such as generated by the emberAfFillCommandOnOffClusterOn(); command. Note: this is different from the above send command, which works with the CLI-generated outgoing commands.
123
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableCommandIndexSendWithEndpoint#
void emberAfDeviceTableCommandIndexSendWithEndpoint (uint16_t index, uint8_t endpoint)
Send an internally-generated command.
N/A | index | The index of the device to which to send the command. |
N/A | endpoint | The endpoint of the device to which to send the command. |
Sends an internally-generated command, such as generated by the emberAfFillCommandOnOffClusterOn(); command. Note: this is different from the above send command, which works with the CLI-generated outgoing commands.
136
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableGetEui64FromNodeId#
bool emberAfDeviceTableGetEui64FromNodeId (EmberNodeId emberNodeId, EmberEUI64 eui64)
Compute the EUI64 from the node ID in the device table.
N/A | emberNodeId | The node ID of the device. |
N/A | eui64 | The location of the EUI64 variable. |
This function looks up the device-table entry using the node ID and return the EUI64.
Returns
bool True if an EUI can be found, false if not.
149
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableGetNodeIdFromIndex#
uint16_t emberAfDeviceTableGetNodeIdFromIndex (uint16_t index)
Compute the node ID from the device table index.
N/A | index | The index of the device. |
Looks up the device table entry based on the index and returns the node ID.
Returns
The node ID of the device.
161
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableGetEndpointFromNodeIdAndEndpoint#
uint16_t emberAfDeviceTableGetEndpointFromNodeIdAndEndpoint (EmberNodeId emberNodeId, uint8_t endpoint)
Find the endpoint index from node ID and endpoint number.
N/A | emberNodeId | The node ID of the device. |
N/A | endpoint | The desired endpoint. |
Computes the index into the endpoint table based on the node ID and the endpoint number.
Returns
The index of the device.
173
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableGetIndexFromNodeId#
uint16_t emberAfDeviceTableGetIndexFromNodeId (EmberNodeId emberNodeId)
Find the index based on the node ID.
N/A | emberNodeId | The node ID of the current device. |
Computes the device-table index based on the node ID.
Returns
The index in the device-table.
184
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableGetFirstIndexFromEui64#
uint16_t emberAfDeviceTableGetFirstIndexFromEui64 (EmberEUI64 eui64)
Find the index based on the EUI64.
N/A | eui64 | EUI64 of the desired node ID. |
Computes the first device table index from the EUI64.
Returns
The first index that matches the EUI64.
194
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableGetIndexFromEui64AndEndpoint#
uint16_t emberAfDeviceTableGetIndexFromEui64AndEndpoint (EmberEUI64 eui64, uint8_t endpoint)
Find the index based on the EUI64 and endpoint.
N/A | eui64 | EUI64 of the desired index. |
N/A | endpoint | The endpoint for the desired index. |
Computes the node ID based on the device table entry that matches the EUI64.
Returns
Index that matches the EUI64
205
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableGetNodeIdFromEui64#
uint16_t emberAfDeviceTableGetNodeIdFromEui64 (EmberEUI64 eui64)
Find the node ID based on the EUI64.
N/A | eui64 | EUI64 of the desired node ID. |
Computes the node ID based on the device table entry that matches the EUI64.
Returns
The node ID that matches the EUI64.
216
of file app/framework/plugin/device-table/device-table.h
emberAfPluginDeviceTableMessageSentStatus#
void emberAfPluginDeviceTableMessageSentStatus (EmberNodeId nodeId, EmberStatus status, uint16_t profileId, uint16_t clusterId)
Change the device status based on the last sent message.
N/A | nodeId | The node ID in the last outgoing message. |
N/A | status | EmberStatus of the last outgoing message. |
N/A | profileId | The profile ID of the last outgoing message. |
N/A | clusterId | The cluster ID of the last outgoing message. |
If the last sent message was a success, change the device state to "joined". However, if the last message sent was not a success, change the device state to unresponsive.
229
of file app/framework/plugin/device-table/device-table.h
emberAfPluginDeviceTableSendLeave#
void emberAfPluginDeviceTableSendLeave (uint16_t index)
Send a leave message to a device based on the index.
N/A | index | The index of the device to whom to send the leave message. |
Sends a leave message to the device indicated by the index.
240
of file app/framework/plugin/device-table/device-table.h
emberAfPluginDeviceTableMessageReceived#
void emberAfPluginDeviceTableMessageReceived (EmberNodeId nodeId)
Inform the device table that a message was received.
N/A | nodeId | The node ID from which the last incoming message came. |
The device table keeps track of whether a device has become unresponsive. Hearing from a known device causes the device table to transition the device state from "unresponsive" to "joined". Hearing from an unknown device causes the device table to discover the device, potentially fixing routing issues (i.e., if the node ID has changed).
252
of file app/framework/plugin/device-table/device-table.h
emberAfPluginDeviceTableInitiateRouteRepair#
void emberAfPluginDeviceTableInitiateRouteRepair (EmberNodeId nodeId)
Kick off device table route repair.
N/A | nodeId | The node ID of the newly unresponsive node. |
A message was sent to the device and failed. Therefore, the route repair will be attempted and the node marked as unresponsive. Currently, route repair simply sends a broadcast message looking for the node ID based on the EUI64. It may be replaced with something more sophisticated in the future.
264
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTablePointer#
EmberAfPluginDeviceTableEntry * emberAfDeviceTablePointer (void )
Return a pointer to the device table structure.
N/A |
Returns a pointer to the device table structure.
Returns
A pointer to the device table structure.
272
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableFindDeviceTableEntry#
EmberAfPluginDeviceTableEntry * emberAfDeviceTableFindDeviceTableEntry (uint16_t index)
Return a pointer to the device table entry.
N/A | index | The index of the device table entry in which we are interested. |
Returns a pointer to the device table entry based on the device table index.
Returns
A pointer to the device table entry.
282
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableNewDeviceJoinHandler#
void emberAfDeviceTableNewDeviceJoinHandler (EmberNodeId newNodeId, EmberEUI64 newNodeEui64)
Inform the device table that a new device joined.
N/A | newNodeId | The node ID of the newly joined device. |
N/A | newNodeEui64 | The EUI64 of the newly joined device. |
Call this function in the device table when a device joins, rejoins, or sends an end-device announce. If the device is new, it will generate a new device table entry and kick off the discovery process. If the device is not new, the device-table will make sure the node ID matches the EUI64 and make an update if necessary. It will also check to verify the discovery process has completed and attempt to complete it.
298
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableTimeSinceLastMessage#
uint32_t emberAfDeviceTableTimeSinceLastMessage (uint16_t index)
Calculate time since the device heard the last message.
N/A | index | The index of the device. |
Computes the amount of time, in seconds, since receiving a message from the device.
Returns
The time since the last message (in seconds).
310
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableMatchEui64#
bool emberAfDeviceTableMatchEui64 (EmberEUI64 a, EmberEUI64 b)
Return true if the two EUI64 parameters match.
N/A | a | The first EUI64 to compare. |
N/A | b | The second EUI64 to compare. |
Determines whether two EUI64 values are the same. The function will print a feedback message to indicate if both EUI64 values are NULL. The function will also print out a feedback message to indicate if the EUI64 values match but in reverse order.
322
of file app/framework/plugin/device-table/device-table.h
emberAfDeviceTableClear#
void emberAfDeviceTableClear (void )
Clear the device table.
N/A |
Clears the device table and the backup file of the device table is also cleared if it is a host.
330
of file app/framework/plugin/device-table/device-table.h
emberAfPluginDeviceTableIndexRemovedCallback#
void emberAfPluginDeviceTableIndexRemovedCallback (uint16_t currentIndex)
Called when a device has been removed from the device table.
N/A | currentIndex | Index of the removed device. |
Called when the device has been removed from the table.
338
of file app/framework/plugin/device-table/device-table.h
emberAfPluginDeviceTableInitialized#
void emberAfPluginDeviceTableInitialized (void )
Called when the device table has been initialized.
N/A |
Called when the device table has been initialized
345
of file app/framework/plugin/device-table/device-table.h
Enumeration Documentation#
EmberAfPluginDeviceTableDeviceState#
EmberAfPluginDeviceTableDeviceState
Enumerator | |
---|---|
EMBER_AF_PLUGIN_DEVICE_TABLE_STATE_NULL | |
EMBER_AF_PLUGIN_DEVICE_TABLE_STATE_JOINED | |
EMBER_AF_PLUGIN_DEVICE_TABLE_STATE_UNRESPONSIVE | |
EMBER_AF_PLUGIN_DEVICE_TABLE_STATE_LEAVE_SENT | |
EMBER_AF_PLUGIN_DEVICE_TABLE_STATE_LEFT | |
EMBER_AF_PLUGIN_DEVICE_TABLE_STATE_UNKNOWN |
37
of file app/framework/plugin/device-table/device-table.h
Typedef Documentation#
EmberAfPluginDeviceTableDeviceState#
typedef uint8_t EmberAfPluginDeviceTableDeviceState
35
of file app/framework/plugin/device-table/device-table.h
Macro Definition Documentation#
EMBER_AF_PLUGIN_DEVICE_TABLE_CLUSTER_SIZE#
#define EMBER_AF_PLUGIN_DEVICE_TABLE_CLUSTER_SIZEValue:
20
50
of file app/framework/plugin/device-table/device-table.h
EMBER_AF_PLUGIN_DEVICE_TABLE_DEVICE_TABLE_SIZE#
#define EMBER_AF_PLUGIN_DEVICE_TABLE_DEVICE_TABLE_SIZEValue:
250
63
of file app/framework/plugin/device-table/device-table.h
EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_NODE_ID#
#define EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_NODE_IDValue:
0xffff
64
of file app/framework/plugin/device-table/device-table.h
EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_INDEX#
#define EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_INDEXValue:
0xffff
65
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_ON_OFF_SWITCH#
#define DEVICE_ID_ON_OFF_SWITCHValue:
0x0000
350
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_LEVEL_CONTROL_SWITCH#
#define DEVICE_ID_LEVEL_CONTROL_SWITCHValue:
0x0001
351
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_ON_OFF_OUTPUT#
#define DEVICE_ID_ON_OFF_OUTPUTValue:
0x0002
352
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_LEVEL_CONTROL_OUTPUT#
#define DEVICE_ID_LEVEL_CONTROL_OUTPUTValue:
0x0003
353
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_SCENE_SELECTOR#
#define DEVICE_ID_SCENE_SELECTORValue:
0x0004
354
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_CONFIG_TOOL#
#define DEVICE_ID_CONFIG_TOOLValue:
0x0005
355
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_REMOTE_CONTROL#
#define DEVICE_ID_REMOTE_CONTROLValue:
0x0006
356
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_COMBINED_INTERFACE#
#define DEVICE_ID_COMBINED_INTERFACEValue:
0x0007
357
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_RANGE_EXTENDER#
#define DEVICE_ID_RANGE_EXTENDERValue:
0x0008
358
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_MAINS_POWER_OUTLET#
#define DEVICE_ID_MAINS_POWER_OUTLETValue:
0x0009
359
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_DOOR_LOCK#
#define DEVICE_ID_DOOR_LOCKValue:
0x000a
360
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_DOOR_LOCK_CONTROLLER#
#define DEVICE_ID_DOOR_LOCK_CONTROLLERValue:
0x000b
361
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_SIMPLE_SENSOR#
#define DEVICE_ID_SIMPLE_SENSORValue:
0x000c
362
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_CONSUMPTION_AWARENESS_DEVICE#
#define DEVICE_ID_CONSUMPTION_AWARENESS_DEVICEValue:
0x000d
363
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_HOME_GATEWAY#
#define DEVICE_ID_HOME_GATEWAYValue:
0x0050
364
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_SMART_PLUG#
#define DEVICE_ID_SMART_PLUGValue:
0x0051
365
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_WHITE_GOODS#
#define DEVICE_ID_WHITE_GOODSValue:
0x0052
366
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_METER_INTERFACE#
#define DEVICE_ID_METER_INTERFACEValue:
0x0053
367
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_ON_OFF_LIGHT#
#define DEVICE_ID_ON_OFF_LIGHTValue:
0x0100
369
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_DIMMABLE_LIGHT#
#define DEVICE_ID_DIMMABLE_LIGHTValue:
0x0101
370
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_COLOR_DIMMABLE_LIGHT#
#define DEVICE_ID_COLOR_DIMMABLE_LIGHTValue:
0x0102
371
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_ON_OFF_LIGHT_SWITCH#
#define DEVICE_ID_ON_OFF_LIGHT_SWITCHValue:
0x0103
372
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_DIMMER_SWITCH#
#define DEVICE_ID_DIMMER_SWITCHValue:
0x0104
373
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_COLOR_DIMMER_SWITCH#
#define DEVICE_ID_COLOR_DIMMER_SWITCHValue:
0x0105
374
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_LIGHT_SENSOR#
#define DEVICE_ID_LIGHT_SENSORValue:
0x0106
375
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_OCCUPANCY_SENSOR#
#define DEVICE_ID_OCCUPANCY_SENSORValue:
0x0107
376
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_SHADE#
#define DEVICE_ID_SHADEValue:
0x0200
378
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_SHADE_CONTROLLER#
#define DEVICE_ID_SHADE_CONTROLLERValue:
0x0201
379
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_WINDOW_COVERING_DEVICE#
#define DEVICE_ID_WINDOW_COVERING_DEVICEValue:
0x0202
380
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_WINDOW_COVERING_CONTROLLER#
#define DEVICE_ID_WINDOW_COVERING_CONTROLLERValue:
0x0203
381
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_HEATING_COOLING_UNIT#
#define DEVICE_ID_HEATING_COOLING_UNITValue:
0x0300
383
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_THERMOSTAT#
#define DEVICE_ID_THERMOSTATValue:
0x0301
384
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_TEMPERATURE_SENSOR#
#define DEVICE_ID_TEMPERATURE_SENSORValue:
0x0302
385
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_PUMP#
#define DEVICE_ID_PUMPValue:
0x0303
386
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_PUMP_CONTROLLER#
#define DEVICE_ID_PUMP_CONTROLLERValue:
0x0304
387
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_PRESSURE_SENSOR#
#define DEVICE_ID_PRESSURE_SENSORValue:
0x0305
388
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_FLOW_SENSOR#
#define DEVICE_ID_FLOW_SENSORValue:
0x0306
389
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_MINI_SPLIT_AC#
#define DEVICE_ID_MINI_SPLIT_ACValue:
0x0307
390
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_IAS_CIE#
#define DEVICE_ID_IAS_CIEValue:
0x0400
392
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_IAS_ANCILLARY_CONTROL#
#define DEVICE_ID_IAS_ANCILLARY_CONTROLValue:
0x0401
393
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_IAS_ZONE#
#define DEVICE_ID_IAS_ZONEValue:
0x0402
394
of file app/framework/plugin/device-table/device-table.h
DEVICE_ID_IAS_WARNING#
#define DEVICE_ID_IAS_WARNINGValue:
0x0403
395
of file app/framework/plugin/device-table/device-table.h