os/kernelhwsrv/kerneltest/e32test/usbho/t_otgdi/inc/testcase0676.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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 the License "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 // @internalComponent
    15 // 
    16 //
    17 
    18 #ifndef TESTCASE0676_H
    19 #define TESTCASE0676_H
    20 
    21 
    22 	
    23 //----------------------------------------------------------------------------------------------		
    24 //! @SYMTestCaseID				PBASE-T_OTGDI-0476
    25 //! @SYMTestCaseDesc			A-Device requests bus, VBUS down (PBASE-USB_OTGDI-0676)
    26 //! @SYMFssID 
    27 //! @SYMPREQ					1305
    28 //! @SYMREQ						8927
    29 //! @SYMTestType				UT
    30 //! @SYMTestPriority			1 
    31 //! @SYMTestActions 			1.	Call function on OTGDI to trigger raise VBUS - BusRequest()
    32 //!                             2.	Retrieve error event from error callback
    33 //! @SYMTestExpectedResults 	Error KErrUsbOtgVbusAlreadyRaised should be observed
    34 //! @SYMTestStatus              Implemented	
    35 //----------------------------------------------------------------------------------------------	
    36 
    37 	class CTestCase0676 : public CTestCaseRoot
    38 	{
    39 public:
    40 	static CTestCase0676* NewL(TBool aHost);
    41 	virtual ~CTestCase0676();
    42 	
    43 protected:	
    44 	virtual void ExecuteTestCaseL();
    45 	void DoCancel();
    46 	static void CancelKB(CTestCaseRoot *pThis);
    47 	
    48 	void RunStepL();
    49 	virtual void DescribePreconditions();
    50 	TInt GetStepIndex()	{ return(iCaseStep); };
    51 
    52 	static void CancelNotify(CTestCaseRoot *pThis);	
    53 	
    54 private:
    55 	CTestCase0676(TBool aHost);
    56 	void ConstructL();
    57 
    58 	// DATA
    59 private:		
    60 	TInt iRepeats;		// loop counter, 
    61 
    62 
    63 	enum TCaseSteps
    64 		{
    65 		EPreconditions,
    66 		ELoadLdd,		// load 
    67 		EDetectAPlug,	// double-check before starting
    68 		ELoopControl,	// loop: loop control  =3x3 times (wait 50ms)
    69 		ELoopDriveVBus,	// loop: drive
    70 		ELoopVerifyVBus,// loop: check
    71 		ELoopWait,      // loop: wait (50ms)
    72 		ELoopDropVBus,  // loop: drop
    73 		ELoopVerifyDrop,// loop: test Vbus dropped, and repeat ELoopDriveVBus
    74 		EUnloadLdd,		// unload 
    75 		ELastStep
    76 		};
    77 	
    78 		
    79 	TCaseSteps iCaseStep;
    80 	
    81 	const static TTestCaseFactoryReceipt<CTestCase0676> iFactoryReceipt;
    82 	
    83 	CTestCaseWatchdog *iWDTimer;	
    84 
    85 	void ContinueAfter(TTimeIntervalMicroSeconds32 aMicroSecs, TCaseSteps step);
    86 	};
    87 
    88 	
    89 #endif // TESTCASE0676_H