1#ifndef INCLUDED_LIBCYBERRADIO_NDR651_PACKETIZER_H
2#define INCLUDED_LIBCYBERRADIO_NDR651_PACKETIZER_H
4#define DAC_RATE 102400000
8#include <linux/if_ether.h>
10#include <netinet/udp.h>
12#include <linux/filter.h>
13#include "LibCyberRadio/NDR651/TransmitSocket.h"
14#include <netpacket/packet.h>
15#include <net/ethernet.h>
26#include "LibCyberRadio/Common/Debuggable.h"
27#include "LibCyberRadio/NDR651/PacketTypes.h"
34 class Packetizer :
public Debuggable
38 std::string txInterfaceName;
39 unsigned short txUdpPort;
40 unsigned int samplesPerFrame;
41 unsigned long long sampleRate;
43 struct iovec txVec[3];
44 uint32_t fracTimestampIncrement;
47 void setVitaHeader(
unsigned short streamId);
48 void incrementVitaHeader();
49 void initBroadcastTxSocket(
const std::string &txInterfaceName,
unsigned short port);
50 unsigned long long calculateSampleRate(
unsigned int ducRateIndex);
54 Packetizer(
const std::string &txInterfaceName,
unsigned short port,
unsigned int ducRateIndex,
bool debug =
false);
59 void sendFrame(
short * samples);
60 void setSamplesPerFrame(
unsigned int samplesPerFrame);
virtual int debug(const char *format,...)
Outputs debug information.
Provides programming elements for controlling the CyberRadio Solutions NDR651 radio.
Defines functionality for LibCyberRadio applications.