os/kernelhwsrv/kerneltest/e32test/debug/t_perflogger_drv.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/debug/t_perflogger_drv.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,113 @@
     1.4 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// A helper test driver for testing Kernel Performance Logger. User part.
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +/**
    1.22 + @file
    1.23 + @internalAll
    1.24 +*/
    1.25 +
    1.26 +
    1.27 +#ifndef T_PERFLOGGER_DRV_H__
    1.28 +#define T_PERFLOGGER_DRV_H__
    1.29 +
    1.30 +#include <e32cmn.h>
    1.31 +#include <e32ver.h>
    1.32 +
    1.33 +/** Test helper LDD name */ 
    1.34 +_LIT(KPLoggerHelperTestDrv, "d_perflogger_test");
    1.35 +
    1.36 +
    1.37 +/** 
    1.38 +	Log control structure.
    1.39 +	Specifies a task arguments to the helper driver
    1.40 +*/
    1.41 +struct TTestLogCtrl
    1.42 +	{
    1.43 +    inline TTestLogCtrl();
    1.44 +	
    1.45 +    TInt    iLogsNum;        ///< numbers of loggings   
    1.46 +    TUint   iLogPeriodTick;  ///< Period of logging, nanokernel ticks, see NTimer::OneShot()
    1.47 +	
    1.48 +    //-- this part will go to the logging function
    1.49 +    
    1.50 +    TUint8  iCategory;
    1.51 +    TUint8  iSubCategory;
    1.52 +    TUint32 iUserData;       ///< user data.
    1.53 +    TUint32 iUserData2;      ///< user data.
    1.54 +	
    1.55 +	};
    1.56 +
    1.57 +
    1.58 +/**
    1.59 +    User - side interface to the perf. logger test helper LDD.
    1.60 +*/
    1.61 +class RKPLoggerTestHelper : public RBusLogicalChannel
    1.62 +	{
    1.63 +	
    1.64 +	public:
    1.65 +#ifndef __KERNEL_MODE__
    1.66 +		
    1.67 +		//-- user application interface methods
    1.68 +		
    1.69 +		inline TInt Open(const TVersion& aVer);
    1.70 +		inline TVersion VersionRequired() const;
    1.71 +		
    1.72 +		inline TInt MakeLogFromUserThread(const TTestLogCtrl& aLogCtrl);
    1.73 +		inline TInt TestDifferentMacros(const TTestLogCtrl& aLogCtrl);
    1.74 +		
    1.75 +		
    1.76 +		inline void MakeLogFromISR(TRequestStatus& aRqStat, const TTestLogCtrl& aLogCtrl);
    1.77 +		inline void CancelLogFromISR();
    1.78 +		
    1.79 +		inline void MakeLogFromIDFC(TRequestStatus& aRqStat, const TTestLogCtrl& aLogCtrl);
    1.80 +		inline void CancelLogFromIDFC();
    1.81 +		
    1.82 +		inline void MakeLogFromDFC(TRequestStatus& aRqStat, const TTestLogCtrl& aLogCtrl);
    1.83 +		inline void CancelLogFromDFC();
    1.84 +		
    1.85 +		inline void Close();
    1.86 +		
    1.87 +#endif  //__KERNEL_MODE__
    1.88 +		
    1.89 +	public:
    1.90 +		
    1.91 +		/** LDD version */
    1.92 +		enum TVer{EMajorVersionNumber=1,EMinorVersionNumber=0,EBuildVersionNumber=1};
    1.93 +		
    1.94 +		/** Synchronous Control functions */
    1.95 +		enum TControl
    1.96 +			{
    1.97 +			EDoLogFromUserThread,   ///< make logging from user thread context. See also TTestLogStruct
    1.98 +			EDoTestMacros           ///< test different PERF_LOG macros, logging from the user thread 
    1.99 +			};
   1.100 +		
   1.101 +		/** Asynchronous Request functions */
   1.102 +		enum TRequest
   1.103 +			{
   1.104 +			EDoLogFromISR,  ///< make logging from ISR. See also TTestLogStruct
   1.105 +			EDoLogFromIDFC, ///< make logging from IDFC. See also TTestLogStruct
   1.106 +			EDoLogFromDFC,  ///< make logging from DFC. See also TTestLogStruct
   1.107 +			};
   1.108 +	};
   1.109 +
   1.110 +#include "t_perflogger_drv.inl"
   1.111 +
   1.112 +#endif  //T_PERFLOGGER_DRV_H__
   1.113 +
   1.114 +
   1.115 +
   1.116 +