User's Manual

Engineering Test Software Operation
Rev 28_A Sept 2005
VIA Telecom, Inc. Proprietary
3
3 Message Definition Files
When ETS is loaded it reads the EtsMsg.txt file and all of the referenced include files. It contains descriptions of
each of the messages to be exchanged with the CP as well as various configurations items. A fatal error occurs
if an invalid message definition exists in the file. A list defining each message will be in the file, in addition to
definitions of the fields within each message.
An encrypted form of the ETS message definition file can also be used. The filename is EtsMsg.bin. It is used in
the same manner as EtsMsg.txt. Loading EtsMsg.bin will take precedence over EtsMsg.txt if they exist in the
same directory. Refer to section 4.6, “ViaCrypt Utility,” for details on how to create an encrypted definition file.
3.1 File Usage Syntax
3.1.1 Include Files
Multiple message definition files can be incorporated to better organize the message definitions. Include files
are specified outside of the definitions and cannot have circular references. The following format is used:
Include <filename>
3.1.2 Define Statements
A "C Language" like ifdef syntax is used to control the interpretation of the definitions. The definitions
themselves are specified using the "Defines" dialog box from the File/Defines… menu item. Definition strings
must not contain space or tab characters. The following statements are allowed:
#ifdef <parameters>| Comments|
#ifndef <parameters>| Comments|
#else| Comments|
#else ifdef <parameters>| Comments|
#else ifndef <parameters>| Comments|
#endif| Comments|
#define <parameter>
These can be nested in the same manner that is done in the C language. Care should be taken since the effect
of the statements cross into and out of include files.
Parameters are either a single definition value or a boolean statement. For example:
#ifdef ADEFINITION This is a comment for a single definition.
Boolean statements must be surrounded by parentheses. Examples are:
#ifdef (FIRST & SECOND) This is a comment for a boolean statement
#ifdef (FIRST | SECOND)
#ifdef (~FIRST | SECOND)
#ifdef (FIRST | (SECOND & THIRD))
Comments can follow the parameters if desired. Either a space character or a trailing parenthesis will separate
the parameters from the comment.
3.1.3 Syntax Checking Pragma
There is a mode to run ETS called full syntax check mode, with option –s or /s. Under full syntax checking
mode, ETS will check for syntax errors in ETS text files. One of the syntax errors is field name duplication error.