Events Server#
API and Callbacks for the Events Server Cluster Component.
Modules#
API#
Clear all events in the specified event log.
Print all events in the specified event log.
Print an event.
Get an event from the specified event log.
Store an event in the specified event log.
Add an event to the specified event log.
Publish an event.
Macros#
API Documentation#
sl_zigbee_af_events_server_clear_event_log#
bool sl_zigbee_af_events_server_clear_event_log (uint8_t endpoint, sl_zigbee_af_event_log_id_t logId)
Clear all events in the specified event log.
N/A | endpoint | The endpoint for which the event log will be cleared. |
N/A | logId | The log to be cleared. |
Returns
True if the log was successfully cleared or false if logId is invalid.
75
of file app/framework/plugin/events-server/events-server.h
sl_zigbee_af_events_server_print_event_log#
void sl_zigbee_af_events_server_print_event_log (uint8_t endpoint, sl_zigbee_af_event_log_id_t logId)
Print all events in the specified event log.
N/A | endpoint | The endpoint for which the event log will be printed. |
N/A | logId | The log to be printed. |
84
of file app/framework/plugin/events-server/events-server.h
sl_zigbee_af_events_server_print_event#
void sl_zigbee_af_events_server_print_event (const sl_zigbee_af_zcl_event_t * event)
Print an event.
N/A | event | The event to print. |
92
of file app/framework/plugin/events-server/events-server.h
sl_zigbee_af_events_server_get_event#
bool sl_zigbee_af_events_server_get_event (uint8_t endpoint, sl_zigbee_af_event_log_id_t logId, uint8_t index, sl_zigbee_af_zcl_event_t * event)
Get an event from the specified event log.
N/A | endpoint | The relevant endpoint. |
N/A | logId | The relevant log. |
N/A | index | The index in the event log. |
N/A | event | The sl_zigbee_af_zcl_event_t structure describing the event. |
This function can be used to get an event at a specific location in the specified log.
Returns
True if the event was found or false if the index is invalid.
106
of file app/framework/plugin/events-server/events-server.h
sl_zigbee_af_events_server_set_event#
bool sl_zigbee_af_events_server_set_event (uint8_t endpoint, sl_zigbee_af_event_log_id_t logId, uint8_t index, const sl_zigbee_af_zcl_event_t * event)
Store an event in the specified event log.
N/A | endpoint | The relevant endpoint. |
N/A | logId | The relevant log. |
N/A | index | The index in the event log. |
N/A | event | The sl_zigbee_af_zcl_event_t structure describing the event. If NULL, the event is removed from the server. |
This function is used to set an event at a specific location in the specified log.
Returns
True if the event was set or removed or false if the index is invalid.
124
of file app/framework/plugin/events-server/events-server.h
sl_zigbee_af_events_server_add_event#
uint8_t sl_zigbee_af_events_server_add_event (uint8_t endpoint, sl_zigbee_af_event_log_id_t logId, const sl_zigbee_af_zcl_event_t * event)
Add an event to the specified event log.
N/A | endpoint | The relevant endpoint. |
N/A | logId | The relevant log. |
N/A | event | The sl_zigbee_af_zcl_event_t structure describing the event. |
This function is used to add an event at the next available location in the specified log. After the event log is full, new events will start overwriting old events at the beginning of the table.
Returns
the index of the location in the log where the event was added or ZCL_EVENTS_INVALID_INDEX if the specified event log is full.
142
of file app/framework/plugin/events-server/events-server.h
sl_zigbee_af_events_server_publish_event_message#
void sl_zigbee_af_events_server_publish_event_message (sl_802154_short_addr_t nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, sl_zigbee_af_event_log_id_t logId, uint8_t index, uint8_t eventControl)
Publish an event.
N/A | nodeId | The destination nodeId. |
N/A | srcEndpoint | The source endpoint. |
N/A | dstEndpoint | The destination endpoint. |
N/A | logId | The relevant log. |
N/A | index | The index in the event log. |
N/A | eventControl | Actions to be taken regarding this event. For example, Report event to HAN and/or Report event to WAN. |
This function will locate the event in the specified log at the specified location and using the information from the event build and send a PublishEvent command.
161
of file app/framework/plugin/events-server/events-server.h