The setup file format is a simple line-based ASCII format. Blank lines and those beginning with a # are ignored. Also, all lines which do not begin (prior whitespace is not permitted) with a recognized command are silently ignored. The allowable directives are as follows:
- Simulation Specifies a DSim file (.ds2) to load to configure the simulation: Simulation path_to_ds2. Relative paths will be, as usual, assumed to be relative to /Library/Application Support/VisualCommander/Model Libraries/, just as they are for DSim objects.
Syntax: Simulation path
- Variable Map a variable from a DSim simulation to a ControlDeck variable. Variable lines must follow the referenced Simulation line. Syntax: "Variable <i>dsim_path</i> <i>group</i> <i>controldeck_path</i>". dsim_path and group must not contain spaces. controldeck_path can be anything. A variable mapped this way is identical to a create_data() call; the group and path can then be referenced with request_data().
- System Give the name of a control system. All user modules are part of a specific system, allowing some separation of different control systems in the same simulation- such as Satellite1 and Satellite2. A System line for system "foo" must appear before a Module line that specifies a module within system "foo". Syntax: "System <i>system_name</i>"
- Module Give the name, type and library path of control modules to load. Syntax "Module <i>System</i> <i>Type</i> <i>Name</i> <i>Path</i>". System must be the name of a system already created with a System line. Type must describe a module type available in the library specified in Path; type_builder will searched for as the builder function, exactly as a DSim object. Name gives the name of this module; the name is arbitrary but must be unique within the System.
- Set Give an initial value for a variable. The syntax is: "Set <i>group</i> <i>path</i> <i>string value</i>". These lines are processed after initialize_data() has been called on all modules (so that variables should be set up at this time) but before initialize() is called (so that the values are available during initialization).
- MarkTelemetry Mark a variable as telemetry so that the variable is provided to VisualCommander. The syntax is "MarkTelemetry <i>group</i> <i>path</i>". Variables marked in this way must have a group and path that from a valid VisualCommander path; specifically, path must either be a valid single identifier, or, if it contains sub-paths separated by '|', it must have a final name offset by a ':'. If path contains an embedded ':', group and path will be fused together with a '|' to form the final path as long as path does not already begin with a ':'. Otherwise, a ':' will be used for the fusion and therefore path must not contain a '|' if it does not contain a ':'.
- MarkCommand Mark a variable as a command so that the variable can be set by VisualCommander. The syntax is "MarkCommand <i>group</i> <i>path</i>". A variable can be marked as both telemetry and a command. As with MarkTelemetry lines, the group and path must form a valid VisualCommander path.
- TimeScale Set the time scale that all modules, and the simulation, will use. Must not be <= 0.0.
Setup files generated by ControlDeckManager are xml.