First public contribution.
1 // Copyright (c) 2007-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 "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.
21 #ifndef __T_SIM_LOAD_UTILS_H__
22 #define __T_SIM_LOAD_UTILS_H__
26 _LIT(KDefaultSectionName, "default");
28 class CTSimLoadAppUtils
32 * Read in sim load type parameter from configuration file
33 * created by test step, and indicate whether the type is
36 * @return ETrue if static load specified.
37 EFalse if spiked load specified
38 * @leave KErrAbort if the load type cannot be determined,
39 otherwise a system error code.
41 IMPORT_C static TBool IsStaticLoadL();
44 * Read in the simload (as a percentage) config parameter from
45 * configuration file created by test step.
47 * @return The simulated load that the app (in
48 * combination with 2 other apps) is to achieve.
49 * @leave System error code.
51 IMPORT_C static TInt SimLoadL();
54 * Given a load percentage, and seed value for delay, create a load that when
55 * combined with 2 other sim load apps produce the load percentage passed in.
57 * @param aLoadPercentage The simulated load that the app (in
58 * combination with 2 other apps) is to achieve.
59 * @param aDelay Seed value which harmonises the load pattern.
60 * @leave System wide error code
62 IMPORT_C static void SimulateStaticLoadL(TInt aLoadPercentage, TInt aDelay);
65 * Simulates a spiked load, e.g. 100% load for short period of time, at regular
66 * spaced intervals, to simulate the load produced when for example a phone
69 IMPORT_C static void SimulateSpikedLoad();
72 CTSimLoadAppUtils() {}
73 static void SimulateTestLoad(TInt, TInt);
74 static TInt CalculateSimLoadL(TInt);
77 #endif // __T_SIM_LOAD_UTILS_H__