rp1.rossum.event
Class RsEncoderStatusEvent

java.lang.Object
  extended by rp1.rossum.event.RsEvent
      extended by rp1.rossum.event.RsEncoderStatusEvent
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class RsEncoderStatusEvent
extends RsEvent

Provides data for encoder data; because this is a transitional implementation it is not treated as a true sensor event. There are two counters associated with the encoder: accumulatorValue and absoluteAccumulatorValue. Essentially, these simulate the behavior of an incremental encoder. Each time the encoder undergoes a transition (moves from one encoder interval to the next), the absolute accumulator is incremented. If the increment is in a positive direction, the standard accumulator is incremented. If it is in a negative direction, the standard accumulator is decremented. Both accumulators are cleared when request to do so is issued by the client application.

See Also:
Serialized Form

Field Summary
 int absoluteAccumulatorValue
          Total count of encoder transitions.
 int accumulatorValue
          Signed value, the sum of accumulated +/1 encoder transitions.
 boolean clearOnReport
          Indicates that the accumulators were cleared when the event was reported.
 double encoderAngle
          The current rotational angle of the encoder (intended for Quality Assuance purposes).
 int encoderID
          ID of the body part associated with the encoder.
 int encoderInterval
          The current encoder value (essentially, simulated an absolute encoder).
 int quadratureValue
          Signed value indicating direction of most recent transition.
 int requestIndex
          Request index from RsClient.sendEncoderStatusRequest.
 
Fields inherited from class rp1.rossum.event.RsEvent
eventID, EVT_ARRAY_SIZE, EVT_CONTACT_SENSOR, EVT_ENCODER_STATUS, EVT_HEARTBEAT, EVT_MAX_CODE, EVT_MOTION_HALTED, EVT_MOTION_STARTED, EVT_MOUSE_CLICK, EVT_PAINT_SENSOR, EVT_PLACEMENT, EVT_PLAN, EVT_POSITION, EVT_RANGE_SENSOR, EVT_TARGET_SELECTION, EVT_TARGET_SENSOR, EVT_TIMEOUT, simTime
 
Constructor Summary
RsEncoderStatusEvent(double simTime, int requestIndex, int encoderID, int accumulatorValue, int absoluteAccumulatorValue, int quadratureValue, int encoderInterval, double encoderAngle, boolean clearOnReport)
           
 
Method Summary
 
Methods inherited from class rp1.rossum.event.RsEvent
consume, getEventID, getIndex, getSimTime, isConsumed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

requestIndex

public final int requestIndex
Request index from RsClient.sendEncoderStatusRequest.


encoderID

public final int encoderID
ID of the body part associated with the encoder.


accumulatorValue

public final int accumulatorValue
Signed value, the sum of accumulated +/1 encoder transitions.


absoluteAccumulatorValue

public final int absoluteAccumulatorValue
Total count of encoder transitions.


quadratureValue

public final int quadratureValue
Signed value indicating direction of most recent transition.


encoderInterval

public final int encoderInterval
The current encoder value (essentially, simulated an absolute encoder).


encoderAngle

public final double encoderAngle
The current rotational angle of the encoder (intended for Quality Assuance purposes).


clearOnReport

public final boolean clearOnReport
Indicates that the accumulators were cleared when the event was reported.

Constructor Detail

RsEncoderStatusEvent

public RsEncoderStatusEvent(double simTime,
                            int requestIndex,
                            int encoderID,
                            int accumulatorValue,
                            int absoluteAccumulatorValue,
                            int quadratureValue,
                            int encoderInterval,
                            double encoderAngle,
                            boolean clearOnReport)
Parameters:
simTime - Simulation time at which event was issued.
requestIndex - Request index from RsClient.sendEncoderStatusRequest.
encoderID - ID of the body part associated with the encoder.
accumulatorValue - Signed value, the sum of accumulated +/1 encoder transitions.
absoluteAccumulatorValue - Total count of encoder transitions.
quadratureValue - Signed value indicating direction of most recent transition.
encoderInterval - The current encoder value (essentially, simulated an absolute encoder).
encoderAngle - The current rotational angle of the encoder (intended for Quality Assuance purposes).
clearOnReport - Indicates that the accumulators were cleared when the event was reported.