|
1 /* |
|
2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Debugging/tracing related declarations & definitions |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 17 % |
|
20 */ |
|
21 |
|
22 #ifndef UMACDEBUG_H |
|
23 #define UMACDEBUG_H |
|
24 |
|
25 struct TMacAddress; |
|
26 |
|
27 const TUint32 KCritLevel = 0x00000001; |
|
28 const TUint32 KSeriousLevel = 0x00000002; |
|
29 const TUint32 KErrorLevel = 0x00000004; |
|
30 const TUint32 KWarningLevel = 0x00000008; |
|
31 const TUint32 KInfoLevel = 0x00000010; |
|
32 |
|
33 const TUint32 KInitLevel = 0x00000020; |
|
34 const TUint32 KUmacProtocolState = 0x00000040; |
|
35 const TUint32 KWsaCmdState = 0x00000080; |
|
36 const TUint32 KMutex = 0x00000100; |
|
37 const TUint32 KWsaCallback = 0x00000200; |
|
38 const TUint32 KUmacMgmtCallback = 0x00000400; |
|
39 const TUint32 KUmacProtocolCallback = 0x00000800; |
|
40 const TUint32 KWsaCmdStateDetails = 0x00001000; |
|
41 const TUint32 KQos = 0x00002000; |
|
42 const TUint32 KWlmCmd = 0x00004000; |
|
43 const TUint32 KWlmIndication = 0x00008000; |
|
44 const TUint32 KWlmCmdDetails = 0x00010000; |
|
45 const TUint32 KUmacDetails = 0x00020000; |
|
46 const TUint32 KWsaTx = 0x00040000; |
|
47 const TUint32 KWsaTxDetails = 0x00080000; |
|
48 const TUint32 KUmacAuth = 0x00100000; |
|
49 const TUint32 KUmacAssoc = 0x00200000; |
|
50 const TUint32 KPacketScheduler = 0x00400000; |
|
51 const TUint32 KMemory = 0x00800000; |
|
52 const TUint32 KTxRateAdapt = 0x01000000; |
|
53 const TUint32 KRxFrame = 0x02000000; |
|
54 const TUint32 KScan = 0x04000000; |
|
55 const TUint32 KPwrStateTransition = 0x08000000; |
|
56 const TUint32 KDot11StateTransit = 0x10000000; |
|
57 const TUint32 KEventDispatcher = 0x20000000; |
|
58 |
|
59 /* for temporary trace */ |
|
60 const TUint32 KScratch = 0x80000000; |
|
61 |
|
62 |
|
63 extern void os_traceprint( |
|
64 TUint32 aLevel, |
|
65 const TUint8* aString ); |
|
66 extern void os_traceprint( |
|
67 TUint32 aLevel, |
|
68 const TUint8* aString, |
|
69 TUint32 aArg1 ); |
|
70 extern void os_traceprint( |
|
71 TUint32 aLevel, |
|
72 const TUint8* aString, |
|
73 const TUint8* aBeg, |
|
74 /* one past last element to be traced */ |
|
75 const TUint8* aEnd ); |
|
76 extern void os_traceprint( |
|
77 TUint32 aLevel, |
|
78 const TUint8* aString, |
|
79 const TMacAddress& aMac ); |
|
80 extern void os_traceprint( |
|
81 TUint32 aLevel, |
|
82 const TUint8* aString, |
|
83 const Sdot11MacHeader& aDot11Hdr ); |
|
84 |
|
85 extern void os_assert( |
|
86 const TUint8* aError, |
|
87 const TUint8* aFile, |
|
88 TUint32 aLine ); |
|
89 |
|
90 |
|
91 inline void OsAssert( |
|
92 const TUint8* aError, |
|
93 const TUint8* aFile, |
|
94 TUint32 aLine ) |
|
95 { |
|
96 os_assert( aError, aFile, aLine ); |
|
97 } |
|
98 |
|
99 |
|
100 #ifndef NDEBUG /* for debug builds */ |
|
101 |
|
102 inline void OsTracePrint( |
|
103 TUint32 aLevel, |
|
104 const TUint8* aString ) |
|
105 { |
|
106 os_traceprint( aLevel, aString ); |
|
107 } |
|
108 |
|
109 inline void OsTracePrint( |
|
110 TUint32 aLevel, |
|
111 const TUint8* aString, |
|
112 TUint32 aArg1 ) |
|
113 { |
|
114 os_traceprint( aLevel, aString, aArg1 ); |
|
115 } |
|
116 |
|
117 inline void OsTracePrint( |
|
118 TUint32 aLevel, |
|
119 const TUint8* aString, |
|
120 const TUint8* aBeg, |
|
121 // one past last element to be traced |
|
122 const TUint8* aEnd ) |
|
123 { |
|
124 os_traceprint( aLevel, aString, aBeg, aEnd ); |
|
125 } |
|
126 |
|
127 inline void OsTracePrint( |
|
128 TUint32 aLevel, |
|
129 const TUint8* aString, |
|
130 const TMacAddress& aMac ) |
|
131 { |
|
132 os_traceprint( aLevel, aString, aMac ); |
|
133 } |
|
134 |
|
135 inline void OsTracePrint( |
|
136 TUint32 aLevel, |
|
137 const TUint8* aString, |
|
138 const Sdot11MacHeader& aDot11Hdr ) |
|
139 { |
|
140 os_traceprint( aLevel, aString, aDot11Hdr ); |
|
141 } |
|
142 |
|
143 #else /* for release builds */ |
|
144 |
|
145 #define OsTracePrint(...) /* empty */ |
|
146 |
|
147 #endif // !NDEBUG |
|
148 |
|
149 |
|
150 #endif // UMACDEBUG_H |