Chapter 12. Config File Format

Table of Contents

Overview
General Rules
Config Files
ConfigChunks
Property Lines
Properties with Enumerations
Example Property Lines

Overview

The config files used by VR Juggler and the VjControl program are ASCII text files based around the idea of "ConfigChunks" - logical groupings of configuration for particular parts of a system (e.g. displays, input devices, or simulators). The different kinds of ConfigChunks are defined in ChunkDesc files.

It's important to note that you should load the ChunkDesc files describing the available Chunks before loading a config file - otherwise the config file won't parse correctly.

Here is an example config file with two entries:

display
  Name { "simView" }
  projectiontype { "front" }
  origin { 0 0 }
  size { 600 600 }
  pipe { 0 }
  stereo { False }
  border { True }
  simulator { True }
  simCamera { "CameraProxy" }
  end
flock
  Name { "flock 1" }
  Port { "/dev/tty52" }
  Baud { 38400 }
  num { 1 }
  translate { 0 0 0 }
  rotate { 180.0 0 0 }
  end
End

As you can see, this file defines two chunks. The first is of type Display (i.e. is uses a ChunkDesc whose token is "Display"). The name of this chunk is "simView". All Chunks must have a unique name - if none is given, the parser will give it a geeky default name like "Display_42" and all the other Chunks will make fun of it.

The remaining properties are defined by the ChunkDesc for Display. Each line gives the token for one of the properties followed by a list of values (the type and allowed number of values are also defined in the ChunkDesc).