EDU.gatech.cc.is.abstractrobot
Class ControlSystemS

java.lang.Object
  |
  +--EDU.gatech.cc.is.abstractrobot.ControlSystemS
Direct Known Subclasses:
ControlSystemCapture, ControlSystemCN150, ControlSystemMFN150, ControlSystemRescueVan, ControlSystemSN150, ControlSystemSS

public class ControlSystemS
extends java.lang.Object

This is the superclass for all robot Control Systems. When you create a contol system by extending this class, it can run within JavaBotHard to control a real robot or JavaBotSim in simulation.

Ordinarily this sort of class would be declared abstract. But because robots and control systems must be instantiated on the fly, this class had to be fully implemented. Copyright (c)1997, 1998 Tucker Balch


Field Summary
 Simple abstract_robot
          The robot to which the control system is attached.
static int CSSTAT_DONE
          Return value from TakeStep(), indicates the mission is complete.
static int CSSTAT_ERROR
          Return value from TakeStep(), indicates some sort of error condition has occured.
static int CSSTAT_OK
          Return value from TakeStep(), indicates everything is OK.
 long seed
          The random number seed to use in configuration or whatever.
 
Constructor Summary
ControlSystemS()
          Constructor.
 
Method Summary
 void configure()
          Override this method if you like, to configure your control system.
 void Configure()
          Deprecated. to conform with Java naming conventions, use configure().
 Simple getAbstractRobot()
          Get a copy of the abstract robot object.
 void Init(Simple r)
          Deprecated. to conform with Java naming conventions, use init().
 void init(Simple r, long s)
          Initialize the object.
 void quit()
          Called only once, at the end of the simulation or hard run.
 int takeStep()
          Called every timestep to allow the control system to run.
 int TakeStep()
          Deprecated. to conform with Java naming conventions, use takestep() instead.
 void trialEnd()
          Called at the end of every trial.
 void TrialEnd()
          Deprecated. to conform with Java naming conventions, use trialEnd() instead.
 void trialInit()
          Called at the beginning of every trial.
 void TrialInit()
          Deprecated. to conform with Java naming conventions, use trialInit() instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CSSTAT_OK

public static final int CSSTAT_OK
Return value from TakeStep(), indicates everything is OK.

CSSTAT_ERROR

public static final int CSSTAT_ERROR
Return value from TakeStep(), indicates some sort of error condition has occured.

CSSTAT_DONE

public static final int CSSTAT_DONE
Return value from TakeStep(), indicates the mission is complete.

abstract_robot

public Simple abstract_robot
The robot to which the control system is attached.

seed

public long seed
The random number seed to use in configuration or whatever.
Constructor Detail

ControlSystemS

public ControlSystemS()
Constructor. Don't override this method, use Configure instead.
Method Detail

Init

public void Init(Simple r)
Deprecated. to conform with Java naming conventions, use init().

DEPRECATED, use init() instead. Initialize the object. Don't override this method, use Configure instead.

init

public void init(Simple r,
                 long s)
Initialize the object. Don't override this method, use Configure instead.
Parameters:
r - Simple, the robot hardware.
s - long, random number seed.

Configure

public void Configure()
Deprecated. to conform with Java naming conventions, use configure().

DEPRECATED, Use configure() instead.

configure

public void configure()
Override this method if you like, to configure your control system.

getAbstractRobot

public Simple getAbstractRobot()
Get a copy of the abstract robot object.
Returns:
the abstract robot object.

takeStep

public int takeStep()
Called every timestep to allow the control system to run. You should override this method for your control system. Note: this is the proper name ("TakeStep" does not comform to Java naming conventions).

TakeStep

public int TakeStep()
Deprecated. to conform with Java naming conventions, use takestep() instead.

DEPRECATED, Use takestep() instead. Called every timestep to allow the control system to run. You should override this method for your control system.

TrialInit

public void TrialInit()
Deprecated. to conform with Java naming conventions, use trialInit() instead.

DEPRECATED, Use trialInit() instead. Called at the beginning of every trial. You can override this method to read configuration information from a file or to reset variables.

trialInit

public void trialInit()
Called at the beginning of every trial. You can override this method to read configuration information from a file or to reset variables.

TrialEnd

public void TrialEnd()
Deprecated. to conform with Java naming conventions, use trialEnd() instead.

DEPRECATED, Use trialEnd() instead. Called at the end of every trial. You can override this method to save configuration information to a file or to reset variables.

trialEnd

public void trialEnd()
Called at the end of every trial. You can override this method to save configuration information to a file or to reset variables.

quit

public void quit()
Called only once, at the end of the simulation or hard run. Override it to save log data to a file.