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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 #ifndef TESTCASE0677_H
19 #define TESTCASE0677_H
22 //----------------------------------------------------------------------------------------------
23 //! @SYMTestCaseID PBASE-T_OTGDI-0677
24 //! @SYMTestCaseDesc B-Device Role-swap attempt, VBUS down
29 //! @SYMTestPriority 1
30 //! LDD is loaded. OTGDI driver session is open
31 //! OET inserted with SW9 set to B-Device
32 //! No A device connected, A plug not connected
33 //! @SYMTestActions 1. Call function on OTGDI to attempt role swap – BusRequest()
34 //! 2. Retrieve error event from error callback
35 //! @SYMTestExpectedResults The call to BusRequest() will trigger the sending of an SRP.
36 //! The SRP must be observed with a dual-trace oscilloscope measuring VBus and D+ and demonstrate the expected waveforms (Figure 5.5 in [R5])
37 //! The A device, if present, should NOT raise VBus.
38 //! The Error retrieved from the callback should be KErrUsbOtgSrpTimeout (-6691)
39 //! Note this test case doesn’t, and isn’t intended to complete role swap. That is tested in PBASE-USB_OTG-0681
40 //! @SYMTestStatus Defined
41 //----------------------------------------------------------------------------------------------
43 class CTestCase0677 : public CTestCaseRoot
46 static CTestCase0677* NewL(TBool aHost);
47 virtual ~CTestCase0677();
49 virtual void ExecuteTestCaseL();
51 static void CancelKB(CTestCaseRoot *pThis);
54 virtual void DescribePreconditions();
55 TInt GetStepIndex() { return(iCaseStep); };
57 static void CancelNotify(CTestCaseRoot *pThis);
60 CTestCase0677(TBool aHost);
63 enum ECancelMethods {ECancelVBusNotify, ECancelEventNotify, ECancelMessageNotify};
64 ECancelMethods iCancelWhat;
65 TTime iTimeSRPStart; // time in microseconds since 0AD nominal Gregorian
71 TInt iRepeats; // loop counter,
77 ELoadLdd, // load client+otg
78 EDetectBPlug, // double-check before starting
80 EWaitForSRPInitiated, // Wait for SRP active event
81 EWaitForSRPTimeout, // Wait for SRP timeout event
82 EIssueSRPObservedPrompt,// Issue message to user to verify SRP was observed
83 ECheckSRPObservedUserInput, // Check user input from previous step.
84 EUnloadLdd, // unload otg
91 const static TTestCaseFactoryReceipt<CTestCase0677> iFactoryReceipt;
93 CTestCaseWatchdog *iWDTimer;
95 void ContinueAfter(TTimeIntervalMicroSeconds32 aMicroSecs, TCaseSteps step);
99 #endif // TESTCASE0677_H