CommsFW::CCFModuleChannelHandler Class Reference

class CommsFW::CCFModuleChannelHandler : public CActive

Utility class to help holding a channelpair, listening for incoming messages and sending responses for CPMs needing a quick way to implement support for the basic messages Discover, Bind, Unbind and Shutdown. All the virtuals have default bodies so only those that require special treatment needs implementation.

Inherits from

Constructor & Destructor Documentation

CCFModuleChannelHandler(TInt)

IMPORT_C CCFModuleChannelHandler ( TInt aPriority ) [protected]

C'tor. Initialise the parent CActive .

Parameters

TInt aPriority

~CCFModuleChannelHandler()

IMPORT_C ~CCFModuleChannelHandler ( ) [protected]

D'tor. Dequeues this instance from the active scheduler.

Member Functions Documentation

CFChannelError(TInt)

IMPORT_C void CFChannelError ( TInt aError ) [protected, virtual]

Called when errors are encountered on using the channels. Does nothing but creating a log entry for [CommsFw,Warning]. Should be overridden if the module wants to supports handling of errors.

Parameters

TInt aError The errorcode.

CFMessageBind(const CommsFW::TCFBindMsg &)

IMPORT_C void CFMessageBind ( const CommsFW::TCFBindMsg & aMessage ) [protected, virtual]

Default implementation of the TCFBindMsg message. It will send a response indicating there is no submodules to bind to in this module. Should be overridden if sub-modules are present in the module.

Parameters

const CommsFW::TCFBindMsg & aMessage The Bind message which has been received from the Rootserver.

CFMessageDiscover(const CommsFW::TCFDiscoverMsg &)

IMPORT_C void CFMessageDiscover ( const CommsFW::TCFDiscoverMsg & aMessage ) [protected, virtual]

Default implementation of the TCFDiscoverMsg message. It will send a response indicating there is no sub-modules in this module. Should be overridden if sub-modules are present in the module.

Parameters

const CommsFW::TCFDiscoverMsg & aMessage The Discovery message which has been received from the Rootserver.

CFMessageForward(const CommsFW::TCFForwardMsg &)

IMPORT_C void CFMessageForward ( const CommsFW::TCFForwardMsg & aMessage ) [protected, virtual]

Default implementation of the CFMessageForward message. it will do nothing. Should be overridden if the module supports Message Forwarding.

Parameters

const CommsFW::TCFForwardMsg & aMessage The Forward message which has been received from the Rootserver.

CFMessageShutdown(const CommsFW::TCFShutdownMsg &)

IMPORT_C void CFMessageShutdown ( const CommsFW::TCFShutdownMsg & aMessage ) [protected, virtual]

Default implementation of the TCFShutdownMsg message. it will do nothing. Should be overridden if the module supports Shutdown.

Parameters

const CommsFW::TCFShutdownMsg & aMessage The Shutdown message which has been received from the Rootserver.

CFMessageUnbind(const CommsFW::TCFUnbindMsg &)

IMPORT_C void CFMessageUnbind ( const CommsFW::TCFUnbindMsg & aMessage ) [protected, virtual]

Default implementation of the TCFUnbindMsg message. It will send a response indicating there is no submodules to unbind from in this module. Should be overridden if sub-modules are present in the module.

Parameters

const CommsFW::TCFUnbindMsg & aMessage The Unbind message which has been received from the Rootserver.

CFMessageUnknown(const CommsFW::TCFMessage &)

IMPORT_C void CFMessageUnknown ( const CommsFW::TCFMessage & aMessage ) [protected, virtual]

Default implementation for handling unknown messages. it will do nothing. Should be overridden if the module wants to implement some handling for receiving unknown messages.

Parameters

const CommsFW::TCFMessage & aMessage The message which has been received from the Rootserver.

ConstructL(CommsFW::RCFChannel::TMsgQueues &, CommsFW::RCFChannel::TMsgQueues &)

IMPORT_C void ConstructL ( CommsFW::RCFChannel::TMsgQueues & aRxQueues,
CommsFW::RCFChannel::TMsgQueues & aTxQueues
) [protected]

Second level constructor, must be called from derived implementations or the module will PANIC when attempting to use the channels.

Parameters

CommsFW::RCFChannel::TMsgQueues & aRxQueues Queues on which to listen for incoming messages.
CommsFW::RCFChannel::TMsgQueues & aTxQueues Queues on which to send outgoing messages.

DoCancel()

IMPORT_C void DoCancel ( ) [private, virtual]

Cancel function, will be called during destruction. Closes the channels contained.

RunL()

IMPORT_C void RunL ( ) [private, virtual]

Receive a message and register for listening for more data on the incoming channel. wants to supports handling of errors.

Send(const CommsFW::TCFMessage &)

IMPORT_C TInt Send ( const CommsFW::TCFMessage & aMessage ) [protected]

Send a message on the outgoing channel, blocks until the message has been sent. The rootserver is expected to run at high priority and retrieve pending messages quickly, also this exchange usually only happens at module startup and shutdown so it can usually be considered safe to block here.

Parameters

const CommsFW::TCFMessage & aMessage Message to send on the outgoing channel.

Member Data Documentation

CommsFW::RCFChannelPair iChannelPair

CommsFW::RCFChannelPair iChannelPair [private]