CommsFW::TCFMessageBase Class Reference

class CommsFW::TCFMessageBase

Base class for all Comms Framework messages. Contains the message code and the fixed size parameter buffer. This class is meant to be derived to set and get parameters in the buffer. The parameter layout is defined in the derived classes. Note: Derived message classes must not add data members or virtual funcions : the channel mechanism deliberately uses fixed size non-virtual classes efficiency gains.

Nested Classes and Structures

Constructor & Destructor Documentation

TCFMessageBase(TCode, TInt, TAny *)

TCFMessageBase ( TCode aCode,
TInt aParamBlockSize,
TAny * aParamBlock
) [protected, inline]
Copy a piece of memory to the message parameter block and set the message code.
panic
ECFChanMsgTooBig

Parameters

TCode aCode Code to to set in the message code.
TInt aParamBlockSize Size, in octets, of memory area to copy.
TAny * aParamBlock Pointer to memory area to copy.

TCFMessageBase(TInt, const TAny *)

TCFMessageBase ( TInt aRawBlockSize,
const TAny * aRawBlock
) [protected, inline]
Copy a piece of memory to the message parameter block and set the message code.
panic
ECFChanMsgTooBig

Parameters

TInt aRawBlockSize Size, in octets, of memory area to copy.
const TAny * aRawBlock Pointer to memory area to copy.

TCFMessageBase()

TCFMessageBase ( ) [protected, inline]

C'tor. Sets the message code to an invalid value, ensuring that the message cannot be sent on a channel unless the message code is set to a valid code, e.g. by a deriving class.

Member Functions Documentation

Code()

TCode Code ( ) const [inline]

Code(TCode)

void Code ( TCode ) [inline]

Parameters

TCode Code to to set in the message code.

IsPIGCode()

TBool IsPIGCode ( ) const [inline]

MaxParamBlockSize()

TInt MaxParamBlockSize ( ) [static, inline]

ParamBlock()

TUint8 * ParamBlock ( ) [inline]

ParamBlock()

const TUint8 * ParamBlock ( ) const [inline]

ParamBlock(TInt, TAny *)

void ParamBlock ( TInt aParamBlockSize,
TAny * aParamBlock
) [inline]
Copy a piece of memory to the message parameter block.
panic
ECFChanMsgTooBig

Parameters

TInt aParamBlockSize Size, in octets, of memory area to copy.
TAny * aParamBlock Pointer to memory area to copy.

RawBlock()

TUint8 * RawBlock ( ) [inline]

RawBlock()

const TUint8 * RawBlock ( ) const [inline]

RawBlock(TInt, const TAny *)

void RawBlock ( TInt aRawBlockSize,
const TAny * aRawBlock
) [inline]
Copy a piece of memory to the raw message block.
panic
ECFChanMsgTooBig

Parameters

TInt aRawBlockSize Size, in octets, of memory area to copy.
const TAny * aRawBlock Pointer to memory area to copy.

SetPIGCode()

void SetPIGCode ( ) [inline]

Sets the code of the message to type EPIG. This is the message type used for closing channels. It is guaranteed that no messages can be sent on a channel after a PIG message has been sent, thus this is ideal for controlled closing of channels using, avoiding data loss, e.g. using the CloseGracefully() member.

Member Type Definitions Documentation

Typedef TCode

typedef TInt TCode

Member Data Documentation

union CommsFW::TCFMessageBase::TCFMessageData iMsg

union CommsFW::TCFMessageBase::TCFMessageData iMsg [private]