|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object device.Device device.RobotDevice device.Simulation
public class Simulation
Stage Gui to draw online robot(s) position
Field Summary | |
---|---|
(package private) static Simulation |
instance
|
(package private) java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.Boolean> |
isDirtyList
|
(package private) java.util.concurrent.ConcurrentHashMap<java.lang.String,Position> |
objList
Objects of interest in the simulation |
Fields inherited from class device.RobotDevice |
---|
device, deviceNode, logger |
Fields inherited from class device.Device |
---|
deviceList, host, id, index, isRunning, isThreaded, port, sleeptime, thread |
Constructor Summary | |
---|---|
protected |
Simulation()
|
protected |
Simulation(DeviceNode roboClient,
Device device)
|
Method Summary | |
---|---|
static Simulation |
getInstance()
Returns null if no Gui instance is instantiated. |
static Simulation |
getInstance(DeviceNode roboClient,
Device device)
Returns a Singleton instance of the Gui |
int |
getIsDirtyListCount()
|
int |
getObjListCount()
|
Position |
getPositionOf(java.lang.String key)
Returns the last known object Position. |
void |
initPositionOf(java.lang.String key)
|
void |
setPositionOf(java.lang.String key,
Position value)
Set a Gui object's position. |
void |
shutdown()
Shutdown Gui and clean up |
void |
sync()
|
protected void |
update()
Might be to be implemented by subclass to do something |
Methods inherited from class device.RobotDevice |
---|
getDevice, getDeviceNode, getLogger, toString |
Methods inherited from class device.Device |
---|
equals, getDevice, getDeviceIterator, getDeviceList, getDeviceListArray, getHost, getId, getIndex, getPort, getSleepTime, getThreadName, isInList, isRunning, isSupported, isThreaded, matches, matchesList, run, runThreaded, setDeviceList, setHost, setName, setPort, setSleepTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static Simulation instance
java.util.concurrent.ConcurrentHashMap<java.lang.String,Position> objList
java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.Boolean> isDirtyList
Constructor Detail |
---|
protected Simulation()
protected Simulation(DeviceNode roboClient, Device device)
Method Detail |
---|
public static Simulation getInstance(DeviceNode roboClient, Device device)
roboClient
- The device node containing the simulation device.device
-
public static Simulation getInstance()
protected void update()
Device
update
in class Device
public void shutdown()
shutdown
in interface IDevice
shutdown
in class Device
public void setPositionOf(java.lang.String key, Position value)
key
- The Stage object id (usually set by the 'name' tag in the world file).value
- The new Position of that object.public Position getPositionOf(java.lang.String key)
key
- The Stage object id (usually set by the 'name' tag in the world file).
public void initPositionOf(java.lang.String key)
public int getObjListCount()
public int getIsDirtyListCount()
public void sync()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |