halcfg.pl Syntax

halcfg.pl is a Perl script that is used by the build system to generate the C++ source files from the Config and Values files.

There are four modes in which the Perl script halcfg.pl can be used.

  • perl halcfg.pl hal_data.h values.hda values.cpp

    takes the values.hda text file and generates a table of initial values for items stored by the HAL.

  • perl halcfg.pl -x hal_data.h config.hcf config.cpp

    generates three tables:

    • the properties, i.e. whether valid and/or writable, for each item

    • the offset of each item within the DllGlobal block

    • the function implementing each item, for derived attributes (i.e. those attributes that are not simply stored by the HAL.

  • perl halcfg.pl -s hal_data.h config.hcf source.cpp

    generates a source file containing skeleton code for the implementation of the accessor function for each derived attribute

  • perl halcfg.pl -h hal_data.h config.hcf header.h

    generates a header file containing prototypes for the accessor functions for each derived attribute

Note that the header file hal_data.h containing the attributes and values used by the HAL is passed on all calls to the Perl script.