rp1.rossum.event
Class RsEvent

java.lang.Object
  extended by rp1.rossum.event.RsEvent
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
RsEncoderStatusEvent, RsHeartbeatEvent, RsMotionHaltedEvent, RsMotionStartedEvent, RsMouseClickEvent, RsPlacementEvent, RsPlanEvent, RsPositionEvent, RsSensorEvent, RsTargetSelectionEvent, RsTimeoutEvent

public abstract class RsEvent
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

The abstract base class for all simulator-event classes.

See Also:
Serialized Form

Field Summary
 int eventID
          Identifies "kind of event"; a unique value is associated with each event class.
static int EVT_ARRAY_SIZE
           
static int EVT_CONTACT_SENSOR
           
static int EVT_ENCODER_STATUS
           
static int EVT_HEARTBEAT
           
static int EVT_MAX_CODE
           
static int EVT_MOTION_HALTED
           
static int EVT_MOTION_STARTED
           
static int EVT_MOUSE_CLICK
           
static int EVT_PAINT_SENSOR
           
static int EVT_PLACEMENT
           
static int EVT_PLAN
           
static int EVT_POSITION
           
static int EVT_RANGE_SENSOR
           
static int EVT_TARGET_SELECTION
           
static int EVT_TARGET_SENSOR
           
static int EVT_TIMEOUT
           
 double simTime
          Simulation time when the event was issued.
 
Constructor Summary
RsEvent(int eventID, double simTime)
           
 
Method Summary
 void consume()
          Used by client-side applications to indicate that the event is not to be used by any other event handlers.
 int getEventID()
          All RsEvent classes set a unique eventID value in their constructors; the getEventID method returns that ID.
 int getIndex()
          Used to associate event with a body part.
 double getSimTime()
          accessor for simTime element of event
 boolean isConsumed()
          returns status of consumed flag
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVT_MAX_CODE

public static final int EVT_MAX_CODE
See Also:
Constant Field Values

EVT_ARRAY_SIZE

public static final int EVT_ARRAY_SIZE
See Also:
Constant Field Values

EVT_CONTACT_SENSOR

public static final int EVT_CONTACT_SENSOR
See Also:
Constant Field Values

EVT_MOUSE_CLICK

public static final int EVT_MOUSE_CLICK
See Also:
Constant Field Values

EVT_POSITION

public static final int EVT_POSITION
See Also:
Constant Field Values

EVT_RANGE_SENSOR

public static final int EVT_RANGE_SENSOR
See Also:
Constant Field Values

EVT_TARGET_SENSOR

public static final int EVT_TARGET_SENSOR
See Also:
Constant Field Values

EVT_TIMEOUT

public static final int EVT_TIMEOUT
See Also:
Constant Field Values

EVT_MOTION_STARTED

public static final int EVT_MOTION_STARTED
See Also:
Constant Field Values

EVT_MOTION_HALTED

public static final int EVT_MOTION_HALTED
See Also:
Constant Field Values

EVT_PLACEMENT

public static final int EVT_PLACEMENT
See Also:
Constant Field Values

EVT_TARGET_SELECTION

public static final int EVT_TARGET_SELECTION
See Also:
Constant Field Values

EVT_PLAN

public static final int EVT_PLAN
See Also:
Constant Field Values

EVT_PAINT_SENSOR

public static final int EVT_PAINT_SENSOR
See Also:
Constant Field Values

EVT_HEARTBEAT

public static final int EVT_HEARTBEAT
See Also:
Constant Field Values

EVT_ENCODER_STATUS

public static final int EVT_ENCODER_STATUS
See Also:
Constant Field Values

eventID

public final int eventID
Identifies "kind of event"; a unique value is associated with each event class.


simTime

public final double simTime
Simulation time when the event was issued.

Constructor Detail

RsEvent

public RsEvent(int eventID,
               double simTime)
Method Detail

getSimTime

public double getSimTime()
accessor for simTime element of event


getEventID

public int getEventID()
All RsEvent classes set a unique eventID value in their constructors; the getEventID method returns that ID. Its primary use is in the RP1 communications protocol and has relatively limited relevance to client-side applications.


getIndex

public int getIndex()
Used to associate event with a body part.


consume

public void consume()
Used by client-side applications to indicate that the event is not to be used by any other event handlers.


isConsumed

public boolean isConsumed()
returns status of consumed flag