kaos.robots.core.test
Class RobotClient

java.lang.Object
  extended by kaos.robots.core.test.RobotClient
All Implemented Interfaces:
FeedbackReceiver, DoubleClickListener, UserInput

public class RobotClient
extends java.lang.Object
implements FeedbackReceiver, UserInput, DoubleClickListener


Field Summary
protected  javax.swing.JTextField _attachment
           
protected  java.lang.String _basePath
           
 ActionStatusCallbackImpl _cbl
           
protected  RobotClient _client
           
protected  javax.swing.JCheckBox _connectCB
           
protected  boolean _connectedToRobot
           
protected  double _currentHdg
           
protected  javax.swing.JTextField _destination
           
protected  javax.swing.JTextField _fileNameTF
           
protected  double _goalDist
           
protected  double _goalHdg
           
protected  javax.swing.JTextField _gpsCommPort
           
protected  javax.swing.JTextField _gpsOriginTF
           
protected  javax.swing.JCheckBox _guiCB
           
protected  javax.swing.JTextField _hostTF
           
protected  Logger _logger
           
protected  javax.swing.JTextField _lrbX
           
protected  javax.swing.JTextField _lrbY
           
protected  javax.swing.JTextField _maxSpeedTF
           
protected  javax.swing.JTextField _moveRelX
           
protected  javax.swing.JTextField _moveRelY
           
protected  javax.swing.JTextField _moveToName
           
protected  javax.swing.JTextField _moveToPose
           
protected  javax.swing.JTextField _msg
           
protected  javax.swing.JTextField _nameTF
           
protected  javax.swing.JTextField _originTF
           
protected  javax.swing.JTextField _phraseTF
           
protected  javax.swing.JTextField _pictureParameters
           
protected  Plotter _plotter
           
protected  PlotterPanel _plotterPanel
           
protected  javax.swing.JTextField _portTF
           
protected  javax.swing.JCheckBox _registerCB
           
protected  KAoSRobot _selectedRobot
           
protected  javax.swing.JTextField _setPose
           
protected  javax.swing.JTextField _sonarRangeTF
           
protected  javax.swing.JTextField _sonarTurnRateTF
           
protected  javax.swing.JTextField _subject
           
protected  javax.swing.JTabbedPane _tabPane
           
protected  javax.swing.JCheckBox _targetCB
           
protected  TeleopPanel _teleopPanel
           
protected  double _testX
           
protected  double _testY
           
protected  javax.swing.JTextField _timeoutTF
           
protected  double _turnHdg
           
protected  javax.swing.JTextField _ulbX
           
protected  javax.swing.JTextField _ulbY
           
protected  javax.swing.JCheckBox _useGPSHeadingCB
           
protected  java.lang.String recvMsg
           
 
Constructor Summary
RobotClient()
           
RobotClient(java.lang.String[] args)
           
 
Method Summary
 void doubleClicked()
           
 Viewer getImageViewer()
           
 Area getSelectedArea()
           
 Coordinate getSelectedCoordinate()
           
 java.util.HashMap getSelectedRecievers()
           
 java.util.Vector getSelectedRobots()
           
 void init()
           
static void main(java.lang.String[] args)
           
 void onAborted(java.util.Calendar time, java.lang.Object reason, java.lang.String actionID, java.lang.String robotID)
          This method is invoked when the requested action is aborted.
 void onAccepted(java.util.Calendar time, java.lang.Object acceptInfo, java.lang.String actionID, java.lang.String robotID)
          This method is invoked when the request is accepted by the robot.
 void onCompleted(java.util.Calendar time, java.lang.Object result, java.lang.String actionID, java.lang.String robotID)
          This method is invoked upon completion of the request byt the requested robot.
 void onRefused(java.util.Calendar time, java.lang.Object reason, java.lang.String actionID, java.lang.String robotID)
          This method is invoked when the request is refused by the robot.
 void onStarted(java.util.Calendar time, java.lang.Object startedInfo, java.lang.String actionID, java.lang.String robotID)
          This method is invoked when the robot starts the requested action.
protected  void printDebugString(java.lang.String msg, int loggerDisplayLevel)
           
 void receiveKAoSStatus(java.lang.String statusMsg, java.lang.String actionID, java.lang.String robotID)
          Receive a status message describing the execution of the requested action.
 void setDatum(java.lang.String gpsString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_client

protected RobotClient _client

_selectedRobot

protected KAoSRobot _selectedRobot

_logger

protected Logger _logger

_moveToName

protected javax.swing.JTextField _moveToName

_moveToPose

protected javax.swing.JTextField _moveToPose

_moveRelX

protected javax.swing.JTextField _moveRelX

_moveRelY

protected javax.swing.JTextField _moveRelY

_setPose

protected javax.swing.JTextField _setPose

_pictureParameters

protected javax.swing.JTextField _pictureParameters

_destination

protected javax.swing.JTextField _destination

_subject

protected javax.swing.JTextField _subject

_msg

protected javax.swing.JTextField _msg

_attachment

protected javax.swing.JTextField _attachment

_fileNameTF

protected javax.swing.JTextField _fileNameTF

_phraseTF

protected javax.swing.JTextField _phraseTF

_ulbX

protected javax.swing.JTextField _ulbX

_ulbY

protected javax.swing.JTextField _ulbY

_lrbX

protected javax.swing.JTextField _lrbX

_lrbY

protected javax.swing.JTextField _lrbY

_originTF

protected javax.swing.JTextField _originTF

_sonarRangeTF

protected javax.swing.JTextField _sonarRangeTF

recvMsg

protected java.lang.String recvMsg

_goalHdg

protected double _goalHdg

_turnHdg

protected double _turnHdg

_goalDist

protected double _goalDist

_connectedToRobot

protected boolean _connectedToRobot

_testX

protected double _testX

_testY

protected double _testY

_currentHdg

protected double _currentHdg

_basePath

protected java.lang.String _basePath

_cbl

public ActionStatusCallbackImpl _cbl

_plotter

protected Plotter _plotter

_targetCB

protected javax.swing.JCheckBox _targetCB

_guiCB

protected javax.swing.JCheckBox _guiCB

_connectCB

protected javax.swing.JCheckBox _connectCB

_registerCB

protected javax.swing.JCheckBox _registerCB

_useGPSHeadingCB

protected javax.swing.JCheckBox _useGPSHeadingCB

_tabPane

protected javax.swing.JTabbedPane _tabPane

_plotterPanel

protected PlotterPanel _plotterPanel

_teleopPanel

protected TeleopPanel _teleopPanel

_hostTF

protected javax.swing.JTextField _hostTF

_portTF

protected javax.swing.JTextField _portTF

_nameTF

protected javax.swing.JTextField _nameTF

_gpsCommPort

protected javax.swing.JTextField _gpsCommPort

_maxSpeedTF

protected javax.swing.JTextField _maxSpeedTF

_timeoutTF

protected javax.swing.JTextField _timeoutTF

_gpsOriginTF

protected javax.swing.JTextField _gpsOriginTF

_sonarTurnRateTF

protected javax.swing.JTextField _sonarTurnRateTF
Constructor Detail

RobotClient

public RobotClient()

RobotClient

public RobotClient(java.lang.String[] args)
Method Detail

init

public void init()

setDatum

public void setDatum(java.lang.String gpsString)

onAccepted

public void onAccepted(java.util.Calendar time,
                       java.lang.Object acceptInfo,
                       java.lang.String actionID,
                       java.lang.String robotID)
This method is invoked when the request is accepted by the robot.

Specified by:
onAccepted in interface FeedbackReceiver
Parameters:
time - Calendar time of acceptance.
acceptInfo - Object containing additional (optional) info about the acceptance.
actionID - String containing the id of the requested action/information.
robotID - String containing the name of the robot performing the action.

onRefused

public void onRefused(java.util.Calendar time,
                      java.lang.Object reason,
                      java.lang.String actionID,
                      java.lang.String robotID)
This method is invoked when the request is refused by the robot.

Specified by:
onRefused in interface FeedbackReceiver
Parameters:
time - Calendar time of refusal.
reason - Object containing the reason for refusing the request.
actionID - String containing the id of the requested action/information.
robotID - String containing the name of the robot performing the action.

onCompleted

public void onCompleted(java.util.Calendar time,
                        java.lang.Object result,
                        java.lang.String actionID,
                        java.lang.String robotID)
This method is invoked upon completion of the request byt the requested robot.

Specified by:
onCompleted in interface FeedbackReceiver
Parameters:
time - Calendar time of information/action completion.
result - Object containing the result of the requested action.
actionID - String containing the id of the requested action/information.
robotID - String containing the name of the robot performing the action.

onStarted

public void onStarted(java.util.Calendar time,
                      java.lang.Object startedInfo,
                      java.lang.String actionID,
                      java.lang.String robotID)
This method is invoked when the robot starts the requested action.

Specified by:
onStarted in interface FeedbackReceiver
Parameters:
time - Calendar time of starting an action.
startedInfo - Object containing additional (optional) info about the start of the action.
actionID - String containing the id of the requested action/information.
robotID - String containing the name of the robot performing the action.

onAborted

public void onAborted(java.util.Calendar time,
                      java.lang.Object reason,
                      java.lang.String actionID,
                      java.lang.String robotID)
This method is invoked when the requested action is aborted.

Specified by:
onAborted in interface FeedbackReceiver
Parameters:
time - Calendar time of aborting an action.
reason - Object containing the reason for aborting an action.
actionID - String containing the id of the requested action/information.
robotID - String containing the name of the robot performing the action.

receiveKAoSStatus

public void receiveKAoSStatus(java.lang.String statusMsg,
                              java.lang.String actionID,
                              java.lang.String robotID)
Receive a status message describing the execution of the requested action. There maybe several status messages sent during action execution.

Specified by:
receiveKAoSStatus in interface FeedbackReceiver
Parameters:
statusMsg - Object containing the result of the requested action/information.
actionID - String containing the id of the requested action/information.
robotID - String containing the name of the robot performing the action.

getSelectedCoordinate

public Coordinate getSelectedCoordinate()
Specified by:
getSelectedCoordinate in interface UserInput

getSelectedArea

public Area getSelectedArea()
Specified by:
getSelectedArea in interface UserInput

getSelectedRecievers

public java.util.HashMap getSelectedRecievers()
Specified by:
getSelectedRecievers in interface UserInput

getSelectedRobots

public java.util.Vector getSelectedRobots()

getImageViewer

public Viewer getImageViewer()
Specified by:
getImageViewer in interface UserInput

doubleClicked

public void doubleClicked()
Specified by:
doubleClicked in interface DoubleClickListener

printDebugString

protected void printDebugString(java.lang.String msg,
                                int loggerDisplayLevel)

main

public static void main(java.lang.String[] args)