BufferedLdcPacket
public
WirelessDataPacket
BufferedLdcPacket

A WirelessDataPacket derived class representing a Buffered LDC packet

Constants
Buffered LDC Packet Information
PAYLOAD_OFFSET_APP_ID

0  - The offset into the payload to get the application ID

PAYLOAD_OFFSET_CHANNEL_MASK

1  - The offset into the payload to get the channel mask

PAYLOAD_OFFSET_SAMPLE_RATE

2  - The offset into the payload to get the sample rate

PAYLOAD_OFFSET_DATA_TYPE

3  - The offset into the payload to get the data type

PAYLOAD_OFFSET_TICK

4  - The offset into the payload to get the tick (2 bytes)

PAYLOAD_OFFSET_CHANNEL_DATA

6  - The offset into the payload where the channel data starts

Packet values
APP_ID_VAL

0x02  - The App ID of the Packet

Functions
BufferedLdcPacket
explicit BufferedLdcPacket(
const WirelessPacket &packet
)

Creates a BufferedLdcPacket from the passed in WirelessPacket

Parameters
packet

A WirelessPacket determined to be a BufferedLdcPacket

parseSweeps
void parseSweeps()

Parses the passed in WirelessPacket for all the sweep information and adds a sweep to the sweeps container

Exceptions
integrityCheck
static bool integrityCheck(
const WirelessPacket &packet
)

Verifies that the packet is a well formed Buffered LDC packet

Parameters
packet

The fully formed Wireless Packet to check the integrity of

Returns

true if the packet is a well formed Buffered LDC packet, false otherwise

getUniqueId
static UniqueWirelessPacketId getUniqueId(
const WirelessPacket &packet
)

Gets the unique Id of the WirelessPacket passed in

Parameters
packet

The WirelessPacket to get the unique id of

Returns

The UniqueWirelessPacketId of the passed in packet