User's Manual

Engineering Test Software Operation
Rev 28_A Sept 2005
22 VIA Telecom, Inc. Proprietary
3.3.7.2 Union Field Examples
3.3.7.2.1 Example: Main Message
The following are excerpts from the main message definition identifier:
Begin ENUM, ETS Id
help ETS Message Identification values.
Loopback, 0, CR, Debug
Help Loopback Messages
MonFault, 1, RO
Spies, 101, CRM, SpyTest
End
3.3.7.2.2 Example: Command Response Message
The Loopback message has an Id equal to zero, being a command response type and having a menu item
located under a Debug submenu. Also the descriptive text of the value is Loopback Messages which would
appear when the command menu item for the loopback message is selected.
Based on this definition the following two definitions for loopback command and response message can be
made.
Begin Message, ETS Loopback Cmd
Help ETS Loopback message command
Data,array,type=uint8,maxsize=253,size=end,columns=60
End
Begin Message, ETS Loopback Rsp
Help ETS Loopback message response
Data,array,type=uint8,maxsize=253,size=end
End
3.3.7.2.3 Example: Response Only Message
The MonFault message is a response only message and has an Id equal to 1. This allows for the associated
response message to be defined as follows:
Begin Message, ETS MonFault Rsp
Proc, uint8, base=enum:ETS MonFault Processor
help Processor identification
Unit, union, enum=Proc
help Unit identifier
End
This case demonstrates that each message can itself contain a union and refer to other enumeration definitions.
In this specific example there is a union member for each processor.
3.3.7.2.4 Example: Command Response Sub-Message
The Spies message is a command response sub-message type and has an Id equal to 101. Because it is a
Command Response Message (CRM) type it must refer to a message definition that contains a union. In this
case the message definition is as follows: