org.lejon.events
Class MotionReport

java.lang.Object
  extended byorg.lejon.events.MotionReport

public class MotionReport
extends java.lang.Object

Wrapper class for motion specific information. If requested by the application the motion report will return the state of the motion, the time left since the motion was started, the distance travelled so far and the local coordinates of the drive's reference point. A motion report is local to its associated action. To be clear, it means that it is indenpendent from former actions excecuted by the application.


Constructor Summary
MotionReport()
          Creates a new empty instance.
 
Method Summary
 float getDistance()
          Returns the distance [cm] travelled in current action.
 Pose getPose()
          Returns the current local pose.
 int getState()
          Returns the current excecution state.
 int getTime()
          Returns the time index at base 'timeBase'.
 void setDistance(float distance)
          Sets the distance travelled so far.
 void setState(int state)
          Sets the current excecution state.
 void setTime(int time)
          Sets the time index.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MotionReport

public MotionReport()
Creates a new empty instance.

Method Detail

getState

public int getState()
Returns the current excecution state.

Returns:
the state of the state machine

getTime

public int getTime()
Returns the time index at base 'timeBase'.

Returns:
the time index [timeBase]

getDistance

public float getDistance()
Returns the distance [cm] travelled in current action.

Returns:
the distance [cm]

getPose

public Pose getPose()
Returns the current local pose.

Returns:
the pose

setState

public void setState(int state)
Sets the current excecution state.

Parameters:
state - the execution state

setTime

public void setTime(int time)
Sets the time index.

Parameters:
time - the time index

setDistance

public void setDistance(float distance)
Sets the distance travelled so far.

Parameters:
distance - distance [cm].