0
|
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 __ISIROUTERTRACE_H__
|
|
21 |
#define __ISIROUTERTRACE_H__
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include <kernel.h>
|
|
25 |
|
|
26 |
// CONSTANTS
|
|
27 |
enum TISIFaultClassCategories
|
|
28 |
{
|
|
29 |
EDISIUserChannelTraceId,
|
|
30 |
EDISIRouterTraceId,
|
|
31 |
EDISILinkTraceId,
|
|
32 |
EDISIMsgQueueTraceId,
|
|
33 |
EDISIIfTraceId,
|
|
34 |
EDISIKernelChannelId,
|
|
35 |
EDISIThreadContainerTraceId,
|
|
36 |
EDISICLTransceiverTraceId,
|
9
|
37 |
EDIsiRouterServiceTraceId,
|
0
|
38 |
};
|
|
39 |
|
|
40 |
const TUint8 KClassIdentifierShift( 8 );
|
|
41 |
const TUint8 KObjIdShift( 16 );
|
|
42 |
const TUint8 KMediaIdShift( 16 );
|
|
43 |
const TUint8 KExtraInfoShift( 24 );
|
|
44 |
|
|
45 |
// MACROS
|
|
46 |
|
|
47 |
#define _T( a ) a
|
|
48 |
#define __TRACE_PRINTF(a) Kern::Printf a
|
|
49 |
|
|
50 |
#ifdef _DEBUG
|
|
51 |
#if defined COMPONENT_TRACE_FLAG
|
9
|
52 |
#define C_TRACE( a ) __TRACE_PRINTF( a )
|
0
|
53 |
#else
|
|
54 |
#define C_TRACE(a)
|
|
55 |
#endif // COMPONENT_TRACE_FLAG
|
9
|
56 |
#if defined ISIMESSAGE_TRACE_FLAG
|
|
57 |
/*
|
|
58 |
* Trace function introduction.
|
|
59 |
*/
|
|
60 |
void PrintIsiMessageTrace( TDes8& aMessage );
|
|
61 |
#define ISIMESSAGE_TRACE( a ) PrintIsiMessageTrace( a )
|
|
62 |
#else
|
|
63 |
#define ISIMESSAGE_TRACE( a )
|
|
64 |
#endif // COMPONENT_TRACE_FLAG
|
0
|
65 |
#else
|
|
66 |
#define C_TRACE(a)
|
9
|
67 |
#define ISIMESSAGE_TRACE( a )
|
0
|
68 |
#endif // _DEBUG
|
|
69 |
|
|
70 |
// Resets are made both in UDEB and UREL (traces only in udeb)
|
|
71 |
#define ASSERT_RESET_ALWAYS(a,b) if(!(a)) { __TRACE_PRINTF(("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__" "__TIME__, __LINE__)); Kern::Fault( "ISI Router:", b ); }
|
|
72 |
#define TRACE_ASSERT_ALWAYS __TRACE_PRINTF( ("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__" "__TIME__, __LINE__) )
|
|
73 |
#define TRACE_ASSERT(a) if (!(a)) __TRACE_PRINTF(("Assertion failed: file=" __FILE__ ", line=%d, compiled=" __DATE__" "__TIME__, __LINE__ ))
|
|
74 |
#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 ));
|
|
75 |
#define TRACE_WARNING(a, b) if (!(a)) __TRACE_PRINTF(("Warning: file=" __FILE__ ", line=%d, extra info 0x%x, compiled=" __DATE__" "__TIME__, __LINE__, b ));
|
|
76 |
#define ASSERT_PANIC_USER_THREAD_ALWAYS( a, b, c ) if(!(a)){__TRACE_PRINTF(("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__" "__TIME__, __LINE__));Kern::ThreadKill( b, EExitPanic, c, _L8("ISI Router:") );}
|
|
77 |
#define ASSERT_THREAD_CONTEXT_ALWAYS( a )ASSERT_RESET_ALWAYS( NKern::CurrentContext() == NKern::EThread, a );
|
|
78 |
|
|
79 |
// DATA TYPES
|
|
80 |
|
|
81 |
// FUNCTION PROTOTYPES
|
|
82 |
|
|
83 |
// FORWARD DECLARATIONS
|
|
84 |
|
|
85 |
#endif // __ISIROUTERTRACE_H__
|
|
86 |
|
|
87 |
// End of File
|