Intersystem Tranceiver/mtrxmuxif.h
author Arnaud Lenoir
Mon, 13 Sep 2010 13:27:05 +0100
changeset 24 8352b635bf00
parent 0 bb4b476bbb96
permissions -rw-r--r--
FYI - READ ONLY - Updated SHAI_public_APIs-status.xlsx. contact arnaudl@symbian.org for any changes you want.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     1
/*
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     2
  mtrxmuxif.h
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     3
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     4
  Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     5
  All rights reserved.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     6
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     7
  This program and the accompanying materials are made available 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     8
  under the terms of the Eclipse Public License v1.0 which accompanies 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     9
  this distribution, and is available at 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    10
  http://www.eclipse.org/legal/epl-v10.html
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    11
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    12
  Initial Contributors:
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    13
  Nokia Corporation - initial contribution.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    14
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    15
  Contributors:
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    16
*/
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    17
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    18
/** @mtrxmuxif.h
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    19
@brief Abstract interface class. Part of IST API.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    20
@publishedDeviceAbstraction
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    21
*/
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    22
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    23
#ifndef __MTRXMUXIF_H__
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    24
#define __MTRXMUXIF_H__
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    25
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    26
// Include files
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    27
#include <e32def.h>         // For TInt
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    28
#include <e32cmn.h>         // For TDes8
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    29
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    30
// Macros
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    31
/*
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    32
A equals to asserted value and b equals to TMultiplexerFault codes. 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    33
*/
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    34
#define MUX_ASSERT_FAULT_MACRO( a, b ) if( !( a ) ){ Kern::Fault("mtrxmuxif:", b ); }
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    35
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    36
// Forward declarations
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    37
class MMuxTrxIf;
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    38
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    39
/**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    40
@brief Abstract interface class to use multiplexer services.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    41
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    42
Interface implemented by multiplexer and used from transceiver.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    43
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    44
Class is used for registering and unregistering transceiver to multiplexer.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    45
Class is used for receiving data from transceiver to multiplexer.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    46
Class is used for deallocating over the interconnection transmitted datas memory block.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    47
*/
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    48
class MTrxMuxIf
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    49
    {
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    50
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    51
    public:
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    52
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    53
        /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    54
        Interface functions fault values.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    55
        */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    56
        enum TMultiplexerFault
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    57
           {
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    58
           ENotKernelThreadContext     = 1,
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    59
           ENullTrxPointer,
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    60
           EInvalidTrxId,
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    61
           ETrxAlreadyRegistered,
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    62
           ETrxNotRegistered,
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    63
           EInvalidMuxingHeader,
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    64
           EInvalidSize,
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    65
           };
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    66
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    67
        /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    68
        Allocates a memory block for data receiving over the interconnection.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    69
        Blocks descriptor length is set to zero, but maximum length can be bigger
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    70
        than size given as parameter (it depends on memory block configurations).
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    71
        Memory content of the descriptor is filled with zeros until maximum length.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    72
        Memory allocated for the block is physically contigous and non cached.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    73
        Note! Transceiver shall register before with MTrxMuxIf::Register.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    74
        Note! Transceiver shall transfer the data block to multiplexer before with MTrxMuxIf::Receive.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    75
        If not called in kernel thread context fault ENotKernelThreadContext thrown with MUX_ASSERT_FAULT_MACRO.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    76
        If size is zero, fault EInvalidSize thrown with MUX_ASSERT_FAULT_MACRO.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    77
        Execution:          Synchronous
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    78
        Re-entrant:         No
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    79
        Can block:          Yes
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    80
        Panic mode:         Kern::Fault
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    81
        Memory allocation:  No
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    82
        Execution time:     Quick
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    83
        SMP safe:           Yes
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    84
        @param aSize 16-bit minimum size of the needed data block
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    85
        @return reference to allocated block
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    86
        @pre Called always in kernel thread context
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    87
        @pre No fastmutex held
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    88
        @post Calling thread not blocked
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    89
        */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    90
        virtual TDes8& AllocateBlock( const TUint16 aSize ) = 0;
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    91
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    92
        /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    93
        Deallocates a memory block transmitted over the interconnection.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    94
        Note! Transceiver shall register before with MTrxMuxIf::Register.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    95
        Note! Transceiver shall receive the block before with MMuxTrxIf::Transmit.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    96
        If not called in kernel thread context fault ENotKernelThreadContext thrown with MUX_ASSERT_FAULT_MACRO.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    97
        Execution:          Synchronous
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    98
        Re-entrant:         No
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    99
        Can block:          Yes
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   100
        Panic mode:         Kern::Fault
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   101
        Memory allocation:  No
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   102
        Execution time:     Quick
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   103
        SMP safe:           Yes
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   104
        @param aBlock reference to block to be deallocated
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   105
        @return void
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   106
        @pre Called always in kernel thread context
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   107
        @pre No fastmutex held
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   108
        @post Calling thread not blocked
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   109
        */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   110
        virtual void DeallocateBlock( TDes8& aBlock ) = 0;
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   111
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   112
        /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   113
        Transfers data received over the interconnection from transceiver to multiplexer.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   114
        Transceiver is responsible of allocating the data block and giving correct 32-bit multiplexing protocol header.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   115
        Multiplexer is responsible of multiplexing and deallocating the transferred data block.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   116
        Note! Transceiver shall register before with MTrxMuxIf::Register.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   117
        Note! Transceiver shall allocate the block before with MTrxMuxIf::AllocateBlock.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   118
        If not called in kernel thread context fault ENotKernelThreadContext thrown with MUX_ASSERT_FAULT_MACRO.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   119
        If invalid multiplexing protocol header fault EInvalidMuxingHeader thrown with MUX_ASSERT_FAULT_MACRO.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   120
        If invalid lenght either in data or in multiplexing protocol header fault EInvalidSize thrown with MUX_ASSERT_FAULT_MACRO.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   121
        Execution:          Synchronous
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   122
        Re-entrant:         No
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   123
        Can block:          Yes
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   124
        Panic mode:         Kern::Fault
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   125
        Memory allocation:  No
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   126
        Execution time:     Quick
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   127
        SMP safe:           Yes
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   128
        @param aData reference to received data
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   129
        @param aMuxingHeader multiplexing protocol header formulated by other systems multiplexer
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   130
        @return void
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   131
        @pre Called always in kernel thread context
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   132
        @pre No fastmutex held
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   133
        @post Calling thread not blocked
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   134
        */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   135
        virtual void Receive( TDes8& aData, const TUint32 aMuxingHeader ) = 0;
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   136
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   137
        /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   138
        Registers a transceiver to multiplexer and returns an interface to it.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   139
        Transceiver shall call this function when interconnection to other system becomes functional.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   140
        Note! Multiplexer shall be initialized before.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   141
        If not called in kernel thread context fault ENotKernelThreadContext thrown with MUX_ASSERT_FAULT_MACRO.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   142
        If aTrx is NULL fault ENullTrxPointer thrown with MUX_ASSERT_FAULT_MACRO.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   143
        If aTrxId is invalid fault EInvalidTrxId thrown with MUX_ASSERT_FAULT_MACRO.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   144
        If transceiver is already registered fault ETrxAlreadyRegistered thrown with MUX_ASSERT_FAULT_MACRO.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   145
        Execution:          Synchronous
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   146
        Re-entrant:         No
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   147
        Can block:          Yes
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   148
        Panic mode:         Kern::Fault
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   149
        Memory allocation:  Yes
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   150
        Execution time:     Quick
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   151
        SMP safe:           Yes
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   152
        @param aTrx, pointer to transceiver
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   153
        @param aTrxId, transceiver unique identifier (from trxdefs.h)
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   154
        @return pointer to multiplexer interface
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   155
        @pre Called always in kernel thread context
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   156
        @pre No fastmutex held
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   157
        @post Calling thread not blocked
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   158
        */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   159
        IMPORT_C static MTrxMuxIf* Register( MMuxTrxIf* aTrx, const TUint8 aTrxId );
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   160
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   161
        /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   162
        Unregisters transceiver
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   163
        Transceiver shall call this function when interconnection to other system becomes non-functional.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   164
        Note! Transceiver shall register before with MTrxMuxIf::Register.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   165
        If not called in kernel thread context fault ENotKernelThreadContext thrown with MUX_ASSERT_FAULT_MACRO.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   166
        If transceiver is not registered fault ETrxNotRegistered thrown with MUX_ASSERT_FAULT_MACRO.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   167
        Execution:          Synchronous
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   168
        Re-entrant:         No
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   169
        Can block:          Yes
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   170
        Panic mode:         Kern::Fault
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   171
        Memory allocation:  No
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   172
        Execution time:     Quick
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   173
        SMP safe:           Yes
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   174
        @return void
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   175
        @pre Called always in kernel thread context
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   176
        @pre No fastmutex held
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   177
        @post Calling thread not blocked
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   178
        */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   179
        virtual void Unregister() = 0;
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   180
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   181
    };
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   182
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
   183
#endif // __MTRXMUXIF_H__