public class RemoteRobotClient extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_TIMEOUT_LENGTH
Default number of milliseconds before a request times out.
|
| Constructor and Description |
|---|
RemoteRobotClient(Robot.Id robotId,
String sourceId,
String destId,
RobotRequestFactory reqFact,
MotionFrameEvent.MotionFrameEventFactory motionFrameEventFactory)
Creates a new RemoteRobotClient.
|
| Modifier and Type | Method and Description |
|---|---|
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.jflux.api.messaging.rk.MessageSender<MotionFrameEvent> frameSender)
Sets the MotionFrameSender to use for sending MotionFrames to the host.
|
void |
setRequestSender(org.jflux.api.messaging.rk.MessageSender<RobotRequest> reqSender)
Sets the MessageSender to send RobotRequests.
|
void |
setResponseReceiver(org.jflux.api.messaging.rk.MessageBlockingReceiver<RobotResponse> respRec)
Sets the MessageReceiver to receive RobotResponses.
|
public static final int DEFAULT_TIMEOUT_LENGTH
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 RobotRequestspublic void setRequestSender(org.jflux.api.messaging.rk.MessageSender<RobotRequest> reqSender)
reqSender - MessageSender to usepublic void setResponseReceiver(org.jflux.api.messaging.rk.MessageBlockingReceiver<RobotResponse> respRec)
respRec - MessageReceiver to usepublic void setMotionFrameSender(org.jflux.api.messaging.rk.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 Jointpublic boolean sendJointDisable(Robot.JointId jointId)
jointId - id of the remote Jointpublic boolean getJointEnabled(Robot.JointId jointId)
jointId - id of the remote Jointpublic Robot.RobotPositionMap requestDefaultPositions()
public Robot.RobotPositionMap requestGoalPositions()
public Robot.RobotPositionMap requestCurrentPositions()
public void sendMovement(MotionFrame frame)
frame - MotionFrame to sendCopyright © 2011-2014. All Rights Reserved.