simulator
Class AddFileClientCommand

java.lang.Object
  |
  +--simulator.ClientCommand
        |
        +--simulator.AddFileClientCommand

class AddFileClientCommand
extends simulator.ClientCommand

Add the group of robot for simulation based for file


Fields inherited from class simulator.ClientCommand
command, description, name
 
Constructor Summary
AddFileClientCommand()
          Initialize object for ADDFILE command
 
Method Summary
 boolean runCommand(java.util.StringTokenizer ST, simulator.Connection connection)
          Add robots for simulation using file information.
 boolean Tokens(java.util.StringTokenizer ST, int n, simulator.Connection connection)
          Determines if there's the expected number of tokens
 
Methods inherited from class simulator.ClientCommand
getDescription, getName, getText
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

AddFileClientCommand

public AddFileClientCommand()
Initialize object for ADDFILE command
Method Detail

runCommand

public boolean runCommand(java.util.StringTokenizer ST,
                          simulator.Connection connection)
Add robots for simulation using file information. This is the structure of the file (.sim extension):

 1°line:   bar_wrl_file Xcm Ycm Xangle  Xcm_goal Ycm_Goal Xangle_Goal
 2°line:   number_of_pushing_robot robot_pushing_wrl sensor_wrl
 3°line:   relative_position_from_bar_cm
 ...
 n°line:   number_of_box box_wrl_file
 N+1°line: Xcm Ycm Xangle
 ...
 
Parameters:
ST - the parameter for simulation
connection - the instance of Connection
Returns:
false becouse simulation must continue
Overrides:
runCommand in class simulator.ClientCommand

Tokens

public boolean Tokens(java.util.StringTokenizer ST,
                      int n,
                      simulator.Connection connection)
Determines if there's the expected number of tokens
Parameters:
ST - the tokens
n - the number of expected token
Returns:
true if ok