dioscuri.module
Class ModuleClock
java.lang.Object
dioscuri.module.AbstractModule
dioscuri.module.ModuleClock
- All Implemented Interfaces:
- Module
- Direct Known Subclasses:
- Clock
public abstract class ModuleClock
- extends AbstractModule
Abstract class representing a clock module.
Nested classes/interfaces inherited from interface dioscuri.interfaces.Module |
Module.Type |
Method Summary |
abstract void |
pulse()
Triggers device's update if timer goes off |
abstract boolean |
registerDevice(Updateable device,
int intervalLength,
boolean continuousOneShot)
Register a device to clock and assign a timer to it |
abstract boolean |
resetTimer(Updateable device,
int intervalLength)
Reset the timer of given device (if any) |
abstract boolean |
setTimerActiveState(Updateable device,
boolean runState)
Set a timer to start/stop running |
Methods inherited from class dioscuri.module.AbstractModule |
getConnection, getConnections, getDebugMode, getDump, getExpectedConnections, getType, isConnected, reset, setConnection, setDebugMode, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModuleClock
public ModuleClock()
registerDevice
public abstract boolean registerDevice(Updateable device,
int intervalLength,
boolean continuousOneShot)
- Register a device to clock and assign a timer to it
- Parameters:
device
- intervalLength
- continuousOneShot
-
- Returns:
- boolean true if timer assigned successfully, false otherwise
resetTimer
public abstract boolean resetTimer(Updateable device,
int intervalLength)
- Reset the timer of given device (if any)
- Parameters:
device
- intervalLength
-
- Returns:
- boolean true if timer is reset successfully, false otherwise
setTimerActiveState
public abstract boolean setTimerActiveState(Updateable device,
boolean runState)
- Set a timer to start/stop running
- Parameters:
device
- runState
-
- Returns:
- boolean true if timer is reset successfully, false otherwise
pulse
public abstract void pulse()
- Triggers device's update if timer goes off