org.robokind.api.motion.messaging
Class RemoteRobot

java.lang.Object
  extended by org.robokind.api.common.property.PropertyChangeNotifier
      extended by org.robokind.api.motion.AbstractRobot<RemoteJoint>
          extended by org.robokind.api.motion.messaging.RemoteRobot
All Implemented Interfaces:
PropertyChangeSource, Robot<RemoteJoint>

public class RemoteRobot
extends AbstractRobot<RemoteJoint>

Author:
Matthew Stevenson

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.robokind.api.motion.Robot
Robot.Id, Robot.JointId, Robot.RobotPositionHashMap, Robot.RobotPositionMap
 
Field Summary
 
Fields inherited from class org.robokind.api.motion.AbstractRobot
myJointList, myJointMap
 
Fields inherited from interface org.robokind.api.motion.Robot
PROP_CONNECTED, PROP_ENABLED, PROP_ID
 
Constructor Summary
RemoteRobot(RemoteRobotClient client)
           
 
Method Summary
 boolean connect()
          The Robot will accept commands only after it is successfully connected.
 void disconnect()
          Disconnect the Robot.
 boolean isConnected()
          Returns true if the Robot is connected.
 boolean isEnabled()
          Returns true if the Robot is enabled and accepting commands.
 void move(Robot.RobotPositionMap positions, long lenMillisec)
          Move the Joints with the given ids to the corresponding positions.
 void setEnabled(boolean val)
          Sets the enabled status of the Robot.
 boolean updateRobot()
           
 
Methods inherited from class org.robokind.api.motion.AbstractRobot
addJoint, clearJoints, getCurrentPositions, getDefaultPositions, getGoalPositions, getJoint, getJointIds, getJointList, getJointName, getJointNames, getJoints, getRobotId, removeJoint
 
Methods inherited from class org.robokind.api.common.property.PropertyChangeNotifier
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.robokind.api.common.property.PropertyChangeSource
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

RemoteRobot

public RemoteRobot(RemoteRobotClient client)
Method Detail

updateRobot

public boolean updateRobot()

connect

public boolean connect()
Description copied from interface: Robot
The Robot will accept commands only after it is successfully connected.

Returns:
true is successful

disconnect

public void disconnect()
Description copied from interface: Robot
Disconnect the Robot.


isConnected

public boolean isConnected()
Description copied from interface: Robot
Returns true if the Robot is connected.

Returns:
true if the Robot is connected

setEnabled

public void setEnabled(boolean val)
Description copied from class: AbstractRobot
Sets the enabled status of the Robot. The Robot only accepts new movements when Enabled is set to true.

Specified by:
setEnabled in interface Robot<RemoteJoint>
Overrides:
setEnabled in class AbstractRobot<RemoteJoint>
Parameters:
val - enabled value

isEnabled

public boolean isEnabled()
Description copied from class: AbstractRobot
Returns true if the Robot is enabled and accepting commands.

Specified by:
isEnabled in interface Robot<RemoteJoint>
Overrides:
isEnabled in class AbstractRobot<RemoteJoint>
Returns:
true if the Robot is enabled and accepting commands

move

public void move(Robot.RobotPositionMap positions,
                 long lenMillisec)
Description copied from interface: Robot
Move the Joints with the given ids to the corresponding positions.

Parameters:
positions - map of Joint logical ids and positions
lenMillisec - duration of the movement in milliseconds


Copyright © 2011-2012. All Rights Reserved.