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 |
#include <PhonetIsi.h> // For phonet-header offsets like ISI_HEADER_OFFSET_MESSAGEID
|
|
20 |
#include <pipeisi.h> // For PEP_IND_BUSY etc..
|
|
21 |
#include <pipe_sharedisi.h> // For PN_MULTI_CREDIT_FLOW_CONTROL etc..
|
|
22 |
#include "pep.h"
|
|
23 |
#include "peptransceiver.h"
|
|
24 |
#include "iadtrace.h"
|
|
25 |
#include "pipehandler.h"
|
|
26 |
#include "router.h" // For DRouter
|
|
27 |
#include "OstTraceDefinitions.h"
|
|
28 |
#ifdef OST_TRACE_COMPILER_IN_USE
|
|
29 |
#include "pepTraces.h"
|
|
30 |
#endif
|
|
31 |
// ************* DPipe methods *************
|
|
32 |
|
|
33 |
DPep::DPep(
|
|
34 |
DRouter* aRouter,
|
|
35 |
MIAD2ChannelApi* aChannel,
|
|
36 |
TUint16 aChannelId,
|
|
37 |
DPipeHandler& aHandler
|
|
38 |
):
|
|
39 |
iRouter( aRouter ),
|
|
40 |
iPipeHandle( 0 ),
|
|
41 |
iChannelId( aChannelId ),
|
|
42 |
iPipeHandler( aHandler ),
|
|
43 |
iChannel( aChannel ),
|
|
44 |
iDecoratedRx( NULL ),
|
|
45 |
iDecoratedTx( NULL ),
|
|
46 |
iMainTxRx( aRouter, aChannel ),
|
|
47 |
iCreating( *this ),
|
|
48 |
iCreatingEnabled( *this ),
|
|
49 |
iDisabled( *this ),
|
|
50 |
iDisabling( *this ),
|
|
51 |
iEnabling( *this ),
|
|
52 |
iEnabled( *this ),
|
|
53 |
//TBR
|
|
54 |
iEnableEnabled( *this ),
|
|
55 |
iDisabledDisabled( *this ),
|
|
56 |
iDisabledEnabled( *this ),
|
|
57 |
iEnabledDisabled( *this ),
|
|
58 |
iEnabledEnabled( *this ),
|
|
59 |
iDisconnected( *this ),
|
|
60 |
iCurrentState( NULL )
|
|
61 |
{
|
|
62 |
OstTraceExt4( TRACE_PIPE, DPEP_DPEP_ENTRY, ">DPep::DPep;aRouter=%x;aChannel=%x;aChannelId=%hx;aHandler=%x", ( TUint )( aRouter ), ( TUint )( aChannel ), aChannelId, ( TUint )&( aHandler ) );
|
|
63 |
|
|
64 |
C_TRACE( ( _T( "DPep::DPep 0x%x ->" ), aChannelId ) );
|
|
65 |
ASSERT_RESET_ALWAYS( iRouter && iChannel, EIADNullParameter | EIADFaultIdentifier5 << KFaultIdentifierShift );
|
|
66 |
iCurrentState = &iCreating;
|
|
67 |
C_TRACE( ( _T( "DPep::DPep <-" ) ) );
|
|
68 |
|
|
69 |
OstTrace0( TRACE_PIPE, DPEP_DPEP_EXIT, "<DPep::DPep" );
|
|
70 |
}
|
|
71 |
|
|
72 |
|
|
73 |
DPep::~DPep()
|
|
74 |
{
|
|
75 |
OstTrace0( TRACE_PIPE, DPEP_DPEP_DES_ENTRY, ">DPep::~DPep" );
|
|
76 |
|
|
77 |
C_TRACE( ( _T( "DPep::~DPep ->" ) ) );
|
|
78 |
if( iDecoratedRx )
|
|
79 |
{
|
|
80 |
delete iDecoratedRx;
|
|
81 |
iDecoratedRx = NULL;
|
|
82 |
}
|
|
83 |
if( iDecoratedTx )
|
|
84 |
{
|
|
85 |
delete iDecoratedTx;
|
|
86 |
iDecoratedTx = NULL;
|
|
87 |
}
|
|
88 |
C_TRACE( ( _T( "DPep::~DPep <-" ) ) );
|
|
89 |
|
|
90 |
OstTrace0( TRACE_PIPE, DPEP_DPEP_DES_EXIT, "<DPep::~DPep" );
|
|
91 |
}
|
|
92 |
|
|
93 |
TInt DPep::SendMessage(
|
|
94 |
TDes8& aMsg,
|
|
95 |
TUint16 // TBR aFromChannel
|
|
96 |
)
|
|
97 |
{
|
|
98 |
OstTrace1( TRACE_PIPE, DPEP_SENDMESSAGE_ENTRY, ">DPep::SendMessage;aMsg=%x", ( TUint )&( aMsg ) );
|
|
99 |
|
|
100 |
C_TRACE( ( _T( "DPep::SendMessage From: 0x%x 0x%x ->" ), iChannelId, this ) );
|
|
101 |
TInt retVal( KErrNotSupported );
|
|
102 |
ASSERT_RESET_ALWAYS( aMsg.Length() > ( ISI_HEADER_OFFSET_MESSAGEID ), EIADOverTheLimits | EIADFaultIdentifier26 << KFaultIdentifierShift );
|
|
103 |
switch( aMsg.Ptr()[ ISI_HEADER_OFFSET_MESSAGEID ] )
|
|
104 |
{
|
|
105 |
case PNS_PIPE_DATA:
|
|
106 |
{
|
|
107 |
retVal = iCurrentState->TxPnsPipeData( aMsg );
|
|
108 |
break;
|
|
109 |
}
|
|
110 |
case PNS_PEP_STATUS_IND:// if data port _COMM
|
|
111 |
{
|
|
112 |
if( aMsg.Ptr()[ ISI_HEADER_SIZE + PNS_PEP_STATUS_IND_OFFSET_PEPTYPE ] == PN_PEP_TYPE_COMM )
|
|
113 |
{
|
|
114 |
retVal = iRouter->SendMsg( aMsg );
|
|
115 |
}
|
|
116 |
break;
|
|
117 |
}
|
|
118 |
case PNS_PEP_CTRL_RESP: // if data port _COMM
|
|
119 |
{
|
|
120 |
if( aMsg.Ptr()[ ISI_HEADER_SIZE + PNS_PEP_CTRL_RESP_OFFSET_PEPTYPE ] == PN_PEP_TYPE_COMM )
|
|
121 |
{
|
|
122 |
retVal = iRouter->SendMsg( aMsg );
|
|
123 |
}
|
|
124 |
break;
|
|
125 |
}
|
|
126 |
// Controller can send these.
|
|
127 |
case PNS_PEP_CTRL_REQ:
|
|
128 |
case PNS_PIPE_ENABLE_REQ:
|
|
129 |
case PNS_PIPE_DISABLE_REQ:
|
|
130 |
case PNS_PIPE_RESET_REQ:
|
|
131 |
case PNS_PIPE_REDIRECT_REQ:
|
|
132 |
case PNS_PIPE_REMOVE_REQ:
|
|
133 |
{
|
|
134 |
retVal = iRouter->SendMsg( aMsg );
|
|
135 |
break;
|
|
136 |
}
|
|
137 |
default:
|
|
138 |
{
|
|
139 |
DATA_DUMP_TRACE( aMsg, ETrue );
|
|
140 |
OstTraceData( TRACE_ISIMSG, DPEP_SENDMESSAGE, "DPep::SendMessage %{hex8[]}", aMsg.Ptr(), aMsg.Length() );
|
|
141 |
ASSERT_RESET_ALWAYS( 0, EIADNotSupported | (TUint8)iChannelId<<KChannelNumberShift | EIADFaultIdentifier4<<KFaultIdentifierShift | aMsg.Ptr()[ ISI_HEADER_OFFSET_MESSAGEID ]<<KExtraInfoShift);
|
|
142 |
break;
|
|
143 |
}
|
|
144 |
}
|
|
145 |
C_TRACE( ( _T( "DPep::SendMessage %d 0x%x <-" ), retVal, this ) );
|
|
146 |
|
|
147 |
|
|
148 |
OstTrace1( TRACE_PIPE, DPEP_SENDMESSAGE_EXIT, "<DPep::SendMessage;retVal=%d", retVal );
|
|
149 |
return retVal;
|
|
150 |
}
|
|
151 |
|
|
152 |
TInt DPep::ReceiveMessage(
|
|
153 |
const TDesC8& aMessage,
|
|
154 |
MIAD2ChannelApi* aChannel
|
|
155 |
)
|
|
156 |
{
|
|
157 |
OstTraceExt2( TRACE_PIPE, DPEP_RECEIVEMESSAGE_ENTRY, ">DPep::ReceiveMessage;aMessage=%x;aChannel=%x", ( TUint )&( aMessage ), ( TUint )( aChannel ) );
|
|
158 |
|
|
159 |
C_TRACE( ( _T( "DPep::ReceiveMessage 0x%x ->" ), aChannel ) );
|
|
160 |
TInt retVal( KErrNone );
|
|
161 |
ASSERT_RESET_ALWAYS( aMessage.Length() > ( ISI_HEADER_OFFSET_MESSAGEID ), EIADOverTheLimits | EIADFaultIdentifier27 << KFaultIdentifierShift );
|
|
162 |
switch( aMessage.Ptr()[ ISI_HEADER_OFFSET_MESSAGEID ] )
|
|
163 |
{
|
|
164 |
case PNS_PIPE_DATA:
|
|
165 |
{
|
|
166 |
retVal = iCurrentState->RxPnsPipeData( aMessage );
|
|
167 |
break;
|
|
168 |
}
|
|
169 |
case PNS_PIPE_CREATED_IND:
|
|
170 |
{
|
|
171 |
HandlePnPipeSbNegotiatedFC( aMessage );
|
|
172 |
iCurrentState->PnsPipeCreatedInd();
|
|
173 |
|
|
174 |
iRouter->DeAllocateBlock( ((TDes8&)aMessage ) );
|
|
175 |
break;
|
|
176 |
}
|
|
177 |
case PNS_PIPE_DISABLED_IND:
|
|
178 |
{
|
|
179 |
iCurrentState->PnsPipeDisabledInd();// TODO: checking of pipehandle
|
|
180 |
iRouter->DeAllocateBlock( ((TDes8&)aMessage ) );
|
|
181 |
break;
|
|
182 |
}
|
|
183 |
case PNS_PIPE_RESET_IND:
|
|
184 |
{
|
|
185 |
iCurrentState->PnsPipeResetInd();
|
|
186 |
iRouter->DeAllocateBlock( ((TDes8&)aMessage ) );
|
|
187 |
break;
|
|
188 |
}
|
|
189 |
case PNS_PIPE_ENABLED_IND:
|
|
190 |
{
|
|
191 |
iCurrentState->PnsPipeEnabledInd();
|
|
192 |
iRouter->DeAllocateBlock( ((TDes8&)aMessage ) );
|
|
193 |
break;
|
|
194 |
}
|
|
195 |
case PNS_PIPE_REDIRECTED_IND:
|
|
196 |
{
|
|
197 |
HandlePnPipeSbNegotiatedFC( aMessage );
|
|
198 |
iCurrentState->PnsPipeRedirectedInd();
|
|
199 |
iRouter->DeAllocateBlock( ((TDes8&)aMessage ) );
|
|
200 |
break;
|
|
201 |
}
|
|
202 |
case PNS_PEP_ENABLE_REQ:
|
|
203 |
{
|
|
204 |
retVal = iCurrentState->PnsPepEnableReq( aMessage );
|
|
205 |
iRouter->DeAllocateBlock( ((TDes8&)aMessage ) );
|
|
206 |
break;
|
|
207 |
}
|
|
208 |
case PNS_PEP_DISCONNECT_REQ:
|
|
209 |
{
|
|
210 |
retVal = iCurrentState->PnsPepDisconnectReq( aMessage );
|
|
211 |
iRouter->DeAllocateBlock( ((TDes8&)aMessage ) );
|
|
212 |
iPipeHandler.RemovePep(this);
|
|
213 |
break;
|
|
214 |
}
|
|
215 |
case PNS_PEP_CONNECT_REQ:
|
|
216 |
{
|
|
217 |
// Needed to set for SOS originated pipes
|
|
218 |
iChannel = ( NULL == iChannel ) ? aChannel : iChannel;
|
|
219 |
retVal = iCurrentState->PnsPepConnectReq( aMessage );
|
|
220 |
|
|
221 |
iRouter->DeAllocateBlock( ((TDes8&)aMessage ) );
|
|
222 |
break;
|
|
223 |
}
|
|
224 |
case PNS_PEP_RESET_REQ:
|
|
225 |
{
|
|
226 |
retVal = iCurrentState->PnsPepResetReq( aMessage );
|
|
227 |
|
|
228 |
iRouter->DeAllocateBlock( ((TDes8&)aMessage ) );
|
|
229 |
break;
|
|
230 |
}
|
|
231 |
case PNS_PEP_DISABLE_REQ:
|
|
232 |
{
|
|
233 |
retVal = iCurrentState->PnsPepDisableReq( aMessage );
|
|
234 |
|
|
235 |
iRouter->DeAllocateBlock( ((TDes8&)aMessage ) );
|
|
236 |
break;
|
|
237 |
}
|
|
238 |
case PNS_PEP_STATUS_IND:
|
|
239 |
{
|
|
240 |
// TODO: Remove this if pep_type_common to be the only pep_type ( && ( ...== PN_PEP_TYPE_COMMON ) )
|
|
241 |
ASSERT_RESET_ALWAYS( aMessage.Length() > ( ISI_HEADER_SIZE + PNS_PEP_STATUS_IND_OFFSET_PEPTYPE ), EIADOverTheLimits | EIADFaultIdentifier28 << KFaultIdentifierShift );
|
|
242 |
if( ( aMessage.Ptr()[ ISI_HEADER_SIZE + PNS_PEP_STATUS_IND_OFFSET_PEPTYPE ] == PN_PEP_TYPE_COMMON ) )
|
|
243 |
{
|
|
244 |
iDecoratedTx->PepStatusInd( aMessage );
|
|
245 |
iRouter->DeAllocateBlock( ((TDes8&)aMessage ) );
|
|
246 |
}
|
|
247 |
else
|
|
248 |
{
|
|
249 |
aChannel->ReceiveMsg(aMessage); // To dataport if _COMM
|
|
250 |
}
|
|
251 |
break;
|
|
252 |
}
|
|
253 |
case PNS_PEP_CTRL_REQ:
|
|
254 |
{
|
|
255 |
// TODO Remove this if pep_type_common to be the only pep_type
|
|
256 |
ASSERT_RESET_ALWAYS( aMessage.Length() > ( ISI_HEADER_SIZE + PNS_PEP_STATUS_IND_OFFSET_PEPTYPE ), EIADOverTheLimits | EIADFaultIdentifier29 << KFaultIdentifierShift );
|
|
257 |
if( ( aMessage.Ptr()[ ISI_HEADER_SIZE + PNS_PEP_STATUS_IND_OFFSET_PEPTYPE ] != PN_PEP_TYPE_COMMON ) )
|
|
258 |
{
|
|
259 |
aChannel->ReceiveMsg( aMessage ); // to dataport _COMM
|
|
260 |
}
|
|
261 |
else{
|
|
262 |
retVal = iDecoratedRx->PepControlReq( aMessage );
|
|
263 |
iRouter->DeAllocateBlock( ((TDes8&)aMessage ) );
|
|
264 |
}
|
|
265 |
break;
|
|
266 |
}
|
|
267 |
// directly to controller
|
|
268 |
case PNS_PIPE_REMOVE_RESP:
|
|
269 |
case PNS_PIPE_REDIRECT_RESP:
|
|
270 |
case PNS_PIPE_ENABLE_RESP:
|
|
271 |
case PNS_PIPE_DISABLE_RESP:
|
|
272 |
case PNS_PIPE_RESET_RESP:
|
|
273 |
case PNS_PIPE_CREATE_RESP:
|
|
274 |
case PNS_PEP_CTRL_RESP:
|
|
275 |
{
|
|
276 |
aChannel->ReceiveMsg( aMessage );
|
|
277 |
break;
|
|
278 |
}
|
|
279 |
|
|
280 |
default:
|
|
281 |
{
|
|
282 |
ASSERT_RESET_ALWAYS( 0, EIADUnknownPipeOrPepMsg | EIADFaultIdentifier1 << KFaultIdentifierShift );
|
|
283 |
break;
|
|
284 |
}
|
|
285 |
}
|
|
286 |
C_TRACE( ( _T( "DPep::ReceiveMessage 0x%x <-" ), retVal ) );
|
|
287 |
|
|
288 |
|
|
289 |
OstTrace1( TRACE_PIPE, DPEP_RECEIVEMESSAGE_EXIT, "<DPep::ReceiveMessage;retVal=%d", retVal );
|
|
290 |
return retVal;
|
|
291 |
}
|
|
292 |
|
|
293 |
TInt DPep::SendPepConnectResp( const TDesC8& aReq )
|
|
294 |
{
|
|
295 |
OstTrace1( TRACE_PIPE, DPEP_SENDPEPCONNECTRESP_ENTRY, ">DPep::SendPepConnectResp;aReq=%x", ( TUint )&( aReq ) );
|
|
296 |
C_TRACE( ( _T( "DPep::SendPepConnectResp ->" )) );
|
|
297 |
TInt retVal = iMainTxRx.SendPnsPepConnectResp( aReq ); // Handle is stored in Tx
|
|
298 |
C_TRACE( ( _T( "DPep::SendPepConnectResp 0x%x <-" ), retVal) );
|
|
299 |
OstTrace1( TRACE_PIPE, DPEP_SENDPEPCONNECTRESP_EXIT, "<DPep::SendPepConnectResp;retVal=%d", retVal );
|
|
300 |
return retVal;
|
|
301 |
}
|
|
302 |
|
|
303 |
TInt DPep::SendPepResetResp( const TDesC8& aReq )
|
|
304 |
{
|
|
305 |
OstTrace1( TRACE_PIPE, DPEP_SENDPEPRESETRESP_ENTRY, ">DPep::SendPepResetResp;aReq=%x", ( TUint )&( aReq ) );
|
|
306 |
C_TRACE( ( _T( "DPep::SendPepResetResp ->" )) );
|
|
307 |
TInt retVal = iMainTxRx.SendResetResp( aReq );
|
|
308 |
C_TRACE( ( _T( "DPep::SendPepResetResp 0x%x <-" ), retVal ) );
|
|
309 |
OstTrace1( TRACE_PIPE, DPEP_SENDPEPRESETRESP_EXIT, "<DPep::SendPepResetResp;retVal=%d", retVal );
|
|
310 |
return retVal;
|
|
311 |
}
|
|
312 |
|
|
313 |
TInt DPep::SendPepDisconnectResp( const TDesC8& aReq )
|
|
314 |
{
|
|
315 |
OstTrace1( TRACE_PIPE, DPEP_SENDPEPDISCONNECTRESP_ENTRY, ">DPep::SendPepDisconnectResp;aReq=%x", ( TUint )&( aReq ) );
|
|
316 |
C_TRACE( ( _T( "DPep::SendPepDisconnectResp ->" )) );
|
|
317 |
TInt retVal = iMainTxRx.SendPnsPepDisconnectResp( aReq );
|
|
318 |
C_TRACE( ( _T( "DPep::SendPepDisconnectResp 0x%x <-" ), retVal) );
|
|
319 |
OstTrace1( TRACE_PIPE, DPEP_SENDPEPDISCONNECTRESP_EXIT, "<DPep::SendPepDisconnectResp;retVal=%d", retVal );
|
|
320 |
return retVal;
|
|
321 |
}
|
|
322 |
|
|
323 |
TInt DPep::SendPepEnableResp( const TDesC8& aReq )
|
|
324 |
{
|
|
325 |
OstTrace1( TRACE_PIPE, DPEP_SENDPEPENABLERESP_ENTRY, ">DPep::SendPepEnableResp;aReq=%x", ( TUint )&( aReq ) );
|
|
326 |
C_TRACE( ( _T( "DPep::SendPepEnableResp ->" )) );
|
|
327 |
TInt retVal = iMainTxRx.SendEnableResp( aReq );
|
|
328 |
C_TRACE( ( _T( "DPep::SendPepEnableResp 0x%x <-" ), retVal) );
|
|
329 |
OstTrace1( TRACE_PIPE, DPEP_SENDPEPENABLERESP_EXIT, "<DPep::SendPepEnableResp;retVal=%d", retVal );
|
|
330 |
return retVal;
|
|
331 |
}
|
|
332 |
|
|
333 |
TInt DPep::SendPepDisableResp(const TDesC8& aReq)
|
|
334 |
{
|
|
335 |
OstTrace1( TRACE_PIPE, DPEP_SENDPEPDISABLERESP_ENTRY, ">DPep::SendPepDisableResp;aReq=%x", ( TUint )&( aReq ) );
|
|
336 |
C_TRACE( ( _T( "DPep::SendPepDisableResp ->" )) );
|
|
337 |
TInt retVal = iMainTxRx.SendDisableResp( aReq );
|
|
338 |
C_TRACE( ( _T( "DPep::SendPepDisableResp 0x%x <-" ), retVal) );
|
|
339 |
OstTrace1( TRACE_PIPE, DPEP_SENDPEPDISABLERESP_EXIT, "<DPep::SendPepDisableResp;retVal=%d", retVal );
|
|
340 |
return retVal;
|
|
341 |
}
|
|
342 |
|
|
343 |
TInt DPep::RxPipeData( const TDesC8& aData )
|
|
344 |
{
|
|
345 |
OstTrace1( TRACE_PIPE, DPEP_RXPIPEDATA_ENTRY, ">DPep::RxPipeData;aData=%x", ( TUint )&( aData ) );
|
|
346 |
C_TRACE( ( _T( "DPep::RxPipeData ->" )) );
|
|
347 |
ASSERT_RESET_ALWAYS( iDecoratedRx, EIADNullParameter | EIADFaultIdentifier6 << KFaultIdentifierShift );
|
|
348 |
TInt retVal = iDecoratedRx->Receive( aData );
|
|
349 |
C_TRACE( ( _T( "DPep::RxPipeData 0x%x <-" ), retVal) );
|
|
350 |
OstTrace1( TRACE_PIPE, DPEP_RXPIPEDATA_EXIT, "<DPep::RxPipeData;retVal=%d", retVal );
|
|
351 |
return retVal;
|
|
352 |
}
|
|
353 |
|
|
354 |
TInt DPep::TxPipeData( TDes8& aData )
|
|
355 |
{
|
|
356 |
OstTrace1( TRACE_PIPE, DPEP_TXPIPEDATA_ENTRY, ">DPep::TxPipeData;aData=%x", ( TUint )&( aData ) );
|
|
357 |
C_TRACE( ( _T( "DPep::TxPipeData ->" )) );
|
|
358 |
ASSERT_RESET_ALWAYS( iDecoratedTx, EIADNullParameter | EIADFaultIdentifier7 << KFaultIdentifierShift );
|
|
359 |
TInt retVal = iDecoratedTx->Send( aData );
|
|
360 |
C_TRACE( ( _T( "DPep::TxPipeData %d <-" ), retVal) );
|
|
361 |
OstTrace1( TRACE_PIPE, DPEP_TXPIPEDATA_EXIT, "<DPep::TxPipeData;retVal=%d", retVal );
|
|
362 |
return retVal;
|
|
363 |
}
|
|
364 |
|
|
365 |
void DPep::PipeEnabled()
|
|
366 |
{
|
|
367 |
OstTrace0( TRACE_PIPE, DPEP_PIPEENABLED_ENTRY, ">DPep::PipeEnabled" );
|
|
368 |
C_TRACE( ( _T( "DPep::PipeEnabled ->" ) ) );
|
|
369 |
ASSERT_RESET_ALWAYS( iDecoratedRx && iDecoratedTx, EIADNullParameter | EIADFaultIdentifier8 << KFaultIdentifierShift );
|
|
370 |
iDecoratedRx->PipeEnabled();
|
|
371 |
iDecoratedTx->PipeEnabled();
|
|
372 |
C_TRACE( ( _T( "DPep::PipeEnabled <-" ) ) );
|
|
373 |
OstTrace0( TRACE_PIPE, DPEP_PIPEENABLED_EXIT, "<DPep::PipeEnabled" );
|
|
374 |
}
|
|
375 |
|
|
376 |
void DPep::PipeDisabling()
|
|
377 |
{
|
|
378 |
OstTrace0( TRACE_PIPE, DPEP_PIPEDISABLING_ENTRY, ">DPep::PipeDisabling" );
|
|
379 |
C_TRACE( ( _T( "DPep::PipeDisabling ->" ) ) );
|
|
380 |
ASSERT_RESET_ALWAYS( iDecoratedTx, EIADNullParameter | EIADFaultIdentifier9 << KFaultIdentifierShift );
|
|
381 |
iDecoratedTx->PipeDisabled();
|
|
382 |
C_TRACE( ( _T( "DPep::PipeDisabling <-" ) ) );
|
|
383 |
OstTrace0( TRACE_PIPE, DPEP_PIPEDISABLING_EXIT, "<DPep::PipeDisabling" );
|
|
384 |
}
|
|
385 |
|
|
386 |
void DPep::PipeDisabled()
|
|
387 |
{
|
|
388 |
OstTrace0( TRACE_PIPE, DPEP_PIPEDISABLED_ENTRY, ">DPep::PipeDisabled" );
|
|
389 |
C_TRACE( ( _T( "DPep::PipeDisabled ->" ) ) );
|
|
390 |
ASSERT_RESET_ALWAYS( iDecoratedRx, EIADNullParameter | EIADFaultIdentifier10 << KFaultIdentifierShift );
|
|
391 |
// TX Already disabled (or then create new Disabling for tx's
|
|
392 |
iDecoratedRx->PipeDisabled();
|
|
393 |
C_TRACE( ( _T( "DPep::PipeDisabled <-" ) ) );
|
|
394 |
OstTrace0( TRACE_PIPE, DPEP_PIPEDISABLED_EXIT, "<DPep::PipeDisabled" );
|
|
395 |
}
|
|
396 |
|
|
397 |
void DPep::PipeEnableEnabled()
|
|
398 |
{
|
|
399 |
OstTrace0( TRACE_PIPE, DPEP_PIPEENABLEENABLED_ENTRY, ">DPep::PipeEnableEnabled" );
|
|
400 |
C_TRACE( ( _T( "DPep::PipeEnableEnabled ->" ) ) );
|
|
401 |
ASSERT_RESET_ALWAYS( iDecoratedTx, EIADNullParameter | EIADFaultIdentifier11 << KFaultIdentifierShift );
|
|
402 |
iDecoratedTx->PipeEnabled();
|
|
403 |
C_TRACE( ( _T( "DPep::PipeEnableEnabled <-" ) ) );
|
|
404 |
OstTrace0( TRACE_PIPE, DPEP_PIPEENABLEENABLED_EXIT, "<DPep::PipeEnableEnabled" );
|
|
405 |
}
|
|
406 |
|
|
407 |
void DPep::PipeDisableDisabled()
|
|
408 |
{
|
|
409 |
OstTrace0( TRACE_PIPE, DPEP_PIPEDISABLEDISABLED_ENTRY, ">DPep::PipeDisableDisabled" );
|
|
410 |
C_TRACE( ( _T( "DPep::PipeDisableDisabled ->" ) ) );
|
|
411 |
ASSERT_RESET_ALWAYS( iDecoratedRx, EIADNullParameter | EIADFaultIdentifier12 << KFaultIdentifierShift );
|
|
412 |
TRACE_ASSERT_ALWAYS;// specifications (pipe, one- and multicredit) don't say anything about this.
|
|
413 |
iDecoratedRx->PipeDisabled();
|
|
414 |
C_TRACE( ( _T( "DPep::PipeDisableDisabled <-" ) ) );
|
|
415 |
OstTrace0( TRACE_PIPE, DPEP_PIPEDISABLEDISABLED_EXIT, "<DPep::PipeDisableDisabled" );
|
|
416 |
}
|
|
417 |
|
|
418 |
void DPep::HandlePnPipeSbNegotiatedFC(
|
|
419 |
const TDesC8& aMsg
|
|
420 |
)
|
|
421 |
{
|
|
422 |
OstTrace1( TRACE_PIPE, DPEP_HANDLEPNPIPESBNEGOTIATEDFC_ENTRY, ">DPep::HandlePnPipeSbNegotiatedFC;aMsg=%x", ( TUint )&( aMsg ) );
|
|
423 |
|
|
424 |
C_TRACE( ( _T( "DPep::HandlePnPipeSbNegotiatedFC ->" ) ) );
|
|
425 |
const TUint8* ptr( aMsg.Ptr() );
|
|
426 |
TUint8 txFcType( PN_LEGACY_FLOW_CONTROL );
|
|
427 |
TUint8 rxFcType( PN_LEGACY_FLOW_CONTROL );
|
|
428 |
ASSERT_RESET_ALWAYS( PNS_PIPE_CREATED_IND_OFFSET_NSB == PNS_PIPE_REDIRECTED_IND_OFFSET_NSB, 0 );
|
|
429 |
const TUint8 sbCountOffset( ( PNS_PIPE_CREATED_IND_OFFSET_NSB + PNS_PIPE_REDIRECTED_IND_OFFSET_NSB ) / 2 );
|
|
430 |
ASSERT_RESET_ALWAYS( aMsg.Length() > ( ISI_HEADER_SIZE + sbCountOffset ), EIADOverTheLimits | EIADFaultIdentifier30 << KFaultIdentifierShift );
|
|
431 |
if( ptr[ ISI_HEADER_SIZE + sbCountOffset ] != 0x00 )
|
|
432 |
{
|
|
433 |
txFcType = ( ptr[ ISI_HEADER_SIZE + SIZE_PNS_PIPE_CREATED_IND + PN_PIPE_SB_NEGOTIATED_FC_OFFSET_SBID + PN_PIPE_SB_NEGOTIATED_FC_OFFSET_NEGOTIATEDTXFC ] );
|
|
434 |
rxFcType = ( ptr[ ISI_HEADER_SIZE + SIZE_PNS_PIPE_CREATED_IND + PN_PIPE_SB_NEGOTIATED_FC_OFFSET_SBID + PN_PIPE_SB_NEGOTIATED_FC_OFFSET_NEGOTIATEDRXFC ] );
|
|
435 |
ASSERT_RESET_ALWAYS( aMsg.Length() > ( ISI_HEADER_SIZE + SIZE_PNS_PIPE_CREATED_IND + PN_PIPE_SB_NEGOTIATED_FC_OFFSET_SBID + PN_PIPE_SB_NEGOTIATED_FC_OFFSET_NEGOTIATEDRXFC ), EIADOverTheLimits | EIADFaultIdentifier31 << KFaultIdentifierShift );
|
|
436 |
}
|
|
437 |
else
|
|
438 |
{
|
|
439 |
TRACE_ASSERT_ALWAYS;
|
|
440 |
C_TRACE( ( _T( "DPep::HandlePnPipeSbNegotiatedFC legacy-legacy in use or corrupted" ) ) );
|
|
441 |
OstTrace0( TRACE_PIPE, DPEP_HANDLEPNPIPESBNEGOTIATEDFC_LEGACY, "DPep::HandlePnPipeSbNegotiatedFC legacy used or corrupted" );
|
|
442 |
}
|
|
443 |
|
|
444 |
iPipeHandle = iMainTxRx.PipeHandle();
|
|
445 |
ASSERT_RESET_ALWAYS( ptr[ ISI_HEADER_SIZE + PNS_PIPE_CREATED_IND_OFFSET_PIPEHANDLE ] == iPipeHandle, EIADWrongPipeHandle | EIADFaultIdentifier1 << KFaultIdentifierShift );
|
|
446 |
// Can also be PN_NO_FLOW_CONTROL but this PEP is not ready for it.
|
|
447 |
if( iDecoratedRx )
|
|
448 |
{
|
|
449 |
delete iDecoratedRx;
|
|
450 |
iDecoratedRx = NULL;
|
|
451 |
}
|
|
452 |
switch( rxFcType )
|
|
453 |
{
|
|
454 |
case PN_LEGACY_FLOW_CONTROL:
|
|
455 |
{
|
|
456 |
iDecoratedRx = new DLegacyRx( iMainTxRx, iPipeHandle );
|
|
457 |
break;
|
|
458 |
}
|
|
459 |
case PN_ONE_CREDIT_FLOW_CONTROL:
|
|
460 |
{
|
|
461 |
iDecoratedRx = new DOneRx( iMainTxRx, iPipeHandle );
|
|
462 |
break;
|
|
463 |
}
|
|
464 |
case PN_MULTI_CREDIT_FLOW_CONTROL:
|
|
465 |
{
|
|
466 |
iDecoratedRx = new DMultiRx( iMainTxRx, iPipeHandle );
|
|
467 |
break;
|
|
468 |
}
|
|
469 |
default:
|
|
470 |
{
|
|
471 |
ASSERT_RESET_ALWAYS(0, EIADUnknownPipeFCType | EIADFaultIdentifier1 << KFaultIdentifierShift );
|
|
472 |
break;
|
|
473 |
}
|
|
474 |
}
|
|
475 |
if( iDecoratedTx )
|
|
476 |
{
|
|
477 |
delete iDecoratedTx;
|
|
478 |
iDecoratedTx = NULL;
|
|
479 |
}
|
|
480 |
switch( txFcType )
|
|
481 |
{
|
|
482 |
case PN_LEGACY_FLOW_CONTROL:
|
|
483 |
{
|
|
484 |
iDecoratedTx = new DLegacyTx( iMainTxRx, iPipeHandle );
|
|
485 |
break;
|
|
486 |
}
|
|
487 |
case PN_ONE_CREDIT_FLOW_CONTROL:
|
|
488 |
{
|
|
489 |
iDecoratedTx = new DOneTx( iMainTxRx, iPipeHandle );
|
|
490 |
break;
|
|
491 |
}
|
|
492 |
case PN_MULTI_CREDIT_FLOW_CONTROL:
|
|
493 |
{
|
|
494 |
iDecoratedTx = new DMultiTx( iMainTxRx, iPipeHandle );
|
|
495 |
break;
|
|
496 |
}
|
|
497 |
default:
|
|
498 |
{
|
|
499 |
ASSERT_RESET_ALWAYS(0, EIADUnknownPipeFCType | EIADFaultIdentifier2 << KFaultIdentifierShift );
|
|
500 |
break;
|
|
501 |
}
|
|
502 |
}
|
|
503 |
C_TRACE( ( _T( "DPep::HandlePnPipeSbNegotiatedFC <-" ) ) );
|
|
504 |
OstTrace0( TRACE_PIPE, DPEP_HANDLEPNPIPESBNEGOTIATEDFC_EXIT, "<DPep::HandlePnPipeSbNegotiatedFC" );
|
|
505 |
|
|
506 |
}
|
|
507 |
|
|
508 |
|
|
509 |
void DPep::NextState(
|
|
510 |
TPipeState aNextState
|
|
511 |
)
|
|
512 |
{
|
|
513 |
|
|
514 |
OstTrace1( TRACE_PIPE, DPEP_NEXTSTATE_ENTRY, ">DPep::NextState;aNextState=%x", ( TUint )&( aNextState ) );
|
|
515 |
C_TRACE( ( _T( "DPep::NextState 0x%x 0x%x ->" ), aNextState, this ) );
|
|
516 |
C_TRACE( ( _T( "DPep::NextState TBR currentstate pipehandle 0x%x " ), iCurrentState->iPep.GetPipeHandle() ) );//TBR
|
|
517 |
switch( aNextState )
|
|
518 |
{
|
|
519 |
case ECreating:
|
|
520 |
{
|
|
521 |
iCurrentState = &iCreating;
|
|
522 |
C_TRACE( ( _T( "ECreating" ) ) );
|
|
523 |
OstTrace0( TRACE_PIPE, DPEP_NEXTSTATE_CREATING, "DPep::NextState ECreating" );
|
|
524 |
break;
|
|
525 |
}
|
|
526 |
case ECreatingEnabled:
|
|
527 |
{
|
|
528 |
iCurrentState = &iCreatingEnabled;
|
|
529 |
C_TRACE( ( _T( "ECreatingEnabled" ) ) );
|
|
530 |
OstTrace0( TRACE_PIPE, DPEP_NEXTSTATE_CREATINGENABLED, "DPep::NextState ECreatingEnabled" );
|
|
531 |
break;
|
|
532 |
}
|
|
533 |
case EDisabled:
|
|
534 |
{
|
|
535 |
iCurrentState = &iDisabled;
|
|
536 |
C_TRACE( ( _T( "EDisabled" ) ) );
|
|
537 |
OstTrace0( TRACE_PIPE, DPEP_NEXTSTATE_DISABLED, "DPep::NextState EDisabled" );
|
|
538 |
break;
|
|
539 |
}
|
|
540 |
case EDisabling:
|
|
541 |
{
|
|
542 |
iCurrentState = &iDisabling;
|
|
543 |
C_TRACE( ( _T( "EDisabling" ) ) );
|
|
544 |
OstTrace0( TRACE_PIPE, DPEP_NEXTSTATE_DISABLING, "DPep::NextState EDisabling" );
|
|
545 |
break;
|
|
546 |
}
|
|
547 |
case EEnabled:
|
|
548 |
{
|
|
549 |
iCurrentState = &iEnabled;
|
|
550 |
C_TRACE( ( _T( "EEnabled" ) ) );
|
|
551 |
OstTrace0( TRACE_PIPE, DPEP_NEXTSTATE_ENABLED, "DPep::NextState EEnabled" );
|
|
552 |
break;
|
|
553 |
}
|
|
554 |
case EEnabling:
|
|
555 |
{
|
|
556 |
iCurrentState = &iEnabling;
|
|
557 |
C_TRACE( ( _T( "EEnabling" ) ) );
|
|
558 |
OstTrace0( TRACE_PIPE, DPEP_NEXTSTATE_ENABLING, "DPep::NextState EEnabling" );
|
|
559 |
break;
|
|
560 |
}
|
|
561 |
//TBR
|
|
562 |
case EEnableEnabled:
|
|
563 |
{
|
|
564 |
iCurrentState = &iEnableEnabled;
|
|
565 |
C_TRACE( ( _T( "EEnableEnabled" ) ) );
|
|
566 |
OstTrace0( TRACE_PIPE, DPEP_NEXTSTATE_ENABLEENABLED, "DPep::NextState EEnableEnabled" );
|
|
567 |
break;
|
|
568 |
}
|
|
569 |
//TBR
|
|
570 |
case EDisabledDisabled:
|
|
571 |
{
|
|
572 |
iCurrentState = &iDisabledDisabled;
|
|
573 |
C_TRACE( ( _T( "EDisabledDisabled" ) ) );
|
|
574 |
OstTrace0( TRACE_PIPE, DPEP_NEXTSTATE_DISABLEDDISABLED, "DPep::NextState EDisabledDisabled" );
|
|
575 |
break;
|
|
576 |
}
|
|
577 |
case EDisabledEnabled:
|
|
578 |
{
|
|
579 |
iCurrentState = &iDisabledEnabled;
|
|
580 |
C_TRACE( ( _T( "EDisabledEnabled" ) ) );
|
|
581 |
OstTrace0( TRACE_PIPE, DPEP_NEXTSTATE_DISABLEDENABLED, "DPep::NextState EDisabledEnabled" );
|
|
582 |
break;
|
|
583 |
}
|
|
584 |
case EEnabledDisabled:
|
|
585 |
{
|
|
586 |
iCurrentState = &iEnabledDisabled;
|
|
587 |
C_TRACE( ( _T( "EEnabledDisabled" ) ) );
|
|
588 |
OstTrace0( TRACE_PIPE, DPEP_NEXTSTATE_ENABLEDDISABLED, "DPep::NextState EEnabledDisabled" );
|
|
589 |
break;
|
|
590 |
}
|
|
591 |
case EEnabledEnabled:
|
|
592 |
{
|
|
593 |
iCurrentState = &iEnabledEnabled;
|
|
594 |
C_TRACE( ( _T( "EEnabledEnabled" ) ) );
|
|
595 |
OstTrace0( TRACE_PIPE, DPEP_NEXTSTATE_ENABLEDENABLED, "DPep::NextState EEnabledEnabled" );
|
|
596 |
break;
|
|
597 |
}
|
|
598 |
case EDisconnected:
|
|
599 |
{
|
|
600 |
iCurrentState = &iDisconnected;
|
|
601 |
C_TRACE( ( _T( "EDisconnected" ) ) );
|
|
602 |
OstTrace0( TRACE_PIPE, DPEP_NEXTSTATE_DISCONNECTED, "DPep::NextState EDisconnected" );
|
|
603 |
break;
|
|
604 |
}
|
|
605 |
default:
|
|
606 |
{
|
|
607 |
ASSERT_RESET_ALWAYS( 0, EIADWrongParameter | EIADFaultIdentifier20 << KFaultIdentifierShift );
|
|
608 |
break;
|
|
609 |
}
|
|
610 |
}
|
|
611 |
iCurrentState->EnterState();
|
|
612 |
C_TRACE( ( _T( "DPep::NextState 0x%x <-" ), this ) );
|
|
613 |
OstTrace0( TRACE_PIPE, DPEP_NEXTSTATE_EXIT, "<DPep::NextState" );
|
|
614 |
|
|
615 |
}
|
|
616 |
|
|
617 |
// ************* DPipe methods *************
|
|
618 |
|
|
619 |
#if (NCP_COMMON_SOS_VERSION_SUPPORT >= SOS_VERSION_95)
|
|
620 |
void DPep::SetLoaned(
|
|
621 |
MIAD2ChannelApi* aCh
|
|
622 |
)
|
|
623 |
{
|
|
624 |
|
|
625 |
C_TRACE( ( _T( "DPep::SetLoaned 0x%x 0x%x ->" ), this, aCh ) );
|
|
626 |
OstTraceExt2( TRACE_PIPE, DPEP__SETLOANED_ENTRY, ">DPep::SetLoaned ;this=%x;ch=0x%x", (TUint)this, (TUint) aCh );
|
|
627 |
this->iDecoratedRx->SetNewChannel( aCh );
|
|
628 |
this->PipeEnabled();
|
|
629 |
C_TRACE( ( _T( "DPep::SetLoaned 0x%x 0x%x <-" ), this, aCh ) );
|
|
630 |
OstTraceExt2( TRACE_PIPE, DPEP__SETLOANED_EXIT, "<DPep::SetLoaned ;this=%x;ch=0x%x", (TUint)this, (TUint)aCh );
|
|
631 |
|
|
632 |
}
|
|
633 |
|
|
634 |
void DPep::SetLoanReturned(
|
|
635 |
MIAD2ChannelApi* aOldCh
|
|
636 |
)
|
|
637 |
{
|
|
638 |
|
|
639 |
C_TRACE( ( _T( "DPep::SetLoanReturned 0x%x aOldCh 0x%x ->" ), this, aOldCh ) );
|
|
640 |
OstTraceExt2( TRACE_PIPE, DPEP__SETLOANRETURNED_ENTRY, ">DPep::SetLoaned ;this=%x;oldch=0x%x", (TUint)this, (TUint)aOldCh );
|
|
641 |
this->iDecoratedRx->SetNewChannel( aOldCh );
|
|
642 |
OstTraceExt2( TRACE_PIPE, DPEP__SETLOANRETURNED_EXIT, "<DPep::SetLoaned ;this=%x;oldch=0x%x", (TUint)this, (TUint)aOldCh );
|
|
643 |
C_TRACE( ( _T( "DPep::SetLoanReturned 0x%x aOldCh 0x%x <-" ), this, aOldCh ) );
|
|
644 |
|
|
645 |
}
|
|
646 |
#endif
|
|
647 |
|
|
648 |
// ************* Main pipe state methods **************
|
|
649 |
DPipeState::DPipeState(DPep& aPep) : iPep( aPep )
|
|
650 |
{
|
|
651 |
OstTrace1( TRACE_PIPE, DPIPESTATE_DPIPESTATE_ENTRY, "<>DPipeState::DPipeState;aPep=%x", ( TUint )&( aPep ) );
|
|
652 |
C_TRACE( ( _T( "DPipeState::DPipeState <->" ) ) );
|
|
653 |
}
|
|
654 |
|
|
655 |
void DPipeState::NextState(TPipeState aNextState)
|
|
656 |
{
|
|
657 |
OstTrace1( TRACE_PIPE, DPIPESTATE_NEXTSTATE_ENTRY, "<>DPipeState::NextState;aNextState=%x", ( TUint )&( aNextState ) );
|
|
658 |
C_TRACE( ( _T( "DPipeState::NextState ->" ) ) );
|
|
659 |
iPep.NextState(aNextState);
|
|
660 |
C_TRACE( ( _T( "DPipeState::NextState <-" ) ) );
|
|
661 |
}
|
|
662 |
|
|
663 |
void DPipeState::EnterState()
|
|
664 |
{
|
|
665 |
OstTrace0( TRACE_PIPE, DPIPESTATE_ENTERSTATE_ENTRY, "<>DPipeState::EnterState" );
|
|
666 |
C_TRACE( ( _T( "DPipeState::EnterState <-> nothing to do" ) ) );
|
|
667 |
//TRACE_ASSERT_ALWAYS;
|
|
668 |
}
|
|
669 |
|
|
670 |
|
|
671 |
TInt DPipeState::PnsPepDisconnectReq(const TDesC8& aReq)
|
|
672 |
{
|
|
673 |
|
|
674 |
OstTrace1( TRACE_PIPE, DPIPESTATE_PNSPEPDISCONNECTREQ_ENTRY, ">DPipeState::PnsPepDisconnectReq;aReq=%x", ( TUint )&( aReq ) );
|
|
675 |
C_TRACE( ( _T( "DPipeState::PnsPepDisconnectReq ->" ) ) );
|
|
676 |
iPep.NextState(EDisconnected);
|
|
677 |
TInt retVal = iPep.SendPepDisconnectResp(aReq);
|
|
678 |
C_TRACE( ( _T( "DPipeState::PnsPepDisconnectReq 0x%x <-" ),retVal ) );
|
|
679 |
OstTrace1( TRACE_PIPE, DPIPESTATE_PNSPEPDISCONNECTREQ_EXIT, "<DPipeState::PnsPepDisconnectReq;retVal=%d", retVal );
|
|
680 |
return retVal;
|
|
681 |
|
|
682 |
}
|
|
683 |
|
|
684 |
TInt DPipeState::TxPnsPipeData(
|
|
685 |
TDes8& // aData
|
|
686 |
)
|
|
687 |
{
|
|
688 |
|
|
689 |
OstTrace0( TRACE_PIPE, DPIPESTATE_TXPNSPIPEDATA_ENTRY, ">DPipeState::TxPnsPipeData" );
|
|
690 |
C_TRACE( ( _T( "DPipeState::TxPnsPipeData <->" ) ) );
|
|
691 |
TRACE_ASSERT_ALWAYS;
|
|
692 |
// illegal to send in other than enabled state inform with KErrOverFlow that flowcontrol is on.
|
|
693 |
return KErrOverflow;
|
|
694 |
|
|
695 |
}
|
|
696 |
|
|
697 |
//********************** DCreating methods *******************/
|
|
698 |
DCreating::DCreating(DPep& aPep) : DPipeState( aPep )
|
|
699 |
{
|
|
700 |
OstTrace1( TRACE_PIPE, DCREATING_DCREATING_ENTRY, ">DCreating::DCreating;aPep=%x", ( TUint )&( aPep ) );
|
|
701 |
|
|
702 |
C_TRACE( ( _T( "DCreating::DCreating <->" ) ) );
|
|
703 |
|
|
704 |
}
|
|
705 |
|
|
706 |
TInt DCreating::PnsPepConnectReq(
|
|
707 |
const TDesC8& aReq
|
|
708 |
)
|
|
709 |
{
|
|
710 |
|
|
711 |
OstTrace1( TRACE_PIPE, DCREATING_PNSPEPCONNECTREQ_ENTRY, ">DCreating::PnsPepConnectReq;aReq=%x", ( TUint )&( aReq ) );
|
|
712 |
C_TRACE( ( _T( "DCreating::PnsPepConnectReq ->" ) ) );
|
|
713 |
TInt retVal = iPep.SendPepConnectResp( aReq );
|
|
714 |
ASSERT_RESET_ALWAYS( aReq.Length() > ( ISI_HEADER_SIZE + PNS_PEP_CONNECT_REQ_OFFSET_STATEAFTERCONNECT ), EIADOverTheLimits | EIADFaultIdentifier32 << KFaultIdentifierShift );
|
|
715 |
const TUint8 stateAfter( aReq.Ptr()[ ISI_HEADER_SIZE + PNS_PEP_CONNECT_REQ_OFFSET_STATEAFTERCONNECT ] );
|
|
716 |
if( stateAfter == PN_PIPE_ENABLE )
|
|
717 |
{
|
|
718 |
iPep.NextState( ECreatingEnabled );
|
|
719 |
}
|
|
720 |
C_TRACE( ( _T( "DCreating::PnsPepConnectReq 0x%x <-" ),retVal ) );
|
|
721 |
OstTrace1( TRACE_PIPE, DCREATING_PNSPEPCONNECTREQ_EXIT, "<DCreating::PnsPepConnectReq;retVal=%d", retVal );
|
|
722 |
return retVal;
|
|
723 |
|
|
724 |
}
|
|
725 |
|
|
726 |
void DCreating::PnsPipeCreatedInd(
|
|
727 |
// None
|
|
728 |
)
|
|
729 |
{
|
|
730 |
|
|
731 |
OstTrace0( TRACE_PIPE, DCREATING_PNSPIPECREATEDIND_ENTRY, ">DCreating::PnsPipeCreatedInd" );
|
|
732 |
C_TRACE( ( _T( "DCreating::PnsPipeCreatedInd ->" ) ) );
|
|
733 |
iPep.NextState( EDisabling );
|
|
734 |
iPep.NextState( EDisabled );
|
|
735 |
C_TRACE( ( _T( "DCreating::PnsPipeCreatedInd <-" ) ) );
|
|
736 |
OstTrace0( TRACE_PIPE, DCREATING_PNSPIPECREATEDIND_EXIT, "<DCreating::PnsPipeCreatedInd" );
|
|
737 |
|
|
738 |
}
|
|
739 |
|
|
740 |
void DCreating::PnsPipeRedirectedInd(
|
|
741 |
// None
|
|
742 |
)
|
|
743 |
{
|
|
744 |
|
|
745 |
OstTrace0( TRACE_PIPE, DCREATING_PNSPIPEREDIRECTEDIND_ENTRY, ">DCreating::PnsPipeRedirectedInd" );
|
|
746 |
C_TRACE( ( _T( "DCreating::PnsPipeRedirectedInd ->" ) ) );
|
|
747 |
iPep.NextState( EDisabling );
|
|
748 |
iPep.NextState( EDisabled );
|
|
749 |
C_TRACE( ( _T( "DCreating::PnsPipeRedirectedInd <-" ) ) );
|
|
750 |
OstTrace0( TRACE_PIPE, DCREATING_PNSPIPEREDIRECTEDIND_EXIT, "<DCreating::PnsPipeRedirectedInd" );
|
|
751 |
|
|
752 |
}
|
|
753 |
|
|
754 |
DCreatingEnabled::DCreatingEnabled(DPep& aPep) : DPipeState( aPep )
|
|
755 |
{
|
|
756 |
|
|
757 |
OstTrace1( TRACE_PIPE, DCREATINGENABLED_DCREATINGENABLED_ENTRY, "<>DCreatingEnabled::DCreatingEnabled;aPep=%x", ( TUint )&( aPep ) );
|
|
758 |
C_TRACE( ( _T( "DCreatingEnabled::DCreatingEnabled <->" ) ) );
|
|
759 |
|
|
760 |
}
|
|
761 |
|
|
762 |
void DCreatingEnabled::PnsPipeCreatedInd(
|
|
763 |
// None
|
|
764 |
)
|
|
765 |
{
|
|
766 |
|
|
767 |
OstTrace0( TRACE_PIPE, DCREATINGENABLED_PNSPIPECREATEDIND_ENTRY, ">DCreatingEnabled::PnsPipeCreatedInd" );
|
|
768 |
C_TRACE( ( _T( "DCreatingEnabled::PnsPipeCreatedInd ->" ) ) );
|
|
769 |
iPep.NextState( EEnabled );
|
|
770 |
C_TRACE( ( _T( "DCreatingEnabled::PnsPipeCreatedInd <-" ) ) );
|
|
771 |
OstTrace0( TRACE_PIPE, DCREATINGENABLED_PNSPIPECREATEDIND_EXIT, "<DCreatingEnabled::PnsPipeCreatedInd" );
|
|
772 |
|
|
773 |
}
|
|
774 |
|
|
775 |
void DCreatingEnabled::PnsPipeRedirectedInd(
|
|
776 |
// None
|
|
777 |
)
|
|
778 |
{
|
|
779 |
|
|
780 |
OstTrace0( TRACE_PIPE, DCREATINGENABLED_PNSPIPEREDIRECTEDIND_ENTRY, ">DCreatingEnabled::PnsPipeRedirectedInd" );
|
|
781 |
C_TRACE( ( _T( "DCreatingEnabled::PnsPipeRedirectedInd ->" ) ) );
|
|
782 |
iPep.NextState( EEnabled );
|
|
783 |
C_TRACE( ( _T( "DCreatingEnabled::PnsPipeRedirectedInd <-" ) ) );
|
|
784 |
OstTrace0( TRACE_PIPE, DCREATINGENABLED_PNSPIPEREDIRECTEDIND_EXIT, "<DCreatingEnabled::PnsPipeRedirectedInd" );
|
|
785 |
|
|
786 |
}
|
|
787 |
|
|
788 |
//********************** DCreating methods *******************/
|
|
789 |
|
|
790 |
DDisconnected::DDisconnected(DPep& aPep) : DPipeState( aPep )
|
|
791 |
{
|
|
792 |
OstTrace1( TRACE_PIPE, DDISCONNECTED_DDISCONNECTED_ENTRY, "<>DDisconnected::DDisconnected;aPep=%x", ( TUint )&( aPep ) );
|
|
793 |
|
|
794 |
C_TRACE( ( _T( "DDisconnected::DDisconnected <->" ) ) );
|
|
795 |
|
|
796 |
}
|
|
797 |
// When Disconnected the pipe is no longer valid -> any transmission cancelled
|
|
798 |
|
|
799 |
|
|
800 |
//********************** DDisabled methods *******************/
|
|
801 |
DDisabled::DDisabled(DPep& aPep) : DPipeState( aPep )
|
|
802 |
{
|
|
803 |
OstTrace1( TRACE_PIPE, DDISABLED_DDISABLED_ENTRY, "<>DDisabled::DDisabled;aPep=%x", ( TUint )&( aPep ) );
|
|
804 |
C_TRACE( ( _T( "DDisabled::DDisabled <->" ) ) );
|
|
805 |
}
|
|
806 |
|
|
807 |
void DDisabled::EnterState()
|
|
808 |
{
|
|
809 |
OstTrace0( TRACE_PIPE, DDISABLED_ENTERSTATE_ENTRY, ">DDisabled::EnterState" );
|
|
810 |
C_TRACE( ( _T( "DDisabled::EnterState ->" ) ) );
|
|
811 |
iPep.PipeDisabled();
|
|
812 |
C_TRACE( ( _T( "DDisabled::EnterState <-" ) ) );
|
|
813 |
OstTrace0( TRACE_PIPE, DDISABLED_ENTERSTATE_EXIT, "<DDisabled::EnterState" );
|
|
814 |
}
|
|
815 |
|
|
816 |
TInt DDisabled::PnsPepEnableReq(const TDesC8& aReq)
|
|
817 |
{
|
|
818 |
OstTrace1( TRACE_PIPE, DDISABLED_PNSPEPENABLEREQ_ENTRY, ">DDisabled::PnsPepEnableReq;aReq=%x", ( TUint )&( aReq ) );
|
|
819 |
C_TRACE( ( _T( "DDisabled::PnsPepEnableReq ->" ) ) );
|
|
820 |
iPep.NextState(EEnabling);
|
|
821 |
C_TRACE( ( _T( "DDisabled::PnsPepEnableReq <-" ) ) );
|
|
822 |
TInt retVal = iPep.SendPepEnableResp(aReq);
|
|
823 |
OstTrace1( TRACE_PIPE, DDISABLED_PNSPEPENABLEREQ_EXIT, "<DDisabled::PnsPepEnableReq;retVal=%d", retVal );
|
|
824 |
return retVal;
|
|
825 |
}
|
|
826 |
|
|
827 |
TInt DDisabled::PnsPepDisableReq(const TDesC8& aReq)
|
|
828 |
{
|
|
829 |
OstTrace1( TRACE_PIPE, DDISABLED_PNSPEPDISABLEREQ_ENTRY, ">DDisabled::PnsPepDisableReq;aReq=%x", ( TUint )&( aReq ) );
|
|
830 |
C_TRACE( ( _T( "DDisabled::PnsPepDisableReq <->" ) ) );
|
|
831 |
TInt retVal = iPep.SendPepDisableResp(aReq);
|
|
832 |
OstTrace1( TRACE_PIPE, DDISABLED_PNSPEPDISABLEREQ_EXIT, "<DDisabled::PnsPepDisableReq;retVal=%d", retVal );
|
|
833 |
return retVal;
|
|
834 |
}
|
|
835 |
|
|
836 |
void DDisabled::PnsPipeDisabledInd(
|
|
837 |
// None
|
|
838 |
)
|
|
839 |
{
|
|
840 |
OstTrace0( TRACE_PIPE, DDISABLED_PNSPIPEDISABLEDIND_ENTRY, ">DDisabled::PnsPipeDisabledInd" );
|
|
841 |
|
|
842 |
C_TRACE( ( _T( "DDisabled::PnsPipeDisabledInd <->" ) ) );
|
|
843 |
C_TRACE( ( _T( "DDisabled::PnsPipeDisabledInd disabling already disabled pipe" ) ) );
|
|
844 |
|
|
845 |
}
|
|
846 |
|
|
847 |
//********************** DDisabling methods *******************/
|
|
848 |
DDisabling::DDisabling(
|
|
849 |
DPep& aPep
|
|
850 |
) :
|
|
851 |
DPipeState( aPep )
|
|
852 |
{
|
|
853 |
OstTrace1( TRACE_PIPE, DDISABLING_DDISABLING_ENTRY, "<>DDisabling::DDisabling;aPep=%x", ( TUint )&( aPep ) );
|
|
854 |
|
|
855 |
C_TRACE( ( _T( "DDisabling::DDisabling <->" ) ) );
|
|
856 |
|
|
857 |
}
|
|
858 |
|
|
859 |
void DDisabling::PnsPipeDisabledInd(
|
|
860 |
// None
|
|
861 |
)
|
|
862 |
{
|
|
863 |
OstTrace0( TRACE_PIPE, DDISABLING_PNSPIPEDISABLEDIND_ENTRY, ">DDisabling::PnsPipeDisabledInd" );
|
|
864 |
|
|
865 |
C_TRACE( ( _T( "DDisabling::PnsPipeDisabledInd ->" ) ) );
|
|
866 |
iPep.NextState( EDisabled );
|
|
867 |
C_TRACE( ( _T( "DDisabling::PnsPipeDisabledInd <-" ) ) );
|
|
868 |
|
|
869 |
OstTrace0( TRACE_PIPE, DDISABLING_PNSPIPEDISABLEDIND_EXIT, "<DDisabling::PnsPipeDisabledInd" );
|
|
870 |
}
|
|
871 |
|
|
872 |
void DDisabling::EnterState(
|
|
873 |
// None
|
|
874 |
)
|
|
875 |
{
|
|
876 |
OstTrace0( TRACE_PIPE, DDISABLING_ENTERSTATE_ENTRY, ">DDisabling::EnterState" );
|
|
877 |
|
|
878 |
C_TRACE( ( _T( "DDisabling::EnterState ->" ) ) );
|
|
879 |
iPep.PipeDisabling();
|
|
880 |
C_TRACE( ( _T( "DDisabling::EnterState <-" ) ) );
|
|
881 |
|
|
882 |
OstTrace0( TRACE_PIPE, DDISABLING_ENTERSTATE_EXIT, "<DDisabling::EnterState" );
|
|
883 |
}
|
|
884 |
|
|
885 |
void DDisabled::PnsPipeRedirectedInd(
|
|
886 |
// None
|
|
887 |
)
|
|
888 |
{
|
|
889 |
|
|
890 |
OstTrace0( TRACE_PIPE, DDISABLED_PNSPIPEREDIRECTEDIND_ENTRY, "<>DDisabled::PnsPipeRedirectedInd" );
|
|
891 |
C_TRACE( ( _T( "DDisabled::PnsPipeRedirectedInd <->" ) ) );
|
|
892 |
C_TRACE( ( _T( "DDisabled::PnsPipeRedirectedInd redirecting to disabled pipe" ) ) );
|
|
893 |
|
|
894 |
}
|
|
895 |
|
|
896 |
TInt DDisabled::PnsPepResetReq(
|
|
897 |
const TDesC8& aReq
|
|
898 |
)
|
|
899 |
{
|
|
900 |
|
|
901 |
OstTrace1( TRACE_PIPE, DDISABLED_PNSPEPRESETREQ_ENTRY, ">DDisabled::PnsPepResetReq;aReq=%x", ( TUint )&( aReq ) );
|
|
902 |
C_TRACE( ( _T( "DDisabled::PnsPepResetReq ->" ) ) );
|
|
903 |
ASSERT_RESET_ALWAYS( aReq.Length() > ( ISI_HEADER_SIZE + PNS_PIPE_RESET_REQ_OFFSET_PIPESTATEAFTERRESET ), EIADOverTheLimits | EIADFaultIdentifier33 << KFaultIdentifierShift );
|
|
904 |
const TUint8 stateAfter( aReq.Ptr()[ ISI_HEADER_SIZE + PNS_PIPE_RESET_REQ_OFFSET_PIPESTATEAFTERRESET ] );
|
|
905 |
TPipeState nextState( stateAfter == PN_PIPE_DISABLE ? EDisabledDisabled : EDisabledEnabled );
|
|
906 |
iPep.NextState( nextState );
|
|
907 |
TInt retVal = iPep.SendPepResetResp( aReq ); // TODO: Why-iiiiiiiiiiiii retval?
|
|
908 |
C_TRACE( ( _T( "DDisabled::PnsPepResetReq <-" ) ) );
|
|
909 |
OstTrace1( TRACE_PIPE, DDISABLED_PNSPEPRESETREQ_EXIT, "<DDisabled::PnsPepResetReq;retVal=%d", retVal );
|
|
910 |
return retVal;
|
|
911 |
|
|
912 |
}
|
|
913 |
|
|
914 |
TInt DEnabled::PnsPepResetReq(
|
|
915 |
const TDesC8& aReq
|
|
916 |
)
|
|
917 |
{
|
|
918 |
|
|
919 |
OstTrace1( TRACE_PIPE, DENABLED_PNSPEPRESETREQ_ENTRY, ">DEnabled::PnsPepResetReq;aReq=%x", ( TUint )&( aReq ) );
|
|
920 |
C_TRACE( ( _T( "DEnabled::PnsPepResetReq ->" ) ) );
|
|
921 |
ASSERT_RESET_ALWAYS( aReq.Length() > ( ISI_HEADER_SIZE + PNS_PIPE_RESET_REQ_OFFSET_PIPESTATEAFTERRESET ), EIADOverTheLimits | EIADFaultIdentifier34 << KFaultIdentifierShift );
|
|
922 |
const TUint8 stateAfter( aReq.Ptr()[ ISI_HEADER_SIZE + PNS_PIPE_RESET_REQ_OFFSET_PIPESTATEAFTERRESET ] );
|
|
923 |
TPipeState nextState( stateAfter == PN_PIPE_DISABLE ? EEnabledDisabled : EEnabledEnabled );
|
|
924 |
iPep.NextState( nextState );
|
|
925 |
TInt retVal = iPep.SendPepResetResp( aReq ); // TODO: Why-iiiiiiiiiiiii retval?
|
|
926 |
C_TRACE( ( _T( "DEnabled::PnsPepResetReq <-" ) ) );
|
|
927 |
OstTrace1( TRACE_PIPE, DENABLED_PNSPEPRESETREQ_EXIT, "<DEnabled::PnsPepResetReq;retVal=%d", retVal );
|
|
928 |
return retVal;
|
|
929 |
|
|
930 |
}
|
|
931 |
|
|
932 |
//TBR
|
|
933 |
DEnableEnabled::DEnableEnabled(DPep& aPep) : DEnabled( aPep )
|
|
934 |
{
|
|
935 |
OstTrace1( TRACE_PIPE, DENABLEENABLED_DENABLEENABLED_ENTRY, "<>DEnableEnabled::DEnableEnabled;aPep=%x", ( TUint )&( aPep ) );
|
|
936 |
C_TRACE( ( _T( "DEnableEnabled::DEnabledEnabled <->" ) ) );
|
|
937 |
}
|
|
938 |
|
|
939 |
void DEnableEnabled::EnterState()
|
|
940 |
{
|
|
941 |
OstTrace0( TRACE_PIPE, DENABLEENABLED_ENTERSTATE_ENTRY, ">DEnableEnabled::EnterState" );
|
|
942 |
C_TRACE( ( _T( "DEnableEnabled::EnterState ->" ) ) );
|
|
943 |
iPep.PipeEnableEnabled();
|
|
944 |
C_TRACE( ( _T( "DEnableEnabled::EnterState <-" ) ) );
|
|
945 |
OstTrace0( TRACE_PIPE, DENABLEENABLED_ENTERSTATE_EXIT, "<DEnableEnabled::EnterState" );
|
|
946 |
}
|
|
947 |
//TBR
|
|
948 |
|
|
949 |
//********************** DEnabled methods *******************/
|
|
950 |
DEnabled::DEnabled(DPep& aPep) : DPipeState( aPep )
|
|
951 |
{
|
|
952 |
OstTrace1( TRACE_PIPE, DENABLED_DENABLED_ENTRY, "<>DEnabled::DEnabled;aPep=%x", ( TUint )&( aPep ) );
|
|
953 |
C_TRACE( ( _T( "DEnabled::DEnabled <->" ) ) );
|
|
954 |
}
|
|
955 |
|
|
956 |
void DEnabled::EnterState()
|
|
957 |
{
|
|
958 |
OstTrace0( TRACE_PIPE, DENABLED_ENTERSTATE_ENTRY, ">DEnabled::EnterState" );
|
|
959 |
C_TRACE( ( _T( "DEnabled::EnterState <->" ) ) );
|
|
960 |
iPep.PipeEnabled();
|
|
961 |
OstTrace0( TRACE_PIPE, DENABLED_ENTERSTATE_EXIT, "<DEnabled::EnterState" );
|
|
962 |
}
|
|
963 |
|
|
964 |
TInt DEnabled::PnsPepDisableReq(
|
|
965 |
const TDesC8& aReq
|
|
966 |
)
|
|
967 |
{
|
|
968 |
|
|
969 |
OstTrace1( TRACE_PIPE, DENABLED_PNSPEPDISABLEREQ_ENTRY, ">DEnabled::PnsPepDisableReq;aReq=%x", ( TUint )&( aReq ) );
|
|
970 |
C_TRACE( ( _T( "DEnabled::PnsPepDisableReq ->" ) ) );
|
|
971 |
// TODO: Disabling for tx credits discarding
|
|
972 |
iPep.NextState( EDisabling );
|
|
973 |
C_TRACE( ( _T( "DEnabled::PnsPepDisableReq <-" ) ) );
|
|
974 |
TInt retVal = iPep.SendPepDisableResp( aReq );
|
|
975 |
OstTrace1( TRACE_PIPE, DENABLED_PNSPEPDISABLEREQ_EXIT, "<DEnabled::PnsPepDisableReq;retVal=%d", retVal );
|
|
976 |
return retVal;
|
|
977 |
|
|
978 |
}
|
|
979 |
|
|
980 |
TInt DEnabled::PnsPepEnableReq(const TDesC8& aReq)
|
|
981 |
{
|
|
982 |
|
|
983 |
OstTrace1( TRACE_PIPE, DENABLED_PNSPEPENABLEREQ_ENTRY, ">DEnabled::PnsPepEnableReq;aReq=%x", ( TUint )&( aReq ) );
|
|
984 |
C_TRACE( ( _T( "DEnabled::PnsPepEnableReq <->" ) ) );
|
|
985 |
TInt retVal = iPep.SendPepEnableResp(aReq);
|
|
986 |
OstTrace1( TRACE_PIPE, DENABLED_PNSPEPENABLEREQ_EXIT, "<DEnabled::PnsPepEnableReq;retVal=%d", retVal );
|
|
987 |
return retVal;
|
|
988 |
|
|
989 |
}
|
|
990 |
|
|
991 |
TInt DEnabled::RxPnsPipeData(const TDesC8& aData)
|
|
992 |
{
|
|
993 |
|
|
994 |
OstTrace1( TRACE_PIPE, DENABLED_RXPNSPIPEDATA_ENTRY, ">DEnabled::RxPnsPipeData;aData=%x", ( TUint )&( aData ) );
|
|
995 |
C_TRACE( ( _T( "DEnabled::RxPnsPipeData <->" ) ) );
|
|
996 |
TInt retVal = iPep.RxPipeData(aData);
|
|
997 |
OstTrace1( TRACE_PIPE, DENABLED_RXPNSPIPEDATA_EXIT, "<DEnabled::RxPnsPipeData;retVal=%d", retVal );
|
|
998 |
return retVal;
|
|
999 |
|
|
1000 |
}
|
|
1001 |
|
|
1002 |
TInt DEnabled::TxPnsPipeData(
|
|
1003 |
TDes8& aData
|
|
1004 |
)
|
|
1005 |
{
|
|
1006 |
|
|
1007 |
OstTrace1( TRACE_PIPE, DENABLED_TXPNSPIPEDATA_ENTRY, ">DEnabled::TxPnsPipeData;aData=%x", ( TUint )&( aData ) );
|
|
1008 |
C_TRACE( ( _T( "DEnabled::TxPnsPipeData <->" ) ) );
|
|
1009 |
TInt retVal = iPep.TxPipeData( aData );
|
|
1010 |
OstTrace1( TRACE_PIPE, DENABLED_TXPNSPIPEDATA_EXIT, "<DEnabled::TxPnsPipeData;retVal=%d", retVal );
|
|
1011 |
return retVal;
|
|
1012 |
|
|
1013 |
}
|
|
1014 |
|
|
1015 |
void DEnabled::PnsPipeEnabledInd()
|
|
1016 |
{
|
|
1017 |
|
|
1018 |
OstTrace0( TRACE_PIPE, DENABLED_PNSPIPEENABLEDIND_ENTRY, ">DEnabled::PnsPipeEnabledInd" );
|
|
1019 |
C_TRACE( ( _T( "DEnabled::PnsPipeEnabledInd ->" ) ) );
|
|
1020 |
TRACE_ASSERT_ALWAYS;
|
|
1021 |
C_TRACE( ( _T( "DEnabled::PnsPipeEnabledInd <-" ) ) );
|
|
1022 |
OstTrace0( TRACE_PIPE, DENABLED_PNSPIPEENABLEDIND_EXIT, "<DEnabled::PnsPipeEnabledInd" );
|
|
1023 |
|
|
1024 |
}
|
|
1025 |
|
|
1026 |
//********************** DEnabling methods *******************/
|
|
1027 |
DEnabling::DEnabling(DPep& aPep) : DPipeState( aPep )
|
|
1028 |
{
|
|
1029 |
OstTrace1( TRACE_PIPE, DENABLING_DENABLING_ENTRY, "<>DEnabling::DEnabling;aPep=%x", ( TUint )&( aPep ) );
|
|
1030 |
C_TRACE( ( _T( "DEnabling::DEnabling <->" ) ) );
|
|
1031 |
}
|
|
1032 |
|
|
1033 |
void DEnabling::PnsPipeEnabledInd()
|
|
1034 |
{
|
|
1035 |
|
|
1036 |
OstTrace0( TRACE_PIPE, DENABLING_PNSPIPEENABLEDIND_ENTRY, ">DEnabling::PnsPipeEnabledInd" );
|
|
1037 |
C_TRACE( ( _T( "DEnabling::PnsPipeEnabledInd ->" ) ) );
|
|
1038 |
iPep.NextState(EEnabled);
|
|
1039 |
C_TRACE( ( _T( "DEnabling::PnsPipeEnabledInd <-" ) ) );
|
|
1040 |
OstTrace0( TRACE_PIPE, DENABLING_PNSPIPEENABLEDIND_EXIT, "<DEnabling::PnsPipeEnabledInd" );
|
|
1041 |
}
|
|
1042 |
/////////////// /////////////////////////////////////////////////////
|
|
1043 |
// TODO: error to pipe spec: we need this in enabling state cause in redirect no enabled_ind is coming! Create and error!!
|
|
1044 |
////////////////////////////////////////////
|
|
1045 |
void DEnabling::PnsPipeRedirectedInd(
|
|
1046 |
// None
|
|
1047 |
)
|
|
1048 |
{
|
|
1049 |
OstTrace0( TRACE_PIPE, DENABLING_PNSPIPEREDIRECTEDIND_ENTRY, ">DEnabling::PnsPipeRedirectedInd" );
|
|
1050 |
|
|
1051 |
C_TRACE( ( _T( "DEnabling::PnsPipeRedirectedInd ->" ) ) );
|
|
1052 |
iPep.NextState( EEnabled );
|
|
1053 |
C_TRACE( ( _T( "DEnabling::PnsPipeRedirectedInd <-" ) ) );
|
|
1054 |
|
|
1055 |
OstTrace0( TRACE_PIPE, DENABLING_PNSPIPEREDIRECTEDIND_EXIT, "<DEnabling::PnsPipeRedirectedInd" );
|
|
1056 |
}
|
|
1057 |
|
|
1058 |
/////////////// /////////////////////////////////////////////////////
|
|
1059 |
// TODO: error to pipe spec: we need this in enabling state cause in redirect no enabled_ind is coming! Create and error!!
|
|
1060 |
////////////////////////////////////////////
|
|
1061 |
|
|
1062 |
|
|
1063 |
DEnabledEnabled::DEnabledEnabled(DPep& aPep) : DPipeState(aPep)
|
|
1064 |
{
|
|
1065 |
OstTrace1( TRACE_PIPE, DENABLEDENABLED_DENABLEDENABLED_ENTRY, "<>DEnabledEnabled::DEnabledEnabled;aPep=%x", ( TUint )&( aPep ) );
|
|
1066 |
C_TRACE( ( _T( "DEnabledEnabled::DEnabledEnabled <->" ) ) );
|
|
1067 |
}
|
|
1068 |
|
|
1069 |
void DEnabledEnabled::PnsPipeResetInd()
|
|
1070 |
{
|
|
1071 |
OstTrace0( TRACE_PIPE, DENABLEDENABLED_PNSPIPERESETIND_ENTRY, ">DEnabledEnabled::PnsPipeResetInd" );
|
|
1072 |
C_TRACE( ( _T( "DEnabledEnabled::PnsPipeResetInd ->" ) ) );
|
|
1073 |
//iPep.NextState( EEnabled );// TODO: to enabled?
|
|
1074 |
iPep.NextState( EEnableEnabled );
|
|
1075 |
C_TRACE( ( _T( "DEnabledEnabled::PnsPipeResetInd <-" ) ) );
|
|
1076 |
OstTrace0( TRACE_PIPE, DENABLEDENABLED_PNSPIPERESETIND_EXIT, "<DEnabledEnabled::PnsPipeResetInd" );
|
|
1077 |
}
|
|
1078 |
|
|
1079 |
DEnabledDisabled::DEnabledDisabled(DPep& aPep) : DPipeState(aPep)
|
|
1080 |
{
|
|
1081 |
OstTrace1( TRACE_PIPE, DENABLEDDISABLED_DENABLEDDISABLED_ENTRY, "<>DEnabledDisabled::DEnabledDisabled;aPep=%x", ( TUint )&( aPep ) );
|
|
1082 |
C_TRACE( ( _T( "DEnabledDisabled::DEnabledDisabled <->" ) ) );
|
|
1083 |
}
|
|
1084 |
|
|
1085 |
void DEnabledDisabled::EnterState()
|
|
1086 |
{
|
|
1087 |
OstTrace0( TRACE_PIPE, DENABLEDDISABLED_ENTERSTATE_ENTRY, "DEnabledDisabled::EnterState" );
|
|
1088 |
|
|
1089 |
C_TRACE( ( _T( "DEnabledDisabled::EnterState ->" ) ) );
|
|
1090 |
iPep.PipeDisabling();
|
|
1091 |
C_TRACE( ( _T( "DEnabledDisabled::EnterState <-" ) ) );
|
|
1092 |
|
|
1093 |
OstTrace0( TRACE_PIPE, DENABLEDDISABLED_ENTERSTATE_EXIT, "<DEnabledDisabled::EnterState" );
|
|
1094 |
}
|
|
1095 |
|
|
1096 |
void DEnabledDisabled::PnsPipeResetInd()
|
|
1097 |
{
|
|
1098 |
OstTrace0( TRACE_PIPE, DENABLEDDISABLED_PNSPIPERESETIND_ENTRY, ">DEnabledDisabled::PnsPipeResetInd>" );
|
|
1099 |
C_TRACE( ( _T( "DEnabledDisabled::PnsPipeResetInd ->" ) ) );
|
|
1100 |
iPep.NextState( EDisabled );
|
|
1101 |
C_TRACE( ( _T( "DEnabledDisabled::PnsPipeResetInd <-" ) ) );
|
|
1102 |
OstTrace0( TRACE_PIPE, DENABLEDDISABLED_PNSPIPERESETIND_EXIT, "<DEnabledDisabled::PnsPipeResetInd" );
|
|
1103 |
}
|
|
1104 |
|
|
1105 |
DDisabledEnabled::DDisabledEnabled(DPep& aPep) : DPipeState( aPep )
|
|
1106 |
{
|
|
1107 |
OstTrace1( TRACE_PIPE, DDISABLEDENABLED_DDISABLEDENABLED_ENTRY, "<>DDisabledEnabled::DDisabledEnabled;aPep=%x", ( TUint )&( aPep ) );
|
|
1108 |
C_TRACE( ( _T( "DDisabledEnabled::DDisabledEnabled <->" ) ) );
|
|
1109 |
}
|
|
1110 |
// TODO EnterState?
|
|
1111 |
void DDisabledEnabled::PnsPipeResetInd()
|
|
1112 |
{
|
|
1113 |
OstTrace0( TRACE_PIPE, DDISABLEDENABLED_PNSPIPERESETIND_ENTRY, ">DDisabledEnabled::PnsPipeResetInd>" );
|
|
1114 |
C_TRACE( ( _T( "DDisabledEnabled::PnsPipeResetInd ->" ) ) );
|
|
1115 |
iPep.NextState( EEnabled );
|
|
1116 |
C_TRACE( ( _T( "DDisabledEnabled::PnsPipeResetInd <-" ) ) );
|
|
1117 |
OstTrace0( TRACE_PIPE, DDISABLEDENABLED_PNSPIPERESETIND_EXIT, "<DDisabledEnabled::PnsPipeResetInd" );
|
|
1118 |
}
|
|
1119 |
|
|
1120 |
DDisabledDisabled::DDisabledDisabled(DPep& aPep) : DPipeState( aPep )
|
|
1121 |
{
|
|
1122 |
OstTrace1( TRACE_PIPE, DDISABLEDDISABLED_DDISABLEDDISABLED_ENTRY, "<>DDisabledDisabled::DDisabledDisabled;aPep=%x", ( TUint )&( aPep ) );
|
|
1123 |
C_TRACE( ( _T( "DDisabledDisabled::DDisabledDisabled <->" ) ) );
|
|
1124 |
}
|
|
1125 |
|
|
1126 |
void DDisabledDisabled::PnsPipeResetInd()
|
|
1127 |
{
|
|
1128 |
OstTrace0( TRACE_PIPE, DDISABLEDDISABLED_PNSPIPERESETIND_ENTRY, ">DDisabledDisabled::PnsPipeResetInd" );
|
|
1129 |
C_TRACE( ( _T( "DDisabledDisabled::PnsPipeResetInd ->" ) ) );
|
|
1130 |
iPep.NextState( EDisabled );
|
|
1131 |
C_TRACE( ( _T( "DDisabledDisabled::PnsPipeResetInd <-" ) ) );
|
|
1132 |
OstTrace0( TRACE_PIPE, DDISABLEDDISABLED_PNSPIPERESETIND_EXIT, "<DDisabledDisabled::PnsPipeResetInd" );
|
|
1133 |
}
|
|
1134 |
|
|
1135 |
//end of file
|