205 const TUint32 aMuxPacket |
205 const TUint32 aMuxPacket |
206 ) |
206 ) |
207 { |
207 { |
208 |
208 |
209 C_TRACE( ( _T( "DMux::Receive this 0x%x id %d msg 0x%x aMuxId 0x%x>" ), this, iShTrxId, &aMsg, aMuxPacket ) ); |
209 C_TRACE( ( _T( "DMux::Receive this 0x%x id %d msg 0x%x aMuxId 0x%x>" ), this, iShTrxId, &aMsg, aMuxPacket ) ); |
210 const TUint8 protocolId = static_cast<TUint8>( aMuxPacket >> 24 ); // TODO macro |
210 const TUint8 protocolId = static_cast<TUint8>( aMuxPacket >> 24 ); |
211 Kern::Printf( "protocolId=0x%x", protocolId );// TODO TBR (ToBeRemoved) |
211 C_TRACE( ( _T( "DMux::Receive this 0x%x id %d msg 0x%x aMuxId 0x%x protocolId 0x%x" ), this, iShTrxId, &aMsg, aMuxPacket, protocolId ) ); |
212 __ASSERT_NO_FAST_MUTEX; |
212 __ASSERT_NO_FAST_MUTEX; |
213 MUX_ASSERT_FAULT_MACRO( ( protocolId < EMuxAmountOfProtocols ), MTrxMuxIf::EInvalidMuxingHeader ); |
213 MUX_ASSERT_FAULT_MACRO( ( protocolId < EMuxAmountOfProtocols ), MTrxMuxIf::EInvalidMuxingHeader ); |
214 MUX_ASSERT_FAULT_MACRO( ( ISTAPI_ASSERT_KERNEL_THREAD_CONTEXT_ALWAYS ), MTrxMuxIf::ENotKernelThreadContext ); |
214 MUX_ASSERT_FAULT_MACRO( ( ISTAPI_ASSERT_KERNEL_THREAD_CONTEXT_ALWAYS ), MTrxMuxIf::ENotKernelThreadContext ); |
215 // TODO ( aMsg.Length() != protocollenght) |
215 // ( aMsg.Length() != protocollenght) |
216 NKern::FMWait( iFastMutex ); |
216 NKern::FMWait( iFastMutex ); |
217 MMuxLinkIf* link = iShLinks[ protocolId ]; |
217 MMuxLinkIf* link = iShLinks[ protocolId ]; |
218 NKern::FMSignal( iFastMutex ); |
218 NKern::FMSignal( iFastMutex ); |
219 ASSERT_RESET_ALWAYS( ( link ), ( EMuxNullPtr | EDMuxTraceId << KClassIdentifierShift ) ); |
219 ASSERT_RESET_ALWAYS( ( link ), ( EMuxNullPtr | EDMuxTraceId << KClassIdentifierShift ) ); |
220 link->Receive( aMsg ); |
220 link->Receive( aMsg ); |
251 const TMessageSendPriority aPriority |
251 const TMessageSendPriority aPriority |
252 ) |
252 ) |
253 { |
253 { |
254 |
254 |
255 C_TRACE( ( _T( "DMux::Send this 0x%x id %d msg 0x%x aLinkId 0x%x priority %d <>" ), this, iShTrxId, &aMsg, aLinkId, aPriority ) ); |
255 C_TRACE( ( _T( "DMux::Send this 0x%x id %d msg 0x%x aLinkId 0x%x priority %d <>" ), this, iShTrxId, &aMsg, aLinkId, aPriority ) ); |
256 TUint32 muxId = static_cast<TUint32>( aMsg.Length() | aLinkId << 24 ); // TODO macro |
256 TUint32 muxId = static_cast<TUint32>( aMsg.Length() | aLinkId << 24 ); |
257 Kern::Printf( "muxId=0x%x", muxId );//TODO TBR |
257 C_TRACE( ( _T( "DMux::Send this 0x%x id %d msg 0x%x aLinkId 0x%x priority %d muxId 0x%x<>" ), this, iShTrxId, &aMsg, aLinkId, aPriority, muxId ) ); |
258 ASSERT_RESET_ALWAYS( ( iShTrx ), ( EMuxNullPtr2 | EDMuxTraceId << KClassIdentifierShift ) ); |
258 ASSERT_RESET_ALWAYS( ( iShTrx ), ( EMuxNullPtr2 | EDMuxTraceId << KClassIdentifierShift ) ); |
259 iShTrx->Transmit( aMsg, (MMuxTrxIf::TDataTransmitPriority) aPriority, muxId ); |
259 iShTrx->Transmit( aMsg, (MMuxTrxIf::TDataTransmitPriority) aPriority, muxId ); |
260 |
260 |
261 } |
261 } |
262 |
262 |