public interface Event extends MetaWearController.ModuleController
Modifier and Type | Interface and Description |
---|---|
static class |
Event.Callbacks
Callbacks for the event module
|
static interface |
Event.Command
Wrapper class encapsulating command information
|
static class |
Event.Register |
Modifier and Type | Method and Description |
---|---|
void |
commandIdToObject(byte commandId)
Read the attributes of a command id.
|
void |
disableModule()
Disable the event module
|
void |
enableModule()
Enable the event module
|
void |
readCommandBytes(byte commandId)
Read the bytes representing the command to be executed.
|
void |
recordCommand(Register srcReg,
byte index,
byte[] extra)
Experimental function for the Event module that can use variables in place of hardcoded
values for a recorded command.
|
void |
recordMacro(Register srcReg)
Record a sequence of commands, to be executed when there is activity
the given register.
|
void |
recordMacro(Register srcReg,
byte index)
Record a sequence of commands to be executed when a notification is sent for
the particular register and index.
|
void |
removeCommand(byte commandId)
Remove the command from the event handler
|
void |
removeMacros()
Remove all recorded macros
|
byte |
stopRecord()
Stop the macro recording
|
void enableModule()
void disableModule()
void commandIdToObject(byte commandId)
Event.Callbacks.receivedCommandInfo(Event.Command)
callback function will be calledcommandId
- ID of the command to lookupvoid readCommandBytes(byte commandId)
Event.Callbacks.receivedCommandBytes(byte[])
callback
function will be calledcommandId
- ID of the command to lookupvoid recordMacro(Register srcReg)
Event.Callbacks.receivedCommandId(byte)
function.
This version of the function is for registers that do not require an
additional index (i.e. GPIO pin, NeoPixel strand, filter id)srcReg
- Register to trigger the eventvoid recordMacro(Register srcReg, byte index)
Event.Callbacks.receivedCommandId(byte)
functionsrcReg
- Register to trigger the eventindex
- Register index to trigger the eventvoid recordCommand(Register srcReg, byte index, byte[] extra)
srcReg
- Register to trigger the eventindex
- Register index to trigger the eventextra
- Extra data to define the variable parametersbyte stopRecord()
void removeMacros()
void removeCommand(byte commandId)
commandId
- Id of the command to remove