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()
voidCancelCompletionTimer()
IMPORT_C MHCICommandQueueClient *Client()
IMPORT_C CHCICommandBase &Command()
TUint CommandQId()
voidCommandSent()
voidDetachClient()
TBool DuplicatedOpcode()
voidFormatFrame()
CHctlCommandFrame &Frame()
IMPORT_C TBoolIsInitialisation()
IMPORT_C TBoolIsNormal()
IMPORT_C TBoolIsParent()
IMPORT_C TBoolIsPostChild()
IMPORT_C TBoolIsPreChild()
IMPORT_C CHCICommandQItem *NewL(MHCICommandAllocator &, MHCICommandQueueClient &, CHCICommandBase *)
IMPORT_C TAny *QdpData()
IMPORT_C TBoolReceivedCmdStatusEvent()
IMPORT_C TUintSentCount()
voidSetCommandQId(TUint)
voidSetDuplicatedOpcode(TBool)
voidSetInitialisationCmd()
IMPORT_C voidSetQdpData(TAny *)
voidSetReceivedCmdStatusEvent(TBool)
voidSetType(TType)
voidStartCompletionTimer(TUint, CHCICmdQController &)
TType Type()
Private Member Functions
CHCICommandQItem(MHCICommandQueueClient &, CHCICommandBase *)
voidConstructL(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
enumTType { EIndeterminate = 0, ENormal = 1, EParent = 2, EPreChild = 3, EPostChild = 4 }
Private Member Enumerations
enumTCommandStateBits { 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()

voidCancelCompletionTimer()

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()

voidCommandSent()

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

ConstructL(MHCICommandAllocator &)

voidConstructL(MHCICommandAllocator &aCommandAllocator)[private]

Constructor

Parameters

MHCICommandAllocator & aCommandAllocator

DetachClient()

voidDetachClient()

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()

voidFormatFrame()

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 TBoolIsInitialisation()const

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

IsNormal()

IMPORT_C TBoolIsNormal()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 TBoolIsParent()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 TBoolIsPostChild()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 TBoolIsPreChild()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 & aCommandAllocatorthe HCI commmand frame allocator.
MHCICommandQueueClient & aCmdProgressRecipientthe HCI event notification client.
CHCICommandBase * aCommandthe 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 TBoolReceivedCmdStatusEvent()const

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

SentCount()

IMPORT_C TUintSentCount()const

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

SetCommandQId(TUint)

voidSetCommandQId(TUintaId)

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

Parameters

TUint aIdthe command queue ID for this object

SetDuplicatedOpcode(TBool)

voidSetDuplicatedOpcode(TBoolaDuplicatedOpcode)

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

Parameters

TBool aDuplicatedOpcode

SetInitialisationCmd()

voidSetInitialisationCmd()

Marks the command item as being an initialisation command.

SetQdpData(TAny *)

IMPORT_C voidSetQdpData(TAny *aQdpData)

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

Parameters

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

SetReceivedCmdStatusEvent(TBool)

voidSetReceivedCmdStatusEvent(TBoolaReceivedCmdStatusEvent)

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

Parameters

TBool aReceivedCmdStatusEvent

SetType(TType)

voidSetType(TTypeaType)

Parameters

TType aType

StartCompletionTimer(TUint, CHCICmdQController &)

voidStartCompletionTimer(TUintaMilliseconds,
CHCICmdQController &aController
)

Starts iCompletionTimer going.

Parameters

TUint aMillisecondsthe amount of time in milliseconds to run the timer for.
CHCICmdQController & aControllerthe 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]