• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  *  Copyright (C) 2001-2012 Broadcom Corporation
4  *
5  *  Licensed under the Apache License, Version 2.0 (the "License");
6  *  you may not use this file except in compliance with the License.
7  *  You may obtain a copy of the License at:
8  *
9  *  http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *  Unless required by applicable law or agreed to in writing, software
12  *  distributed under the License is distributed on an "AS IS" BASIS,
13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *  See the License for the specific language governing permissions and
15  *  limitations under the License.
16  *
17  ******************************************************************************/
18 
19 /******************************************************************************
20  *
21  *  Contains the LogMsg wrapper routines for BTE.  It routes calls the
22  *  appropriate application's LogMsg equivalent.
23  *
24  ******************************************************************************/
25 
26 #include <stdio.h>
27 #include <stdlib.h>
28 #include <string.h>
29 #include <stdarg.h>
30 
31 #include "gki.h"
32 #include "bte.h"
33 
34 #include "bte_appl.h"
35 
36 #if MMI_INCLUDED == TRUE
37 #include "mmi.h"
38 #endif
39 
40 /* always enable trace framework */
41 
42 #include "btu.h"
43 #include "l2c_api.h"
44 #if (RFCOMM_INCLUDED==TRUE)
45 #include "port_api.h"
46 #endif
47 #if (OBX_INCLUDED==TRUE)
48 #include "obx_api.h"
49 #endif
50 #if (AVCT_INCLUDED==TRUE)
51 #include "avct_api.h"
52 #endif
53 #if (AVDT_INCLUDED==TRUE)
54 #include "avdt_api.h"
55 #endif
56 #if (AVRC_INCLUDED==TRUE)
57 #include "avrc_api.h"
58 #endif
59 #if (AVDT_INCLUDED==TRUE)
60 #include "avdt_api.h"
61 #endif
62 #if (A2D_INCLUDED==TRUE)
63 #include "a2d_api.h"
64 #endif
65 #if (BIP_INCLUDED==TRUE)
66 #include "bip_api.h"
67 #endif
68 #if (BNEP_INCLUDED==TRUE)
69 #include "bnep_api.h"
70 #endif
71 #if (BPP_INCLUDED==TRUE)
72 #include "bpp_api.h"
73 #endif
74 #include "btm_api.h"
75 #if (DUN_INCLUDED==TRUE)
76 #include "dun_api.h"
77 #endif
78 #if (GAP_INCLUDED==TRUE)
79 #include "gap_api.h"
80 #endif
81 #if (GOEP_INCLUDED==TRUE)
82 #include "goep_util.h"
83 #endif
84 #if (HCRP_INCLUDED==TRUE)
85 #include "hcrp_api.h"
86 #endif
87 #if (PAN_INCLUDED==TRUE)
88 #include "pan_api.h"
89 #endif
90 #include "sdp_api.h"
91 
92 #if (BLE_INCLUDED==TRUE)
93 #include "gatt_api.h"
94 #include "smp_api.h"
95 #endif
96 
97     /* LayerIDs for BTA, currently everything maps onto appl_trace_level */
98 #if (BTA_INCLUDED==TRUE)
99 #include "bta_api.h"
100 #endif
101 
102 
103 #if defined(__CYGWIN__) || defined(__linux__)
104 #undef RPC_INCLUDED
105 #define RPC_INCLUDED TRUE
106 
107 #include <sys/time.h>
108 #include <time.h>
109 
110 #if (defined(ANDROID_USE_LOGCAT) && (ANDROID_USE_LOGCAT==TRUE))
111 const char * const bt_layer_tags[] = {
112     "bt-btif",
113     "bt-usb",
114     "bt-serial",
115     "bt-socket",
116     "bt-rs232",
117     "bt-lc",
118     "bt-lm",
119     "bt-hci",
120     "bt-l2cap",
121     "bt-rfcomm",
122     "bt-sdp",
123     "bt-tcs",
124     "bt-obex",
125     "bt-btm",
126     "bt-gap",
127     "bt-dun",
128     "bt-goep",
129     "bt-icp",
130     "bt-hsp2",
131     "bt-spp",
132     "bt-ctp",
133     "bt-bpp",
134     "bt-hcrp",
135     "bt-ftp",
136     "bt-opp",
137     "bt-btu",
138     "bt-gki",
139     "bt-bnep",
140     "bt-pan",
141     "bt-hfp",
142     "bt-hid",
143     "bt-bip",
144     "bt-avp",
145     "bt-a2d",
146     "bt-sap",
147     "bt-amp",
148     "bt-mca",
149     "bt-att",
150     "bt-smp",
151     "bt-nfc",
152     "bt-nci",
153     "bt-idep",
154     "bt-ndep",
155     "bt-llcp",
156     "bt-rw",
157     "bt-ce",
158     "bt-snep",
159     "bt-ndef",
160     "bt-nfa",
161 };
162 
163 #ifndef LINUX_NATIVE
164 #include <cutils/log.h>
165 #define LOGI0(t,s) __android_log_write(ANDROID_LOG_INFO, t, s)
166 #define LOGD0(t,s) __android_log_write(ANDROID_LOG_DEBUG, t, s)
167 #define LOGW0(t,s) __android_log_write(ANDROID_LOG_WARN, t, s)
168 #define LOGE0(t,s) __android_log_write(ANDROID_LOG_ERROR, t, s)
169 
170 #else
171 #undef ANDROID_USE_LOGCAT
172 #endif
173 
174 #endif
175 
176 
177 //#include "btl_cfg.h"
178 #define BTL_GLOBAL_PROP_TRC_FLAG "TRC_BTAPP"
179 #ifndef DEFAULT_CONF_TRACE_LEVEL
180 #define DEFAULT_CONF_TRACE_LEVEL BT_TRACE_LEVEL_WARNING
181 #endif
182 
183 #ifndef BTE_LOG_BUF_SIZE
184 #define BTE_LOG_BUF_SIZE  1024
185 #endif
186 #define BTE_LOG_MAX_SIZE  (BTE_LOG_BUF_SIZE - 12)
187 
188 
189 //#define BTE_MAP_TRACE_LEVEL FALSE
190 /* map by default BTE trace levels onto android trace levels */
191 #ifndef BTE_MAP_TRACE_LEVEL
192 #define BTE_MAP_TRACE_LEVEL TRUE
193 #endif
194 
195 // #define BTE_ANDROID_INTERNAL_TIMESTAMP TRUE
196 /* by default no internal timestamp. adb logcate -v time allows having timestamps */
197 #ifndef BTE_ANDROID_INTERNAL_TIMESTAMP
198 #define BTE_ANDROID_INTERNAL_TIMESTAMP FALSE
199 #endif
200 #if (BTE_ANDROID_INTERNAL_TIMESTAMP==TRUE)
201 #define MSG_BUFFER_OFFSET strlen(buffer)
202 #else
203 #define MSG_BUFFER_OFFSET 0
204 #endif
205 
206 //#define DBG_TRACE
207 
208 #if defined( DBG_TRACE )
209 #define DBG_TRACE_API0( m ) BT_TRACE_0( TRACE_LAYER_HCI, TRACE_TYPE_API, m )
210 #define DBG_TRACE_WARNING2( m, p0, p1 ) BT_TRACE_2( TRACE_LAYER_BTM, (TRACE_ORG_APPL|TRACE_TYPE_WARNING), m, p0, p1 )
211 #else
212 #define DBG_TRACE_API0( m )
213 #define DBG_TRACE_WARNING2( m, p0, p1 )
214 #endif
215 #define DBG_TRACE_DEBUG2( m, p0, p1 ) BT_TRACE_2( TRACE_LAYER_BTM, (TRACE_ORG_APPL|TRACE_TYPE_DEBUG), m, p0, p1 )
216 
217 void
LogMsg(UINT32 trace_set_mask,const char * fmt_str,...)218 LogMsg(UINT32 trace_set_mask, const char *fmt_str, ...)
219 {
220 	static char buffer[BTE_LOG_BUF_SIZE];
221     int trace_layer = TRACE_GET_LAYER(trace_set_mask);
222     if (trace_layer >= TRACE_LAYER_MAX_NUM)
223         trace_layer = 0;
224 
225 	va_list ap;
226 #if (BTE_ANDROID_INTERNAL_TIMESTAMP==TRUE)
227 	struct timeval tv;
228 	struct timezone tz;
229 	struct tm *tm;
230 	time_t t;
231 
232 	gettimeofday(&tv, &tz);
233 	time(&t);
234 	tm = localtime(&t);
235 
236     sprintf(buffer, "%02d:%02d:%02d.%03d ", tm->tm_hour, tm->tm_min, tm->tm_sec,
237         tv.tv_usec / 1000);
238 #endif
239 	va_start(ap, fmt_str);
240 	vsnprintf(&buffer[MSG_BUFFER_OFFSET], BTE_LOG_MAX_SIZE, fmt_str, ap);
241 	va_end(ap);
242 
243 #if (defined(ANDROID_USE_LOGCAT) && (ANDROID_USE_LOGCAT==TRUE))
244 #if (BTE_MAP_TRACE_LEVEL==TRUE)
245     switch ( TRACE_GET_TYPE(trace_set_mask) )
246     {
247         case TRACE_TYPE_ERROR:
248             LOGE0(bt_layer_tags[trace_layer], buffer);
249             break;
250         case TRACE_TYPE_WARNING:
251             LOGW0(bt_layer_tags[trace_layer], buffer);
252             break;
253         case TRACE_TYPE_API:
254         case TRACE_TYPE_EVENT:
255             LOGI0(bt_layer_tags[trace_layer], buffer);
256             break;
257         case TRACE_TYPE_DEBUG:
258             LOGD0(bt_layer_tags[trace_layer], buffer);
259             break;
260         default:
261             LOGE0(bt_layer_tags[trace_layer], buffer);      /* we should never get this */
262             break;
263     }
264 #else
265     LOGI0(bt_layer_tags[trace_layer], buffer);
266 #endif
267 #else
268 	write(2, buffer, strlen(buffer));
269 	write(2, "\n", 1);
270 #endif
271 }
272 
273 void
ScrLog(UINT32 trace_set_mask,const char * fmt_str,...)274 ScrLog(UINT32 trace_set_mask, const char *fmt_str, ...)
275 {
276 	static char buffer[BTE_LOG_BUF_SIZE];
277 
278 	va_list ap;
279 	struct timeval tv;
280 	struct timezone tz;
281 	struct tm *tm;
282 	time_t t;
283     int trace_layer = TRACE_GET_LAYER(trace_set_mask);
284     if (trace_layer >= TRACE_LAYER_MAX_NUM)
285         trace_layer = 0;
286 	gettimeofday(&tv, &tz);
287 	time(&t);
288 	tm = localtime(&t);
289 
290         sprintf(buffer, "%02d:%02d:%02d.%03ld ", tm->tm_hour, tm->tm_min, tm->tm_sec,
291         tv.tv_usec / 1000);
292 
293 	va_start(ap, fmt_str);
294 	vsnprintf(&buffer[strlen(buffer)], BTE_LOG_MAX_SIZE, fmt_str, ap);
295 	va_end(ap);
296 
297 #if (defined(ANDROID_USE_LOGCAT) && (ANDROID_USE_LOGCAT==TRUE))
298     LOGI0(bt_layer_tags[trace_layer], buffer);
299 #else
300 	write(2, buffer, strlen(buffer));
301 	write(2, "\n", 1);
302 #endif
303 }
304 
305 /* this function should go into BTAPP_DM for example */
BTAPP_SetTraceLevel(UINT8 new_level)306 BT_API UINT8 BTAPP_SetTraceLevel( UINT8 new_level )
307 {
308     if (new_level != 0xFF)
309         appl_trace_level = new_level;
310 
311     return (appl_trace_level);
312 }
313 
BTIF_SetTraceLevel(UINT8 new_level)314 BT_API UINT8 BTIF_SetTraceLevel( UINT8 new_level )
315 {
316     if (new_level != 0xFF)
317         btif_trace_level = new_level;
318 
319     return (btif_trace_level);
320 }
321 
BTU_SetTraceLevel(UINT8 new_level)322 BTU_API UINT8 BTU_SetTraceLevel( UINT8 new_level )
323 {
324     if (new_level != 0xFF)
325         btu_cb.trace_level = new_level;
326 
327     return (btu_cb.trace_level);
328 }
329 
330 BOOLEAN trace_conf_enabled = FALSE;
331 
bte_trace_conf(char * p_conf_name,char * p_conf_value)332 void bte_trace_conf(char *p_conf_name, char *p_conf_value)
333 {
334     tBTTRC_FUNC_MAP *p_f_map = (tBTTRC_FUNC_MAP *) &bttrc_set_level_map[0];
335 
336     while (p_f_map->trc_name != NULL)
337     {
338         if (strcmp(p_f_map->trc_name, (const char *)p_conf_name) == 0)
339         {
340             p_f_map->trace_level = (UINT8) atoi(p_conf_value);
341             break;
342         }
343         p_f_map++;
344     }
345 }
346 
347 /********************************************************************************
348  **
349  **    Function Name:    BTA_SysSetTraceLevel
350  **
351  **    Purpose:          set or reads the different Trace Levels of layer IDs (see bt_trace.h,
352  **                      BTTRC_ID_xxxx
353  **
354  **    Input Parameters: Array with trace layers to set to a given level or read. a layer ID of 0
355  **                      defines the end of the list
356  **                      WARNING: currently type should be 0-5! or FF for reading!!!!
357  **
358  **    Returns:
359  **                      input array with trace levels for given layer id
360  **
361  *********************************************************************************/
BTA_SysSetTraceLevel(tBTTRC_LEVEL * p_levels)362 BT_API tBTTRC_LEVEL * BTA_SysSetTraceLevel(tBTTRC_LEVEL * p_levels)
363 {
364     const tBTTRC_FUNC_MAP *p_f_map;
365     tBTTRC_LEVEL *p_l = p_levels;
366 
367     DBG_TRACE_API0( "BTA_SysSetTraceLevel()" );
368 
369     while (0 != p_l->layer_id)
370     {
371         p_f_map = &bttrc_set_level_map[0];
372 
373         while (0 != p_f_map->layer_id_start)
374         {
375             printf("BTA_SysSetTraceLevel - trace id in map start = %d end= %d,  paramter id = %d\r\n", p_f_map->layer_id_start, p_f_map->layer_id_end, p_l->layer_id );
376             /* as p_f_map is ordered by increasing layer id, go to next map entry as long end id
377              * is smaller */
378             //if (p_f_map->layer_id_end < p_l->layer_id)
379             //{
380                 //p_f_map++;
381             //}
382             //else
383             {
384                 /* check if layer_id actually false into a range or if it is note existing in the  map */
385                 if ((NULL != p_f_map->p_f) && (p_f_map->layer_id_start <= p_l->layer_id) && (p_f_map->layer_id_end >= p_l->layer_id) )
386                 {
387                     DBG_TRACE_DEBUG2( "BTA_SysSetTraceLevel( id:%d, level:%d ): setting/reading",
388                             p_l->layer_id, p_l->type );
389                     p_l->type = p_f_map->p_f(p_l->type);
390                     break;
391                 }
392                 else
393                 {
394                     DBG_TRACE_WARNING2( "BTA_SysSetTraceLevel( id:%d, level:%d ): MISSING Set function OR ID in map!",
395                             p_l->layer_id, p_l->type );
396                 }
397                 /* set/read next trace level by getting out ot map loop */
398                 //p_l++;
399                 //break;
400             }
401             p_f_map++;
402         }
403         //if (0 == p_f_map->layer_id_start)
404         {
405             DBG_TRACE_WARNING2( "BTA_SysSetTraceLevel( id:%d, level:%d ): ID NOT FOUND in map. Skip to next",
406                     p_l->layer_id, p_l->type );
407             p_l++;
408         }
409     }
410 
411     return p_levels;
412 } /* BTA_SysSetTraceLevel() */
413 
414 /* make sure list is order by increasing layer id!!! */
415 tBTTRC_FUNC_MAP bttrc_set_level_map[] = {
416     {BTTRC_ID_STK_BTU, BTTRC_ID_STK_HCI, BTU_SetTraceLevel, "TRC_HCI", DEFAULT_CONF_TRACE_LEVEL},
417     {BTTRC_ID_STK_L2CAP, BTTRC_ID_STK_L2CAP, L2CA_SetTraceLevel, "TRC_L2CAP", DEFAULT_CONF_TRACE_LEVEL},
418 #if (RFCOMM_INCLUDED==TRUE)
419     {BTTRC_ID_STK_RFCOMM, BTTRC_ID_STK_RFCOMM_DATA, PORT_SetTraceLevel, "TRC_RFCOMM", DEFAULT_CONF_TRACE_LEVEL},
420 #endif
421 #if (OBX_INCLUDED==TRUE)
422     {BTTRC_ID_STK_OBEX, BTTRC_ID_STK_OBEX, OBX_SetTraceLevel, "TRC_OBEX", DEFAULT_CONF_TRACE_LEVEL},
423 #endif
424 #if (AVCT_INCLUDED==TRUE)
425     //{BTTRC_ID_STK_AVCT, BTTRC_ID_STK_AVCT, NULL, "TRC_AVCT", DEFAULT_CONF_TRACE_LEVEL},
426 #endif
427 #if (AVDT_INCLUDED==TRUE)
428     {BTTRC_ID_STK_AVDT, BTTRC_ID_STK_AVDT, AVDT_SetTraceLevel, "TRC_AVDT", DEFAULT_CONF_TRACE_LEVEL},
429 #endif
430 #if (AVRC_INCLUDED==TRUE)
431     {BTTRC_ID_STK_AVRC, BTTRC_ID_STK_AVRC, AVRC_SetTraceLevel, "TRC_AVRC", DEFAULT_CONF_TRACE_LEVEL},
432 #endif
433 #if (AVDT_INCLUDED==TRUE)
434     //{BTTRC_ID_AVDT_SCB, BTTRC_ID_AVDT_CCB, NULL, "TRC_AVDT_SCB", DEFAULT_CONF_TRACE_LEVEL},
435 #endif
436 #if (A2D_INCLUDED==TRUE)
437     {BTTRC_ID_STK_A2D, BTTRC_ID_STK_A2D, A2D_SetTraceLevel, "TRC_A2D", DEFAULT_CONF_TRACE_LEVEL},
438 #endif
439 #if (BIP_INCLUDED==TRUE)
440     {BTTRC_ID_STK_BIP, BTTRC_ID_STK_BIP, BIP_SetTraceLevel, "TRC_BIP", DEFAULT_CONF_TRACE_LEVEL},
441 #endif
442 #if (BNEP_INCLUDED==TRUE)
443     {BTTRC_ID_STK_BNEP, BTTRC_ID_STK_BNEP, BNEP_SetTraceLevel, "TRC_BNEP", DEFAULT_CONF_TRACE_LEVEL},
444 #endif
445 #if (BPP_INCLUDED==TRUE)
446     {BTTRC_ID_STK_BPP, BTTRC_ID_STK_BPP, BPP_SetTraceLevel, "TRC_BPP", DEFAULT_CONF_TRACE_LEVEL},
447 #endif
448     {BTTRC_ID_STK_BTM_ACL, BTTRC_ID_STK_BTM_SEC, BTM_SetTraceLevel, "TRC_BTM", DEFAULT_CONF_TRACE_LEVEL},
449 #if (DUN_INCLUDED==TRUE)
450     {BTTRC_ID_STK_DUN, BTTRC_ID_STK_DUN, DUN_SetTraceLevel, "TRC_DUN", DEFAULT_CONF_TRACE_LEVEL},
451 #endif
452 #if (GAP_INCLUDED==TRUE)
453     {BTTRC_ID_STK_GAP, BTTRC_ID_STK_GAP, GAP_SetTraceLevel, "TRC_GAP", DEFAULT_CONF_TRACE_LEVEL},
454 #endif
455 #if (GOEP_INCLUDED==TRUE)
456     {BTTRC_ID_STK_GOEP, BTTRC_ID_STK_GOEP, GOEP_SetTraceLevel, "TRC_GOEP", DEFAULT_CONF_TRACE_LEVEL},
457 #endif
458 #if (HCRP_INCLUDED==TRUE)
459     {BTTRC_ID_STK_HCRP, BTTRC_ID_STK_HCRP, HCRP_SetTraceLevel, "TRC_HCRP", DEFAULT_CONF_TRACE_LEVEL},
460 #endif
461 #if (PAN_INCLUDED==TRUE)
462     {BTTRC_ID_STK_PAN, BTTRC_ID_STK_PAN, PAN_SetTraceLevel, "TRC_PAN", DEFAULT_CONF_TRACE_LEVEL},
463 #endif
464 #if (SAP_SERVER_INCLUDED==TRUE)
465     {BTTRC_ID_STK_SAP, BTTRC_ID_STK_SAP, NULL, "TRC_SAP", DEFAULT_CONF_TRACE_LEVEL},
466 #endif
467     {BTTRC_ID_STK_SDP, BTTRC_ID_STK_SDP, SDP_SetTraceLevel, "TRC_SDP", DEFAULT_CONF_TRACE_LEVEL},
468 #if (BLE_INCLUDED==TRUE)
469     {BTTRC_ID_STK_GATT, BTTRC_ID_STK_GATT, GATT_SetTraceLevel, "TRC_GATT", DEFAULT_CONF_TRACE_LEVEL},
470     {BTTRC_ID_STK_SMP, BTTRC_ID_STK_SMP, SMP_SetTraceLevel, "TRC_SMP", DEFAULT_CONF_TRACE_LEVEL},
471 #endif
472 
473 #if (BTA_INCLUDED==TRUE)
474     /* LayerIDs for BTA, currently everything maps onto appl_trace_level.
475      * BTL_GLOBAL_PROP_TRC_FLAG serves as flag in conf.
476      */
477     {BTTRC_ID_BTA_ACC, BTTRC_ID_BTAPP, BTAPP_SetTraceLevel, BTL_GLOBAL_PROP_TRC_FLAG, DEFAULT_CONF_TRACE_LEVEL},
478 #endif
479 
480 #if (BT_TRACE_BTIF == TRUE)
481     {BTTRC_ID_BTA_ACC, BTTRC_ID_BTAPP, BTIF_SetTraceLevel, "TRC_BTIF", DEFAULT_CONF_TRACE_LEVEL},
482 #endif
483 
484     {0, 0, NULL, NULL, DEFAULT_CONF_TRACE_LEVEL}
485 };
486 
487 const UINT16 bttrc_map_size = sizeof(bttrc_set_level_map)/sizeof(tBTTRC_FUNC_MAP);
488 #endif
489 
490 /********************************************************************************
491  **
492  **    Function Name:     BTE_InitTraceLevels
493  **
494  **    Purpose:           This function can be used to set the boot time reading it from the
495  **                       platform.
496  **                       WARNING: it is called under BTU context and it blocks the BTU task
497  **                       till it returns (sync call)
498  **
499  **    Input Parameters:  None, platform to provide levels
500  **    Returns:
501  **                       Newly set levels, if any!
502  **
503  *********************************************************************************/
BTE_InitTraceLevels(void)504 BT_API void BTE_InitTraceLevels( void )
505 {
506     /* read and set trace levels by calling the different XXX_SetTraceLevel().
507      */
508 #if ( BT_USE_TRACES==TRUE )
509     if (trace_conf_enabled == TRUE)
510     {
511         tBTTRC_FUNC_MAP *p_f_map = (tBTTRC_FUNC_MAP *) &bttrc_set_level_map[0];
512 
513         while (p_f_map->trc_name != NULL)
514         {
515             ALOGI("BTE_InitTraceLevels -- %s", p_f_map->trc_name);
516 
517             if (p_f_map->p_f)
518                 p_f_map->p_f(p_f_map->trace_level);
519 
520             p_f_map++;
521         }
522     }
523     else
524     {
525         ALOGI("[bttrc] using compile default trace settings");
526     }
527 #endif
528 }
529 
530 
531 /********************************************************************************
532  **
533  **    Function Name:   LogMsg_0
534  **
535  **    Purpose:  Encodes a trace message that has no parameter arguments
536  **
537  **    Input Parameters:  trace_set_mask: tester trace type.
538  **                       fmt_str: displayable string.
539  **    Returns:
540  **                      Nothing.
541  **
542  *********************************************************************************/
LogMsg_0(UINT32 trace_set_mask,const char * fmt_str)543 void LogMsg_0(UINT32 trace_set_mask, const char *fmt_str) {
544     LogMsg(trace_set_mask, fmt_str);
545 }
546 
547 /********************************************************************************
548  **
549  **    Function Name:   LogMsg_1
550  **
551  **    Purpose:  Encodes a trace message that has one parameter argument
552  **
553  **    Input Parameters:  trace_set_mask: tester trace type.
554  **                       fmt_str: displayable string.
555  **    Returns:
556  **                      Nothing.
557  **
558  *********************************************************************************/
LogMsg_1(UINT32 trace_set_mask,const char * fmt_str,UINT32 p1)559 void LogMsg_1(UINT32 trace_set_mask, const char *fmt_str, UINT32 p1) {
560 
561     LogMsg(trace_set_mask, fmt_str, p1);
562 }
563 
564 /********************************************************************************
565  **
566  **    Function Name:   LogMsg_2
567  **
568  **    Purpose:  Encodes a trace message that has two parameter arguments
569  **
570  **    Input Parameters:  trace_set_mask: tester trace type.
571  **                       fmt_str: displayable string.
572  **    Returns:
573  **                      Nothing.
574  **
575  *********************************************************************************/
LogMsg_2(UINT32 trace_set_mask,const char * fmt_str,UINT32 p1,UINT32 p2)576 void LogMsg_2(UINT32 trace_set_mask, const char *fmt_str, UINT32 p1, UINT32 p2) {
577     LogMsg(trace_set_mask, fmt_str, p1, p2);
578 }
579 
580 /********************************************************************************
581  **
582  **    Function Name:   LogMsg_3
583  **
584  **    Purpose:  Encodes a trace message that has three parameter arguments
585  **
586  **    Input Parameters:  trace_set_mask: tester trace type.
587  **                       fmt_str: displayable string.
588  **    Returns:
589  **                      Nothing.
590  **
591  *********************************************************************************/
LogMsg_3(UINT32 trace_set_mask,const char * fmt_str,UINT32 p1,UINT32 p2,UINT32 p3)592 void LogMsg_3(UINT32 trace_set_mask, const char *fmt_str, UINT32 p1, UINT32 p2,
593         UINT32 p3) {
594     LogMsg(trace_set_mask, fmt_str, p1, p2, p3);
595 }
596 
597 /********************************************************************************
598  **
599  **    Function Name:   LogMsg_4
600  **
601  **    Purpose:  Encodes a trace message that has four parameter arguments
602  **
603  **    Input Parameters:  trace_set_mask: tester trace type.
604  **                       fmt_str: displayable string.
605  **    Returns:
606  **                      Nothing.
607  **
608  *********************************************************************************/
LogMsg_4(UINT32 trace_set_mask,const char * fmt_str,UINT32 p1,UINT32 p2,UINT32 p3,UINT32 p4)609 void LogMsg_4(UINT32 trace_set_mask, const char *fmt_str, UINT32 p1, UINT32 p2,
610         UINT32 p3, UINT32 p4) {
611     LogMsg(trace_set_mask, fmt_str, p1, p2, p3, p4);
612 }
613 
614 /********************************************************************************
615  **
616  **    Function Name:   LogMsg_5
617  **
618  **    Purpose:  Encodes a trace message that has five parameter arguments
619  **
620  **    Input Parameters:  trace_set_mask: tester trace type.
621  **                       fmt_str: displayable string.
622  **    Returns:
623  **                      Nothing.
624  **
625  *********************************************************************************/
LogMsg_5(UINT32 trace_set_mask,const char * fmt_str,UINT32 p1,UINT32 p2,UINT32 p3,UINT32 p4,UINT32 p5)626 void LogMsg_5(UINT32 trace_set_mask, const char *fmt_str, UINT32 p1, UINT32 p2,
627         UINT32 p3, UINT32 p4, UINT32 p5) {
628     LogMsg(trace_set_mask, fmt_str, p1, p2, p3, p4, p5);
629 }
630 
631 /********************************************************************************
632  **
633  **    Function Name:   LogMsg_6
634  **
635  **    Purpose:  Encodes a trace message that has six parameter arguments
636  **
637  **    Input Parameters:  trace_set_mask: tester trace type.
638  **                       fmt_str: displayable string.
639  **    Returns:
640  **                      Nothing.
641  **
642  *********************************************************************************/
LogMsg_6(UINT32 trace_set_mask,const char * fmt_str,UINT32 p1,UINT32 p2,UINT32 p3,UINT32 p4,UINT32 p5,UINT32 p6)643 void LogMsg_6(UINT32 trace_set_mask, const char *fmt_str, UINT32 p1, UINT32 p2,
644         UINT32 p3, UINT32 p4, UINT32 p5, UINT32 p6) {
645     LogMsg(trace_set_mask, fmt_str, p1, p2, p3, p4, p5, p6);
646 }
647