Chapter 8. Working with Chunk Description Files

Table of Contents

The ChunkDesc Editing Window
Labeling Individual Values of a Property
Properties with Enumerations
Properties that Reference or Embed ConfigChunks
Using DescHelp files

VjControl includes the ability to view and edit the Chunk Description files, allowing you to create new kinds of ConfigChunks or modify existing Chunks. Typically, there are two reasons you might want to do this:

  1. You're an application writer, and you want your application to be able to configure itself using the VR Juggler configuration mechanism. You could create a new kind of ConfigChunk that contains information specific to your application.

  2. You're developing a new component for VR Juggler - a device driver, or something similar. You would create a ConfigChunk to define the driver's configuration info, which could include things like serial port name and speed, calibration files, and so on.

You can load and edit VR Juggler Chunk Description Files by clicking on the "Descriptions" tab of VjControl's main window. The Descriptions panel is similar to the Configure panel, without the side-by-side display of multiple files.

Figure 8.1. Descriptions Panel

Descriptions Panel

The ComboBox at the top of the panel lets you choose which of the loaded description files to display (in this case, the file is called ``chunksDesc''). Below that is a list of all the ChunkDescs defined in the file. Click on a name to select it. You can double-click on a name to view or edit the ChunkDesc.

There are six buttons along the side of the panel:

The ChunkDesc Editing Window

Double-clicking on the name of a ChunkDesc brings up a new window, shown in Figure 8.2.

Figure 8.2. Chunk Description Editor

Chunk Description Editor

The uppermost part of the window displays basic information about the ChunkDesc. Every ChunkDesc has two identifiers: a descriptive name which is used for GUI displays, and a shorter token, which is used in the file format and internally by VR Juggler. The name can be any short descriptive phrase; the token should be terse and may not contain spaces. There is also a help string, which can be used to provide a general one-line description of what the ChunkDesc is for.

The center of the ChunkDesc editing window displays a scrollable list of all the properties that ConfigChunks using this description should have. Every ChunkDesc includes a Name property, which is actually used to store the instance name for ConfigChunks of that type. The number and type of other properties can vary.

Users can add a new property by pressing the "Insert" button at the bottom of the window. Properties can be removed by selecting them (clicking on the background of the property's box) and then pressing the "Remove" button.

As with the ChunkDesc itself, each property has a descriptive name and short token, as well as a help string. Some properties can have multiple values (e.g. a position with separate x, y, and z values); this can be defined by entering the desired number of values in the "Number" box, or by selecting the "Var Arguments" value, for a property with a variable number of values.

Every property has a specific type of legal values (integers, strings, etc.); this is selected in the "Type" box. The meanings of the different types are explained in the ConfigChunk Primer.