Chapter 13. ConfigDesc File Format

Table of Contents

Overview
General Rules
ChunkDesc Files
ChunkDescs
Property Description Lines

Overview

A ChunkDesc file includes descriptions of different kinds of ConfigChunks. It is a way to configure the configuration system itself. Here's a simple example, a ChunkDesc file with two entries.

chunk flockobirds
 port string 1 port "serial port address"
 offset double 3 offset "tracker coord offset"
 baudrate int 1 baud "serial port rate"
 end
 
chunk display
 name string 1 name "descriptive name"
 origin double 3 origin "other help text"
 size int 2 size ""
 SGIpipe int 1 SGIpipe ""
 xdisplay string 1 xdisplay ""
 stereo bool 1 stereo ""
 lowerleft double 3 lowerleft ""
 lowerright double 3 lowerright ""
 upperleft double 3 upperleft ""
 end

End

The first entry defines a chunk type called "flockobirds" that contains three properties ("port", "offset", and "baudrate"). The second defines a chunktype called "display" which contains 9 properties.

Each property has a type - for example, the values that "port" can take will be strings, such as "/dev/ttyd45", while baudrate will always have integer values.

It is also possible for a property to have a set of values. For example, the "display" chunk's "lowerleft", "lowerright", and "upperleft" properties are meant to represent positions in 3d space. These can be represented by a sequence of three doubles for the x, y, and z coordinates. The number of values a property supports is listed directly to the right of the type - the "3" in the line for "lowerleft", or the "1" for "stereo." If a property might have a variable number of entries (perhaps as a list of active displays, or such), use the number -1.

The fourth word on each property line is the actual token to be used to represent this property when reading/writing config files. Most often this will be the same as the name of the property (which is used internally for querying a ConfigChunk), but the options is provided to make the config files more flexible or readable.

The last thing on a property line is a help string. If the help string contains spaces or is empty, it must be in quotes.