XFcObjectDataQueue class Reference

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# XFcObjectDataQueue Class Reference

XFcObjectDataQueue holds prioritized packets. More...

Collaboration diagram for XFcObjectDataQueue:

[legend]
List of all members.

## Public Member Functions

XFcObjectDataFrame * | getPacketFrame (INT aSlot)
| Gets packet frame.
XFcObjectDataFrame * | getRecentStateFrame (INT32 aRecentId)
| Gets packet frame.
void | reorderFrames ()
| Reorders frames, will reorder packet to priority order and moves empty frames to empty list.
void | removeRecentStateFrame (INT32 aRecentId)
| Removes recent state frame.
void | createUnsentMultiPacket (XFcObjectDataPacket *aPacket, INT32 aSeqNum, INT aStyle)
| Packs data and sets it as send.
void | createUnsentOnePacket (XFcObjectDataPacket *aPacket, INT32 aSeqNum, INT aStyle)
| Gets first unsent alone going packet and set it's as send.
void | createUnsentAutoPacket (XFcObjectDataPacket *aPacket, INT32 aSeqNum, INT aStyle)
| Packs data and sets it as send.
void | resetQueue (INT32 aStatus)
| Resets queue, this does not delete packets. Sets given seqnum packets as unsend.
void | reset ()
| Resets queue, this does not delete packets. Sets all packets as unsend.
void | deleteQueue ()
| Deletes queue.
void | deleteNonGuaranteedSent ()
| Deletes sent non guaranteed packets.
void | removeSeqNum (INT32 aSeqNum)
| Removes packets by seqnum.
void | removeByIndex (INT32 aIndex)
| Removes packet by index.
INT32 | getFirstIndex (INT32 aSeqNum)
| Returns first index of given seqnum.
INT32 | getFirstNonguaranteedIndex ()
| Return first index of given seqnum.
INT32 | isFull ()
| Is queue full.
INT32 | isEmpty ()
| Is queue empty.
void | setQueueSize (UINT32 aQueueSize)
| Sets queue size.
void | updatePriority ()
| Updates send priority.
virtual | ~XFcObjectDataQueue ()
| Virtual destructor.

## Static Public Member Functions

XFcObjectDataQueue * | create (INT32 aMaxSize, INT aBufferSize)
| Static constructor.

## Protected Member Functions

INT32 | init (INT32 aMaxSize, INT aBufferSize)
| Initializes list.
INT32 | addPacket (XFcObjectDataFrame *aPacket)
| Adds new packet to list.
INT32 | getIndexOfLockedFrame (XFcLinkedList< XFcObjectDataFrame * > *aList)
| Gets locked frame.
INT32 | getIndexOfUnlockedFrame (XFcLinkedList< XFcObjectDataFrame * > *aList)
| Gets unlocked frame.
INT32 | getIndexOfNegativeBufferSize (XFcLinkedList< XFcObjectDataFrame * > *aList)
| Gets index of negative buffer size.
XFcObjectDataFrame * | getFrameByIndex (XFcLinkedList< XFcObjectDataFrame * > *aList, INT32 aIndex)
| Gets frame.
| XFcObjectDataQueue ()
| Protected constructor.

## Protected Attributes

XFcObjectDataPriorityHelp | mHelp
| Holds lists of data send/sendable packets.
XFcPriorityList< XFcObjectDataFrame * > | mObjectUnlockedData
XFcLinkedList< XFcObjectDataFrame * > | mObjectLockedData
| Holds list of unlocked packet frames.

## Private Attributes

INT32 | mRecentStateHandle
| Holds recent state handle.
UINT32 | mMaxSize
| Holds queue max size.
INT | mBufferSize
| Holds buffer size.
INT | mReset
| Holds reset flag.

## Detailed Description

XFcObjectDataQueue holds prioritized packets.

It holds list of locked and unlocked packet frames. If packet frame is locked list does not add it to sendable packet frame. If packet is unlocked and contains data it can be added to sendable packet frame. Its purpose is to keep added packet frames on prioritized order and update order if wanted. XFcObjectDataQueue owns all the data added to it, delete of queue will remove all XFcObjectDataFrame allocated. XFcObjectDataFrame allocation is made with given granularity. After send of packet frame queue does not delete packet, it marks frame free for later use.

## Constructor & Destructor Documentation

XFcObjectDataQueue::XFcObjectDataQueue | ( |  | ) | `[protected]`

| Protected constructor.

virtual XFcObjectDataQueue::~XFcObjectDataQueue | ( |  | ) | `[virtual]`

| Virtual destructor.

## Member Function Documentation

INT32 XFcObjectDataQueue::addPacket | ( | XFcObjectDataFrame * | aPacket | ) | `[protected]`

| Adds new packet to list.

XFcObjectDataQueue* XFcObjectDataQueue::create | ( | INT32 | aMaxSize,
|  | INT | aBufferSize
| ) | `[static]`

Static constructor.

Parameters:

  aMaxSize | max queue size.
  aBufferSize | max buffer size.

Returns:
  new object if successful, or NULL if unsuccessful.

void XFcObjectDataQueue::createUnsentAutoPacket | ( | XFcObjectDataPacket * | aPacket,
|  | INT32 | aSeqNum,
|  | INT | aStyle
| ) |

Packs data and sets it as send.

Parameters:

  aPacket | object data packet.
  aSeqNum | sequence number.

void XFcObjectDataQueue::createUnsentMultiPacket | ( | XFcObjectDataPacket * | aPacket,
|  | INT32 | aSeqNum,
|  | INT | aStyle
| ) |

Packs data and sets it as send.

Parameters:

  aPacket | object data packet.
  aSeqNum | sequence number.

void XFcObjectDataQueue::createUnsentOnePacket | ( | XFcObjectDataPacket * | aPacket,
|  | INT32 | aSeqNum,
|  | INT | aStyle
| ) |

Gets first unsent alone going packet and set it's as send.

Parameters:

  aPacket | object data packet.
  aSeqNum | sequence number.

void XFcObjectDataQueue::deleteNonGuaranteedSent | ( |  | ) |

| Deletes sent non guaranteed packets.

void XFcObjectDataQueue::deleteQueue | ( |  | ) |

| Deletes queue.

INT32 XFcObjectDataQueue::getFirstIndex | ( | INT32 | aSeqNum | ) |

Returns first index of given seqnum.

Parameters:

  aSeqNum | sequency number.

Returns:
  list index.

INT32 XFcObjectDataQueue::getFirstNonguaranteedIndex | ( |  | ) |

Return first index of given seqnum.

Returns:
  list index.

XFcObjectDataFrame* XFcObjectDataQueue::getFrameByIndex | ( | XFcLinkedList< XFcObjectDataFrame * > * | aList,
|  | INT32 | aIndex
| ) | `[protected]`

| Gets frame.

INT32 XFcObjectDataQueue::getIndexOfLockedFrame | ( | XFcLinkedList< XFcObjectDataFrame * > * | aList | ) | `[protected]`

| Gets locked frame.

INT32 XFcObjectDataQueue::getIndexOfNegativeBufferSize | ( | XFcLinkedList< XFcObjectDataFrame * > * | aList | ) | `[protected]`

| Gets index of negative buffer size.

INT32 XFcObjectDataQueue::getIndexOfUnlockedFrame | ( | XFcLinkedList< XFcObjectDataFrame * > * | aList | ) | `[protected]`

| Gets unlocked frame.

XFcObjectDataFrame* XFcObjectDataQueue::getPacketFrame | ( | INT | aSlot | ) |

Gets packet frame.

Parameters:

  aSlot | message identifier (RECENTSTATE ...).

Returns:
  packet frame class.

XFcObjectDataFrame* XFcObjectDataQueue::getRecentStateFrame | ( | INT32 | aRecentId | ) |

Gets packet frame.

Parameters:

  aRecentId | message identifier (RECENTSTATE ...).

Returns:
  packet frame class.

INT32 XFcObjectDataQueue::init | ( | INT32 | aMaxSize,
|  | INT | aBufferSize
| ) | `[protected]`

| Initializes list.

INT32 XFcObjectDataQueue::isEmpty | ( |  | ) |

Is queue empty.

Returns:
  1 if queue is empty, or 0 if not.

INT32 XFcObjectDataQueue::isFull | ( |  | ) |

Is queue full.

Returns:
  1 if queue is full, or 0 if not.

void XFcObjectDataQueue::removeByIndex | ( | INT32 | aIndex | ) |

Removes packet by index.

Parameters:

  aIndex | list index.

void XFcObjectDataQueue::removeRecentStateFrame | ( | INT32 | aRecentId | ) |

Removes recent state frame.

Parameters:

  aRecentId | recent state id.

void XFcObjectDataQueue::removeSeqNum | ( | INT32 | aSeqNum | ) |

Removes packets by seqnum.

Parameters:

  aSeqNum | sequence number.

void XFcObjectDataQueue::reorderFrames | ( |  | ) |

| Reorders frames, will reorder packet to priority order and moves empty frames to empty list.

void XFcObjectDataQueue::reset | ( |  | ) |

| Resets queue, this does not delete packets. Sets all packets as unsend.

void XFcObjectDataQueue::resetQueue | ( | INT32 | aStatus | ) |

| Resets queue, this does not delete packets. Sets given seqnum packets as unsend.

void XFcObjectDataQueue::setQueueSize | ( | UINT32 | aQueueSize | ) |

Sets queue size.

Parameters:

  aQueueSize | queue size.

void XFcObjectDataQueue::updatePriority | ( |  | ) |

| Updates send priority.

## Member Data Documentation

INT XFcObjectDataQueue::mBufferSize`[private]`

| Holds buffer size.

XFcObjectDataPriorityHelp XFcObjectDataQueue::mHelp`[protected]`

| Holds lists of data send/sendable packets.

UINT32 XFcObjectDataQueue::mMaxSize`[private]`

| Holds queue max size.

XFcLinkedList<XFcObjectDataFrame *> XFcObjectDataQueue::mObjectLockedData`[protected]`

| Holds list of unlocked packet frames.

XFcPriorityList<XFcObjectDataFrame *> XFcObjectDataQueue::mObjectUnlockedData`[protected]`

INT32 XFcObjectDataQueue::mRecentStateHandle`[private]`

| Holds recent state handle.

INT XFcObjectDataQueue::mReset`[private]`

| Holds reset flag.

|  | X-Forge Documentation Confidential Copyright © 2002-2003 Fathammer |  | Documentation generated with doxygen by Dimitri van Heesch