mns
Class MNScommandQueue

java.lang.Object
  extended by biocell.BioCell
      extended by mns.MNScommandQueue
All Implemented Interfaces:
BioDeviceListener, MNSRobotPartListener, BioSensorListener

public class MNScommandQueue
extends BioCell
implements MNSRobotPartListener, BioSensorListener

Author:
Martin Lukac The core of the synchronization between Command and RobotParts, is this object. It handles single command running or continuous comand running

Constructor Summary
MNScommandQueue()
          Constructor simple implementing a commandQueue and a current processQueue
 
Method Summary
 void bioEvent(BioDeviceEvent bdE)
           
 void flush()
           
 java.lang.String get()
           
 int getSize()
           
 boolean isAvailable()
           
 boolean isBusy()
           
 boolean isSync()
           
 void masterChanges(boolean enable)
           
 void sensorCRLPercieved(BioSensorEvent event)
           
 void sensorPercieved(BioSensorEvent event)
           
 void setAvailable(boolean available)
           
 void setBusy(boolean busy)
           
 void setSync(boolean sync)
           
 void stateChanged(MNSRobotPartEvent rpEvent)
           
 
Methods inherited from class biocell.BioCell
getCurrentmood, getMoodParam, getstate, setMood, stepEnergy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MNScommandQueue

public MNScommandQueue()
Constructor simple implementing a commandQueue and a current processQueue

Method Detail

bioEvent

public void bioEvent(BioDeviceEvent bdE)
Specified by:
bioEvent in interface BioDeviceListener

stateChanged

public void stateChanged(MNSRobotPartEvent rpEvent)
Specified by:
stateChanged in interface MNSRobotPartListener

sensorPercieved

public void sensorPercieved(BioSensorEvent event)
Specified by:
sensorPercieved in interface BioSensorListener
Parameters:
event - - must be overriden to provide command access

sensorCRLPercieved

public void sensorCRLPercieved(BioSensorEvent event)
Specified by:
sensorCRLPercieved in interface BioSensorListener
Parameters:
event - - must be overriden to allow CRL parsed commands

masterChanges

public void masterChanges(boolean enable)
Parameters:
enable -

get

public java.lang.String get()
Returns:

setSync

public void setSync(boolean sync)
Parameters:
sync -

flush

public void flush()

getSize

public int getSize()
Returns:

isAvailable

public boolean isAvailable()
Returns:
Returns the available.

setAvailable

public void setAvailable(boolean available)
Parameters:
available - The available to set.

isBusy

public boolean isBusy()
Returns:
Returns the busy.

setBusy

public void setBusy(boolean busy)
Parameters:
busy - The busy to set.

isSync

public boolean isSync()
Returns:
Returns the sync.