0
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
/************** NOTE ! *****************
|
|
21 |
*
|
|
22 |
* TODO:
|
|
23 |
*
|
|
24 |
* TO BE CHANGED ALL COMMON INC FILES TO
|
|
25 |
* ISAACCESSDRIVER\INC
|
|
26 |
*
|
|
27 |
************** NOTE ! *****************/
|
|
28 |
|
|
29 |
|
|
30 |
#ifndef ISAACCESSDRIVER_INTERNALDEFINITIONS_H
|
|
31 |
#define ISAACCESSDRIVER_INTERNALDEFINITIONS_H
|
|
32 |
|
|
33 |
// INCLUDES
|
|
34 |
#ifndef __KERNEL_MODE__
|
|
35 |
#include <e32std.h>
|
|
36 |
#else
|
|
37 |
#include <kernel.h>
|
|
38 |
#endif // __KERNEL_MODE__
|
|
39 |
|
|
40 |
// CONSTANTS
|
|
41 |
_LIT( KIADDriverName, "IADDriver" );
|
|
42 |
_LIT( KNameOfIsaAccessDriverLdd, "isaaccessldd.ldd" );
|
|
43 |
|
|
44 |
// connection status enumeration
|
|
45 |
enum TIADConnectionStatus
|
|
46 |
{
|
|
47 |
EIADConnectionOk=0,
|
|
48 |
EIADConnectionNotOk
|
|
49 |
};
|
|
50 |
|
|
51 |
// flow control status enumeration
|
|
52 |
enum TIADFlowControlStatus
|
|
53 |
{
|
|
54 |
EIADFlowControlOff=0,
|
|
55 |
EIADFlowControlOn,
|
|
56 |
EIADTransmissionEnd
|
|
57 |
};
|
|
58 |
|
|
59 |
const TUint16 KIADControlChannel = 0x0000;
|
|
60 |
const TUint16 KIADFrameReceiverNotFound = 0x500;
|
|
61 |
const TUint16 KIADAllChannels = 0x100;
|
|
62 |
const TUint16 KNotInitializedChannel( 0xffff );
|
|
63 |
|
|
64 |
// DFC Queue priorities inside IAD
|
|
65 |
const TInt KIADLddEmptyRxQueuePriori( 2 );
|
|
66 |
const TInt KIADLddEmptyDataRxQueuePriori( 2 );
|
|
67 |
const TInt KIADLddConnStatPriori( 3 );
|
|
68 |
const TInt KIADLddFlowStatPriori( 3 );
|
|
69 |
const TInt KIADLddCompleteChannelPriori( 2 );
|
|
70 |
const TInt KIADKernelChMsgQueDfcPriori( 1 );
|
|
71 |
const TInt KIADExtCommonRxPriori( 7 );
|
|
72 |
const TInt KIADExtInitCmtPriori( 7 );
|
|
73 |
const TInt KIADExtConnStatPriori( 7 );
|
|
74 |
const TInt KIADKernelEmptyRxQueuePriori( 0 );
|
|
75 |
|
|
76 |
/////////////// THESE CAN BE EDITED DEPENDING ON PRODUCT CONFIGURATIONS ///////////////
|
|
77 |
//
|
|
78 |
// This kind of configurations are needed cause we must support legacy flowcontrol
|
|
79 |
// protocoll too.
|
|
80 |
//
|
|
81 |
// Databuffer size in bytes.
|
|
82 |
const TInt KDataSizeInBytesWithPipeHeader( 2048 );// Re-used due to buffer configurations
|
|
83 |
const TInt KDataCalculateDataQueusWithDataSize( 1536 );
|
|
84 |
|
|
85 |
// DATA SPEED IN DOWNLINK AND UPLINK
|
|
86 |
// UPLINK:( NOT USED YET )
|
|
87 |
// CASW_ISC_UPLINK_DATA_RATE
|
|
88 |
// DOWNLINK:
|
|
89 |
// CASW_ISC_DOWNLINK_DATA_RATE
|
|
90 |
// Max delay from flowcontrol sending to air interface closing time in milliseconds.
|
|
91 |
const TInt KMaxDelayAfterFlowCtrlOnInMs( 150 );
|
|
92 |
// Max size of the data burst in bytes.
|
|
93 |
//const TInt KMaxDataBurstInBytes( 81920 );
|
|
94 |
// NW configured max RLC buffer size for HSDPA3.6 = 320*2047
|
|
95 |
const TInt KMaxDataBurstInBytes( ( 320 * 2047 ) / 8 );
|
|
96 |
|
|
97 |
//////////////////////////////// DO NOT EDIT AFTER THIS ////////////////////////////////
|
|
98 |
|
|
99 |
// QUEUE CONFIGURATIONS
|
|
100 |
const TInt KMaxDataSpeedInBytes( CASW_ISC_DOWNLINK_DATA_RATE / 8 );
|
|
101 |
const TInt KMaxDataAfterDelay( KMaxDataSpeedInBytes / 1000 * KMaxDelayAfterFlowCtrlOnInMs );
|
|
102 |
// Plus one so we round upwards.
|
|
103 |
const TInt KMaxNumberOfDataMsgAfterDelay( KMaxDataAfterDelay / KDataCalculateDataQueusWithDataSize + 1 );// 45
|
|
104 |
const TInt KMaxNumberOfDataMsgInBurst( KMaxDataBurstInBytes / KDataCalculateDataQueusWithDataSize + 1 );// 54
|
|
105 |
const TInt KMaxDataSpaceAfterHW( KMaxNumberOfDataMsgAfterDelay + KMaxNumberOfDataMsgInBurst ); // 99
|
|
106 |
// NOTE!! This is for HSDPA where we need DL2UL1 messages. When HSUPA used modify this.
|
|
107 |
const TInt KMaxDataSpaceUntilULLW( 10 );
|
|
108 |
|
|
109 |
// Receive queue for PIPE messages.
|
|
110 |
const TUint16 KIADChDataRxQueueSize( KMaxDataSpaceAfterHW + KMaxNumberOfDataMsgInBurst + ( KMaxNumberOfDataMsgAfterDelay / 2 ) );
|
|
111 |
//const TInt KTotalDataSpace( KIADChannelDataReceiveQueueSize + KIADChannelSendQueueSize );// 225
|
|
112 |
// Here we must have space for maxburst and the data send during delay.
|
|
113 |
const TUint16 KIADChDataRxHighWaterMark( KIADChDataRxQueueSize - KMaxDataSpaceAfterHW );
|
|
114 |
// Low water mark can be half of delay. It's not crucial to set it on as fast as possible.
|
|
115 |
// Half of the time is enough.
|
|
116 |
const TUint16 KIADChDataRxLowWaterMark( KMaxNumberOfDataMsgAfterDelay / 2 );
|
|
117 |
|
|
118 |
#if (CASW_ISC_DOWNLINK_DATA_RATE == CASW_ISC_DATA_RATE_3600000_BITS)
|
|
119 |
#define CREDIT_AMOUNT 10
|
|
120 |
#define CREDIT_THRESHOLD 7
|
|
121 |
// If we have lower bitrate we can exchange credits more often. So we can guarantee that we have enough memory also in situations when all
|
|
122 |
// the possible parallel datachannels are used.
|
|
123 |
#elif (CASW_ISC_DOWNLINK_DATA_RATE < CASW_ISC_DATA_RATE_3600000_BITS)
|
|
124 |
#define CREDIT_AMOUNT 5
|
|
125 |
#define CREDIT_THRESHOLD 2
|
|
126 |
#endif // CASW_ISC_DOWNLINK_DATA_RATE < CASW_ISC_DATA_RATE_3600000_BITS
|
|
127 |
|
|
128 |
//////////////////////////////// DO NOT EDIT BEFORE THIS ////////////////////////////////
|
|
129 |
|
9
|
130 |
const TInt KIADMaxIsiMsgSize( 2048 ); // to be changed for MINI_OS could it be static?
|
0
|
131 |
|
|
132 |
// QUEUE CONFIGURATIONS
|
9
|
133 |
// configure properly
|
0
|
134 |
const TInt KIADExtensionRxQueueSize( 200);//50 );
|
|
135 |
const TInt KIADLddFlowCtrlRxQueuSize( 5 );
|
|
136 |
const TInt KIADLddRxQueuSize( 50 );
|
|
137 |
const TInt KIADLddDataRxQueuSize( KIADChDataRxQueueSize );
|
|
138 |
const TInt KIADKernelRxQueuSize( 50 );
|
|
139 |
const TInt KIADKernelDataRxQueuSize( 100 );
|
9
|
140 |
// Re-used due to buffer configurations how to ensure enough blocks without cbfc and knowing how big is the IST send que?
|
0
|
141 |
const TInt KTotalDataSpace( KIADLddDataRxQueuSize + 50 );
|
|
142 |
|
|
143 |
// DFC Thread names.
|
|
144 |
_LIT8( KIADLddDfc, "IADLddDFC" );
|
|
145 |
_LIT8( KIADExtensionDfc, "IADExtensionDFC" );
|
|
146 |
|
|
147 |
// MACROS
|
|
148 |
|
|
149 |
// DATA TYPES
|
|
150 |
|
|
151 |
// enumerations for asynchronous requests in IAD
|
|
152 |
enum TIADAsyncRequest
|
|
153 |
{
|
|
154 |
EIADAsyncOpen = 0,
|
|
155 |
EIADAsyncClose,
|
|
156 |
EIADAsyncSend,
|
|
157 |
EIADAsyncReceive,
|
|
158 |
EIADAsyncDataSend,
|
|
159 |
EIADAsyncDataReceive,
|
|
160 |
EIADAsyncNotifyConnectionStatus,
|
|
161 |
EIADAsyncNotifyFlowControlStatus,
|
|
162 |
EIADAsyncSubscribeIndications,
|
|
163 |
EIADAsyncSendIndication,
|
|
164 |
EIADAsyncSubscribeIndications32Bit,
|
|
165 |
EIADAsyncFTDInformation,
|
|
166 |
EIADAsyncLast
|
|
167 |
};
|
|
168 |
|
|
169 |
// enumerations for synchronous requests in IAD
|
|
170 |
enum TIADRequest
|
|
171 |
{
|
|
172 |
EIADClose = EIADAsyncLast, // 12
|
|
173 |
EIADSend,
|
|
174 |
EIADDataSend,
|
|
175 |
EIADGetConnectionStatus,
|
|
176 |
EIADGetFlowControlStatus,
|
|
177 |
EIADGetChannelInfo,
|
|
178 |
EIADGetMaxDataSize,
|
|
179 |
EIADSubscribeIndications,
|
|
180 |
EIADSendIndication,
|
|
181 |
EIADSubscribeIndications32Bit,
|
|
182 |
EIADResetQueues,
|
|
183 |
EIADAllocateBlock,
|
|
184 |
EIADDeAllocateBlock,
|
|
185 |
EIADAllocateDataBlock,
|
|
186 |
EIADDeAllocateDataBlock,
|
|
187 |
EIADDeAllocateBlockInternal,
|
|
188 |
EIADDeAllocateDataBlockInternal,
|
|
189 |
EIADLoan,
|
9
|
190 |
EIADReturnLoan
|
0
|
191 |
};
|
|
192 |
|
|
193 |
// FUNCTION PROTOTYPES
|
|
194 |
|
|
195 |
// FORWARD DECLARATIONS
|
|
196 |
|
|
197 |
// CLASS DECLARATION
|
|
198 |
|
|
199 |
#endif // ISAACCESSDRIVER_INTERNALDEFINITIONS_H
|
|
200 |
|
|
201 |
// End of File
|