1 /* 2 * report.h 3 * 4 * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 11 * * Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * * Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in 15 * the documentation and/or other materials provided with the 16 * distribution. 17 * * Neither the name Texas Instruments nor the names of its 18 * contributors may be used to endorse or promote products derived 19 * from this software without specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34 35 /***************************************************************************/ 36 /* */ 37 /* MODULE: report.h */ 38 /* PURPOSE: Report module internal header API */ 39 /* */ 40 /***************************************************************************/ 41 #ifndef __REPORT_H__ 42 #define __REPORT_H__ 43 44 /** \file report.h 45 * \brief Report module API \n 46 * APIs which are used for reporting messages to the User while running. \n\n 47 * 48 * The report mechanism: Messages are reported per file and severity Level \n 49 * Therefore, each file has a report flag which indicate if reporting for that file is enabled, \n 50 * and each severity has a severity flag which indicate if reporting for that severity is enabled. \n 51 * Only if both flags are enabled, the message is printed. \n 52 * The report flags of all file are indicated in a bit map Table which is contained in the report module handle \n 53 * The report flags of all severities are indicated in a bit map Table which is contained in the report module handle \n 54 */ 55 56 /* in order to work without the driver logger use that definition here 57 * #define PRINTF_ROLLBACK 58 */ 59 60 #include "osApi.h" 61 #include "commonTypes.h" 62 63 #define MAX_STRING_LEN 32 64 65 66 /*******************************/ 67 /* Report Files IDs */ 68 /*******************************/ 69 70 typedef enum 71 { 72 FILE_ID_0 , /* timer */ 73 FILE_ID_1 , /* measurementMgr */ 74 FILE_ID_2 , /* measurementMgrSM */ 75 FILE_ID_3 , /* regulatoryDomain */ 76 FILE_ID_4 , /* requestHandler */ 77 FILE_ID_5 , /* SoftGemini */ 78 FILE_ID_6 , /* spectrumMngmntMgr */ 79 FILE_ID_7 , /* SwitchChannel */ 80 FILE_ID_8 , /* roamingMngr */ 81 FILE_ID_9 , /* scanMngr */ 82 FILE_ID_10 , /* admCtrlXCC */ 83 FILE_ID_11 , /* XCCMngr */ 84 FILE_ID_12 , /* XCCRMMngr */ 85 FILE_ID_13 , /* XCCTSMngr */ 86 FILE_ID_14 , /* rogueAp */ 87 FILE_ID_15 , /* TransmitPowerXCC */ 88 FILE_ID_16 , /* admCtrl */ 89 FILE_ID_17 , /* admCtrlNone */ 90 FILE_ID_18 , /* admCtrlWep */ 91 FILE_ID_19 , /* admCtrlWpa */ 92 FILE_ID_20 , /* admCtrlWpa2 */ 93 FILE_ID_21 , /* apConn */ 94 FILE_ID_22 , /* broadcastKey802_1x */ 95 FILE_ID_23 , /* broadcastKeyNone */ 96 FILE_ID_24 , /* broadcastKeySM */ 97 FILE_ID_25 , /* conn */ 98 FILE_ID_26 , /* connIbss */ 99 FILE_ID_27 , /* connInfra */ 100 FILE_ID_28 , /* keyDerive */ 101 FILE_ID_29 , /* keyDeriveAes */ 102 FILE_ID_30 , /* keyDeriveCkip */ 103 FILE_ID_31 , /* keyDeriveTkip */ 104 FILE_ID_32 , /* keyDeriveWep */ 105 FILE_ID_33 , /* keyParser */ 106 FILE_ID_34 , /* keyParserExternal */ 107 FILE_ID_35 , /* keyParserWep */ 108 FILE_ID_36 , /* mainKeysSm */ 109 FILE_ID_37 , /* mainSecKeysOnly */ 110 FILE_ID_38 , /* mainSecNull */ 111 FILE_ID_39 , /* mainSecSm */ 112 FILE_ID_40 , /* rsn */ 113 FILE_ID_41 , /* sme */ 114 FILE_ID_42 , /* smeSelect */ 115 FILE_ID_43 , /* smeSm */ 116 FILE_ID_44 , /* unicastKey802_1x */ 117 FILE_ID_45 , /* unicastKeyNone */ 118 FILE_ID_46 , /* unicastKeySM */ 119 FILE_ID_47 , /* CmdDispatcher */ 120 FILE_ID_48 , /* CmdHndlr */ 121 FILE_ID_49 , /* DrvMain */ 122 FILE_ID_50 , /* EvHandler */ 123 FILE_ID_51 , /* Ctrl */ 124 FILE_ID_52 , /* GeneralUtil */ 125 FILE_ID_53 , /* RateAdaptation */ 126 FILE_ID_54 , /* rx */ 127 FILE_ID_55 , /* TrafficMonitor */ 128 FILE_ID_56 , /* txCtrl */ 129 FILE_ID_57 , /* txCtrlParams */ 130 FILE_ID_58 , /* txCtrlServ */ 131 FILE_ID_59 , /* TxDataClsfr */ 132 FILE_ID_60 , /* txDataQueue */ 133 FILE_ID_61 , /* txMgmtQueue */ 134 FILE_ID_62 , /* txPort */ 135 FILE_ID_63 , /* assocSM */ 136 FILE_ID_64 , /* authSm */ 137 FILE_ID_65 , /* currBss */ 138 FILE_ID_66 , /* healthMonitor */ 139 FILE_ID_67 , /* mlmeBuilder */ 140 FILE_ID_68 , /* mlmeParser */ 141 FILE_ID_69 , /* mlmeSm */ 142 FILE_ID_70 , /* openAuthSm */ 143 FILE_ID_71 , /* PowerMgr */ 144 FILE_ID_72 , /* PowerMgrDbgPrint */ 145 FILE_ID_73 , /* PowerMgrKeepAlive */ 146 FILE_ID_74 , /* qosMngr */ 147 FILE_ID_75 , /* roamingInt */ 148 FILE_ID_76 , /* ScanCncn */ 149 FILE_ID_77 , /* ScanCncnApp */ 150 FILE_ID_78 , /* ScanCncnOsSm */ 151 FILE_ID_79 , /* ScanCncnSm */ 152 FILE_ID_80 , /* ScanCncnSmSpecific */ 153 FILE_ID_81 , /* scanResultTable */ 154 FILE_ID_82 , /* scr */ 155 FILE_ID_83 , /* sharedKeyAuthSm */ 156 FILE_ID_84 , /* siteHash */ 157 FILE_ID_85 , /* siteMgr */ 158 FILE_ID_86 , /* StaCap */ 159 FILE_ID_87 , /* systemConfig */ 160 FILE_ID_88 , /* templates */ 161 FILE_ID_89 , /* trafficAdmControl */ 162 FILE_ID_90 , /* CmdBld */ 163 FILE_ID_91 , /* CmdBldCfg */ 164 FILE_ID_92 , /* CmdBldCfgIE */ 165 FILE_ID_93 , /* CmdBldCmd */ 166 FILE_ID_94 , /* CmdBldCmdIE */ 167 FILE_ID_95 , /* CmdBldItr */ 168 FILE_ID_96 , /* CmdBldItrIE */ 169 FILE_ID_97 , /* CmdQueue */ 170 FILE_ID_98 , /* RxQueue */ 171 FILE_ID_99 , /* txCtrlBlk */ 172 FILE_ID_100 , /* txHwQueue */ 173 FILE_ID_101 , /* CmdMBox */ 174 FILE_ID_102 , /* eventMbox */ 175 FILE_ID_103 , /* fwDebug */ 176 FILE_ID_104 , /* FwEvent */ 177 FILE_ID_105 , /* HwInit */ 178 FILE_ID_106 , /* RxXfer */ 179 FILE_ID_107 , /* txResult */ 180 FILE_ID_108 , /* txXfer */ 181 FILE_ID_109 , /* MacServices */ 182 FILE_ID_110 , /* MeasurementSrv */ 183 FILE_ID_111 , /* measurementSrvDbgPrint */ 184 FILE_ID_112 , /* MeasurementSrvSM */ 185 FILE_ID_113 , /* PowerSrv */ 186 FILE_ID_114 , /* PowerSrvSM */ 187 FILE_ID_115 , /* ScanSrv */ 188 FILE_ID_116 , /* ScanSrvSM */ 189 FILE_ID_117 , /* TWDriver */ 190 FILE_ID_118 , /* TWDriverCtrl */ 191 FILE_ID_119 , /* TWDriverRadio */ 192 FILE_ID_120 , /* TWDriverTx */ 193 FILE_ID_121 , /* TwIf */ 194 FILE_ID_122 , /* SdioBusDrv */ 195 FILE_ID_123 , /* TxnQueue */ 196 FILE_ID_124 , /* WspiBusDrv */ 197 FILE_ID_125 , /* context */ 198 FILE_ID_126 , /* freq */ 199 FILE_ID_127 , /* fsm */ 200 FILE_ID_128 , /* GenSM */ 201 FILE_ID_129 , /* mem */ 202 FILE_ID_130 , /* queue */ 203 FILE_ID_131 , /* rate */ 204 FILE_ID_132 , /* report */ 205 FILE_ID_133 , /* stack */ 206 FILE_ID_134 , /* externalSec */ 207 FILE_ID_135 , /* roamingMngr_autoSM */ 208 FILE_ID_136 , /* roamingMngr_manualSM */ 209 FILE_ID_137 , /* cmdinterpretoid */ 210 FILE_ID_138 , /* wlandrvif */ 211 REPORT_FILES_NUM /* Number of files with trace reports */ 212 213 } EReportFiles; 214 215 216 /************************************/ 217 /* Report Severity values */ 218 /************************************/ 219 220 /** \enum EReportSeverity 221 * \brief Report Severity Types 222 * 223 * \par Description 224 * All available severity Levels of the events which are reported to user.\n 225 * 226 * \sa 227 */ 228 typedef enum 229 { 230 REPORT_SEVERITY_INIT = 1, /**< Init Level (event happened during initialization) */ 231 REPORT_SEVERITY_INFORMATION = 2, /**< Information Level */ 232 REPORT_SEVERITY_WARNING = 3, /**< Warning Level */ 233 REPORT_SEVERITY_ERROR = 4, /**< Error Level (error accored) */ 234 REPORT_SEVERITY_FATAL_ERROR = 5, /**< Fatal-Error Level (fatal-error accored) */ 235 REPORT_SEVERITY_SM = 6, /**< State-Machine Level (event happened in State-Machine) */ 236 REPORT_SEVERITY_CONSOLE = 7, /**< Consol Level (event happened in Consol) */ 237 REPORT_SEVERITY_MAX = REPORT_SEVERITY_CONSOLE + 1 /**< Maximum number of report severity levels */ 238 239 } EReportSeverity; 240 241 /** \enum EProblemType 242 * \brief used to handle SW problems according to their types. 243 * 244 * \par Description 245 * All available SW problem types checked in run time.\n 246 * 247 * \sa 248 */ 249 typedef enum 250 { 251 PROBLEM_BUF_SIZE_VIOLATION = 1, 252 PROBLEM_NULL_VALUE_PTR = 2, 253 254 PROBLEM_MAX_VALUE 255 256 } EProblemType; 257 /** \struct TReport 258 * \brief Report Module Object 259 * 260 * \par Description 261 * All the Databases and other parameters which are needed for reporting messages to user 262 * 263 * \sa 264 */ 265 typedef struct 266 { 267 TI_HANDLE hOs; /**< Handle to Operating System Object */ 268 TI_UINT8 aSeverityTable[REPORT_SEVERITY_MAX]; /**< Severities Table: Table which holds for each severity level a flag which indicates whether the severity is enabled for reporting */ 269 char aSeverityDesc[REPORT_SEVERITY_MAX][MAX_STRING_LEN]; /**< Severities Descriptors Table: Table which holds for each severity a string of its name, which is used in severity's reported messages */ 270 TI_UINT8 aFileEnable[REPORT_FILES_NUM]; /**< Files table indicating per file if it is enabled for reporting */ 271 272 #ifdef PRINTF_ROLLBACK 273 char aFileName[REPORT_FILES_NUM][MAX_STRING_LEN]; /**< Files names table inserted in the file's reported messages */ 274 #endif 275 276 } TReport; 277 278 /** \struct TReportParamInfo 279 * \brief Report Parameter Information 280 * 281 * \par Description 282 * Struct which defines all the Databases and other parameters which are needed 283 * for reporting messages to user. 284 * The actual Content of the Report Parameter Could be one of the followed (held in union): 285 * Severety Table | Module Table | Enable/Disable indication of debug module usage 286 * 287 * \sa EExternalParam, ETwdParam 288 */ 289 typedef struct 290 { 291 TI_UINT32 paramType; /**< The reported parameter type - one of External Parameters (which includes Set,Get, Module, internal number etc.) 292 * of Report Module. Used by user for Setting or Getting Report Module Paramters, for exaple Set/Get severety table 293 * to/from Report Module 294 */ 295 TI_UINT32 paramLength; /**< Length of reported parameter */ 296 297 union 298 { 299 TI_UINT8 aSeverityTable[REPORT_SEVERITY_MAX]; /**< Table which holds severity flag for every available LOG severity level. 300 * This flag indicates for each severity - whether it is enabled for Logging or not. 301 * User can Set/Get this Tabel 302 */ 303 TI_UINT8 aFileEnable[REPORT_FILES_NUM]; /**< Table which holds file flag for every available LOG file. 304 * This flag indicates for each file - whether it is enabled for Logging or not. 305 * User can Set/Get this Tabel 306 */ 307 TI_UINT32 uReportPPMode; /**< Used by user for Indicating if Debug Module should be enabled/disabled */ 308 309 } content; 310 311 } TReportParamInfo; 312 313 /** \struct TReportInitParams 314 * \brief Report Init Parameters 315 * 316 * \par Description 317 * Struct which defines all the Databases needed for init and set the defualts of the Report Module. 318 * 319 */ 320 typedef struct 321 { 322 /* Note: The arrays sizes are aligned to 4 byte to avoid padding added by the compiler! */ 323 TI_UINT8 aSeverityTable[(REPORT_SEVERITY_MAX + 3) & ~3]; /**< Table in the size of all available LOG severity levels which indicates for each severity - whether it is enabled for Logging or not. */ 324 TI_UINT8 aFileEnable [(REPORT_FILES_NUM + 3) & ~3]; /**< Table in the size of all available LOG files which indicates for each file - whether it is enabled for Logging or not */ 325 326 } TReportInitParams; 327 328 329 330 /****************************/ 331 /* report module Macros */ 332 /****************************/ 333 334 /* The report mechanism is like that: 335 Each file has a report flag. Each severity has a severity flag. 336 Only if bits are enabled, the message is printed */ 337 /* The modules which have their report flag enable are indicated by a bit map in the reportModule 338 variable contained in the report handle*/ 339 /* The severities which have are enabled are indicated by a bit map in the reportSeverity 340 variable contained in the report handle*/ 341 /* general trace messages */ 342 #ifndef PRINTF_ROLLBACK 343 344 #define TRACE0(hReport, level, str) \ 345 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 346 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 0); } } while(0) 347 348 #define TRACE1(hReport, level, str, p1) \ 349 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 350 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 1, (TI_UINT32)p1); } } while(0) 351 352 #define TRACE2(hReport, level, str, p1, p2) \ 353 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 354 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 2, (TI_UINT32)p1, (TI_UINT32)p2); } } while(0) 355 356 #define TRACE3(hReport, level, str, p1, p2, p3) \ 357 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 358 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 3, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3); } } while(0) 359 360 #define TRACE4(hReport, level, str, p1, p2, p3, p4) \ 361 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 362 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 4, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4); } } while(0) 363 364 #define TRACE5(hReport, level, str, p1, p2, p3, p4, p5) \ 365 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 366 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 5, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5); } } while(0) 367 368 #define TRACE6(hReport, level, str, p1, p2, p3, p4, p5, p6) \ 369 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 370 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 6, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6); } } while(0) 371 372 #define TRACE7(hReport, level, str, p1, p2, p3, p4, p5, p6, p7) \ 373 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 374 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 7, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7); } } while(0) 375 376 #define TRACE8(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8) \ 377 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 378 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 8, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8); } } while(0) 379 380 #define TRACE9(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9) \ 381 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 382 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 9, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9); } } while(0) 383 384 #define TRACE10(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) \ 385 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 386 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 10, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10); } } while(0) 387 388 #define TRACE11(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) \ 389 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 390 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 11, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11); } } while(0) 391 392 #define TRACE12(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) \ 393 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 394 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 12, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12); } } while(0) 395 396 #define TRACE13(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) \ 397 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 398 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 13, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13); } } while(0) 399 400 #define TRACE14(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14) \ 401 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 402 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 14, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14); } } while(0) 403 404 #define TRACE15(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) \ 405 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 406 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 15, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15); } } while(0) 407 408 #define TRACE16(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16) \ 409 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 410 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 16, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16); } } while(0) 411 412 #define TRACE17(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17) \ 413 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 414 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 17, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16, (TI_UINT32)p17); } } while(0) 415 416 #define TRACE18(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18) \ 417 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 418 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 18, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16, (TI_UINT32)p17, (TI_UINT32)p18); } } while(0) 419 420 #define TRACE19(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19) \ 421 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 422 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 19, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16, (TI_UINT32)p17, (TI_UINT32)p18, (TI_UINT32)p19); } } while(0) 423 424 #define TRACE20(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20) \ 425 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 426 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 20, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16, (TI_UINT32)p17, (TI_UINT32)p18, (TI_UINT32)p19, (TI_UINT32)p20); } } while(0) 427 428 #define TRACE21(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21) \ 429 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 430 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 21, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16, (TI_UINT32)p17, (TI_UINT32)p18, (TI_UINT32)p19, (TI_UINT32)p20, (TI_UINT32)p21); } } while(0) 431 432 #define TRACE22(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22) \ 433 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 434 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 22, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16, (TI_UINT32)p17, (TI_UINT32)p18, (TI_UINT32)p19, (TI_UINT32)p20, (TI_UINT32)p21, (TI_UINT32)p22); } } while(0) 435 436 #define TRACE25(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25) \ 437 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 438 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 22, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16, (TI_UINT32)p17, (TI_UINT32)p18, (TI_UINT32)p19, (TI_UINT32)p20, (TI_UINT32)p21, (TI_UINT32)p22, (TI_UINT32)p23, (TI_UINT32)p24, (TI_UINT32)p25); } } while(0) 439 440 #define TRACE31(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31) \ 441 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 442 { os_Trace((((TReport *)hReport)->hOs), level, __FILE_ID__, __LINE__, 22, (TI_UINT32)p1, (TI_UINT32)p2, (TI_UINT32)p3, (TI_UINT32)p4, (TI_UINT32)p5, (TI_UINT32)p6, (TI_UINT32)p7, (TI_UINT32)p8, (TI_UINT32)p9, (TI_UINT32)p10, (TI_UINT32)p11, (TI_UINT32)p12, (TI_UINT32)p13, (TI_UINT32)p14, (TI_UINT32)p15, (TI_UINT32)p16, (TI_UINT32)p17, (TI_UINT32)p18, (TI_UINT32)p19, (TI_UINT32)p20, (TI_UINT32)p21, (TI_UINT32)p22, (TI_UINT32)p23, (TI_UINT32)p24, (TI_UINT32)p25, (TI_UINT32)p26, (TI_UINT32)p27, (TI_UINT32)p28, (TI_UINT32)p29, (TI_UINT32)p30, (TI_UINT32)p31); } } while(0) 443 444 445 #else /* PRINTF_ROLLBACK */ 446 447 #define TRACE0(hReport, level, str) \ 448 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 449 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str); } } while(0) 450 451 #define TRACE1(hReport, level, str, p1) \ 452 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 453 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1); } } while(0) 454 455 #define TRACE2(hReport, level, str, p1, p2) \ 456 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 457 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2); } } while(0) 458 459 #define TRACE3(hReport, level, str, p1, p2, p3) \ 460 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 461 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3); } } while(0) 462 463 #define TRACE4(hReport, level, str, p1, p2, p3, p4) \ 464 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 465 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4); } } while(0) 466 467 #define TRACE5(hReport, level, str, p1, p2, p3, p4, p5) \ 468 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 469 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5); } } while(0) 470 471 #define TRACE6(hReport, level, str, p1, p2, p3, p4, p5, p6) \ 472 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 473 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6); } } while(0) 474 475 #define TRACE7(hReport, level, str, p1, p2, p3, p4, p5, p6, p7) \ 476 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 477 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7); } } while(0) 478 479 #define TRACE8(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8) \ 480 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 481 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8); } } while(0) 482 483 #define TRACE9(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9) \ 484 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 485 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9); } } while(0) 486 487 #define TRACE10(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) \ 488 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 489 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); } } while(0) 490 491 #define TRACE11(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) \ 492 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 493 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); } } while(0) 494 495 #define TRACE12(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) \ 496 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 497 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); } } while(0) 498 499 #define TRACE13(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) \ 500 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 501 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); } } while(0) 502 503 #define TRACE14(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14) \ 504 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 505 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); } } while(0) 506 507 #define TRACE15(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) \ 508 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 509 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15); } } while(0) 510 511 #define TRACE16(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16) \ 512 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 513 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16); } } while(0) 514 515 #define TRACE17(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17) \ 516 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 517 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17); } } while(0) 518 519 #define TRACE18(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18) \ 520 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 521 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18); } } while(0) 522 523 #define TRACE19(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19) \ 524 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 525 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19); } } while(0) 526 527 #define TRACE20(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20) \ 528 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 529 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20); } } while(0) 530 531 #define TRACE21(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21) \ 532 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 533 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21); } } while(0) 534 535 #define TRACE22(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22) \ 536 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 537 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22); } } while(0) 538 539 #define TRACE25(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25) \ 540 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 541 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25); } } while(0) 542 543 #define TRACE31(hReport, level, str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31) \ 544 do { if (hReport && (((TReport *)hReport)->aSeverityTable[level]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 545 { os_printf ("%s, %s:", ((TReport *)hReport)->aFileName[__FILE_ID__], ((TReport *)hReport)->aSeverityDesc[level]); os_printf (str, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p27, p27, p28, p29, p30, p31); } } while(0) 546 547 #endif /* #ifdef PRINTF_ROLLBACK */ 548 549 550 /****************************/ 551 /* report module Macros */ 552 /****************************/ 553 554 /* The report mechanism is like that: 555 Each file has a report flag. Each severity has a severity flag. 556 Only if bits are enabled, the message is printed */ 557 /* The modules which have their report flag enable are indicated by a bit map in the reportModule 558 variable contained in the report handle*/ 559 /* The severities which have are enabled are indicated by a bit map in the reportSeverity 560 variable contained in the report handle*/ 561 562 #ifdef REPORT_LOG 563 564 /** \def WLAN_OS_REPORT 565 * \brief Macro which writes a message to user via specific Operating System printf. 566 * E.g. print is done using the relevant used OS printf method. 567 */ 568 #define WLAN_OS_REPORT(msg) \ 569 do { os_printf msg;} while(0) 570 571 572 #ifdef INIT_MESSAGES 573 /** \def WLAN_INIT_REPORT 574 * \brief Macro which writes a message to user via specific Operating System printf. 575 * E.g. print is done using the relevant used OS printf method. 576 */ 577 #define WLAN_INIT_REPORT(msg) \ 578 do { os_printf msg;} while(0) 579 #else 580 /** \def WLAN_INIT_REPORT 581 * \brief Macro which writes a message to user via specific Operating System printf. 582 * E.g. print is done using the relevant used OS printf method. 583 */ 584 #define WLAN_INIT_REPORT(msg) 585 #endif 586 #define TRACE_INFO_HEX(hReport, data, datalen) \ 587 do { if (hReport && (((TReport *)hReport)->aSeverityTable[REPORT_SEVERITY_INFORMATION]) && (((TReport *)hReport)->aFileEnable[__FILE_ID__])) \ 588 { report_PrintDump (data, datalen); } } while(0) 589 590 591 #else /* REPORT_LOG */ 592 593 /* NOTE: Keep a dummy report function call to treat compilation warnings */ 594 595 /** \def WLAN_OS_REPORT 596 * \brief Dummy macro: Nothing is done 597 */ 598 #define WLAN_OS_REPORT(msg) \ 599 do { } while (0) 600 601 /** \def WLAN_INIT_REPORT 602 * \brief Dummy macro: Nothing is done 603 */ 604 #define WLAN_INIT_REPORT(msg) \ 605 do { } while (0) 606 607 608 #define TRACE_INFO_HEX(hReport, data, datalen) \ 609 do { } while (0) 610 611 #endif /* REPORT_LOG */ 612 613 614 /****************************/ 615 /* report module prototypes */ 616 /****************************/ 617 618 /** \brief Create Report Module Object 619 * \param hOs - OS module object handle 620 * \return Handle to the report module on success, NULL otherwise 621 * 622 * \par Description 623 * Report module creation function, called by the config mgr in creation phase \n 624 * performs the following: \n 625 * - Allocate the report handle 626 */ 627 TI_HANDLE report_Create (TI_HANDLE hOs); 628 /** \brief Set Report Module Defaults 629 * \param hReport - Report module object handle 630 * \param pInitParams - Pointer to Input Init Parameters 631 * \return TI_OK on success or TI_NOK on failure 632 * 633 * \par Description 634 * Report module configuration function, called by the config mgr in configuration phase \n 635 * performs the following: \n 636 * - Reset & init local variables 637 * - Resets all report modules bits 638 * - Resets all severities bits 639 * - Init the description strings * 640 */ 641 TI_STATUS report_SetDefaults (TI_HANDLE hReport, TReportInitParams *pInitParams); 642 /** \brief Unload Report Module 643 * \param hReport - Report module object handle 644 * \return TI_OK on success or TI_NOK on failure 645 * 646 * \par Description 647 * Report Module unload function, called by the config mgr in the unload phase \n 648 * performs the following: \n 649 * - Free all memory allocated by the module 650 */ 651 TI_STATUS report_Unload (TI_HANDLE hReport); 652 /** \brief Set Report Module 653 * \param hReport - Report module object handle 654 * \return TI_OK on success or TI_NOK on failure 655 * 656 * \par Description 657 * Enables the relevant module for reporting - according to the received module index 658 */ 659 TI_STATUS report_SetReportModule (TI_HANDLE hReport, TI_UINT8 module_index); 660 /** \brief Clear Report Module 661 * \param hReport - Report module object handle 662 * \param module_index - Index of file to be disable for reporting 663 * \return TI_OK on success or TI_NOK on failure 664 * 665 * \par Description 666 * Disables the relevant module for reporting - according to the received module index 667 */ 668 TI_STATUS report_ClearReportModule (TI_HANDLE hReport, TI_UINT8 module_index); 669 /** \brief Get Report files Table 670 * \param hReport - Report module object handle 671 * \param pFiles - Pointer to output files Table 672 * \return TI_OK on success or TI_NOK on failure 673 * 674 * \par Description 675 * Returns the Modules Table (the table which holds Modules reporting indication) held in Report Module Object 676 */ 677 TI_STATUS report_GetReportFilesTable (TI_HANDLE hReport, TI_UINT8 *pFiles); 678 /** \brief Set Report Files Table 679 * \param hReport - Report module object handle 680 * \param pFiles - Pointer to input files Table 681 * \return TI_OK on success or TI_NOK on failure 682 * 683 * \par Description 684 * Updates the Modules Table: copies the input Modules Table (the table which holds Modules reporting indication) 685 * to the Modules Table which is held in Report Module Object 686 */ 687 TI_STATUS report_SetReportFilesTable (TI_HANDLE hReport, TI_UINT8 *pFiles); 688 /** \brief Get Report Severity Table 689 * \param hReport - Report module object handle 690 * \param pSeverities - Pointer to input Severity Table 691 * \return TI_OK on success or TI_NOK on failure 692 * 693 * \par Description 694 * Returns the Severities Table (the table which holds Severities reporting indication) held in Report Module Object 695 */ 696 TI_STATUS report_GetReportSeverityTable (TI_HANDLE hReport, TI_UINT8 *pSeverities); 697 /** \brief Set Report Severity Table 698 * \param hReport - Report module object handle 699 * \param pSeverities - Pointer to input Severity Table 700 * \return TI_OK on success or TI_NOK on failure 701 * 702 * \par Description 703 * Updates the Severities Table: copies the input Severities Table (the table which holds Severities reporting indication) 704 * to the Severities Table which is held in Report Module Object 705 */ 706 TI_STATUS report_SetReportSeverityTable (TI_HANDLE hReport, TI_UINT8 *pSeverities); 707 /** \brief Set Report Parameters 708 * \param hReport - Report module object handle 709 * \param pParam - Pointer to input Report Parameters Information 710 * \return TI_OK on success or TI_NOK on failure 711 * 712 * \par Description 713 * Report set param function sets parameter/s to Report Module Object. 714 * Called by the following: 715 * - configuration Manager in order to set a parameter/s from the OS abstraction layer 716 * - Form inside the driver 717 */ 718 TI_STATUS report_SetParam (TI_HANDLE hReport, TReportParamInfo *pParam); 719 /** \brief Get Report Parameters 720 * \param hReport - Report module object handle 721 * \param pParam - Pointer to output Report Parameters Information 722 * \return TI_OK on success or TI_NOK on failure 723 * 724 * \par Description 725 * Report get param function gets parameter/s from Report Module Object. 726 * Called by the following: 727 * - configuration Manager in order to get a parameter/s from the OS abstraction layer 728 * - from inside the driver 729 */ 730 TI_STATUS report_GetParam (TI_HANDLE hReport, TReportParamInfo *pParam); 731 /** \brief Report Dump 732 * \param pBuffer - Pointer to input HEX buffer 733 * \param pString - Pointer to output string 734 * \param size - size of output string 735 * \return TI_OK on success or TI_NOK on failure 736 * 737 * \par Description 738 * Converts hex buffer to string buffer 739 * NOTE: 1. The caller has to make sure that the string size is at lease: ((Size * 2) + 1) 740 * 2. A string terminator is inserted into lase char of the string 741 */ 742 TI_STATUS report_Dump (TI_UINT8 *pBuffer, char *pString, TI_UINT32 size); 743 /** \brief Report Print Dump 744 * \param pData - Pointer to input data buffer 745 * \param datalen - size of input data buffer 746 * \return TI_OK on success or TI_NOK on failure 747 * 748 * \par Description 749 * Performs HEX dump of input Data buffer. Used for debug only! 750 */ 751 TI_STATUS report_PrintDump (TI_UINT8 *pData, TI_UINT32 datalen); 752 753 /** \brief Sets bRedirectOutputToLogger 754 * \param value - True if to direct output to remote PC 755 * \param hEvHandler - Event handler 756 */ 757 void os_setDebugOutputToLogger(TI_BOOL value); 758 759 /** \brief Sets handles a SW running problem 760 * \param problemType - used for different problem handling depending on problem type 761 */ 762 void handleRunProblem(EProblemType prType); 763 764 #endif /* __REPORT_H__ */ 765 766 767