|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.robokind.api.motion.messaging.RemoteRobotClient
public class RemoteRobotClient
Client for messaging with a RemoteRobotHost. Used by RemoteRobot to control a Robot through a messaging channel.
Field Summary | |
---|---|
static int |
DEFAULT_TIMEOUT_LENGTH
Default number of milliseconds before a request times out. |
Constructor Summary | |
---|---|
RemoteRobotClient(Robot.Id robotId,
String sourceId,
String destId,
RobotRequestFactory reqFact,
MotionFrameEvent.MotionFrameEventFactory motionFrameEventFactory)
Creates a new RemoteRobotClient. |
Method Summary | |
---|---|
boolean |
getConnected()
Requests the remote Robot's connection status. |
String |
getDestinationId()
Returns the String identifying the host, currently unused. |
boolean |
getEnabled()
Requests the remote Robot's enabled status. |
boolean |
getJointEnabled(Robot.JointId jointId)
Requests the remote Joint's enabled status. |
Robot.Id |
getRobotId()
Returns the id of the remote Robot |
String |
getSourceId()
Returns the String identifying this client, currently unused. |
Robot.RobotPositionMap |
requestCurrentPositions()
Requests the remote Robot's current positions. |
Robot.RobotPositionMap |
requestDefaultPositions()
Requests the remote Robot's default joint positions. |
Robot.RobotPositionMap |
requestGoalPositions()
Requests the remote Robot's goal positions. |
RobotDefinitionResponse |
requestRobotDefinition()
Requests a RobotDefinition from the host. |
boolean |
sendConnect()
Sends a connect command to the remote Robot. |
boolean |
sendDisable()
Sends an disable command to the remote Robot. |
boolean |
sendDisconnect()
Sends a disconnect command to the remote Robot. |
boolean |
sendEnable()
Sends an enable command to the remote Robot. |
boolean |
sendJointDisable(Robot.JointId jointId)
Sends an disable command to a remote Joint. |
boolean |
sendJointEnable(Robot.JointId jointId)
Sends an disable command to a remote Joint. |
void |
sendMovement(MotionFrame frame)
Sends a MotionFrame to move a RemoteRobot. |
void |
setMotionFrameSender(org.robokind.api.messaging.MessageSender<MotionFrameEvent> frameSender)
Sets the MotionFrameSender to use for sending MotionFrames to the host. |
void |
setRequestSender(org.robokind.api.messaging.MessageSender<RobotRequest> reqSender)
Sets the MessageSender to send RobotRequests. |
void |
setResponseReceiver(org.robokind.api.messaging.MessageBlockingReceiver<RobotResponse> respRec)
Sets the MessageReceiver to receive RobotResponses. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_TIMEOUT_LENGTH
Constructor Detail |
---|
public RemoteRobotClient(Robot.Id robotId, String sourceId, String destId, RobotRequestFactory reqFact, MotionFrameEvent.MotionFrameEventFactory motionFrameEventFactory)
robotId
- id of the remote robotsourceId
- arbitrary String to identify this clientdestId
- arbitrary String to identify the hostreqFact
- factory used for creating new RobotRequestsMethod Detail |
---|
public void setRequestSender(org.robokind.api.messaging.MessageSender<RobotRequest> reqSender)
reqSender
- MessageSender to usepublic void setResponseReceiver(org.robokind.api.messaging.MessageBlockingReceiver<RobotResponse> respRec)
respRec
- MessageReceiver to usepublic void setMotionFrameSender(org.robokind.api.messaging.MessageSender<MotionFrameEvent> frameSender)
frameSender
- MotionFrameSender to usepublic Robot.Id getRobotId()
public String getSourceId()
public String getDestinationId()
public RobotDefinitionResponse requestRobotDefinition()
public boolean sendConnect()
public boolean sendDisconnect()
public boolean getConnected()
public boolean sendEnable()
public boolean sendDisable()
public boolean getEnabled()
public boolean sendJointEnable(Robot.JointId jointId)
jointId
- id of the remote Joint
public boolean sendJointDisable(Robot.JointId jointId)
jointId
- id of the remote Joint
public boolean getJointEnabled(Robot.JointId jointId)
jointId
- id of the remote Joint
public Robot.RobotPositionMap requestDefaultPositions()
public Robot.RobotPositionMap requestGoalPositions()
public Robot.RobotPositionMap requestCurrentPositions()
public void sendMovement(MotionFrame frame)
frame
- MotionFrame to send
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |