Modules#
Events Server#
API and Callbacks for the Events Server Cluster Component.
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#
emberAfEventsServerClearEventLog#
bool emberAfEventsServerClearEventLog (uint8_t endpoint, EmberAfEventLogId 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
emberAfEventsServerPrintEventLog#
void emberAfEventsServerPrintEventLog (uint8_t endpoint, EmberAfEventLogId 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
emberAfEventsServerPrintEvent#
void emberAfEventsServerPrintEvent (const EmberAfEvent * event)
Print an event.
N/A | event | The event to print. |
92
of file app/framework/plugin/events-server/events-server.h
emberAfEventsServerGetEvent#
bool emberAfEventsServerGetEvent (uint8_t endpoint, EmberAfEventLogId logId, uint8_t index, EmberAfEvent * 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 EmberAfEvent 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
emberAfEventsServerSetEvent#
bool emberAfEventsServerSetEvent (uint8_t endpoint, EmberAfEventLogId logId, uint8_t index, const EmberAfEvent * 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 EmberAfEvent 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
emberAfEventsServerAddEvent#
uint8_t emberAfEventsServerAddEvent (uint8_t endpoint, EmberAfEventLogId logId, const EmberAfEvent * 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 EmberAfEvent 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
emberAfEventsServerPublishEventMessage#
void emberAfEventsServerPublishEventMessage (EmberNodeId nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, EmberAfEventLogId 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