1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/usbho/t_usbdi/inc/PBASE-T_USBDI-0498.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,114 @@
1.4 +#ifndef __TEST_CASE_PBASE_T_USBDI_0498_H
1.5 +#define __TEST_CASE_PBASE_T_USBDI_0498_H
1.6 +
1.7 +/*
1.8 +* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
1.9 +* All rights reserved.
1.10 +* This component and the accompanying materials are made available
1.11 +* under the terms of the License "Eclipse Public License v1.0"
1.12 +* which accompanies this distribution, and is available
1.13 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.14 +*
1.15 +* Initial Contributors:
1.16 +* Nokia Corporation - initial contribution.
1.17 +*
1.18 +* Contributors:
1.19 +*
1.20 +* Description:
1.21 +* @file PBASE-T_USBDI-0498.h
1.22 +* @internalComponent
1.23 +*
1.24 +*
1.25 +*/
1.26 +
1.27 +
1.28 +
1.29 +
1.30 +#include "BaseBulkTestCase.h"
1.31 +
1.32 +
1.33 +namespace NUnitTesting_USBDI
1.34 + {
1.35 +const TUint8 KNumOutTransfersPerInterface = 2; //number of queued OUT transfers in used for each interface
1.36 +const TUint8 KNumInTransfersPerInterface = 2; //number of queued IN transfers used for each interface
1.37 +const TUint8 KNumInitialRequests = 4;
1.38 +/**
1.39 +
1.40 +
1.41 + @SYMTestCaseID PBASE-T_USBDI-0498
1.42 + @SYMTestCaseDesc Test use of multiple concurrent bulk transfers on two interfaces
1.43 + @SYMFssID
1.44 + @SYMPREQ 1305
1.45 + @SYMREQ 7055 [USBD : Bulk transfers]
1.46 + @SYMTestType UT
1.47 + @SYMTestPriority 1
1.48 + @SYMTestActions 1. Open interfaces to connected device
1.49 + 2. Queue two bulk OUT transfer requests on each interface
1.50 + 3. Queue two bulk IN transfer requests on each interface
1.51 + 4. Validate data sent and data received
1.52 + 5. Compare completion times for each bulk transfer
1.53 + @SYMTestExpectedResults Round trip transfer data is not corrupt
1.54 + @SYMTestStatus Draft
1.55 +
1.56 +
1.57 +*/
1.58 +
1.59 +class CUT_PBASE_T_USBDI_0498 : public CBaseBulkTestCase,
1.60 + public MTransferObserver,
1.61 + public MCommandObserver
1.62 +
1.63 + {
1.64 +public:
1.65 + static CUT_PBASE_T_USBDI_0498* NewL(TBool aHostRole);
1.66 + ~CUT_PBASE_T_USBDI_0498();
1.67 +
1.68 +public: // From MUsbBusObserver
1.69 + void DeviceInsertedL(TUint aDeviceHandle);
1.70 +
1.71 +public: // From MCommandObserver
1.72 + void Ep0TransferCompleteL(TInt aCompletionCode);
1.73 +
1.74 +public: // From MTransferObserver
1.75 + void TransferCompleteL(TInt aTransferId,TInt aCompletionCode);
1.76 +
1.77 +private:
1.78 + CUT_PBASE_T_USBDI_0498(TBool aHostRole);
1.79 + void ConstructL();
1.80 +
1.81 +private:
1.82 +
1.83 + enum TCaseStep
1.84 + {
1.85 + EInProgress,
1.86 + EPassed,
1.87 + EFailed,
1.88 + ERequestDeviceIFC1Read,
1.89 + ERequestDeviceIFC2Read,
1.90 + ERequestDeviceIFC1Write,
1.91 + ERequestDeviceIFC2Write,
1.92 + ETransfer,
1.93 + ERequestDeviceValidateIFC1,
1.94 + ERequestDeviceValidateIFC2,
1.95 + ERequestDeviceValidationResultIFC1,
1.96 + ERequestDeviceValidationResultIFC2
1.97 + };
1.98 +
1.99 + CBulkTransfer* iIfc1InTransfer[KNumInTransfersPerInterface];
1.100 + CBulkTransfer* iIfc1OutTransfer[KNumOutTransfersPerInterface];
1.101 +
1.102 + CBulkTransfer* iIfc2InTransfer[KNumInTransfersPerInterface];
1.103 + CBulkTransfer* iIfc2OutTransfer[KNumOutTransfersPerInterface];
1.104 +
1.105 + TCaseStep iCaseStep;
1.106 + TPtr8 iRequestDeviceValidationResultPtr;
1.107 +
1.108 +private:
1.109 + /**
1.110 + The functor for this test case
1.111 + */
1.112 + const static TFunctorTestCase<CUT_PBASE_T_USBDI_0498,TBool> iFunctor;
1.113 + };
1.114 +
1.115 + } //end namespace
1.116 +
1.117 +#endif