IDBLUE logo
Public Member Functions
PacketQueue Class Reference
Inheritance diagram for PacketQueue:
ByteQueue

Public Member Functions

(ResponseFactory *) - responseFactory
(void) - setResponseFactory:
(IDBluePacket *) - popNextPacket
(IDBluePacket *) - peekPacket:
(int) - recover
(BOOL) - isValidPacket:

Detailed Description

PacketQueue is a subclass of ByteQueue that is used to convert from raw bytes into IDBluePacket objects.


Member Function Documentation

- (BOOL) isValidPacket: (IDBluePacket*)  packet

Determine if the given packet is a valid IDBLUE packet

Parameters:
packetThe packet to validate
Returns:
TRUE if the packet is valid, FALSE otherwise
- (IDBluePacket *) peekPacket: (int)  index

Create an IDBLuePacket from the ByteQueue at the given index

Parameters:
indexThe index in the ByteQueue to check for a packet
Returns:
An IDBluePacket if the data starting at index is a valid packet. Otherwise, returns nil.

Create an IDBluePacket from a ByteQueue

Returns:
The IDBluePacket if the ByteQueue starts with a valid IDBluePacket, nil otherwise.
- (int) recover

In the event the ByteQueue contains invalid data (i.e. data is not formatted as proper IDBLUE packets), remove data from the start of the ByteQueue so that the ByteQueue contains only valid IDBLUE packets.

Returns:
The number of bytes removed from the start of the ByteQueue.

The documentation for this class was generated from the following files:

 

Generated on Mon Jan 19 2015 15:47:40
Copyright © 2015 Cathexis Innovations Inc. All Rights Reserved.