|
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: This file contains the header file of the STIF test |
|
15 * interference module. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef STIFTESTINTERFERENCE_H |
|
20 #define STIFTESTINTERFERENCE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "StifTestModule.h" |
|
24 #include <StifLogger.h> |
|
25 #include <e32std.h> |
|
26 #include <e32base.h> |
|
27 #include <e32svr.h> |
|
28 |
|
29 // CONSTANTS |
|
30 //const ?type ?constant_var = ?constant; |
|
31 |
|
32 // MACROS |
|
33 //#define ?macro ?macro_def |
|
34 |
|
35 // DATA TYPES |
|
36 //enum ?declaration |
|
37 //typedef ?declaration |
|
38 //extern ?data_type; |
|
39 |
|
40 // FUNCTION PROTOTYPES |
|
41 //?type ?function_name(?arg_list); |
|
42 |
|
43 // FORWARD DECLARATIONS |
|
44 //class ?FORWARD_CLASSNAME; |
|
45 |
|
46 // CLASS DECLARATION |
|
47 |
|
48 /** |
|
49 * This a MSTIFTestInterference class. |
|
50 * MSTIFTestInterference is an interface class. Purpose is to |
|
51 * avoid multi heritance in subclasses. |
|
52 * |
|
53 * @lib ?library |
|
54 * @since ?Series60_version |
|
55 */ |
|
56 NONSHARABLE_CLASS( MSTIFTestInterference ) |
|
57 { |
|
58 public: // Enumerations |
|
59 |
|
60 // Way of using test interference |
|
61 enum TStifTestInterferenceCategory |
|
62 { |
|
63 EActiveObject, // Test interference using active object |
|
64 EThread, // Test interference using thread |
|
65 }; |
|
66 |
|
67 // Type of the test interference |
|
68 enum TStifTestInterferenceType |
|
69 { |
|
70 ENone, // No test interference |
|
71 ECpuLoad, // with CPU load |
|
72 EFileSystemReadC, // with file system load, read from C-drive |
|
73 EFileSystemReadD, // with file system load, read from D-drive |
|
74 EFileSystemReadE, // with file system load, read from E-drive |
|
75 EFileSystemReadZ, // with file system load, read from Z-drive |
|
76 EFileSystemWriteC, // with file system load, write from C-drive |
|
77 EFileSystemWriteD, // with file system load, write from D-drive |
|
78 EFileSystemWriteE, // with file system load, write from E-drive |
|
79 EFileSystemFillAndEmptyC, // with file system load, fill and empty from |
|
80 // C-drive |
|
81 EFileSystemFillAndEmptyD, // with file system load, fill and empty from |
|
82 // D-drive |
|
83 EFileSystemFillAndEmptyE, // with file system load, fill and empty from |
|
84 // E-drive |
|
85 |
|
86 ENoneMicroSeconds, // No test interference |
|
87 ECpuLoadMicroSeconds, // with CPU load |
|
88 EFileSystemReadCMicroSeconds, // with file system load, read from C-drive |
|
89 EFileSystemReadDMicroSeconds, // with file system load, read from D-drive |
|
90 EFileSystemReadEMicroSeconds, // with file system load, read from E-drive |
|
91 EFileSystemReadZMicroSeconds, // with file system load, read from Z-drive |
|
92 EFileSystemWriteCMicroSeconds, // with file system load, write from C-drive |
|
93 EFileSystemWriteDMicroSeconds, // with file system load, write from D-drive |
|
94 EFileSystemWriteEMicroSeconds, // with file system load, write from E-drive |
|
95 EFileSystemFillAndEmptyCMicroSeconds, // with file system load, fill and empty from |
|
96 // C-drive |
|
97 EFileSystemFillAndEmptyDMicroSeconds, // with file system load, fill and empty from |
|
98 // D-drive |
|
99 EFileSystemFillAndEmptyEMicroSeconds // with file system load, fill and empty from |
|
100 // E-drive |
|
101 }; |
|
102 |
|
103 public: // Constructors and destructor |
|
104 |
|
105 /** |
|
106 * Two-phased constructor. |
|
107 * @param: aTestModuleBase: CTestModuleBase object for get test |
|
108 interference handle to STIF's side(Used if test case panic so |
|
109 test interference thread can be kill by STIF). |
|
110 * @param: aCategory: Test interference category |
|
111 * @return: MSTIFTestInterference object |
|
112 */ |
|
113 IMPORT_C static MSTIFTestInterference* NewL( |
|
114 CTestModuleBase* aTestModuleBase, |
|
115 TStifTestInterferenceCategory aCategory ); |
|
116 |
|
117 /** |
|
118 * Destructor. |
|
119 */ |
|
120 virtual ~MSTIFTestInterference(); |
|
121 |
|
122 public: // New functions |
|
123 |
|
124 /** |
|
125 * StartL method starts test interference. |
|
126 * @param: aType: Test interference type. |
|
127 * @param: aIdleTime: Test interference idle time. |
|
128 * @param: aActiveTime: Test interference active time. |
|
129 * @return: Symbian error code. |
|
130 */ |
|
131 virtual TInt StartL( TStifTestInterferenceType aType, |
|
132 TInt aIdleTime, |
|
133 TInt aActiveTime ) = 0; |
|
134 |
|
135 /** |
|
136 * Stop method stops test interference. |
|
137 */ |
|
138 virtual TInt Stop() = 0; |
|
139 |
|
140 /** |
|
141 * Sets thread or active object priority. This should use before |
|
142 * test interference is started otherwise error code will return. |
|
143 * |
|
144 * Thread priority can set during interference executions time. User |
|
145 * should be sure that given value is acceptable, otherwise SetPriority |
|
146 * panics. |
|
147 * |
|
148 * @param: aPriority: New priority for active object or thread |
|
149 * @return: Symbian error code. |
|
150 */ |
|
151 virtual TInt SetPriority( TInt aPriority ) = 0; |
|
152 |
|
153 /** |
|
154 * ?member_description. |
|
155 * @since ?Series60_version |
|
156 * @param ?arg1 ?description |
|
157 * @return ?description |
|
158 */ |
|
159 //?type ?member_function( ?type ?arg1 ); |
|
160 |
|
161 public: // Functions from base classes |
|
162 |
|
163 /** |
|
164 * ?member_description. |
|
165 * @since ?Series60_version |
|
166 * @param ?arg1 ?description |
|
167 * @return ?description |
|
168 */ |
|
169 //?type ?member_function( ?type ?arg1 ); |
|
170 |
|
171 protected: // New functions |
|
172 |
|
173 /** |
|
174 * ?member_description. |
|
175 * @since ?Series60_version |
|
176 * @param ?arg1 ?description |
|
177 * @return ?description |
|
178 */ |
|
179 //?type ?member_function( ?type ?arg1 ); |
|
180 |
|
181 protected: // Functions from base classes |
|
182 |
|
183 /** |
|
184 * From ?base_class ?member_description |
|
185 */ |
|
186 //?type ?member_function(); |
|
187 |
|
188 private: |
|
189 |
|
190 // Prohibit copy constructor if not deriving from CBase. |
|
191 // ?classname( const ?classname& ); |
|
192 // Prohibit assigment operator if not deriving from CBase. |
|
193 // ?classname& operator=( const ?classname& ); |
|
194 |
|
195 public: // Data |
|
196 // ?one_line_short_description_of_data |
|
197 //?data_declaration; |
|
198 |
|
199 protected: // Data |
|
200 // ?one_line_short_description_of_data |
|
201 //?data_declaration; |
|
202 |
|
203 private: // Data |
|
204 // ?one_line_short_description_of_data |
|
205 //?data_declaration; |
|
206 |
|
207 // Reserved pointer for future extension |
|
208 //TAny* iReserved; |
|
209 |
|
210 public: // Friend classes |
|
211 //?friend_class_declaration; |
|
212 protected: // Friend classes |
|
213 //?friend_class_declaration; |
|
214 private: // Friend classes |
|
215 //?friend_class_declaration; |
|
216 |
|
217 }; |
|
218 |
|
219 #endif // STIFTESTINTERFERENCE_H |
|
220 |
|
221 // End of File |