First public contribution.
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32tset\group\d_btrace.h
23 #include <e32btrace.h>
25 #ifndef __KERNEL_MODE__
31 Interface to the fast-trace memory buffer.
33 class RBTraceTest : public RBusLogicalChannel
40 EContextIntsOff = 1<<10,
45 #ifndef __KERNEL_MODE__
48 return DoCreate(Name(),TVersion(0,1,1),KNullUnit,NULL,NULL,EOwnerThread);
51 inline TInt Trace(TUint aType, TAny* aData, TInt aSize, TUint aDelay=0)
53 TPtrC8 des((TUint8*)aData,aSize+4);
55 return DoControl(ETestTrace,(TAny*)aDelay,(TAny*)&des);
57 return DoControl(ETestSpecialTrace,(TAny*)aType,(TAny*)&des);
60 inline TUint TestBenchmark(TInt aSize, TUint aDuration)
62 return DoControl(ETestBenchmark,(TAny*)aSize,(TAny*)aDuration);
65 inline TUint TestBenchmark2(TInt aSize, TUint aDuration)
67 return DoControl(ETestBenchmark2,(TAny*)aSize,(TAny*)aDuration);
70 inline TUint TestBenchmarkCheckFilter(TInt aSize, TUint aDuration)
72 return DoControl(ETestBenchmarkCheckFilter,(TAny*)aSize,(TAny*)aDuration);
74 inline TInt UTrace(TUint aType, TAny* aData, TInt aSize)
76 TPtrC8 des((TUint8*)aData,aSize+4);
77 return DoControl(ETestUTrace,(TAny*)aType,(TAny*)&des);
82 inline static const TDesC& Name();
91 ETestBenchmarkCheckFilter,
95 friend class DBTraceTestChannel;
96 friend class DBTraceTestFactory;
99 inline const TDesC& RBTraceTest::Name()
101 _LIT(KBTraceName,"d_btrace");
106 // Test UIDs are 0x10282675 To 0x102826D8 Inclusive
107 const TUint32 KBTraceFilterTestUid = 0x10282675;
108 const TUint KNumBTraceFilterTestUids = 100;
109 const TUint32 KBTraceFilterTestUid1 = KBTraceFilterTestUid+KNumBTraceFilterTestUids/2-1;
110 const TUint32 KBTraceFilterTestUid2 = KBTraceFilterTestUid1+2;