• 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 #endif
95 
96     /* LayerIDs for BTA, currently everything maps onto appl_trace_level */
97 #if (BTA_INCLUDED==TRUE)
98 #include "bta_api.h"
99 #endif
100 
101 
102 #if defined(__CYGWIN__) || defined(__linux__)
103 #undef RPC_INCLUDED
104 #define RPC_INCLUDED TRUE
105 
106 #include <sys/time.h>
107 #include <time.h>
108 
109 #if (defined(ANDROID_USE_LOGCAT) && (ANDROID_USE_LOGCAT==TRUE))
110 const char * const bt_layer_tags[] = {
111     "bt-btif",
112     "bt-usb",
113     "bt-serial",
114     "bt-socket",
115     "bt-rs232",
116     "bt-lc",
117     "bt-lm",
118     "bt-hci",
119     "bt-l2cap",
120     "bt-rfcomm",
121     "bt-sdp",
122     "bt-tcs",
123     "bt-obex",
124     "bt-btm",
125     "bt-gap",
126     "bt-dun",
127     "bt-goep",
128     "bt-icp",
129     "bt-hsp2",
130     "bt-spp",
131     "bt-ctp",
132     "bt-bpp",
133     "bt-hcrp",
134     "bt-ftp",
135     "bt-opp",
136     "bt-btu",
137     "bt-gki",
138     "bt-bnep",
139     "bt-pan",
140     "bt-hfp",
141     "bt-hid",
142     "bt-bip",
143     "bt-avp",
144     "bt-a2d",
145     "bt-sap",
146     "bt-amp",
147     "bt-mca",
148     "bt-att",
149     "bt-smp",
150     "bt-nfc",
151     "bt-nci",
152     "bt-idep",
153     "bt-ndep",
154     "bt-llcp",
155     "bt-rw",
156     "bt-ce",
157     "bt-snep",
158     "bt-ndef",
159     "bt-nfa",
160 };
161 
162 #ifndef LINUX_NATIVE
163 #include <cutils/log.h>
164 #define LOGI0(t,s) __android_log_write(ANDROID_LOG_INFO, t, s)
165 #define LOGD0(t,s) __android_log_write(ANDROID_LOG_DEBUG, t, s)
166 #define LOGW0(t,s) __android_log_write(ANDROID_LOG_WARN, t, s)
167 #define LOGE0(t,s) __android_log_write(ANDROID_LOG_ERROR, t, s)
168 
169 #else
170 #undef ANDROID_USE_LOGCAT
171 #endif
172 
173 #endif
174 
175 
176 //#include "btl_cfg.h"
177 #define BTL_GLOBAL_PROP_TRC_FLAG "TRC_BTAPP"
178 #ifndef DEFAULT_CONF_TRACE_LEVEL
179 #define DEFAULT_CONF_TRACE_LEVEL BT_TRACE_LEVEL_WARNING
180 #endif
181 
182 #ifndef BTE_LOG_BUF_SIZE
183 #define BTE_LOG_BUF_SIZE  1024
184 #endif
185 #define BTE_LOG_MAX_SIZE  (BTE_LOG_BUF_SIZE - 12)
186 
187 
188 //#define BTE_MAP_TRACE_LEVEL FALSE
189 /* map by default BTE trace levels onto android trace levels */
190 #ifndef BTE_MAP_TRACE_LEVEL
191 #define BTE_MAP_TRACE_LEVEL TRUE
192 #endif
193 
194 // #define BTE_ANDROID_INTERNAL_TIMESTAMP TRUE
195 /* by default no internal timestamp. adb logcate -v time allows having timestamps */
196 #ifndef BTE_ANDROID_INTERNAL_TIMESTAMP
197 #define BTE_ANDROID_INTERNAL_TIMESTAMP FALSE
198 #endif
199 #if (BTE_ANDROID_INTERNAL_TIMESTAMP==TRUE)
200 #define MSG_BUFFER_OFFSET strlen(buffer)
201 #else
202 #define MSG_BUFFER_OFFSET 0
203 #endif
204 
205 //#define DBG_TRACE
206 
207 #if defined( DBG_TRACE )
208 #define DBG_TRACE_API0( m ) BT_TRACE_0( TRACE_LAYER_HCI, TRACE_TYPE_API, m )
209 #define DBG_TRACE_WARNING2( m, p0, p1 ) BT_TRACE_2( TRACE_LAYER_BTM, (TRACE_ORG_APPL|TRACE_TYPE_WARNING), m, p0, p1 )
210 #else
211 #define DBG_TRACE_API0( m )
212 #define DBG_TRACE_WARNING2( m, p0, p1 )
213 #endif
214 #define DBG_TRACE_DEBUG2( m, p0, p1 ) BT_TRACE_2( TRACE_LAYER_BTM, (TRACE_ORG_APPL|TRACE_TYPE_DEBUG), m, p0, p1 )
215 
216 void
LogMsg(UINT32 trace_set_mask,const char * fmt_str,...)217 LogMsg(UINT32 trace_set_mask, const char *fmt_str, ...)
218 {
219 	static char buffer[BTE_LOG_BUF_SIZE];
220     int trace_layer = TRACE_GET_LAYER(trace_set_mask);
221     if (trace_layer >= TRACE_LAYER_MAX_NUM)
222         trace_layer = 0;
223 
224 	va_list ap;
225 #if (BTE_ANDROID_INTERNAL_TIMESTAMP==TRUE)
226 	struct timeval tv;
227 	struct timezone tz;
228 	struct tm *tm;
229 	time_t t;
230 
231 	gettimeofday(&tv, &tz);
232 	time(&t);
233 	tm = localtime(&t);
234 
235     sprintf(buffer, "%02d:%02d:%02d.%03d ", tm->tm_hour, tm->tm_min, tm->tm_sec,
236         tv.tv_usec / 1000);
237 #endif
238 	va_start(ap, fmt_str);
239 	vsnprintf(&buffer[MSG_BUFFER_OFFSET], BTE_LOG_MAX_SIZE, fmt_str, ap);
240 	va_end(ap);
241 
242 #if (defined(ANDROID_USE_LOGCAT) && (ANDROID_USE_LOGCAT==TRUE))
243 #if (BTE_MAP_TRACE_LEVEL==TRUE)
244     switch ( TRACE_GET_TYPE(trace_set_mask) )
245     {
246         case TRACE_TYPE_ERROR:
247             LOGE0(bt_layer_tags[trace_layer], buffer);
248             break;
249         case TRACE_TYPE_WARNING:
250             LOGW0(bt_layer_tags[trace_layer], buffer);
251             break;
252         case TRACE_TYPE_API:
253         case TRACE_TYPE_EVENT:
254             LOGI0(bt_layer_tags[trace_layer], buffer);
255             break;
256         case TRACE_TYPE_DEBUG:
257             LOGD0(bt_layer_tags[trace_layer], buffer);
258             break;
259         default:
260             LOGE0(bt_layer_tags[trace_layer], buffer);      /* we should never get this */
261             break;
262     }
263 #else
264     LOGI0(bt_layer_tags[trace_layer], buffer);
265 #endif
266 #else
267 	write(2, buffer, strlen(buffer));
268 	write(2, "\n", 1);
269 #endif
270 }
271 
272 void
ScrLog(UINT32 trace_set_mask,const char * fmt_str,...)273 ScrLog(UINT32 trace_set_mask, const char *fmt_str, ...)
274 {
275 	static char buffer[BTE_LOG_BUF_SIZE];
276 
277 	va_list ap;
278 	struct timeval tv;
279 	struct timezone tz;
280 	struct tm *tm;
281 	time_t t;
282     int trace_layer = TRACE_GET_LAYER(trace_set_mask);
283     if (trace_layer >= TRACE_LAYER_MAX_NUM)
284         trace_layer = 0;
285 
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 #endif
471 #if (BLE_INCLUDED==TRUE)
472     {BTTRC_ID_STK_SMP, BTTRC_ID_STK_SMP, SMP_SetTraceLevel, "TRC_SMP", DEFAULT_CONF_TRACE_LEVEL},
473 #endif
474 
475 #if (BTA_INCLUDED==TRUE)
476     /* LayerIDs for BTA, currently everything maps onto appl_trace_level.
477      * BTL_GLOBAL_PROP_TRC_FLAG serves as flag in conf.
478      */
479     {BTTRC_ID_BTA_ACC, BTTRC_ID_BTAPP, BTAPP_SetTraceLevel, BTL_GLOBAL_PROP_TRC_FLAG, DEFAULT_CONF_TRACE_LEVEL},
480 #endif
481 
482 #if (BT_TRACE_BTIF == TRUE)
483     {BTTRC_ID_BTA_ACC, BTTRC_ID_BTAPP, BTIF_SetTraceLevel, "TRC_BTIF", DEFAULT_CONF_TRACE_LEVEL},
484 #endif
485 
486     {0, 0, NULL, NULL, DEFAULT_CONF_TRACE_LEVEL}
487 };
488 
489 const UINT16 bttrc_map_size = sizeof(bttrc_set_level_map)/sizeof(tBTTRC_FUNC_MAP);
490 #endif
491 
492 /********************************************************************************
493  **
494  **    Function Name:     BTE_InitTraceLevels
495  **
496  **    Purpose:           This function can be used to set the boot time reading it from the
497  **                       platform.
498  **                       WARNING: it is called under BTU context and it blocks the BTU task
499  **                       till it returns (sync call)
500  **
501  **    Input Parameters:  None, platform to provide levels
502  **    Returns:
503  **                       Newly set levels, if any!
504  **
505  *********************************************************************************/
BTE_InitTraceLevels(void)506 BT_API void BTE_InitTraceLevels( void )
507 {
508     /* read and set trace levels by calling the different XXX_SetTraceLevel().
509      */
510 #if ( BT_USE_TRACES==TRUE )
511     if (trace_conf_enabled == TRUE)
512     {
513         tBTTRC_FUNC_MAP *p_f_map = (tBTTRC_FUNC_MAP *) &bttrc_set_level_map[0];
514 
515         while (p_f_map->trc_name != NULL)
516         {
517             ALOGI("BTE_InitTraceLevels -- %s", p_f_map->trc_name);
518 
519             if (p_f_map->p_f)
520                 p_f_map->p_f(p_f_map->trace_level);
521 
522             p_f_map++;
523         }
524     }
525     else
526     {
527         ALOGI("[bttrc] using compile default trace settings");
528     }
529 #endif
530 }
531 
532 
533 /********************************************************************************
534  **
535  **    Function Name:   LogMsg_0
536  **
537  **    Purpose:  Encodes a trace message that has no parameter arguments
538  **
539  **    Input Parameters:  trace_set_mask: tester trace type.
540  **                       fmt_str: displayable string.
541  **    Returns:
542  **                      Nothing.
543  **
544  *********************************************************************************/
LogMsg_0(UINT32 trace_set_mask,const char * fmt_str)545 void LogMsg_0(UINT32 trace_set_mask, const char *fmt_str) {
546     LogMsg(trace_set_mask, fmt_str);
547 }
548 
549 /********************************************************************************
550  **
551  **    Function Name:   LogMsg_1
552  **
553  **    Purpose:  Encodes a trace message that has one parameter argument
554  **
555  **    Input Parameters:  trace_set_mask: tester trace type.
556  **                       fmt_str: displayable string.
557  **    Returns:
558  **                      Nothing.
559  **
560  *********************************************************************************/
LogMsg_1(UINT32 trace_set_mask,const char * fmt_str,UINT32 p1)561 void LogMsg_1(UINT32 trace_set_mask, const char *fmt_str, UINT32 p1) {
562 
563     LogMsg(trace_set_mask, fmt_str, p1);
564 }
565 
566 /********************************************************************************
567  **
568  **    Function Name:   LogMsg_2
569  **
570  **    Purpose:  Encodes a trace message that has two parameter arguments
571  **
572  **    Input Parameters:  trace_set_mask: tester trace type.
573  **                       fmt_str: displayable string.
574  **    Returns:
575  **                      Nothing.
576  **
577  *********************************************************************************/
LogMsg_2(UINT32 trace_set_mask,const char * fmt_str,UINT32 p1,UINT32 p2)578 void LogMsg_2(UINT32 trace_set_mask, const char *fmt_str, UINT32 p1, UINT32 p2) {
579     LogMsg(trace_set_mask, fmt_str, p1, p2);
580 }
581 
582 /********************************************************************************
583  **
584  **    Function Name:   LogMsg_3
585  **
586  **    Purpose:  Encodes a trace message that has three parameter arguments
587  **
588  **    Input Parameters:  trace_set_mask: tester trace type.
589  **                       fmt_str: displayable string.
590  **    Returns:
591  **                      Nothing.
592  **
593  *********************************************************************************/
LogMsg_3(UINT32 trace_set_mask,const char * fmt_str,UINT32 p1,UINT32 p2,UINT32 p3)594 void LogMsg_3(UINT32 trace_set_mask, const char *fmt_str, UINT32 p1, UINT32 p2,
595         UINT32 p3) {
596     LogMsg(trace_set_mask, fmt_str, p1, p2, p3);
597 }
598 
599 /********************************************************************************
600  **
601  **    Function Name:   LogMsg_4
602  **
603  **    Purpose:  Encodes a trace message that has four parameter arguments
604  **
605  **    Input Parameters:  trace_set_mask: tester trace type.
606  **                       fmt_str: displayable string.
607  **    Returns:
608  **                      Nothing.
609  **
610  *********************************************************************************/
LogMsg_4(UINT32 trace_set_mask,const char * fmt_str,UINT32 p1,UINT32 p2,UINT32 p3,UINT32 p4)611 void LogMsg_4(UINT32 trace_set_mask, const char *fmt_str, UINT32 p1, UINT32 p2,
612         UINT32 p3, UINT32 p4) {
613     LogMsg(trace_set_mask, fmt_str, p1, p2, p3, p4);
614 }
615 
616 /********************************************************************************
617  **
618  **    Function Name:   LogMsg_5
619  **
620  **    Purpose:  Encodes a trace message that has five parameter arguments
621  **
622  **    Input Parameters:  trace_set_mask: tester trace type.
623  **                       fmt_str: displayable string.
624  **    Returns:
625  **                      Nothing.
626  **
627  *********************************************************************************/
LogMsg_5(UINT32 trace_set_mask,const char * fmt_str,UINT32 p1,UINT32 p2,UINT32 p3,UINT32 p4,UINT32 p5)628 void LogMsg_5(UINT32 trace_set_mask, const char *fmt_str, UINT32 p1, UINT32 p2,
629         UINT32 p3, UINT32 p4, UINT32 p5) {
630     LogMsg(trace_set_mask, fmt_str, p1, p2, p3, p4, p5);
631 }
632 
633 /********************************************************************************
634  **
635  **    Function Name:   LogMsg_6
636  **
637  **    Purpose:  Encodes a trace message that has six parameter arguments
638  **
639  **    Input Parameters:  trace_set_mask: tester trace type.
640  **                       fmt_str: displayable string.
641  **    Returns:
642  **                      Nothing.
643  **
644  *********************************************************************************/
LogMsg_6(UINT32 trace_set_mask,const char * fmt_str,UINT32 p1,UINT32 p2,UINT32 p3,UINT32 p4,UINT32 p5,UINT32 p6)645 void LogMsg_6(UINT32 trace_set_mask, const char *fmt_str, UINT32 p1, UINT32 p2,
646         UINT32 p3, UINT32 p4, UINT32 p5, UINT32 p6) {
647     LogMsg(trace_set_mask, fmt_str, p1, p2, p3, p4, p5, p6);
648 }
649