os/kernelhwsrv/kerneltest/e32test/resourceman/resourceman_psl/rescontrol_extended_psl.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/resourceman/resourceman_psl/rescontrol_extended_psl.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,139 @@
     1.4 +// Copyright (c) 2007-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 +// e32test\resourceman\resourceman_psl\rescontrol_extended_psl.h
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#ifndef __RESCONTROL_EXTENDED_PSL_H__
    1.22 +#define __RESCONTROL_EXTENDED_PSL_H__
    1.23 +
    1.24 +//Macro to establish dependency between the specified resource
    1.25 +#define CREATE_DEPENDENCY_BETWEEN_NODES(pN1, pN2, pRes1, pRes2, priRes1, priRes2)			\
    1.26 +	pN1->iPriority = priRes1;																\
    1.27 +	pN1->iResource = pRes1;																	\
    1.28 +	pN1->iPropagatedLevel = 0;																\
    1.29 +	pN1->iVisited = EFalse;																	\
    1.30 +	pN2->iPriority = priRes2;																\
    1.31 +	pN2->iResource = pRes2;																	\
    1.32 +	pN2->iPropagatedLevel = 0;																\
    1.33 +	pN2->iVisited = EFalse;																	\
    1.34 +	pN1->iResource->AddNode(pN2);															\
    1.35 +	pN2->iResource->AddNode(pN1);														
    1.36 +
    1.37 +//class definition for multilevel single positive sense dependent resource
    1.38 +NONSHARABLE_CLASS(DMLSLGLSPDependResource) : public DStaticPowerResourceD
    1.39 +	{
    1.40 +public:
    1.41 +    DMLSLGLSPDependResource();
    1.42 +    TInt DoRequest(TPowerRequest &req);
    1.43 +    TInt GetInfo(TDes8* aInfo) const;
    1.44 +	TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
    1.45 +private:
    1.46 +    TInt iMinLevel;
    1.47 +    TInt iMaxLevel;
    1.48 +    TInt iCurrentLevel;
    1.49 +	TInt iBlockTime; //Time duration the thread will be blocked. 
    1.50 +	};
    1.51 +
    1.52 +//class definition for multilevel single negative sense dependent resource
    1.53 +NONSHARABLE_CLASS(DMLSIGLSNDependResource) : public DStaticPowerResourceD
    1.54 +	{
    1.55 +public:
    1.56 +    DMLSIGLSNDependResource();
    1.57 +    TInt DoRequest(TPowerRequest &req);
    1.58 +    TInt GetInfo(TDes8* aInfo) const;
    1.59 +	TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
    1.60 +private:
    1.61 +    TInt iMinLevel;
    1.62 +    TInt iMaxLevel;
    1.63 +    TInt iCurrentLevel;
    1.64 +	TInt iBlockTime; //Time duration the thread will be blocked. 
    1.65 +	};
    1.66 +
    1.67 +//class definition for binary single postive sense dependent resource
    1.68 +NONSHARABLE_CLASS(DBSIGLSPDependResource) : public DStaticPowerResourceD
    1.69 +	{
    1.70 +public:
    1.71 +    DBSIGLSPDependResource();
    1.72 +    TInt DoRequest(TPowerRequest &req);
    1.73 +    TInt GetInfo(TDes8* aInfo) const;
    1.74 +	TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
    1.75 +private:
    1.76 +    TInt iMinLevel;
    1.77 +    TInt iMaxLevel;
    1.78 +    TInt iCurrentLevel;
    1.79 +	TInt iBlockTime; //Time duration the thread will be blocked. 
    1.80 +	};
    1.81 +
    1.82 +//class definition for multilevel shared postive sense dependent resource
    1.83 +NONSHARABLE_CLASS(DMLSHIGLSPDependResource) : public DStaticPowerResourceD
    1.84 +	{
    1.85 +public:
    1.86 +    DMLSHIGLSPDependResource();
    1.87 +    TInt DoRequest(TPowerRequest &req);
    1.88 +    TInt GetInfo(TDes8* aInfo) const;
    1.89 +	TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
    1.90 +private:
    1.91 +    TInt iMinLevel;
    1.92 +    TInt iMaxLevel;
    1.93 +    TInt iCurrentLevel;
    1.94 +	TInt iBlockTime; //Time duration the thread will be blocked. 
    1.95 +	};
    1.96 +
    1.97 +//class definition for binary shared negative sense dependent resource
    1.98 +NONSHARABLE_CLASS(DBSHLGLSNDependResource) : public DStaticPowerResourceD
    1.99 +	{
   1.100 +public:
   1.101 +    DBSHLGLSNDependResource();
   1.102 +    TInt DoRequest(TPowerRequest &req);
   1.103 +    TInt GetInfo(TDes8* aInfo) const;
   1.104 +	TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
   1.105 +private:
   1.106 +    TInt iMinLevel;
   1.107 +    TInt iMaxLevel;
   1.108 +    TInt iCurrentLevel;
   1.109 +	TInt iBlockTime; //Time duration the thread will be blocked. 
   1.110 +	};
   1.111 +
   1.112 +//class definition for multilevel shared negative sense dependent resource
   1.113 +NONSHARABLE_CLASS(DMLSHLGLSNDependResource) : public DStaticPowerResourceD
   1.114 +	{
   1.115 +public:
   1.116 +    DMLSHLGLSNDependResource();
   1.117 +    TInt DoRequest(TPowerRequest &req);
   1.118 +    TInt GetInfo(TDes8* aInfo) const;
   1.119 +	TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
   1.120 +private:
   1.121 +    TInt iMinLevel;
   1.122 +    TInt iMaxLevel;
   1.123 +    TInt iCurrentLevel;
   1.124 +	TInt iBlockTime; //Time duration the thread will be blocked. 
   1.125 +	};
   1.126 +
   1.127 +//class definition for multilevel shared custom sense dependent resource
   1.128 +NONSHARABLE_CLASS(DMLSHLGLSCDependResource) : public DStaticPowerResourceD
   1.129 +	{
   1.130 +public:
   1.131 +    DMLSHLGLSCDependResource();
   1.132 +    TInt DoRequest(TPowerRequest &req);
   1.133 +    TInt GetInfo(TDes8* aInfo) const;
   1.134 +	TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
   1.135 +private:
   1.136 +    TInt iMinLevel;
   1.137 +    TInt iMaxLevel;
   1.138 +    TInt iCurrentLevel;
   1.139 +	TInt iBlockTime; //Time duration the thread will be blocked. 
   1.140 +	};
   1.141 +
   1.142 +#endif //__RESCONTROL_EXTENDED_PSL_H__