|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdioscuri.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 Moduletype - the Type of the Module to be fetched.
Modulepublic final java.util.Map<Module.Type,Module> getConnections()
getConnections in interface ModuleModulepublic final boolean getDebugMode()
getDebugMode in interface ModuleModulepublic java.lang.String getDump()
getDump in interface ModuleModulepublic final Module.Type[] getExpectedConnections()
getExpectedConnections in interface ModuleModulepublic final Module.Type getType()
getType in interface ModuleModulepublic final boolean isConnected()
isConnected in interface ModuleModulepublic abstract boolean reset()
reset in interface ModuleModulepublic final boolean setConnection(Module module)
setConnection in interface Modulemodule - the other AbstractModule.
Modulepublic final void setDebugMode(boolean status)
setDebugMode in interface Modulestatus - the new debug mode for this AbstractModule.Modulepublic void start()
start in interface ModuleModulepublic void stop()
stop in interface ModuleModule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||