Modules#

EmberAfEvent

Events Server

Events Server#

API and Callbacks for the Events Server Cluster Component.

API#

bool
emberAfEventsServerClearEventLog(uint8_t endpoint, EmberAfEventLogId logId)

Clear all events in the specified event log.

void
emberAfEventsServerPrintEventLog(uint8_t endpoint, EmberAfEventLogId logId)

Print all events in the specified event log.

void
emberAfEventsServerPrintEvent(const EmberAfEvent *event)

Print an event.

bool
emberAfEventsServerGetEvent(uint8_t endpoint, EmberAfEventLogId logId, uint8_t index, EmberAfEvent *event)

Get an event from the specified event log.

bool
emberAfEventsServerSetEvent(uint8_t endpoint, EmberAfEventLogId logId, uint8_t index, const EmberAfEvent *event)

Store an event in the specified event log.

uint8_t
emberAfEventsServerAddEvent(uint8_t endpoint, EmberAfEventLogId logId, const EmberAfEvent *event)

Add an event to the specified event log.

void
emberAfEventsServerPublishEventMessage(EmberNodeId nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint, EmberAfEventLogId logId, uint8_t index, uint8_t eventControl)

Publish an event.

Macros#

API Documentation#

emberAfEventsServerClearEventLog#

bool emberAfEventsServerClearEventLog (uint8_t endpoint, EmberAfEventLogId logId)

Clear all events in the specified event log.

Parameters
N/Aendpoint

The endpoint for which the event log will be cleared.

N/AlogId

The log to be cleared.

Returns

  • True if the log was successfully cleared or false if logId is invalid.


Definition at line 82 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.

Parameters
N/Aendpoint

The endpoint for which the event log will be printed.

N/AlogId

The log to be printed.


Definition at line 91 of file app/framework/plugin/events-server/events-server.h

emberAfEventsServerPrintEvent#

void emberAfEventsServerPrintEvent (const EmberAfEvent * event)

Print an event.

Parameters
N/Aevent

The event to print.


Definition at line 99 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.

Parameters
N/Aendpoint

The relevant endpoint.

N/AlogId

The relevant log.

N/Aindex

The index in the event log.

N/Aevent

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.


Definition at line 113 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.

Parameters
N/Aendpoint

The relevant endpoint.

N/AlogId

The relevant log.

N/Aindex

The index in the event log.

N/Aevent

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.


Definition at line 131 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.

Parameters
N/Aendpoint

The relevant endpoint.

N/AlogId

The relevant log.

N/Aevent

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.


Definition at line 149 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.

Parameters
N/AnodeId

The destination nodeId.

N/AsrcEndpoint

The source endpoint.

N/AdstEndpoint

The destination endpoint.

N/AlogId

The relevant log.

N/Aindex

The index in the event log.

N/AeventControl

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.


Definition at line 168 of file app/framework/plugin/events-server/events-server.h

Macro Definition Documentation#

ZCL_EVENTS_INVALID_INDEX#

#define ZCL_EVENTS_INVALID_INDEX
Value:
0xFF

Definition at line 52 of file app/framework/plugin/events-server/events-server.h