|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __ISICOMMUNICATIONMANAGERTRACE_H__ |
|
21 #define __ISICOMMUNICATIONMANAGERTRACE_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <kernel.h> |
|
25 |
|
26 // CONSTANTS |
|
27 enum TISIFaultClassCategories |
|
28 { |
|
29 EDISICommunicationManagerTraceId, |
|
30 EDISIIndicationHandlerTraceId, |
|
31 }; |
|
32 |
|
33 const TUint8 KClassIdentifierShift( 8 ); |
|
34 const TUint8 KObjIdShift( 16 ); |
|
35 const TUint8 KExtraInfoShift( 24 ); |
|
36 |
|
37 // MACROS |
|
38 |
|
39 #define _T( a ) a |
|
40 #define __TRACE_PRINTF(a) Kern::Printf a |
|
41 |
|
42 #ifdef _DEBUG |
|
43 #if defined COMPONENT_TRACE_FLAG |
|
44 #define C_TRACE(a) __TRACE_PRINTF(a) |
|
45 #else |
|
46 #define C_TRACE(a) |
|
47 #endif // COMPONENT_TRACE_FLAG |
|
48 #else |
|
49 #define C_TRACE(a) |
|
50 #endif // _DEBUG |
|
51 |
|
52 // Resets are made both in UDEB and UREL (traces only in udeb) |
|
53 #define ASSERT_RESET_ALWAYS(a,b) if(!(a)) { __TRACE_PRINTF(("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__" "__TIME__, __LINE__)); Kern::Fault( "ISICommunicationManager:", b ); } |
|
54 #define TRACE_ASSERT(a) if (!(a)) __TRACE_PRINTF(("Assertion failed: file=" __FILE__ ", line=%d, compiled=" __DATE__" "__TIME__, __LINE__ )) |
|
55 #define TRACE_ASSERT_INFO(a, b) if (!(a)) __TRACE_PRINTF(("Assertion failed: file=" __FILE__ ", line=%d, extra info 0x%08x, compiled=" __DATE__" "__TIME__, __LINE__, b )); |
|
56 |
|
57 #endif // __ISICOMMUNICATIONMANAGERTRACE_H__ |
|
58 |
|
59 // End of File |