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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @test |
|
19 @internalComponent |
|
20 */ |
|
21 |
|
22 #ifndef __T_SIM_LOAD_UTILS_H__ |
|
23 #define __T_SIM_LOAD_UTILS_H__ |
|
24 |
|
25 class CTSimLoadAppUtils |
|
26 { |
|
27 public: |
|
28 /** |
|
29 * Read in sim load type parameter from configuration file |
|
30 * created by test step, and indicate whether the type is |
|
31 * spiked. |
|
32 * |
|
33 * @return ETrue if spiked load required, or EFalse otherwise |
|
34 * @leave System error code. |
|
35 */ |
|
36 IMPORT_C static TBool SpikedLoadL(); |
|
37 |
|
38 /** |
|
39 * Read in sim load type parameter from configuration file |
|
40 * created by test step, and indicate whether the type is |
|
41 * static. |
|
42 * |
|
43 * @return ETrue if static load required, or EFalse otherwise |
|
44 * @leave System error code. |
|
45 */ |
|
46 IMPORT_C static TBool StaticLoadL(); |
|
47 |
|
48 /** |
|
49 * Read in the simload (as a percentage) config parameter from |
|
50 * configuration file created by test step. |
|
51 * |
|
52 * @return The simulated load that the app (in |
|
53 * combination with 2 other apps) is to achieve. |
|
54 * @leave System error code. |
|
55 */ |
|
56 IMPORT_C static TInt SimLoadL(); |
|
57 |
|
58 /** |
|
59 * Given a load percentage, and seed value for delay, create a load that when |
|
60 * combined with 2 other sim load apps produce the load percentage passed in. |
|
61 * |
|
62 * @param aLoadPercentage The simulated load that the app (in |
|
63 * combination with 2 other apps) is to achieve. |
|
64 * @param aDelay Seed value which harmonises the load pattern. |
|
65 * @leave System wide error code |
|
66 */ |
|
67 IMPORT_C static void SimulateStaticLoadL(const TInt& aLoadPercentage, const TInt& aDelay); |
|
68 |
|
69 /** |
|
70 * Simulates a spiked load, e.g. 100% load for short period of time, at regular |
|
71 * spaced intervals, to simulate the load produced when for example a phone |
|
72 * call is received. |
|
73 */ |
|
74 IMPORT_C static void SimulateSpikedLoad(); |
|
75 |
|
76 private: |
|
77 CTSimLoadAppUtils() {} |
|
78 static void SimulateTestLoad(const TInt&, const TInt&); |
|
79 static TInt CalculateSimLoadL(const TInt&); |
|
80 }; |
|
81 |
|
82 #endif // __T_SIM_LOAD_UTILS_H__ |
|
83 |
|