User's Manual

Engineering Test Software Operation
Rev 28_A Sept 2005
38 VIA Telecom, Inc. Proprietary
4 Utilities
4.1 Include File Generator
A set of include files can be generated from the message definition files. The names of the files and the
contents of the files are specified in a definition file that is selected using the Log/Make Include… menu item.
Two types of “C” definitions can be created using this utility. The first is an enumerated list, and the other is an
initialized list of strings.
4.1.1 Enumerated List Generation
Each definition causes an include file to be generated. In the following example the file is EtsId.h. A single
command file could contain multiple definitions, thereby generating multiple files.
Files which contain default header and footer information for the target include file can be specified. The header
file is copied to the target file at the start of the process, and at the end of the process the footer file is appended
to the target file.
The ENUM statements specify an enumeration definition that will be converted into a typedef enum.. In the
example the "ETS Id" enumeration from the etsmsg.txt file would be selected. The NAME parameter is optional
and specifies the name of the typedef. The PRE parameter is optional and specifies a string that is to be
attached to the beginning of the name of each enumerated value. The POST parameter is optional and specifies
a string that is appended to the name of each enumerated value.
The following is an example include definition and its resulting typedef:
Include definition
Begin Include, EtsId.h
Header, EtsIdPre.h
Footer, EtsIdPost.h
enum, ETS Id, name=EtsIdT, pre=MON_, post=_SYS
End
Enum definition from the message definition file
Begin ENUM, ETS Id
Loopback, 0, CR, Debug
Fault, 1, RO, Debug
End
Generated enumerated list
typedef enum
{
MON_LOOPBACK_SYS=0,
MON_FAULT_SYS=1
} EtsIdT;
4.1.2 String List Generation
The string list generator is designed to support Trace message testing. It extracts the help information that is
associated with a list of enumerated values specified in the message definition file. As in the include file
definition the name of the file can be specified. The only parameter used for the ENUM statements is the NAME.