BasebandChannelAdaptation::MBca Class Reference

class BasebandChannelAdaptation::MBca

The abstract interface between NIF and Bearer Transport. The client (caller) of MBca is the one conceptually living in a specific Comms Stack layer and it is entirely responsible for implementing the function of that layer as imposed by the respective protocol technology. On the contrary, the MBca is merely a HAI (Hardware Abstraction Interface) and its implementation is protocol/technology agnostic. This means that the MBca is solely responsible for passing (entire) data frames between its caller and the bearer transport as well as for propagating error conditions towards the client and for propagating flow control conditions in both directions.

Member Functions Documentation

CancelIoctl()

void CancelIoctl ( ) [pure virtual]

Cancels the pending Ioctl request with KErrCancel.

CancelRead()

void CancelRead ( ) [pure virtual]

Cancels the pending read request with KErrCancel.

CancelWrite()

void CancelWrite ( ) [pure virtual]

Cancels the pending write request with KErrCancel.

Close()

void Close ( ) [pure virtual]

Close is a "emergency"/synchronous termination which closes the BCA immediately. Informs the BCA is no longer required by the client. The method is the logical reverse operation to Open(). Close cancels all pending asynchronous requests with KErrCancel.

Ioctl(TRequestStatus &, TUint, TUint, TDes8 &)

void Ioctl ( TRequestStatus & aStatus,
TUint aOptLevel,
TUint aOptName,
TDes8 & aOpt
) [pure virtual]

The BCA control function,gets or sets the information of the BCA in an asynchronous manner.

Parameters

TRequestStatus & aStatus complete status, KErrNone if succesful, system-wide error code otherwise. All errors reported are fatal (the MBca became defunct and can no loger be used to send and receive data) except KErrNotSupported, no functionality provided and KErrAlreadyExists.
TUint aOptLevel option level to be used.
TUint aOptName option name to be used.
TDes8 & aOpt an optional parameter,holds the option value on return or the option value to be set.

Open(TRequestStatus &, const TDesC &)

void Open ( TRequestStatus & aStatus,
const TDesC & aChannelId
) [pure virtual]

Informs that the BCA is required by the client(for instance, Raw IP NIF)

Parameters

TRequestStatus & aStatus complete status, KErrNone if succesful, system-wide error code otherwise. All other error codes reported are fatal (denoting the MBca interface has failed to open and is not good for transferring data) including KErrCancel if request cancelled.
const TDesC & aChannelId an optional parameter, used to open the BCA. It is implementation dependent, It can be empty descriptor when it is not used.

Read(TRequestStatus &, TDes8 &)

void Read ( TRequestStatus & aStatus,
TDes8 & aBuf
) [pure virtual]

Queues a Read, reads data from underlying baseband channel. Used for for uplink flow control, i.e. the client will refrain from calling MBca::Read if in a flow off condition.

Note:

the client must not modify the buffer until this call is completed.

Parameters

TRequestStatus & aStatus complete status, KErrNone if succesful, system-wide error code otherwise. All other errors reported are fatal (the MBca became defunct and can no loger be used to send and receive data) except KErrCancel if request cancelled and KErrNoMemory, KErrCommsParity, KErrCommsOverrun, KErrCommsFrame, in which case the MBca stays functional and is only reporting failure to read the next frame. The caller may attempt to Read again.
TDes8 & aBuf buffer for data to be read. The caller owns the buffer and is responsible for keeping its reference valid at least until the MBca::Read call is completed. The caller is responsible for supplying a large enough buffer for the MBca implementation to fit the entire pending frame. If the caller fails to supply a large enough buffer, the MBca implementation is free to error the Read with KErrNoMemory.

Release()

void Release ( ) [pure virtual]

Deletes the allocated data in BCA the MBca implementation and all resources it owns. The method is the logical reverse operation to MBcaFactory::NewBcaL()

Shutdown(TRequestStatus &)

void Shutdown ( TRequestStatus & aStatus ) [pure virtual]

Shutdown is a graceful, asynchronous termination which can take some time. It is called under normal stop cases. Informs the BCA is no longer required by the client and can release its resources. The method is the logical reverse operation to Open(). Shutdown cancels all other pending asynchronous requests with KErrCancel.

Parameters

TRequestStatus & aStatus complete status, KErrNone if succesful KErrCancel if request cancelled.

Write(TRequestStatus &, const TDesC8 &)

void Write ( TRequestStatus & aStatus,
const TDesC8 & aBuf
) [pure virtual]

Queues a Write, write data to underlying baseband channel. Used for downlink flow control. The MBca implementation will not complete a pending Write if in flow off condition.

Note:

the client must not modify the buffer until this call is completed.

Parameters

TRequestStatus & aStatus the complete status, KErrNone if succesful, system-wide error code otherwise. All errors reported are fatal (the MBca became defunct and can no loger be used to send and receive data) except KErrCancel if request cancelled and KErrNoMemory and KErrNotReady, in which case the MBca implementation indicates the failure to send the current frame. The caller may drop or resend the current packet depending on its logic.
const TDesC8 & aBuf the buffer to sent. The caller owns the buffer and is responsible for keeping its reference valid at least until the MBca::Write call is completed.