CHCICommandQItem Class Reference

class CHCICommandQItem : public CBase

Encapsulates a Command frame so that it can be placed on and handled by the CHCICmdQController .

The class is designed to be used by the Command Queue Controller

CHCICmdQController

Inherits from

Public Member Functions
~CHCICommandQItem ()
void CancelCompletionTimer ()
IMPORT_C MHCICommandQueueClient * Client ()
IMPORT_C CHCICommandBase & Command ()
TUint CommandQId ()
void CommandSent ()
void DetachClient ()
TBool DuplicatedOpcode ()
void FormatFrame ()
CHctlCommandFrame & Frame ()
IMPORT_C TBool IsInitialisation ()
IMPORT_C TBool IsNormal ()
IMPORT_C TBool IsParent ()
IMPORT_C TBool IsPostChild ()
IMPORT_C TBool IsPreChild ()
IMPORT_C CHCICommandQItem * NewL ( MHCICommandAllocator &, MHCICommandQueueClient &, CHCICommandBase *)
IMPORT_C TAny * QdpData ()
IMPORT_C TBool ReceivedCmdStatusEvent ()
IMPORT_C TUint SentCount ()
void SetCommandQId ( TUint )
void SetDuplicatedOpcode ( TBool )
void SetInitialisationCmd ()
IMPORT_C void SetQdpData ( TAny *)
void SetReceivedCmdStatusEvent ( TBool )
void SetType ( TType )
void StartCompletionTimer ( TUint , CHCICmdQController &)
TType Type ()
Private Member Functions
CHCICommandQItem ( MHCICommandQueueClient &, CHCICommandBase *)
void ConstructL ( MHCICommandAllocator &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enum TType { EIndeterminate  = 0, ENormal  = 1, EParent  = 2, EPreChild  = 3, EPostChild  = 4 }
Private Member Enumerations
enum TCommandStateBits { EReceivedCmdStatusEvent  = 0x01, EDuplicatedOpcode  = 0x02, EInitialisationCmd  = 0x04 }
Private Attributes
CHctlCommandFrame * iCmdFrame
MHCICommandQueueClient * iCmdProgressRecipient
CHCICommandBase * iCommand
TUint iCommandQId
TUint8 iCommandState
CHCICmdQCompletionTimer * iCompletionTimer
TDblQueLink iLink
TAny * iQdpData
TUint8 iSentCounter
TType iType

Constructor & Destructor Documentation

CHCICommandQItem(MHCICommandQueueClient &, CHCICommandBase *)

CHCICommandQItem ( MHCICommandQueueClient & aCmdProgressRecipient,
CHCICommandBase * aCommand
) [private]

Constructor

Parameters

MHCICommandQueueClient & aCmdProgressRecipient
CHCICommandBase * aCommand

~CHCICommandQItem()

IMPORT_C ~CHCICommandQItem ( )

Member Functions Documentation

CancelCompletionTimer()

void CancelCompletionTimer ( )

Cancels iCompletionTimer.

Client()

IMPORT_C MHCICommandQueueClient * Client ( ) const

Getter for the client to be notified of the progress of the command

Command()

IMPORT_C CHCICommandBase & Command ( ) const

Const getter for the Command encapsulated in the object.

CommandQId()

TUint CommandQId ( ) const

This isn't exported since only the CHCICmdQController will use the ID.

CommandSent()

void CommandSent ( )

This isn't exported since only the CHCICmdQController will set the send status flags.

ConstructL(MHCICommandAllocator &)

void ConstructL ( MHCICommandAllocator & aCommandAllocator ) [private]

Constructor

Parameters

MHCICommandAllocator & aCommandAllocator

DetachClient()

void DetachClient ( )

Detaches the client callback interface from the command on the queue.

DuplicatedOpcode()

TBool DuplicatedOpcode ( ) const

This isn't exported since only the CHCICmdQController will use the EDuplicatedOpcode flag.

FormatFrame()

void FormatFrame ( )

Instructs this object to format iCmdFrame with the parameters in iCommand.

Frame()

CHctlCommandFrame & Frame ( ) const

This isn't exported since only the CHCICmdQController will use the Frame. Getter for the command frame object that is associated with this queue item.

IsInitialisation()

IMPORT_C TBool IsInitialisation ( ) const

Return if the command associated with this queue item was added to the command queue as an initialisation command.

IsNormal()

IMPORT_C TBool IsNormal ( ) const

Return if the command associated with this queue item is a Normal command, i.e. one that doesn't require a workaround and isn't itself a Child command.

IsParent()

IMPORT_C TBool IsParent ( ) const

Return if the command associated with this queue item is a Parent command, i.e. one that has pre and/or post child commands.

IsPostChild()

IMPORT_C TBool IsPostChild ( ) const

Return if the command associated with this queue item is a Post-Child command, i.e. one that has Parent command.

IsPreChild()

IMPORT_C TBool IsPreChild ( ) const

Return if the command associated with this queue item is a Pre-Child command, i.e. one that has Parent command.

NewL(MHCICommandAllocator &, MHCICommandQueueClient &, CHCICommandBase *)

IMPORT_C CHCICommandQItem * NewL ( MHCICommandAllocator & aCommandAllocator,
MHCICommandQueueClient & aCmdProgressRecipient,
CHCICommandBase * aCommand
) [static]

Static factory method for HCI Command Queue items.

Parameters

MHCICommandAllocator & aCommandAllocator the HCI commmand frame allocator.
MHCICommandQueueClient & aCmdProgressRecipient the HCI event notification client.
CHCICommandBase * aCommand the HCI command to be processed. Ownership of the command is transferred to the created HCI Command Queue item object.

QdpData()

IMPORT_C TAny * QdpData ( ) const

Getter for the pointer to the QDP specific data associated with the queue item.

ReceivedCmdStatusEvent()

IMPORT_C TBool ReceivedCmdStatusEvent ( ) const

Return if a Command Status event has been received that matches the command associated with this command queue item.

SentCount()

IMPORT_C TUint SentCount ( ) const

Return the total number of times the command associated with this queue item has been sent.

SetCommandQId(TUint)

void SetCommandQId ( TUint aId )

This isn't exported since only the CHCICmdQController will use the ID.

Parameters

TUint aId the command queue ID for this object

SetDuplicatedOpcode(TBool)

void SetDuplicatedOpcode ( TBool aDuplicatedOpcode )

This isn't exported since only the CHCICmdQController will use the EDuplicatedOpcode flag.

Parameters

TBool aDuplicatedOpcode

SetInitialisationCmd()

void SetInitialisationCmd ( )

Marks the command item as being an initialisation command.

SetQdpData(TAny *)

IMPORT_C void SetQdpData ( TAny * aQdpData )

Setter for the pointer to the QDP specific data associated with the queue item.

Parameters

TAny * aQdpData A pointer to some data used by the QDP to be associated with this queue item.

SetReceivedCmdStatusEvent(TBool)

void SetReceivedCmdStatusEvent ( TBool aReceivedCmdStatusEvent )

This isn't exported since only the CHCICmdQController will use the EReceivedCmdStatusEvent flag.

Parameters

TBool aReceivedCmdStatusEvent

SetType(TType)

void SetType ( TType aType )

Parameters

TType aType

StartCompletionTimer(TUint, CHCICmdQController &)

void StartCompletionTimer ( TUint aMilliseconds,
CHCICmdQController & aController
)

Starts iCompletionTimer going.

Parameters

TUint aMilliseconds the amount of time in milliseconds to run the timer for.
CHCICmdQController & aController the object to inform if the timer expires.

Type()

TType Type ( ) const

Member Enumerations Documentation

Enum TCommandStateBits

Command state bit flags

Enumerators

EReceivedCmdStatusEvent = 0x01

Indicates that a Command Status Event has been processed for the command

EDuplicatedOpcode = 0x02

Indicates that a duplicate command has been detected.

EInitialisationCmd = 0x04

Indicates that the command was added as an Initialisation command.

Enum TType

Enumerators

EIndeterminate = 0

A CHCICommandQItem is this type until QDP::MhcqdiDoesCommandRequireWorkaround(...) is called on it.

ENormal = 1

A CHCICommandQItem is this type if QDP::MhcqdiDoesCommandRequireWorkaround(...) returned EFalse for this object.

EParent = 2

A CHCICommandQItem is this type if QDP::MhcqdiDoesCommandRequireWorkaround(...) returned ETrue for this object.

EPreChild = 3

A CHCICommandQItem is set to this type after it is returned by QDP::GetPreChild.

EPostChild = 4

A CHCICommandQItem is set to this type after it is returned by QDP::GetPostChild.

Member Data Documentation

CHctlCommandFrame * iCmdFrame

CHctlCommandFrame * iCmdFrame [private]

MHCICommandQueueClient * iCmdProgressRecipient

MHCICommandQueueClient * iCmdProgressRecipient [private]

CHCICommandBase * iCommand

CHCICommandBase * iCommand [private]

TUint iCommandQId

TUint iCommandQId [private]

TUint8 iCommandState

TUint8 iCommandState [private]

This is a bit mask of the possible TCommandStateBits states

CHCICmdQCompletionTimer * iCompletionTimer

CHCICmdQCompletionTimer * iCompletionTimer [private]

The timer runs between when the command is sent and when it completes. If the timeout value given is 0 then no timer will be run.

NB a Command Status event doesn't stop the timer.

TDblQueLink iLink

TDblQueLink iLink [private]

TAny * iQdpData

TAny * iQdpData [private]

Owned by this class in the sense that we will delete this pointer (after notifying the licensee provided QDP) but this class must not otherwise touch this data. It is to be used only by the licensee provided QDP.

TUint8 iSentCounter

TUint8 iSentCounter [private]

TType iType

TType iType [private]