User's Manual

Engineering Test Software Operation
Rev 28_A Sept 2005
72 VIA Telecom, Inc. Proprietary
6.2.1.1 Modify ETS Message Id and Message Body Definition Text files
On the ETS side, the file that defines all ETS commands is 'trace_id.txt'. The command message body
definitions are defined in each sub-unit ‘<unit>_trace.txt’ file and are included by ‘etsmsg.txt’. We will now
describe the steps for modifying both of these ETS text files.
6.2.1.1.1 Declare the New Trace in trace_id.txt
Open the file ‘/trace_id.txt’. This file contains several sub-unit menu declarations, including MON, HWD, etc.
Scroll down to the 'MMI Sub Menu' section in ‘trace_id.txt’ and add a new declaration for the new trace.
Example:
CP MMI Test Msg, [0x263], CT, CP/Trace/MMI
Again, the trace message id in the square brackets is optional.
6.2.1.1.2 Add the Trace Message Body to <mmi/mmi_trace.txt>
Open the file ‘/cp/mmi/mmi_trace.txt’. Go to the 'Start MMI Definitions' and add the trace message body. Note
that the MON task in the CP software that handles traces automatically adds a 32-bit system time variable to
the top of the trace data structure. Therefore, the trace message body will have to include the variable “Sys
Time, uint32” as its first argument.
Example:
Begin Message, CP Trace CP MMI Test Msg Rsp
PrintFormat, 1, 1, 0x%08X CP - MMI VRec Msg: MsgId=%s, NewState=%s
Sys Time, uint32
MsgId, uint32
End
6.2.1.2 Modify CBP CP Software Files
In the CBP CP software, adding an ETS trace involves declaring the new ETS trace ID in a global header file
and adding calls to MonTrace() to pass the desired information to ETS.
6.2.1.2.1 Declare New Trace ID in <inc/monids.h>
Add the new trace id to the 'MonTraceIdT' enumeration.
Example:
MON_CP_MMI_TEST_MSG_TRACE_ID,
6.2.1.2.2 Add MonTrace() Calls to Source Code
In the C source files, a 'MonTrace()' call can be added to send trace information to ETS wherever such
information is desired.
The prototype for 'MonTrace' is defined as follows:
extern void MonTrace(uint16 TraceId, uint32 NumArgs, ...);
Example:
/* display the incoming message id and the Test Message */
MonTrace (MON_CP_MMI_TEST_MSG_TRACE_ID, 2, (uint32) MsgId);