AsyncDigitalPacket
public
WirelessDataPacket
AsyncDigitalPacket

A WirelessDataPacket derived class representing an Asynchronouse Digital packet

Constants
Synchronized Sampling Packet Information
PAYLOAD_OFFSET_CHANNEL_MASK

0  - The offset into the payload to get the digital channel mask (2 bytes)

PAYLOAD_OFFSET_TICK

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

PAYLOAD_OFFSET_TS_SEC

4  - The offset into the payload to get the timestamp seconds (4 bytes)

PAYLOAD_OFFSET_TS_NANOSEC

8  - The offset into the payload to get the timestamp nanoseconds (4 bytes)

PAYLOAD_OFFSET_CHANNEL_DATA

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

Functions
AsyncDigitalPacket
explicit AsyncDigitalPacket(
const WirelessPacket &packet
)

Creates a AsyncDigitalPacket from the passed in WirelessPacket

Parameters
packet

A WirelessPacket determined to be a AsyncDigitalPacket

parseSweeps
void parseSweeps()

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

Exceptions
wirelessChannelFromChNum
virtual WirelessChannel::ChannelId wirelessChannelFromChNum(
int channelNum
) override

Converts a digital channel number to a WirelessChannel::ChannelId

Parameters
channelNum
int

The digital channel number to convert (digital channel 1 = 1, digital channel 16 = 16)

Returns

The WirelessChannel::ChannelId representing the passed in digital channel number

integrityCheck
static bool integrityCheck(
const WirelessPacket &packet
)

Verifies that the packet is a well formed Async Digital packet

Parameters
packet

The fully formed Wireless Packet to check the integrity of

Returns

true if the packet is a well formed Sync Sampling 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