com.yobotics.simulationconstructionset.robotcommprotocol
Class SCSRobotGUICommandListener

java.lang.Object
  extended by com.yobotics.simulationconstructionset.robotcommprotocol.SCSRobotGUICommandListener
All Implemented Interfaces:
ExitActionListener, CommandListener, VariableChangedListener

public class SCSRobotGUICommandListener
extends java.lang.Object
implements CommandListener, ExitActionListener, VariableChangedListener

Title: Yobotics! Simulation Construction Set

Description: GUI Command Listener

Copyright: Copyright (c) Jerry Pratt

Company: Yobotics

Version:
Beta 0.10
Author:
Jerry Pratt

Nested Class Summary
 class SCSRobotGUICommandListener.ConnectButton
           
 class SCSRobotGUICommandListener.PauseButton
           
 
Field Summary
static int PORT
           
 
Constructor Summary
SCSRobotGUICommandListener(SendingNewVariablesListener sendingNewVariablesListener, CreatedNewRobotProtocolListener createdNewRobotProtocolListener, CreatedNewVariablesListener createdNewVariablesListener, ReceivedDataListener receivedDataListener, YoVariableHolder yoVariableHolder, java.lang.String[] sendVars, java.lang.String[] sendVarsRegularExpressions, java.lang.String HOST)
           
 
Method Summary
 void attemptConnectionToHost(CommandListener commandListener)
           
 void doConnect()
           
 void doConnected(java.lang.String name, int nvars, java.lang.String[] vars, float[] vals)
           
 void doData(int listid, int nvars, float[] data)
           
 void doDisconnect()
           
 void doHello(java.lang.String name, java.lang.String info)
           
 void doPeriod(int periodmsec)
           
 void doSend(int[] indices)
           
 void doSending(int listid, int[] indices)
           
 void doSet(int index, float value)
           
 void doTextMessage(java.lang.String message)
           
 void doUnsend(int[] indices)
           
 void doUnsendAll()
           
 void doUserCommand(java.lang.String command)
           
 void exitActionPerformed()
           
 boolean isConnected()
           
 void putButtonsAndExitActionListenerOnSimulationGUI(SimulationConstructionSet simulationConstructionSet)
           
 void sendUserCommand(java.lang.String command)
           
 boolean setupEthernetConnection()
           
 void variableChanged(YoVariable variable)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORT

public static int PORT
Constructor Detail

SCSRobotGUICommandListener

public SCSRobotGUICommandListener(SendingNewVariablesListener sendingNewVariablesListener,
                                  CreatedNewRobotProtocolListener createdNewRobotProtocolListener,
                                  CreatedNewVariablesListener createdNewVariablesListener,
                                  ReceivedDataListener receivedDataListener,
                                  YoVariableHolder yoVariableHolder,
                                  java.lang.String[] sendVars,
                                  java.lang.String[] sendVarsRegularExpressions,
                                  java.lang.String HOST)
Method Detail

putButtonsAndExitActionListenerOnSimulationGUI

public void putButtonsAndExitActionListenerOnSimulationGUI(SimulationConstructionSet simulationConstructionSet)

exitActionPerformed

public void exitActionPerformed()
Specified by:
exitActionPerformed in interface ExitActionListener

isConnected

public boolean isConnected()

doHello

public void doHello(java.lang.String name,
                    java.lang.String info)
Specified by:
doHello in interface CommandListener

doConnect

public void doConnect()
Specified by:
doConnect in interface CommandListener

doConnected

public void doConnected(java.lang.String name,
                        int nvars,
                        java.lang.String[] vars,
                        float[] vals)
Specified by:
doConnected in interface CommandListener

doSet

public void doSet(int index,
                  float value)
Specified by:
doSet in interface CommandListener

doSend

public void doSend(int[] indices)
Specified by:
doSend in interface CommandListener

doSending

public void doSending(int listid,
                      int[] indices)
Specified by:
doSending in interface CommandListener

doUnsend

public void doUnsend(int[] indices)
Specified by:
doUnsend in interface CommandListener

doUnsendAll

public void doUnsendAll()
Specified by:
doUnsendAll in interface CommandListener

doPeriod

public void doPeriod(int periodmsec)
Specified by:
doPeriod in interface CommandListener

doDisconnect

public void doDisconnect()
Specified by:
doDisconnect in interface CommandListener

doUserCommand

public void doUserCommand(java.lang.String command)
Specified by:
doUserCommand in interface CommandListener

doData

public void doData(int listid,
                   int nvars,
                   float[] data)
Specified by:
doData in interface CommandListener

doTextMessage

public void doTextMessage(java.lang.String message)
Specified by:
doTextMessage in interface CommandListener

sendUserCommand

public void sendUserCommand(java.lang.String command)

setupEthernetConnection

public boolean setupEthernetConnection()

attemptConnectionToHost

public void attemptConnectionToHost(CommandListener commandListener)

variableChanged

public void variableChanged(YoVariable variable)
Specified by:
variableChanged in interface VariableChangedListener