8 #ifndef INCLUDED_LIBCYBERRADIO_NDR651_RADIOCONTROLLER_H 9 #define INCLUDED_LIBCYBERRADIO_NDR651_RADIOCONTROLLER_H 11 #include "LibCyberRadio/Common/Debuggable.h" 12 #include "LibCyberRadio/NDR651/ClientSocket.h" 13 #include "LibCyberRadio/Common/BasicList.h" 14 #include <boost/algorithm/string.hpp> 15 #include <boost/format.hpp> 18 #define CMD_TIMEOUT 10000 // How long to wait for a response from radio 24 class RadioController :
public Debuggable
28 ClientSocket *clientSocket;
29 std::string radioHostname;
30 unsigned short radioPort;
34 bool sendCmd(
const std::string& cmd,
bool splitResponse =
true);
35 bool sendCmdAndQry(
const std::string& cmd,
const std::string& qry,
bool splitResponse =
true);
40 RadioController(
const std::string& radioHostname,
unsigned short radioPort,
bool debug =
false);
44 std::string getRadioMac(
unsigned int tenGbeIndex);
45 std::string getRadioIP(
unsigned int tenGbeIndex);
46 bool setTXF(
unsigned int channel,
double freq);
47 double getTXA(
unsigned int channel);
48 bool setTXA(
unsigned int channel,
double attenuation);
49 bool setTXP(
unsigned int channel,
bool enable);
50 bool setTXINV(
unsigned int ducChannel,
bool invert);
51 bool setDUCP(
unsigned int ducChannel,
bool pause);
52 bool setDUCA(
unsigned int ducChannel,
double attenuation);
53 bool setDUCF(
unsigned int ducChannel,
double freq);
54 bool setSHF(
unsigned int channel,
bool enable);
55 bool setSIP(
unsigned int tenGbeIndex,
const std::string& sourceIP);
57 unsigned int ducChannel,
58 unsigned int tenGbeIndex,
59 const std::string& destIP,
60 const std::string& destMAC,
61 unsigned short ducStatusPort
64 unsigned int ducChannel,
65 unsigned int tenGbeIndex,
68 unsigned int ducRateIndex,
69 unsigned int rfTxChannel,
74 unsigned int ducChannel,
75 unsigned int tenGbeIndex,
76 unsigned int fullThresh,
77 unsigned int emptyThresh,
78 unsigned int duchsPeriod,
79 unsigned int ducStreamID
82 unsigned int ducChannel,
83 unsigned int tenGbeIndex,
84 double fullThreshPercent,
85 double emptyThreshPercent,
86 unsigned int updatesPerSecond,
87 unsigned int ducStreamID
89 bool clearDUC(
unsigned int ducChannel);
90 bool clearDUCHS(
unsigned int ducChannel);
91 bool clearDUCG(
unsigned int ducGroup);
92 bool setDUCG(
unsigned int ducGroup,
unsigned int ducChannel,
bool enable);
93 bool setDUCGE(
unsigned int ducGroup,
bool enable);
94 bool querySTAT(
bool verbose);
95 bool queryTSTAT(
bool verbose);
BASIC_LIST_CONTAINER< std::string > BasicStringList
Type representing a list of strings.
Defines functionality for LibCyberRadio applications.