11 #include "LibCyberRadio/Driver/NDR472/WbddcComponent.h" 12 #include "LibCyberRadio/Driver/RadioHandler.h" 13 #include "LibCyberRadio/Common/Pythonesque.h" 14 #include <boost/lexical_cast.hpp> 15 #include <boost/format.hpp> 35 (boost::format(
"NDR472-WBDDC%02d") % \
72 ::LibCyberRadio::Driver::WbddcComponent::operator=(other);
82 int& udpDestination,
bool& enabled,
int& vitaEnable,
83 unsigned int& streamId)
86 if ( (_parent != NULL) && (_parent->
isConnected()) )
88 std::ostringstream oss;
89 oss <<
"WBDDC? " << index <<
"\n";
98 rateIndex = boost::lexical_cast<
int>(vec[1]);
99 udpDestination = boost::lexical_cast<
int>(vec[2]);
100 enabled = (boost::lexical_cast<
int>(vec[3]) == 1);
101 vitaEnable = boost::lexical_cast<
int>(vec[4]);
102 streamId = boost::lexical_cast<
unsigned int>(vec[5]);
virtual void initConfigurationDict()
Initializes the configuration dictionary, defining the allowed keys.
WBDDC component class for the NDR472.
virtual bool isConnected() const
Gets whether or not the handler is connected.
static std::string Replace(const std::string &str, const std::string &oldstr, const std::string &newstr, int count=INT_MAX)
Replaces occurrences of one substring with another within the given string.
virtual bool executeDataPortCommand(int index, int &dataPort)
Executes the WBDDC data port set command.
static BasicStringList Split(const std::string &str, const std::string &sep, int maxsplit=INT_MAX)
Splits the given string into a list of string tokens.
virtual bool executeWbddcQuery(int index, int &rateIndex, int &udpDestination, bool &enabled, int &vitaEnable, unsigned int &streamId)
Executes the WBDDC configuration query command.
Generic radio handler class.
BASIC_LIST_CONTAINER< std::string > BasicStringList
Type representing a list of strings.
Defines functionality for LibCyberRadio applications.
virtual std::string getLastCommandErrorInfo() const
Gets the error message from the last command attempted.
virtual BasicStringList sendCommand(const std::string &cmdString, double timeout=-1)
Sends a command to the radio.
virtual ~WbddcComponent()
Destroys a WbddcComponent object.
WbddcComponent(int index=1, ::LibCyberRadio::Driver::RadioHandler *parent=NULL, bool debug=false, int dataPort=1, int rateIndex=0, int udpDestination=0, int vitaEnable=0, int streamId=0)
Constructs a WbddcComponent object.
virtual bool executeDataPortQuery(int index, int &dataPort)
Executes the WBDDC data port query command.
virtual WbddcComponent & operator=(const WbddcComponent &other)
Assignment operator for WbddcComponent objects.