Notes for Programmers - Parameters

1.  Parameter records are stored contiguously within the parameter section and start immediately following the parameter header.  Parameter records 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).  Some non-compliant applications may expect the parameter section to contain a final 512-byte block that contains the value 0x00h.

2.  The parameters are organized into groups – each parameter is a member of a single group.

3.  Parameter names within a group must be unique so that applications can search for specific parameters by name.  Parameter names may be reused so long as they are in different groups – thus the two RATE parameters, POINT:RATE and ANALOG:RATE are unique and can be read without confusion.

4.  The first two bytes of the parameter header record are only meaningful when the parameter section starts at the beginning of the file (as in ADTech parameter files), but some C3D software applications may (erroneously) expect them to be set to the values that they would have in a parameter file.  Applications that access C3D files should maintain these values for compatibility with older non-compliant applications.

5.  The actual parameter data starts at byte 5 of the first block of the parameter section.

6.  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 group names are converted to upper case when they are read to ensure that parameter matches are not sensitive to case.

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

8.  It is not uncommon for applications to create, modify and/or delete parameters from the parameter section.  The C3D format does not require that parameter deletion be done in any particular order.  As a result, programs that read the parameter section should not assume that the contents are in any particular order and it is quite possible for parameters to be listed earlier in the parameter section than the group names to which they belong.

9.  The original, ASCII text, C3D specification contained a description of a C3D file that stated that the parameter section started at the second block in the file.  While this was accurate for the C3D file example used in the original specification, this has caused some programmers to assume that the parameter section can always be found starting at the second block in the C3D file – this is incorrect.  It is very important to note that the C3D file parameter section always starts at the location pointed to by the byte pointer in the first word of the C3D file header.

10. The pointer-based structure of the C3D parameter block makes it very easy to scan through the parameters to catalog their structure without any requirement to decode the individual parameter values.