First public contribution.
1 #ifndef __TEST_CASE_PBASE_T_USBDI_1229_H
2 #define __TEST_CASE_PBASE_T_USBDI_1229_H
5 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
7 * This component and the accompanying materials are made available
8 * under the terms of the License "Eclipse Public License v1.0"
9 * which accompanies this distribution, and is available
10 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
12 * Initial Contributors:
13 * Nokia Corporation - initial contribution.
18 * @file PBASE-T_USBDI-1229.h
27 #include "BaseBulkTestCase.h"
30 namespace NUnitTesting_USBDI
32 const TUint8 KNumInitialRequests = 4;
36 @SYMTestCaseID PBASE-T_USBDI-1229
37 @SYMTestCaseDesc Test use of two queued bulk OUT transfers to send a large amount of data working together another type of transfer
40 @SYMREQ 7055 [USBD : Bulk transfers]
43 @SYMTestActions 1. Open interfaces to connected device
44 2. Request two bulk OUT transfers
45 3. When each completes request another one until specified number of bytes have been sent
46 4. Whilst bulk transfers are active, send EP0 transfers and check they have priority over bulk transfers
47 5. Validate data as it is read
48 @SYMTestExpectedResults Round trip transfer data is not corrupt
54 class CUT_PBASE_T_USBDI_1229 : public CBaseBulkTestCase,
55 public MTransferObserver,
56 public MCommandObserver
60 static CUT_PBASE_T_USBDI_1229* NewL(TBool aHostRole);
61 ~CUT_PBASE_T_USBDI_1229();
63 public: // From MUsbBusObserver
64 void DeviceInsertedL(TUint aDeviceHandle);
66 public: // From MCommandObserver
67 void Ep0TransferCompleteL(TInt aCompletionCode);
69 public: // From MTransferObserver
70 void TransferCompleteL(TInt aTransferId,TInt aCompletionCode);
71 void HandleBulkTestTimerFired();
74 CUT_PBASE_T_USBDI_1229(TBool aHostRole);
77 void ExtractDeviceReadBytes();
78 void PostTransferAction();
79 TBool PerformNextTransfer(TInt aTransferId);
80 void RequestNumBytesSent(TUint8 aTimerIndex);
90 ERequestRepeatedReadAndValidate,
92 EDelayedTransferComplete,
93 ERequestPrepareEndpointValidationResult,
94 ERequestValidationResult
97 TUint iNumWriteBytesRequested;
100 TUint iDeviceNumBytesReadInTotal;
101 TUint iDeviceMinTimedNumBytesRead;
102 TUint iDeviceMaxTimedNumBytesRead;
106 The functor for this test case
108 const static TFunctorTestCase<CUT_PBASE_T_USBDI_1229,TBool> iFunctor;