![]() |
libcyberradio
22.01.24
|
Decodes a VITA 49 or I/Q data packet. More...
#include <Vita49Packet.h>
Public Member Functions | |
| Vita49Packet (int vitaType, size_t payloadSize, size_t vitaHeaderSize, size_t vitaTailSize, bool byteSwapped, bool iqSwapped, unsigned char *rawData=NULL, size_t rawDataLen=0) | |
| Constructs a Vita49Packet object. More... | |
| virtual | ~Vita49Packet () |
| Destroys a Vita49Packet object. | |
| Vita49Packet (const Vita49Packet &src) | |
| Copy constructor. More... | |
| virtual Vita49Packet & | operator= (const Vita49Packet &src) |
| Assignment operator. More... | |
| bool | isVita49 () const |
| Indicates whether the packet data is in VITA 49 format. More... | |
| int16_t | getSampleI (int sample) |
| Gets the I component of a given data sample. More... | |
| int16_t | getSampleQ (int sample) |
| Gets the Q component of a given data sample. More... | |
| std::string | rawDataHex () |
| Gets the raw data in hex-string format. More... | |
| std::string | dump () |
| Gets a string dump of the contents of the data packet. More... | |
Decodes a VITA 49 or I/Q data packet.
The Vita49Packet class is used to decode VITA 49 or raw I/Q data coming from an NDR-class radio.
This class is designed to be as flexible as possible in dealing with data streams, since each NDR-class radio varies in how it packages data streams.
Definition at line 37 of file Vita49Packet.h.
| Vita49Packet | ( | int | vitaType, |
| size_t | payloadSize, | ||
| size_t | vitaHeaderSize, | ||
| size_t | vitaTailSize, | ||
| bool | byteSwapped, | ||
| bool | iqSwapped, | ||
| unsigned char * | rawData = NULL, |
||
| size_t | rawDataLen = 0 |
||
| ) |
Constructs a Vita49Packet object.
| vitaType | The VITA 49 enable option value. The range of valid values depends on the radio, but 0 always disables VITA 49 formatting. In that case, the data format is raw I/Q. |
| payloadSize | The VITA 49 or I/Q payload size for the radio, in bytes. If VITA 49 output is disabled, then this parameter provides the total size of all raw I/Q data transmitted in a single packet. |
| vitaHeaderSize | The VITA 49 header size for the radio, in bytes. If VITA 49 output is disabled, then this parameter is ignored. |
| vitaTailSize | The VITA 49 tail size for the radio, in bytes. If VITA 49 output is disabled, then this parameter is ignored. |
| byteSwapped | Whether the bytes in the packet are byte-swapped with respect to the endianness employed by the host operating system. |
| iqSwapped | Whether I and Q data in the payload are swapped. |
| rawData | A pointer to the buffer of raw data received from the radio. |
| rawDataLen | The length of the raw data buffer. |
Definition at line 21 of file Vita49Packet.cpp.
| Vita49Packet | ( | const Vita49Packet & | src | ) |
Copy constructor.
| src | The object to copy. |
Definition at line 283 of file Vita49Packet.cpp.
| std::string dump | ( | ) |
Gets a string dump of the contents of the data packet.
Definition at line 417 of file Vita49Packet.cpp.
| int16_t getSampleI | ( | int | sample | ) |
Gets the I component of a given data sample.
| sample | The sample number (0-based). |
Definition at line 378 of file Vita49Packet.cpp.
| int16_t getSampleQ | ( | int | sample | ) |
Gets the Q component of a given data sample.
| sample | The sample number (0-based). |
Definition at line 386 of file Vita49Packet.cpp.
| bool isVita49 | ( | ) | const |
Indicates whether the packet data is in VITA 49 format.
Definition at line 368 of file Vita49Packet.cpp.
|
virtual |
Assignment operator.
| src | The object to assign properties from. |
Definition at line 327 of file Vita49Packet.cpp.
|
inline |
Gets the raw data in hex-string format.
Definition at line 110 of file Vita49Packet.h.