rp1.rossum
Class RsConnection
java.lang.Object
rp1.rossum.RsProtocol
rp1.rossum.RsConnection
- All Implemented Interfaces:
- java.lang.Runnable, RsLogInterface
- Direct Known Subclasses:
- SimClient
public class RsConnection
- extends RsProtocol
- implements java.lang.Runnable
A class used by the simulator to communicate with clients.
Method Summary |
void |
addInterlock(RsInterlock interlock)
|
void |
exchangeIntroductions()
|
int |
getMaxInterlockSent()
|
boolean |
isClientSubscribedToEvent(int row,
int column)
|
void |
run()
note: in the references below, we have several places
where we check verbosity
if(verbosity)
verbose(someString+someOtherString);
If we are not in verbose mode, verbose is a do-nothing method,
but we check first anyway so as not to incur the overhead of
creating a temporary string (in Java, someString+someOtherString
would be created as a short-lived String object even though it
is never used). |
void |
sendContactSensorEvent(double simTime,
int sensorID,
boolean status,
java.lang.String contactObjectName)
|
void |
sendContactSensorEvent(RsContactSensorEvent event)
|
void |
sendEncoderStatusEvent(RsEncoderStatusEvent event)
|
void |
sendEvent(RsEvent t)
|
void |
sendHeartbeatEvent(double simTime,
int sequence)
|
void |
sendHeartbeatEvent(RsHeartbeatEvent heartbeat)
|
void |
sendMotionHaltedEvent(RsMotionHaltedEvent event)
|
void |
sendMotionStartedEvent(RsMotionStartedEvent event)
|
void |
sendMouseClickEvent(RsMouseClickEvent mouseClick)
|
void |
sendPaintSensorEvent(RsPaintSensorEvent event)
|
void |
sendPlacementEvent(RsPlacementEvent placement)
|
void |
sendPlanEvent(RsPlanEvent planEvent)
|
void |
sendPositionEvent(RsPositionEvent position)
|
void |
sendRangeSensorEvent(RsRangeSensorEvent event)
|
void |
sendTargetSelectionEvent(RsTargetSelectionEvent targetSelection)
|
void |
sendTargetSensorEvent(RsTargetSensorEvent event)
|
void |
sendTimeoutEvent(RsTimeoutEvent timeout)
|
void |
setActuatorControlRequestHandler(RsActuatorControlRequestHandler handler)
|
void |
setBodyHandler(RsConnectionBodyHandler handler)
|
void |
setEncoderStatusRequestHandler(RsEncoderStatusRequestHandler handler)
|
void |
setHaltRequestHandler(RsHaltRequestHandler handler)
|
void |
setHeartbeatRequestHandler(RsHeartbeatRequestHandler handler)
|
void |
setMotionRequestHandler(RsMotionRequestHandler handler)
|
void |
setPainterChangeRequestHandler(RsPainterChangeRequestHandler handler)
|
void |
setPlacementRequestHandler(RsPlacementRequestHandler handler)
|
void |
setPlanRequestHandler(RsPlanRequestHandler handler)
|
void |
setPositionRequestHandler(RsPositionRequestHandler handler)
|
void |
setSensorRequestHandler(RsSensorRequestHandler handler)
|
void |
setSubscriptionRequestHandler(RsSubscriptionRequestHandler handler)
|
void |
setSubscriptionTableEntry(int row,
int column,
boolean value)
|
void |
setTargetSelectionRequestHandler(RsTargetSelectionRequestHandler handler)
|
void |
setTimeoutRequestHandler(RsTimeoutRequestHandler handler)
|
Methods inherited from class rp1.rossum.RsProtocol |
getVerbosity, isInputSet, isLoggerSet, isOutputSet, log, logIt, setInputOutputStreams, setLogger, setProtocolShutdownHandler, setSocket, setVerbosity, verbose |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RsConnection
public RsConnection()
addInterlock
public void addInterlock(RsInterlock interlock)
getMaxInterlockSent
public int getMaxInterlockSent()
sendTimeoutEvent
public void sendTimeoutEvent(RsTimeoutEvent timeout)
sendMouseClickEvent
public void sendMouseClickEvent(RsMouseClickEvent mouseClick)
sendPositionEvent
public void sendPositionEvent(RsPositionEvent position)
sendPlacementEvent
public void sendPlacementEvent(RsPlacementEvent placement)
sendMotionHaltedEvent
public void sendMotionHaltedEvent(RsMotionHaltedEvent event)
sendMotionStartedEvent
public void sendMotionStartedEvent(RsMotionStartedEvent event)
sendTargetSensorEvent
public void sendTargetSensorEvent(RsTargetSensorEvent event)
sendContactSensorEvent
public void sendContactSensorEvent(RsContactSensorEvent event)
sendContactSensorEvent
public void sendContactSensorEvent(double simTime,
int sensorID,
boolean status,
java.lang.String contactObjectName)
sendRangeSensorEvent
public void sendRangeSensorEvent(RsRangeSensorEvent event)
sendTargetSelectionEvent
public void sendTargetSelectionEvent(RsTargetSelectionEvent targetSelection)
sendPlanEvent
public void sendPlanEvent(RsPlanEvent planEvent)
sendPaintSensorEvent
public void sendPaintSensorEvent(RsPaintSensorEvent event)
sendHeartbeatEvent
public void sendHeartbeatEvent(RsHeartbeatEvent heartbeat)
sendHeartbeatEvent
public void sendHeartbeatEvent(double simTime,
int sequence)
sendEncoderStatusEvent
public void sendEncoderStatusEvent(RsEncoderStatusEvent event)
sendEvent
public void sendEvent(RsEvent t)
setTimeoutRequestHandler
public void setTimeoutRequestHandler(RsTimeoutRequestHandler handler)
setSubscriptionRequestHandler
public void setSubscriptionRequestHandler(RsSubscriptionRequestHandler handler)
setMotionRequestHandler
public void setMotionRequestHandler(RsMotionRequestHandler handler)
setPositionRequestHandler
public void setPositionRequestHandler(RsPositionRequestHandler handler)
setPlacementRequestHandler
public void setPlacementRequestHandler(RsPlacementRequestHandler handler)
setHaltRequestHandler
public void setHaltRequestHandler(RsHaltRequestHandler handler)
setSensorRequestHandler
public void setSensorRequestHandler(RsSensorRequestHandler handler)
setTargetSelectionRequestHandler
public void setTargetSelectionRequestHandler(RsTargetSelectionRequestHandler handler)
setPainterChangeRequestHandler
public void setPainterChangeRequestHandler(RsPainterChangeRequestHandler handler)
setActuatorControlRequestHandler
public void setActuatorControlRequestHandler(RsActuatorControlRequestHandler handler)
setEncoderStatusRequestHandler
public void setEncoderStatusRequestHandler(RsEncoderStatusRequestHandler handler)
setBodyHandler
public void setBodyHandler(RsConnectionBodyHandler handler)
setPlanRequestHandler
public void setPlanRequestHandler(RsPlanRequestHandler handler)
setHeartbeatRequestHandler
public void setHeartbeatRequestHandler(RsHeartbeatRequestHandler handler)
exchangeIntroductions
public void exchangeIntroductions()
throws java.io.IOException
- Throws:
java.io.IOException
run
public void run()
- note: in the references below, we have several places
where we check verbosity
if(verbosity)
verbose(someString+someOtherString);
If we are not in verbose mode, verbose is a do-nothing method,
but we check first anyway so as not to incur the overhead of
creating a temporary string (in Java, someString+someOtherString
would be created as a short-lived String object even though it
is never used).
In cases where I don't think the verbose method would be
invoked often, or where no short-lived string is required,
I often don't bother checking. If you see a place I missed,
let me know.
- Specified by:
run
in interface java.lang.Runnable
setSubscriptionTableEntry
public void setSubscriptionTableEntry(int row,
int column,
boolean value)
isClientSubscribedToEvent
public boolean isClientSubscribedToEvent(int row,
int column)