piprofiler/piprofiler_plat/inc/PluginDriver.h
branchRCL_3
changeset 13 da2cedce4920
equal deleted inserted replaced
12:d27dfa8884ad 13:da2cedce4920
       
     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 "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 #include <piprofiler/ProfilerGenericClassesKrn.h>
       
    20 
       
    21 const TInt KMinRate = 10;
       
    22 const TInt KMaxRate = 1000;
       
    23 
       
    24 enum TState{ERunning, EStopping, EStopped};
       
    25 
       
    26 const TUid KGppPropertyCat={0x20201F70};
       
    27 enum TGppPropertyKeys
       
    28 	{
       
    29 	EGppPropertySyncSampleNumber
       
    30 	};
       
    31 
       
    32 
       
    33 /*
       
    34  *
       
    35  *
       
    36  *	Class DPluginDriver definition, inherited by sampler implementations except GPP
       
    37  *
       
    38  *
       
    39  */
       
    40 
       
    41 class DPluginDriver : public DLogicalChannel
       
    42 {
       
    43 
       
    44 public:
       
    45 	DPluginDriver();
       
    46 	~DPluginDriver();
       
    47 
       
    48 public:	
       
    49 	TInt					ProcessStreamReadCancel();
       
    50 
       
    51 	TInt					StopSampling();
       
    52 
       
    53 private:
       
    54 	TInt					ProcessPrintStreamRequest(TDesC8* aDes/*,TRequestStatus* aStatus*/);
       
    55 	
       
    56 	void 					FastPrintf(TDesC8* aDes);
       
    57  
       
    58 public:
       
    59 	DThread*				iClient;
       
    60 
       
    61 	// property and value; 
       
    62 	// GPP sampler start time, needed to set other samplers in sync
       
    63 	RPropertyRef 			iSampleStartTimeProp;
       
    64 	TInt					iSampleStartTime;
       
    65 	TUint32 				iSyncOffset;		// offset from the start
       
    66 	
       
    67 	
       
    68 	TUint32					sampleRunning;
       
    69 	const TUint*			iInterruptStack;
       
    70 	TState					iState;
       
    71 	TInt					doingDfc;
       
    72 
       
    73 	// request status objects for requests
       
    74 	TRequestStatus*			iEndRequestStatus;
       
    75 	TRequestStatus*			iStreamReadCancelStatus;
       
    76 
       
    77 	// sample stream object used in stream mode
       
    78 	DProfilerSampleStream		iSampleStream;
       
    79 
       
    80 	// just for testing
       
    81 	TUint32*				stackTop;
       
    82 
       
    83 };
       
    84 
       
    85 #include <piprofiler/PluginDriver.inl>