8 #ifndef INCLUDED_LIBCYBERRADIO_NDR651_TXCLIENT_H 9 #define INCLUDED_LIBCYBERRADIO_NDR651_TXCLIENT_H 11 #include "LibCyberRadio/Common/Debuggable.h" 12 #include "LibCyberRadio/NDR651/FlowControlClient.h" 13 #include "LibCyberRadio/NDR651/PacketTypes.h" 14 #include "LibCyberRadio/NDR651/UdpStatusReceiver.h" 15 #include "LibCyberRadio/NDR651/StatusReceiver.h" 16 #include "LibCyberRadio/NDR651/RadioController.h" 17 #include "LibCyberRadio/NDR651/Packetizer.h" 19 #include <boost/algorithm/string.hpp> 20 #include <boost/thread.hpp> 22 #define UDP_STATUS_BASE 65500 23 #define INVALID_VALUE 100000 29 class TXClient :
public Debuggable
35 std::string txInterfaceName;
36 unsigned int ducChannel;
37 unsigned int tenGbeIndex;
38 double ducAttenuation;
39 unsigned int ducRateIndex;
40 unsigned int rfChannel;
41 unsigned short txUdpPort;
43 double ducFullThreshPercent;
44 double ducEmptyThreshPercent;
45 unsigned int updatesPerSecond;
49 std::string radioHostName;
54 Packetizer *packetizer;
56 StatusReceiver *statusRX;
62 long prefillSampleCount;
65 boost::mutex objectAccessMutex;
68 std::string getSourceMac();
69 std::string getSourceIP();
70 bool validInputs(std::string &errors);
74 TXClient(std::string radioHostName,
bool debug);
79 void stop(
bool disableRF =
false);
80 void setGrouped(
bool isGrouped);
81 void sendFrame(
short * samples,
unsigned int samplesPerFrame);
82 unsigned int getDucChannel();
85 bool setDUCPaused(
bool paused);
88 bool setDUCChannel(
unsigned int ducChannel);
89 bool setTxChannel(
unsigned int txChannel);
90 bool setDUCRateIndex(
unsigned int ducRateIndex);
91 bool setDUCFreq(
double ducFreq);
92 bool setDUCAtten(
double ducAtten);
93 bool setTxFreq(
double txFreq);
94 bool setTxAtten(
double txAttenuation);
95 bool setDUCParameters(
96 unsigned int ducChannel,
97 unsigned int ducRateIndex,
98 unsigned int txChannel
100 bool setEthernetInterface(
unsigned int tenGbeIndex,
const std::string &txInterfaceName,
unsigned short port);
102 bool setTxInversion(
bool txInversion);
103 bool pauseDUC(
bool paused =
true);
106 bool setDUCRateIndexUnlocked(
unsigned int ducRateIndex);
Defines functionality for LibCyberRadio applications.