|
VLCB
|
Service for consuming events. More...
#include <EventConsumerService.h>
Public Member Functions | |
| void | setEventHandler (void(*fptr)(byte index, const VlcbMessage *msg)) |
| register the user handler for learned events | |
| virtual void | processAction (const Action &action) override |
| Called when there is an action available. | |
| virtual VlcbServiceTypes | getServiceID () const override |
| Return a unique ID for this service. | |
| virtual byte | getServiceVersionID () const override |
| Return the version of the service specification implemented by this service. | |
| Public Member Functions inherited from VLCB::Service | |
| void | setController (Controller *ctrl) |
| Set a pointer to the controller object for use in implementing class. | |
| virtual void | begin () |
| This optional method is called at the beginning of the Arduino sketch. Define this method for the service to do any setup required at the beginning. | |
| virtual void | process () |
| This method that be called regularly from the VLCB core to let the service perform regular tasks. | |
| virtual void | reportDiagnostics (byte serviceIndex, byte diagnosticsCode) |
| Report a given diagnostic value. | |
| virtual int | getDiagnosticCount () |
| report how many diagnostics this service supports. | |
| virtual Data | getServiceData () |
| Return Data bytes specific for the implementing service. The meaning of each data byte is defined in the service specification. | |
Protected Attributes | |
| unsigned int | diagEventsConsumed = 0 |
| unsigned int | diagEventsAcknowledged = 0 |
| Protected Attributes inherited from VLCB::Service | |
| Controller * | controller |
| Pointer to the Controller object that can be used by implementing classes. | |
Additional Inherited Members | |
| Protected Member Functions inherited from VLCB::Service | |
| bool | isThisNodeNumber (unsigned int nodeNumber) |
| Helper function to decide if a given node number is the same as that assigned to this node. | |
Service for consuming events.
This service provides a means of filtering received VLCB events and passing them to an event handler. A full description of events can be found in the document VLCB Event Model. The events that a module can handle are held in the Events Table. Specific events are identified by their table index number.
| void VLCB::EventConsumerService::setEventHandler | ( | void(* | fptr )(byte index, const VlcbMessage *msg) | ) |
register the user handler for learned events
Sets the callback function that is called when an event opcode that matches an Event Table entry is received.
|
overridevirtual |
Called when there is an action available.
This method does not need to be implemented if the service does react to any actions.
| action | The action that the service may have interest in. |
Reimplemented from VLCB::Service.
|
inlineoverridevirtual |
Return a unique ID for this service.
This ID is used by configuration utilities to identify the service type. The service IDs are listed in the VLCB service specifications.
Implements VLCB::Service.
|
inlineoverridevirtual |
Return the version of the service specification implemented by this service.
This version is used by configuration utilities to identify which features are implemented by this service.
Implements VLCB::Service.
|
protected |
|
protected |