|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.frcsimulator.internals.CRIO
public class CRIO
A class used by the simulator that represents a hardware CRIO.
| Field Summary | |
|---|---|
Semaphore |
newDataSemaphore
|
| Method Summary | |
|---|---|
void |
addModule(CRIOModule module,
int id)
Adds a simulated module at the given location to the CRIO. |
static CRIO |
getInstance()
Gets the current instance of the CRIO being run by the simulator. |
CRIOModule |
getModule(int id)
Gets a module from the given location on the CRIO. |
FrcBotSimProperties |
getSimProperties()
Gets the properties of this component that can later be parsed by the simulator or an external program. |
boolean |
isDebugging()
Returns whether or not the CRIO is in debug mode. |
void |
removeModule(int id)
Removes a module from the given location on the CRIO. |
void |
setDebugging(boolean debug)
Sets whether or not the CRIO is in debug mode. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Semaphore newDataSemaphore
| Method Detail |
|---|
public void addModule(CRIOModule module,
int id)
throws ModuleException
module - The module to be added.id - Where to insert the module.
InvalidModuleException - if the module equals null.
ModuleSlotOutOfBoundsException - if the id would not fit on a hardware CRIO.
ModuleException
public void removeModule(int id)
throws ModuleException
id - Where to remove the module from.
ModuleSlotOutOfBoundsException - if the id would not be on a hardware CRIO.
ModuleException
public CRIOModule getModule(int id)
throws ModuleException
id - Where the module is located.
ModuleSlotOutOfBoundsException - if the id would not be on a hardware CRIO.
ModuleNotFoundException - if the module does not exist at that location.
ModuleExceptionpublic static CRIO getInstance()
public boolean isDebugging()
public void setDebugging(boolean debug)
debug - The debugging mode to be set to.public FrcBotSimProperties getSimProperties()
getSimProperties in interface FrcBotSimComponent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||