Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Executive

Overview

The Executive simulates a basic on-board rover executive. It accepts a c-style script on the command line and executes it.

Model Description

The Executive models a basic on-board rover executive. It accepts a c-sytle script on the command line and executes it. The Executive uses a parser based on ANTLR, an open source parser. It has been customized to provide basic variables, branching execution, and to process MSF messages. The best documentation on the functionality provided by the Executive is the set of script files included in this release - namely the test script files in MSF_HOME/components/ExEC/scripts/ and the demo scenario scripts in MSF_HOME/data/exec_script_scenario_*.c.

Usage

Executive ScriptName

Parameters

ScriptName: The c-style script which the Executive will execute.

API

The Executive subscribes to and publishes all object classes.

GUI

This component does not have a graphical user interface.

Known Issues

The c-style language of the executive script files is limited and can be troublesome when creating new scripts. For example, if, else, and else if constructs are available, but the construct if (boolean_value) is not. Instead, the construct if (boolean_value == true) must be used.

Arrays exist, but they must be defined when they are declared, and all values must be of the same inherent type (int, float, char). For example:

my_array = {0.1, 1.2, 2.3};

There is a known bug where accessing an individual array value such as:

my_value = my_array[1];

will cause the next call of an MSF method to give a run-time error (regarding too many arguments). Therefore, it is best to only reference arrays as a whole.

Test Programs

To test the Executive, run any of the available test scripts. The Executive will always connect to the RTI at startup, but many of the test scripts operate on local variables and make no use of the RTI (and so are convenient for simple tests of the executive. Just launch an RTI and then run this Executive as follows:

MSF_HOME/PLATFORM/bin/Executive MSF_HOME/components/ExEC/scripts/test*.c
The test script files are commented and are self-explanatory.

Files

Code and data files for the Executive reside in the MSF_HOME/components/ExEC directory and include the following files:

/
ArgList.h                 // storage class header file
ArgList.cpp               // storage class code file
FunctionLiaison.h         // MSF method wrapper header file
FunctionLiaison.cpp       // MSF method wrapper code file
Main.cpp                  // Main executable
VariableLiaison.h         // utility class header file
VariableLiaison.cpp       // utility class code file
makefile                  // makefile
exec.g                    // ANTLR grammar file (used to generate .cpp files)
execAST.g                 // ANTLR grammar file (used to generate .cpp files)
MyAST.h                   // ANTLR header file
LangLexer.hpp             // generated file
LagLexer.cpp              // generated file
LandWalker.hpp            // generated file
LangWalker.cpp            // generated file
LandWalkerTokenTypes.hpp  // generated file
LangWalkerTokenTypes.cpp  // generated file
scripts/test*.c               // script files (used for testing)

For detailed scenario files, see MSF_HOME/data/exec_scenario_*.c.


Generated on Thu Apr 7 18:21:16 2005 for MST API by  doxygen 1.4.1