|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdioscuri.module.AbstractModule
dioscuri.module.ModuleClock
dioscuri.module.clock.Clock
public class Clock
AbstractModule Clock This module implements a pulsing clock mechanism. Based on a user-defined sleepTime the clock sends a pulse to the PIT-counters after sleeping.
Note: - This clock imitates the crystal clock (crystal timer in hardware) - The (maximum) operating frequency of this clock should be 1193181 Hz (0.00083809581 ms/cycle). - This implementation can distinguish between real-time pulsing by host machine or CPU-pulsed by target machine. - The actual frequency in real-time pulsing is 1 pulse each millisecond - The actual frequency in CPU-triggered pulsing is 1 pulse each microsecond - By default the clock is CPU-triggered - Only 10 clock users can be registered at max
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface dioscuri.interfaces.Module |
|---|
Module.Type |
| Field Summary | |
|---|---|
static int |
TIMER_ARRAY_SIZE
|
| Fields inherited from class dioscuri.module.AbstractModule |
|---|
type |
| Constructor Summary | |
|---|---|
Clock(Emulator owner)
Constructor Clock |
|
| Method Summary | |
|---|---|
java.lang.String |
getDump()
Return a dump of module status |
void |
pulse()
Triggers device's update if timer goes off |
boolean |
registerDevice(Updateable device,
int intervalLength,
boolean continuous)
Register a device to clock and assign a timer to it |
boolean |
reset()
Reset all parameters of module. |
boolean |
resetTimer(Updateable device,
int updateInterval)
Reset the timer of given device (if any) |
void |
run()
Implements the run method of Runnable |
protected void |
setKeepRunning(boolean status)
Sets the keepRunning toggle keepRunning states if the clock-thread should keep running or not |
boolean |
setTimerActiveState(Updateable device,
boolean runState)
Set a timer to start/stop running |
void |
stop()
Stops the module from being active. |
| Methods inherited from class dioscuri.module.AbstractModule |
|---|
getConnection, getConnections, getDebugMode, getExpectedConnections, getType, isConnected, setConnection, setDebugMode, start |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TIMER_ARRAY_SIZE
| Constructor Detail |
|---|
public Clock(Emulator owner)
owner - | Method Detail |
|---|
public boolean reset()
reset in interface Modulereset in class AbstractModuleAbstractModulepublic void stop()
stop in interface Modulestop in class AbstractModuleModulepublic java.lang.String getDump()
getDump in interface ModulegetDump in class AbstractModuleAbstractModule
public boolean registerDevice(Updateable device,
int intervalLength,
boolean continuous)
registerDevice in class ModuleClockModuleClock
public boolean resetTimer(Updateable device,
int updateInterval)
resetTimer in class ModuleClockModuleClock
public boolean setTimerActiveState(Updateable device,
boolean runState)
setTimerActiveState in class ModuleClockModuleClockpublic void pulse()
pulse in class ModuleClockModuleClockpublic void run()
run in interface java.lang.Runnableprotected void setKeepRunning(boolean status)
status -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||