2
|
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 CTestExecution.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef TEST_SERVER_MODULE_IF_H
|
|
19 |
#define TEST_SERVER_MODULE_IF_H
|
|
20 |
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <e32std.h>
|
|
24 |
#include <e32base.h>
|
|
25 |
#include <StifTestModule.h>
|
|
26 |
#include <StifTestInterface.h>
|
|
27 |
#include <stfeventsystem.h>
|
|
28 |
#include <stfasynceventactive.h>
|
|
29 |
#include "StifTFwIfProt.h"
|
|
30 |
|
|
31 |
// CONSTANTS
|
|
32 |
|
|
33 |
// MACROS
|
|
34 |
|
|
35 |
// DATA TYPES
|
|
36 |
|
|
37 |
// FUNCTION PROTOTYPES
|
|
38 |
typedef CSTIFTestMeasurementImplementation*(
|
|
39 |
*CTestMeasurementFactory )( const TDesC&,
|
|
40 |
CSTIFTestMeasurement::TSTIFMeasurementType );
|
|
41 |
|
|
42 |
// FORWARD DECLARATIONS
|
|
43 |
class TEvent;
|
|
44 |
class CTestModule;
|
|
45 |
class CTestModuleContainer;
|
|
46 |
class CPrintQueue;
|
|
47 |
class CPrintHandler;
|
|
48 |
class CEventHandler;
|
|
49 |
class CSndHandler;
|
|
50 |
class CRcvHandler;
|
|
51 |
class CErrorPrintHandler;
|
|
52 |
class CInterferenceHandler;
|
|
53 |
class CMeasurementHandler;
|
|
54 |
class CCommandHandler;
|
|
55 |
class CAsyncEventActive;
|
|
56 |
|
|
57 |
// CLASS DECLARATION
|
|
58 |
|
|
59 |
// DESCRIPTION
|
|
60 |
// TCmdDef represents remote command
|
|
61 |
class TCmdDef
|
|
62 |
{
|
|
63 |
public:
|
|
64 |
TStifCommand iCommand;
|
|
65 |
TParams iParam;
|
|
66 |
TInt iLen;
|
|
67 |
TRequestStatus* iStatus;
|
|
68 |
};
|
|
69 |
|
|
70 |
// TCommandDef represents command
|
|
71 |
class TCommandDef
|
|
72 |
{
|
|
73 |
public:
|
|
74 |
TCommand iCommand;
|
|
75 |
TBuf8<KMaxCommandParamsLength2> iParamsPckg;
|
|
76 |
};
|
|
77 |
|
|
78 |
// DESCRIPTION
|
|
79 |
// CCommandDef represents command
|
|
80 |
class CCommandDef : public CBase
|
|
81 |
{
|
|
82 |
public: // Enumerations
|
|
83 |
|
|
84 |
private: // Enumerations
|
|
85 |
|
|
86 |
public: // Constructors and destructor
|
|
87 |
static CCommandDef* NewL();
|
|
88 |
~CCommandDef();
|
|
89 |
|
|
90 |
private: // Constructors and destructor
|
|
91 |
CCommandDef();
|
|
92 |
void ConstructL();
|
|
93 |
|
|
94 |
public: // New functions
|
|
95 |
|
|
96 |
public: // Functions from base classes
|
|
97 |
|
|
98 |
protected: // New functions
|
|
99 |
|
|
100 |
protected: // Functions from base classes
|
|
101 |
|
|
102 |
private:
|
|
103 |
|
|
104 |
public: //Data
|
|
105 |
TCommand iCommand;
|
|
106 |
TBuf8<KMaxCommandParamsLength2> iParamsPckg;
|
|
107 |
|
|
108 |
protected: // Data
|
|
109 |
|
|
110 |
private: // Data
|
|
111 |
|
|
112 |
public: // Friend classes
|
|
113 |
|
|
114 |
protected: // Friend classes
|
|
115 |
|
|
116 |
private: // Friend classes
|
|
117 |
|
|
118 |
};
|
|
119 |
|
|
120 |
// CLASS DECLARATION
|
|
121 |
|
|
122 |
// DESCRIPTION
|
|
123 |
// TCmdDef represents remote command
|
|
124 |
class TEventDef
|
|
125 |
{
|
|
126 |
public:
|
|
127 |
enum TEventCmdType
|
|
128 |
{
|
|
129 |
EEventCmd,
|
|
130 |
EEventCmdCancel,
|
|
131 |
};
|
|
132 |
// Added constructor to TEventDef @js
|
|
133 |
TEventDef():iStatus(NULL){};
|
|
134 |
|
|
135 |
public:
|
|
136 |
TEventCmdType iType;
|
|
137 |
TEventIf iEvent;
|
|
138 |
TRequestStatus* iStatus;
|
|
139 |
};
|
|
140 |
|
|
141 |
// DESCRIPTION
|
|
142 |
// TTestInterference represents remote command
|
|
143 |
class TTestInterference
|
|
144 |
{
|
|
145 |
public:
|
|
146 |
enum TOperation
|
|
147 |
{
|
|
148 |
EAppend,
|
|
149 |
ERemove,
|
|
150 |
};
|
|
151 |
public:
|
|
152 |
TTestInterference(){};
|
|
153 |
public:
|
|
154 |
// Thread id.
|
|
155 |
TUint iThreadId;
|
|
156 |
// Is operations append or remove.
|
|
157 |
TOperation iOperation;
|
|
158 |
};
|
|
159 |
|
|
160 |
// DESCRIPTION
|
|
161 |
// TTestMeasurement contains measurement related information
|
|
162 |
// transfering between TestInterface and TestServer.
|
|
163 |
class TTestMeasurement
|
|
164 |
{
|
|
165 |
public:
|
|
166 |
TTestMeasurement(){};
|
|
167 |
public:
|
|
168 |
// Struct for information.
|
|
169 |
CSTIFTestMeasurement::TStifMeasurementStruct iMeasurementStruct;
|
|
170 |
|
|
171 |
};
|
|
172 |
|
|
173 |
// DESCRIPTION
|
|
174 |
// TMeasurementHandling keeps information for measurement module
|
|
175 |
// dynamic loading, types, etc.
|
|
176 |
class TMeasurementHandling
|
|
177 |
{
|
|
178 |
public:
|
|
179 |
TMeasurementHandling() : iMeasurement( NULL ),
|
|
180 |
iMeasurementModulePtr( NULL ){};
|
|
181 |
|
|
182 |
~TMeasurementHandling()
|
|
183 |
{
|
|
184 |
delete iMeasurement;
|
|
185 |
delete iMeasurementModulePtr;
|
|
186 |
// After close test measurement's pointer is not valid anymore.
|
|
187 |
if ( iMeasurementModule.Handle() )
|
|
188 |
{
|
|
189 |
iMeasurementModule.Close();
|
|
190 |
}
|
|
191 |
};
|
|
192 |
public:
|
|
193 |
RLibrary iMeasurementModule;
|
|
194 |
CTestMeasurementFactory iMeasurementLibEntry;
|
|
195 |
CSTIFTestMeasurementImplementation* iMeasurement;
|
|
196 |
CSTIFTestMeasurement::TSTIFMeasurementType iMeasurementType;
|
|
197 |
CSTIFTestMeasurementImplementation* iMeasurementModulePtr;
|
|
198 |
};
|
|
199 |
|
|
200 |
// CLASS DECLARATION
|
|
201 |
|
|
202 |
// DESCRIPTION
|
|
203 |
// CTestExecution represents a subsession object in the CTestServer.
|
|
204 |
// A session may own any number of CTestExecution objects
|
|
205 |
class CTestExecution
|
|
206 |
:public CObject
|
|
207 |
{
|
|
208 |
|
|
209 |
public: // Enumerations
|
|
210 |
enum TTestState
|
|
211 |
{
|
|
212 |
ENotStarted,
|
|
213 |
EOnGoing,
|
|
214 |
EFinished,
|
|
215 |
ECancelled,
|
|
216 |
};
|
|
217 |
|
|
218 |
enum TRequestType
|
|
219 |
{
|
|
220 |
ERqPrint,
|
|
221 |
ERqEvent,
|
|
222 |
ERqSnd,
|
|
223 |
ERqRcv,
|
|
224 |
ERqInterference,
|
|
225 |
ERqMeasurement,
|
|
226 |
ERqCommand,
|
|
227 |
};
|
|
228 |
|
|
229 |
enum TTestThreadFailure
|
|
230 |
{
|
|
231 |
ETestThreadOk = 0,
|
|
232 |
ETestMemLeak = 0x00000001,
|
|
233 |
ETestRequestLeak = 0x00000002,
|
|
234 |
ETestHandleLeak = 0x00000004,
|
|
235 |
};
|
|
236 |
|
|
237 |
private: // Enumerations
|
|
238 |
// None
|
|
239 |
|
|
240 |
public: // Constructors and destructor
|
|
241 |
|
|
242 |
/**
|
|
243 |
* NewL is first phase of two-phased constructor.
|
|
244 |
*/
|
|
245 |
static CTestExecution* NewL( CTestModule* aModuleSession,
|
|
246 |
TInt aCaseNumber,
|
|
247 |
const TFileName& aConfig
|
|
248 |
);
|
|
249 |
|
|
250 |
/**
|
|
251 |
* Destructor
|
|
252 |
*/
|
|
253 |
virtual ~CTestExecution();
|
|
254 |
|
|
255 |
public: // New functions
|
|
256 |
|
|
257 |
/**
|
|
258 |
* Close Test Execution
|
|
259 |
*/
|
|
260 |
TInt CloseTestExecution( const RMessage2& aMessage );
|
|
261 |
|
|
262 |
/**
|
|
263 |
* Run a test case
|
|
264 |
*/
|
|
265 |
TInt RunTestCase( const RMessage2& aMessage );
|
|
266 |
|
|
267 |
/**
|
|
268 |
* Sets a print notification
|
|
269 |
*/
|
|
270 |
TInt NotifyPrint( const RMessage2& aMessage );
|
|
271 |
|
|
272 |
/**
|
|
273 |
* Sets a event notification
|
|
274 |
*/
|
|
275 |
TInt NotifyEvent( const RMessage2& aMessage );
|
|
276 |
|
|
277 |
/**
|
|
278 |
* Sets a RemoteCmd notification
|
|
279 |
*/
|
|
280 |
TInt NotifyRemoteCmd( const RMessage2& aMessage );
|
|
281 |
|
|
282 |
/**
|
|
283 |
* Reads a RemoteCmd notification
|
|
284 |
*/
|
|
285 |
TInt ReadRemoteCmdInfo( const RMessage2& aMessage );
|
|
286 |
|
|
287 |
/**
|
|
288 |
* Resumes a paused test case
|
|
289 |
*/
|
|
290 |
TInt Resume( const RMessage2& aMessage );
|
|
291 |
|
|
292 |
/**
|
|
293 |
* Pauses ongoing test case
|
|
294 |
*/
|
|
295 |
TInt Pause( const RMessage2& aMessage );
|
|
296 |
|
|
297 |
|
|
298 |
/**
|
|
299 |
* Cancels asynchronous request
|
|
300 |
*/
|
|
301 |
TInt CancelRequestL( const RMessage2& aMessage );
|
|
302 |
|
|
303 |
|
|
304 |
/**
|
|
305 |
* Completes a print request.
|
|
306 |
*/
|
|
307 |
void DoNotifyPrint();
|
|
308 |
|
|
309 |
/**
|
|
310 |
* Completes a interference request.
|
|
311 |
*/
|
|
312 |
void DoNotifyInterference();
|
|
313 |
|
|
314 |
/**
|
|
315 |
* Completes a measurement request.
|
|
316 |
*/
|
|
317 |
TInt DoNotifyMeasurement();
|
|
318 |
|
|
319 |
/**
|
|
320 |
* Completes a print request.
|
|
321 |
*/
|
|
322 |
void DoErrorPrint();
|
|
323 |
|
|
324 |
/**
|
|
325 |
* Enables remote command receiving.
|
|
326 |
*/
|
|
327 |
void DoRemoteReceive();
|
|
328 |
|
|
329 |
/**
|
|
330 |
* Sends remote commands.
|
|
331 |
*/
|
|
332 |
void DoRemoteSend();
|
|
333 |
|
|
334 |
/**
|
|
335 |
* Completes a event request.
|
|
336 |
*/
|
|
337 |
TInt DoNotifyEvent();
|
|
338 |
|
|
339 |
/**
|
|
340 |
* Completes a event cancel request.
|
|
341 |
*/
|
|
342 |
void CancelEvent();
|
|
343 |
|
|
344 |
/**
|
|
345 |
* Set thread State.
|
|
346 |
* This function can be called from test execution thread.
|
|
347 |
*/
|
|
348 |
void SetThreadState( const TTestState aState );
|
|
349 |
|
|
350 |
/**
|
|
351 |
* Completes print request if print queue is empty
|
|
352 |
*/
|
|
353 |
void CompletePrintRequestIfQueueEmpty();
|
|
354 |
|
|
355 |
/**
|
|
356 |
* Completes print request if print queue is empty
|
|
357 |
*/
|
|
358 |
void CleanupEvents();
|
|
359 |
|
|
360 |
/**
|
|
361 |
* Completes test execution
|
|
362 |
*/
|
|
363 |
void CompleteTestExecution( const TInt aCompletionCode,
|
|
364 |
const TFullTestResult::TCaseExecutionResult aCaseExecutionType,
|
|
365 |
const TInt aCaseExecutionCode,
|
|
366 |
const TInt aCaseResult,
|
|
367 |
const TDesC& aText );
|
|
368 |
|
|
369 |
/**
|
|
370 |
* Unsets all pending state events.
|
|
371 |
*/
|
|
372 |
void UnsetStateEvents();
|
|
373 |
|
|
374 |
/**
|
|
375 |
* Completes test execution
|
|
376 |
*/
|
|
377 |
void CompleteTestExecution( const TInt aCompletionCode );
|
|
378 |
|
|
379 |
/**
|
|
380 |
* Current thread state.
|
|
381 |
*/
|
|
382 |
TTestState ThreadState(){ return iThreadState; }
|
|
383 |
|
|
384 |
/**
|
|
385 |
* Cancels test(s) execution in special cases e.g. timeout, exit etc.
|
|
386 |
*/
|
|
387 |
TInt CancelTestExecution();
|
|
388 |
|
|
389 |
/**
|
|
390 |
* Make sure that any of the test interference thread's won't stay
|
|
391 |
* to run if test case is crashed of test interference object is not
|
|
392 |
* deleted.
|
|
393 |
*/
|
|
394 |
TInt KillTestinterferenceThread();
|
|
395 |
|
|
396 |
/**
|
|
397 |
* Make sure that any of the test measurement process's won't stay
|
|
398 |
* to run if test case is crashed of test measurement object is not
|
|
399 |
* deleted.
|
|
400 |
*/
|
|
401 |
TInt KillTestMeasurement();
|
|
402 |
|
|
403 |
/**
|
|
404 |
* Executes command for ongoing test case.
|
|
405 |
* Created to allow test case to kill itself.
|
|
406 |
*/
|
|
407 |
TInt NotifyCommand(const RMessage2& aMessage);
|
|
408 |
|
|
409 |
/**
|
|
410 |
* Completes a command request.
|
|
411 |
* Created to allow test case to kill itself.
|
|
412 |
*/
|
|
413 |
TInt DoNotifyCommand();
|
|
414 |
|
|
415 |
/**
|
|
416 |
* Cancels command request.
|
|
417 |
* Created to allow test case to kill itself.
|
|
418 |
*/
|
|
419 |
TInt CancelCommandRequest();
|
|
420 |
|
|
421 |
public: // Functions that are called from test thread
|
|
422 |
|
|
423 |
/**
|
|
424 |
* Get mutex handles.
|
|
425 |
*/
|
|
426 |
TInt EventMutexHandle(){ return iEventMutex.Handle(); };
|
|
427 |
TInt SndMutexHandle(){ return iSndMutex.Handle(); };
|
|
428 |
TInt RcvMutexHandle(){ return iRcvMutex.Handle(); };
|
|
429 |
TInt PrintMutexHandle(){ return iPrintMutex.Handle(); };
|
|
430 |
TInt InterferenceMutexHandle(){ return iInterferenceMutex.Handle(); };
|
|
431 |
TInt MeasurementMutexHandle(){ return iMeasurementMutex.Handle(); };
|
|
432 |
TInt CommandMutexHandle(){ return iCommandMutex.Handle(); };
|
|
433 |
|
|
434 |
/**
|
|
435 |
* Get semaphore handles.
|
|
436 |
*/
|
|
437 |
TInt EventSemHandle(){ return iEventSem.Handle(); };
|
|
438 |
TInt SndSemHandle(){ return iSndSem.Handle(); };
|
|
439 |
TInt RcvSemHandle(){ return iRcvSem.Handle(); };
|
|
440 |
//TInt ReceiverSemHandle(){ return iReceiverSem.Handle(); };
|
|
441 |
TInt PrintSemHandle(){ return iPrintSem.Handle(); };
|
|
442 |
TInt InterferenceSemHandle(){ return iInterferenceSem.Handle(); };
|
|
443 |
TInt MeasurementSemHandle(){ return iMeasurementSem.Handle(); };
|
|
444 |
TInt CommandSemHandle(){ return iCommandSem.Handle(); };
|
|
445 |
|
|
446 |
/**
|
|
447 |
* Set execution test thread id.
|
|
448 |
*/
|
|
449 |
void SetTestThread( TThreadId aThreadId ){ iTestThreadId = aThreadId; };
|
|
450 |
|
|
451 |
/**
|
|
452 |
* Access to "shared" memory.
|
|
453 |
*/
|
|
454 |
TFullTestResult& FullResult(){ return iFullResult; };
|
|
455 |
TTestProgress& TestProgress(){ return iProgress; };
|
|
456 |
TEventDef& EventDef(){ return iEventDef; };
|
|
457 |
TCmdDef& SndInfo(){ return iCmdDef; };
|
|
458 |
TCmdDef& RcvInfo(){ return iRcvCmdDef; };
|
|
459 |
TInt& TestThreadFailure(){ return iTestThreadFailure; };
|
|
460 |
TTestInterference& TestInterference(){ return iTestInterference; };
|
|
461 |
TTestMeasurement& TestMeasurement(){ return iTestMeasurement; };
|
|
462 |
CCommandDef& CommandDef(){ return *iCommandDef; };
|
|
463 |
|
|
464 |
/**
|
|
465 |
* Get specific TRequestStatus variable.
|
|
466 |
*/
|
|
467 |
TRequestStatus* GetRq( TRequestType aType );
|
|
468 |
|
|
469 |
/**
|
|
470 |
* Get mutex handle.
|
|
471 |
* This mutex meaning is to make sure that test complete and test
|
|
472 |
* case cancel operations are not executed at the same time.
|
|
473 |
*/
|
|
474 |
TInt TestThreadMutexHandle() { return iTestThreadMutex.Handle(); };
|
|
475 |
|
|
476 |
const TDesC& GetConfigFileName() const { return iConfig; }
|
|
477 |
public: // Functions from base classes
|
|
478 |
// None
|
|
479 |
|
|
480 |
protected: // New functions
|
|
481 |
// None
|
|
482 |
|
|
483 |
protected: // Functions from base classes
|
|
484 |
// None
|
|
485 |
|
|
486 |
private:
|
|
487 |
|
|
488 |
/**
|
|
489 |
* C++ default constructor.
|
|
490 |
*/
|
|
491 |
CTestExecution();
|
|
492 |
|
|
493 |
/**
|
|
494 |
* By default Symbian OS constructor is private.
|
|
495 |
*/
|
|
496 |
void ConstructL( CTestModule* aModuleSession,
|
|
497 |
TInt aCaseNumber,
|
|
498 |
const TFileName& aConfig );
|
|
499 |
|
|
500 |
/**
|
|
501 |
* Cancels print request.
|
|
502 |
*/
|
|
503 |
TInt CancelPrintRequest();
|
|
504 |
|
|
505 |
/**
|
|
506 |
* Cancels test interference request.
|
|
507 |
*/
|
|
508 |
TInt CancelInterferenceRequest();
|
|
509 |
|
|
510 |
/**
|
|
511 |
* Cancels test execution request
|
|
512 |
*/
|
|
513 |
TInt CancelTestRequest();
|
|
514 |
|
|
515 |
/**
|
|
516 |
* Cancel event request.
|
|
517 |
*/
|
|
518 |
TInt CancelEventRequest();
|
|
519 |
|
|
520 |
/**
|
|
521 |
* Cancel event request.
|
|
522 |
*/
|
|
523 |
TInt CancelRemoteCmdRequest();
|
|
524 |
|
|
525 |
/**
|
|
526 |
* Writes a print notification to client memory space.
|
|
527 |
*/
|
|
528 |
TInt WritePrint( TTestProgress& aProgress );
|
|
529 |
|
|
530 |
/**
|
|
531 |
* Complete event TRequestStatus if pending.
|
|
532 |
*/
|
|
533 |
void CompleteEvent( TInt aError );
|
|
534 |
|
|
535 |
/**
|
|
536 |
* Handle event unsets.
|
|
537 |
*/
|
|
538 |
TInt UnsetEvent( TEventIf& aEvent, const RMessage2& aMessage );
|
|
539 |
|
|
540 |
/**
|
|
541 |
* Handle event request.
|
|
542 |
*/
|
|
543 |
TInt RequestEvent( TEventIf& aEvent );
|
|
544 |
|
|
545 |
/**
|
|
546 |
* Wait event request.
|
|
547 |
*/
|
|
548 |
TInt WaitEvent( TEventIf& aEvent, TRequestStatus* aStatus );
|
|
549 |
|
|
550 |
/**
|
|
551 |
* Handle event releases.
|
|
552 |
*/
|
|
553 |
TInt ReleaseEvent( TEventIf& aEvent );
|
|
554 |
|
|
555 |
/**
|
|
556 |
* Handle state events.
|
|
557 |
*/
|
|
558 |
TInt EventStateChange( TEventIf& aEvent );
|
|
559 |
|
|
560 |
/**
|
|
561 |
* Complete request in test thread.
|
|
562 |
*/
|
|
563 |
void TestThreadRequestComplete( TRequestStatus* aStatus, TInt aCode );
|
|
564 |
|
|
565 |
public: // Data
|
|
566 |
// None
|
|
567 |
protected: // Data
|
|
568 |
// None
|
|
569 |
|
|
570 |
private: // Data
|
|
571 |
|
|
572 |
// Pointers to things around
|
|
573 |
CTestModule* iModuleSession; // Session owning us
|
|
574 |
CTestModuleContainer* iModuleContainer; // Container used to execute this case
|
|
575 |
|
|
576 |
// Test execution related members
|
|
577 |
TInt iCaseNumber; // Case to be executed
|
|
578 |
TPtr iConfig; // Configuration file name
|
|
579 |
HBufC* iConfigNameBuffer; // HBuffer for configuration file;
|
|
580 |
RMessage2 iTestExeMessage; // Test execution message
|
|
581 |
TTestState iThreadState; // Thread state
|
|
582 |
|
|
583 |
// Print related members
|
|
584 |
RMutex iPrintMutex; // For iPrintSem semaphore handling
|
|
585 |
RSemaphore iPrintSem; // Synchonize print queue access
|
|
586 |
CPrintQueue* iPrintQueue; // Print queue
|
|
587 |
RMessage2 iNotifyPrintMessage; // Print notification message
|
|
588 |
TBool iPrintNotifyAvailable; // Is print notification available?
|
|
589 |
|
|
590 |
// Event related members
|
|
591 |
RMessage2 iNotifyEventMessage; // Event nofitication message
|
|
592 |
TBool iEventNotifyAvailable; // Is event notification available?
|
|
593 |
RMutex iEventMutex; // For iEventSem semaphore handling
|
|
594 |
RSemaphore iEventSem; // Signal event request availability
|
|
595 |
TEventDef iEventDef;
|
|
596 |
|
|
597 |
// Remote command protocol related stuff
|
|
598 |
RMessage2 iNotifyRemoteCmdMessage;// RemoteCmd notication message
|
|
599 |
TBool iRemoteSendAvailable; // Is RemoteSend available
|
|
600 |
RMutex iSndMutex; // For iSndSem semaphore handling
|
|
601 |
RSemaphore iSndSem; // Signal RemoteCmd request availability
|
|
602 |
TThreadId iTestThreadId; // Thread id for receiver
|
|
603 |
RThread iTestThread;
|
|
604 |
TBool iTestThreadOpen;
|
|
605 |
TBool iRemoteReceiveAvailable; // Is RemoteReceive available
|
|
606 |
RMutex iRcvMutex; // For iRcvSem semaphore handling
|
|
607 |
RSemaphore iRcvSem; // Signal RemoteCmd request availability
|
|
608 |
//RSemaphore iReceiverSem; // Signal testmodule request availability
|
|
609 |
RPointerArray<HBufC8> iMessageQueue;
|
|
610 |
|
|
611 |
TCmdDef iCmdDef;
|
|
612 |
TCmdDef iRcvCmdDef;
|
|
613 |
TTestProgress iProgress;
|
|
614 |
|
|
615 |
|
|
616 |
// Result with timestamp information
|
|
617 |
TFullTestResult iFullResult;
|
|
618 |
TInt iTestThreadFailure;
|
|
619 |
|
|
620 |
// Event array
|
|
621 |
RPointerArray<TEvent> iEventArray;
|
|
622 |
// State event array
|
|
623 |
RPointerArray<TDesC> iStateEvents;
|
|
624 |
|
|
625 |
// Event handlers
|
|
626 |
CPrintHandler* iPrintHandler;
|
|
627 |
CEventHandler* iEventHandler;
|
|
628 |
CSndHandler* iSndHandler;
|
|
629 |
CRcvHandler* iRcvHandler;
|
|
630 |
CInterferenceHandler* iInterferenceHandler;
|
|
631 |
CMeasurementHandler* iMeasurementHandler;
|
|
632 |
CCommandHandler* iCommandHandler;
|
|
633 |
|
|
634 |
// Test Interface related members
|
|
635 |
RMutex iInterferenceMutex; // For iInterferenceMutex semaphore handling
|
|
636 |
RSemaphore iInterferenceSem; // Synchronize interference queue access
|
|
637 |
TBool iInterferenceNotifyAvailable; // Is interference notification
|
|
638 |
//available?
|
|
639 |
// Test measurement related members
|
|
640 |
RMutex iMeasurementMutex; // For iMeasurementMutex semaphore handling
|
|
641 |
RSemaphore iMeasurementSem; // Synchronize measurement queue access
|
|
642 |
TBool iMeasurementNotifyAvailable; // Is measurement notification
|
|
643 |
//available?
|
|
644 |
RMessage2 iNotifyInterferenceMessage; // Interference notification message
|
|
645 |
|
|
646 |
TTestInterference iTestInterference; // Struct for information
|
|
647 |
// Array for handling test interference thread's kill in
|
|
648 |
// panic etc. cases
|
|
649 |
RArray<RThread> iSTIFTestInterferenceArray;
|
|
650 |
|
|
651 |
RMessage2 iNotifyMeasurementMessage; // Measurement notification message
|
|
652 |
|
|
653 |
// Struct for information
|
|
654 |
TTestMeasurement iTestMeasurement;
|
|
655 |
// Array for handling measurement
|
|
656 |
RPointerArray<TMeasurementHandling> iMeasurementHandlingArray;
|
|
657 |
|
|
658 |
// This mutex meaning is to make sure that test complete and test
|
|
659 |
// case cancel operations are not executed at the same time.
|
|
660 |
RMutex iTestThreadMutex;
|
|
661 |
|
|
662 |
// Command related members
|
|
663 |
CCommandDef* iCommandDef; // Command definition (content)
|
|
664 |
RMessage2 iNotifyCommandMessage; // Command nofitication message
|
|
665 |
TBool iCommandNotifyAvailable; // Is command notification available?
|
|
666 |
RMutex iCommandMutex; // For iCommandSem semaphore handling
|
|
667 |
RSemaphore iCommandSem; // Signal command request availability
|
|
668 |
|
|
669 |
// New event system
|
|
670 |
CAsyncEventActive* iAsyncEventActive; // Active object to handle asynchronous wait.
|
|
671 |
// Only one asynchronous operation can be handled at a time,
|
|
672 |
// so if the object is created and is pending, it means
|
|
673 |
// that operation is ongoing.
|
|
674 |
// AO after completion closes connection to server and object
|
|
675 |
// can be deleted and new wait can be handled
|
|
676 |
|
|
677 |
public: // Friend classes
|
|
678 |
// None
|
|
679 |
|
|
680 |
protected: // Friend classes
|
|
681 |
// None
|
|
682 |
|
|
683 |
private: // Friend classes
|
|
684 |
friend class CUnderTaker;
|
|
685 |
friend class CPrintHandler;
|
|
686 |
friend class CEventHandler;
|
|
687 |
friend class CSndHandler;
|
|
688 |
friend class CRcvHandler;
|
|
689 |
friend class TEvent;
|
|
690 |
friend class CInterferenceHandler;
|
|
691 |
friend class CMeasurementHandler;
|
|
692 |
friend class CCommandHandler;
|
|
693 |
};
|
|
694 |
|
|
695 |
#endif // TEST_SERVER_MODULE_IF_H
|
|
696 |
|
|
697 |
// End of File
|