|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dioscuri.module.AbstractModule
public abstract class AbstractModule
Abstract class representing a generic hardware module.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface dioscuri.interfaces.Module |
---|
Module.Type |
Field Summary | |
---|---|
protected Module.Type |
type
the Type of this AbstractModule |
Constructor Summary | |
---|---|
AbstractModule(Module.Type type,
Module.Type... expectedConnections)
Creates a new instance of a module. |
Method Summary | |
---|---|
Module |
getConnection(Module.Type type)
Returns the Module of a certain Type connected to this Module. |
java.util.Map<Module.Type,Module> |
getConnections()
Returns all connected, or supposedly connected, Modules of this Module. |
boolean |
getDebugMode()
Returns the state of debug mode |
java.lang.String |
getDump()
Return a dump of module status |
Module.Type[] |
getExpectedConnections()
Get all Module.Type's this AbstractModule is supposed to be connected to. |
Module.Type |
getType()
Returns the Type of this Module. |
boolean |
isConnected()
Checks if this module is connected to operate normally |
abstract boolean |
reset()
Reset all parameters of module. |
boolean |
setConnection(Module module)
Connect both Modules 'this' and 'module' to each other. |
void |
setDebugMode(boolean status)
Set toggle to define if this module is in debug mode or not |
void |
start()
Starts the module to become active. |
void |
stop()
Stops the module from being active. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Module.Type type
Constructor Detail |
---|
public AbstractModule(Module.Type type, Module.Type... expectedConnections)
type
- the type of this module.expectedConnections
- optional number of types this module
is supposed to be connected to when
the emulation process starts.Method Detail |
---|
public final Module getConnection(Module.Type type)
getConnection
in interface Module
type
- the Type of the Module to be fetched.
Module
public final java.util.Map<Module.Type,Module> getConnections()
getConnections
in interface Module
Module
public final boolean getDebugMode()
getDebugMode
in interface Module
Module
public java.lang.String getDump()
getDump
in interface Module
Module
public final Module.Type[] getExpectedConnections()
getExpectedConnections
in interface Module
Module
public final Module.Type getType()
getType
in interface Module
Module
public final boolean isConnected()
isConnected
in interface Module
Module
public abstract boolean reset()
reset
in interface Module
Module
public final boolean setConnection(Module module)
setConnection
in interface Module
module
- the other AbstractModule.
Module
public final void setDebugMode(boolean status)
setDebugMode
in interface Module
status
- the new debug mode for this AbstractModule.Module
public void start()
start
in interface Module
Module
public void stop()
stop
in interface Module
Module
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |