Notes for programmers – Parameter Files

1.  The first word of a parameter file has the same format of the first word in a C3D file.

2.  The format of the parameter section of a parameter file is identical to that of a C3D file except for the first byte of the section.

3.  Parameter data values are stored contiguously within the parameter file and may overlap 512 byte block boundaries.  The parameter section will always occupy a whole number of 512 byte blocks – space between the end of the parameter records and the end of the parameter section should be cleared (filled with 0x00h).

4.  Do not assume that the pointer in the first word of the parameter file will be 0x01h.  Always read the pointer to determine the start of the parameter section.  There is no requirement in the description that the parameter section starts at the first block of the file.

5.  Spell group and parameter names correctly – a software application that expects to read data from a parameter called FORCE_PLATFORM may fail if the parameter has been spelt incorrectly as FORCE_PLATEFORM and the software searches for the entire parameter name rather than just the first six characters.

6.  Parameters are organized into groups – each parameter is a member of a single group such that the parameter SCALE in the ANALOG group is distinct and separate from the parameter SCALE in the POINT group.

7.  Although it is not required, parameter and group names are generally UPPER CASE and are written as GROUP:PARAMETER to avoid confusion, e.g.  ANALOG:SCALE.  All parameter and group names should be case insensitive in reading and writing – it is recommended that all parameter names are converted to upper case when they are read to ensure that parameter matches are not sensitive the case.

8.  A negative group number in the group header is normal.

9.  Parameters indicate which group they belong to by a positive group number in the parameter header.

10. Traditionally, all integers in a parameter file are signed integers with a range of –32768 to +32767 and all bytes are signed bytes with a range of –128 to +127.  However, imposes some limits of the size of various parameters and as a result some parameters may use unsigned integers.  Unfortunately, there is no flag to indicate that a parameter file uses unsigned integers.  The use of unsigned integers can only be determined by finding negative values in certain parameter, pointer or index values.  For example, reading a negative array index is a clear indicator that unsigned integers are being used. 

11. Group identifiers and parameters may appear in any order in the file.

12. It should be assumed that the previous comments made about the organization of parameter data within the C3D parameter section also apply to the parameter file.  It is not uncommon for applications to create, modify, and/or delete parameters from the parameter section.  The parameter file format does not require that parameter deletion be done in any particular order.  As a result, programs that read the parameter files should not assume that the contents would be in any particular order.

13. The same formats are used to store parameter information in both the C3D file parameter section and the individual parameter file.