public interface Timer extends MetaWearController.ModuleController
Modifier and Type | Interface and Description |
---|---|
static class |
Timer.Callbacks
Callbacks for the Timer module
|
static class |
Timer.Register
Registers under the Timer module
|
Modifier and Type | Method and Description |
---|---|
void |
addTimer(int period,
short repeat,
boolean delay)
Add an onboard timer
|
void |
disableNotification(byte timerId)
Disables calls to the
Timer.Callbacks.receivedNotification(byte) callback function |
void |
enableNotification(byte timerId)
Enables ble notifications for a timer.
|
void |
removeTimer(byte timerId)
Remove a timer from the board
|
void |
startTimer(byte timerId)
Start timer notifications
|
void |
stopTimer(byte timerId)
Stop timer notifications
|
void addTimer(int period, short repeat, boolean delay)
period
- How often the timer should send a notification, in msrepeat
- How many times to repeat the notificationdelay
- True if the first notification should be delayed for one
period worth of timevoid startTimer(byte timerId)
timerId
- Timer ID to startvoid stopTimer(byte timerId)
timerId
- Timer ID to stopvoid removeTimer(byte timerId)
timerId
- Timer ID to removevoid enableNotification(byte timerId)
Timer.Callbacks.receivedNotification(byte)
callback function.timerId
- Timer ID to receive notifications fromvoid disableNotification(byte timerId)
Timer.Callbacks.receivedNotification(byte)
callback functiontimerId
- Timer ID to disable notifications from