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_CCCFModuleChannelHandler(TIntaPriority)[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 voidCFChannelError(TIntaError)[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 aErrorThe errorcode.

CFMessageBind(const CommsFW::TCFBindMsg &)

IMPORT_C voidCFMessageBind(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 & aMessageThe Bind message which has been received from the Rootserver.

CFMessageDiscover(const CommsFW::TCFDiscoverMsg &)

IMPORT_C voidCFMessageDiscover(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 & aMessageThe Discovery message which has been received from the Rootserver.

CFMessageForward(const CommsFW::TCFForwardMsg &)

IMPORT_C voidCFMessageForward(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 & aMessageThe Forward message which has been received from the Rootserver.

CFMessageShutdown(const CommsFW::TCFShutdownMsg &)

IMPORT_C voidCFMessageShutdown(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 & aMessageThe Shutdown message which has been received from the Rootserver.

CFMessageUnbind(const CommsFW::TCFUnbindMsg &)

IMPORT_C voidCFMessageUnbind(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 & aMessageThe Unbind message which has been received from the Rootserver.

CFMessageUnknown(const CommsFW::TCFMessage &)

IMPORT_C voidCFMessageUnknown(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 & aMessageThe message which has been received from the Rootserver.

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

IMPORT_C voidConstructL(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 & aRxQueuesQueues on which to listen for incoming messages.
CommsFW::RCFChannel::TMsgQueues & aTxQueuesQueues on which to send outgoing messages.

DoCancel()

IMPORT_C voidDoCancel()[private, virtual]

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

RunL()

IMPORT_C voidRunL()[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 TIntSend(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 & aMessageMessage to send on the outgoing channel.

Member Data Documentation

CommsFW::RCFChannelPair iChannelPair

CommsFW::RCFChannelPair iChannelPair[private]