sl@0
|
1 |
#ifndef __TEST_CASE_PBASE_T_USBDI_0497_H
|
sl@0
|
2 |
#define __TEST_CASE_PBASE_T_USBDI_0497_H
|
sl@0
|
3 |
|
sl@0
|
4 |
/*
|
sl@0
|
5 |
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
6 |
* All rights reserved.
|
sl@0
|
7 |
* This component and the accompanying materials are made available
|
sl@0
|
8 |
* under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
9 |
* which accompanies this distribution, and is available
|
sl@0
|
10 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Initial Contributors:
|
sl@0
|
13 |
* Nokia Corporation - initial contribution.
|
sl@0
|
14 |
*
|
sl@0
|
15 |
* Contributors:
|
sl@0
|
16 |
*
|
sl@0
|
17 |
* Description:
|
sl@0
|
18 |
* @file PBASE-T_USBDI-0497.h
|
sl@0
|
19 |
* @internalComponent
|
sl@0
|
20 |
*
|
sl@0
|
21 |
*
|
sl@0
|
22 |
*/
|
sl@0
|
23 |
|
sl@0
|
24 |
|
sl@0
|
25 |
|
sl@0
|
26 |
|
sl@0
|
27 |
#include "BaseBulkTestCase.h"
|
sl@0
|
28 |
|
sl@0
|
29 |
|
sl@0
|
30 |
namespace NUnitTesting_USBDI
|
sl@0
|
31 |
{
|
sl@0
|
32 |
const TUint8 KNumOutTransfersPerInterface = 2; //number of queued OUT transfers in used for each interface
|
sl@0
|
33 |
const TUint8 KNumInTransfersPerInterface = 2; //number of queued IN transfers used for each interface
|
sl@0
|
34 |
|
sl@0
|
35 |
/**
|
sl@0
|
36 |
|
sl@0
|
37 |
|
sl@0
|
38 |
@SYMTestCaseID PBASE-T_USBDI-0497
|
sl@0
|
39 |
@SYMTestCaseDesc Test use of multiple bulk transfers doing a round trip on two interfaces
|
sl@0
|
40 |
@SYMFssID
|
sl@0
|
41 |
@SYMPREQ 1305
|
sl@0
|
42 |
@SYMREQ 7055 [USBD : Bulk transfers]
|
sl@0
|
43 |
@SYMTestType UT
|
sl@0
|
44 |
@SYMTestPriority 1
|
sl@0
|
45 |
@SYMTestActions 1. Open interfaces to connected device
|
sl@0
|
46 |
2. Queue two bulk OUT transfer requests on each interface
|
sl@0
|
47 |
3. On completion of OUT transfers queue two bulk IN transfer requests on each interface
|
sl@0
|
48 |
4. Validate round trip data
|
sl@0
|
49 |
5. Compare completion times for each bulk transfer
|
sl@0
|
50 |
@SYMTestExpectedResults Round trip transfer data is not corrupt
|
sl@0
|
51 |
@SYMTestStatus Draft
|
sl@0
|
52 |
|
sl@0
|
53 |
|
sl@0
|
54 |
*/
|
sl@0
|
55 |
|
sl@0
|
56 |
class CUT_PBASE_T_USBDI_0497 : public CBaseBulkTestCase,
|
sl@0
|
57 |
public MTransferObserver,
|
sl@0
|
58 |
public MCommandObserver
|
sl@0
|
59 |
|
sl@0
|
60 |
{
|
sl@0
|
61 |
public:
|
sl@0
|
62 |
static CUT_PBASE_T_USBDI_0497* NewL(TBool aHostRole);
|
sl@0
|
63 |
~CUT_PBASE_T_USBDI_0497();
|
sl@0
|
64 |
|
sl@0
|
65 |
public: // From MUsbBusObserver
|
sl@0
|
66 |
void DeviceInsertedL(TUint aDeviceHandle);
|
sl@0
|
67 |
|
sl@0
|
68 |
public: // From MCommandObserver
|
sl@0
|
69 |
void Ep0TransferCompleteL(TInt aCompletionCode);
|
sl@0
|
70 |
|
sl@0
|
71 |
public: // From MTransferObserver
|
sl@0
|
72 |
void TransferCompleteL(TInt aTransferId,TInt aCompletionCode);
|
sl@0
|
73 |
|
sl@0
|
74 |
private:
|
sl@0
|
75 |
CUT_PBASE_T_USBDI_0497(TBool aHostRole);
|
sl@0
|
76 |
void ConstructL();
|
sl@0
|
77 |
|
sl@0
|
78 |
private:
|
sl@0
|
79 |
|
sl@0
|
80 |
enum TCaseStep
|
sl@0
|
81 |
{
|
sl@0
|
82 |
EInProgress,
|
sl@0
|
83 |
EPassed,
|
sl@0
|
84 |
EFailed,
|
sl@0
|
85 |
ERequestDeviceRead,
|
sl@0
|
86 |
ETransferOut,
|
sl@0
|
87 |
ERequestDeviceWriteBack,
|
sl@0
|
88 |
ETransferIn
|
sl@0
|
89 |
};
|
sl@0
|
90 |
|
sl@0
|
91 |
// Transfer objects - use specific names for this test
|
sl@0
|
92 |
CBulkTransfer* iIfc1InTransfer[KNumInTransfersPerInterface];
|
sl@0
|
93 |
CBulkTransfer* iIfc1OutTransfer[KNumOutTransfersPerInterface];
|
sl@0
|
94 |
|
sl@0
|
95 |
CBulkTransfer* iIfc2InTransfer[KNumInTransfersPerInterface];
|
sl@0
|
96 |
CBulkTransfer* iIfc2OutTransfer[KNumOutTransfersPerInterface];
|
sl@0
|
97 |
|
sl@0
|
98 |
TCaseStep iCaseStep;
|
sl@0
|
99 |
|
sl@0
|
100 |
private:
|
sl@0
|
101 |
/**
|
sl@0
|
102 |
The functor for this test case
|
sl@0
|
103 |
*/
|
sl@0
|
104 |
const static TFunctorTestCase<CUT_PBASE_T_USBDI_0497,TBool> iFunctor;
|
sl@0
|
105 |
};
|
sl@0
|
106 |
|
sl@0
|
107 |
} //end namespace
|
sl@0
|
108 |
|
sl@0
|
109 |
#endif
|