Update contrib.
1 // Copyright (c) 2005-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.
20 #ifndef T_PERFLOGGER_DRV_INL__
21 #define T_PERFLOGGER_DRV_INL__
24 //-----------------------------------------------------------------------------------
26 TTestLogCtrl::TTestLogCtrl()
28 iLogsNum = -1; //-- invalid default value
29 iLogPeriodTick = 10; //-- 10 ms by default
34 iUserData = 0xBEEEBEEE;
35 iUserData2 = 0xAABBCCDD;
39 //-----------------------------------------------------------------------------------
41 #ifndef __KERNEL_MODE__
45 @param aVer version required
46 @return System-wide error code
48 TInt RKPLoggerTestHelper::Open(const TVersion& aVer)
50 return DoCreate(KPLoggerHelperTestDrv, aVer, KNullUnit, NULL, NULL, EOwnerProcess);
54 Cancel all pending requests and close LDD
56 void RKPLoggerTestHelper::Close()
61 RBusLogicalChannel::Close();
66 @return Current LDD version
68 TVersion RKPLoggerTestHelper::VersionRequired() const
70 return TVersion(EMajorVersionNumber,EMinorVersionNumber,EBuildVersionNumber);
76 Synchronous request to make a number of logging from user thread.
77 Logging is performen in the context of the user caller thread
79 @param aLogCtrl control parameters for logging
80 @return System wide error code
82 TInt RKPLoggerTestHelper::MakeLogFromUserThread(const TTestLogCtrl& aLogCtrl)
84 return DoControl(EDoLogFromUserThread, (TAny*)&aLogCtrl);
89 test different PERF_LOG macros, logging from the user thread. Just unit test
90 @param aLogCtrl control parameters for logging
91 @return System wide error code
93 TInt RKPLoggerTestHelper::TestDifferentMacros(const TTestLogCtrl& aLogCtrl)
95 return DoControl(EDoTestMacros, (TAny*)&aLogCtrl);
100 Asynchronous request to make a number of logging from ISR. NTimer is used for this purpose.
102 @param aRqStat request status, will be completed when all done.
103 @param aLogCtrl control parameters for logging
105 void RKPLoggerTestHelper::MakeLogFromISR(TRequestStatus& aRqStat, const TTestLogCtrl& aLogCtrl)
107 DoRequest(EDoLogFromISR, aRqStat, (TAny*)&aLogCtrl);
110 /** cancel ISR logging request */
111 void RKPLoggerTestHelper::CancelLogFromISR()
113 DoCancel(EDoLogFromISR);
117 Asynchronous request to make a number of logging from IDFC. NTimer is used for this purpose.
119 @param aRqStat request status, will be completed when all done.
120 @param aLogCtrl control parameters for logging
122 void RKPLoggerTestHelper::MakeLogFromIDFC(TRequestStatus& aRqStat, const TTestLogCtrl& aLogCtrl)
124 DoRequest(EDoLogFromIDFC, aRqStat, (TAny*)&aLogCtrl);
127 /** cancel IDFC logging request */
128 void RKPLoggerTestHelper::CancelLogFromIDFC()
130 DoCancel(EDoLogFromIDFC);
134 Asynchronous request to make a number of logging from DFC. NTimer is used for this purpose.
136 @param aRqStat request status, will be completed when all done.
137 @param aLogCtrl control parameters for logging
139 void RKPLoggerTestHelper::MakeLogFromDFC(TRequestStatus& aRqStat, const TTestLogCtrl& aLogCtrl)
141 DoRequest(EDoLogFromDFC, aRqStat, (TAny*)&aLogCtrl);
144 /** cancel DFC logging request */
145 void RKPLoggerTestHelper::CancelLogFromDFC()
147 DoCancel(EDoLogFromDFC);
151 #endif //__KERNEL_MODE__
155 #endif //T_PERFLOGGER_DRV_INL__