11 #include "LibCyberRadio/Driver/NDR472/WbddcGroupComponent.h" 12 #include "LibCyberRadio/Driver/RadioHandler.h" 13 #include "LibCyberRadio/Common/Pythonesque.h" 14 #include <boost/lexical_cast.hpp> 15 #include <boost/format.hpp> 30 (boost::format(
"NDR472-WBG%02d") % \
52 ::LibCyberRadio::Driver::WbddcGroupComponent::operator=(other);
64 this->
debug(
"[NDR472::WbddcGroupComponent::executeWbddcGroupEnableQuery] Called\n");
66 if ( (_parent != NULL) && (_parent->
isConnected()) )
68 std::ostringstream oss;
69 oss <<
"WBGE? " << index <<
"\n";
78 enabled = (boost::lexical_cast<
int>(vec[1]) == 1);
82 this->
debug(
"[NDR472::WbddcGroupComponent::executeWbddcGroupEnableQuery] Returning %s\n",
90 this->
debug(
"[NDR472::WbddcGroupComponent::executeWbddcGroupMemberQuery] Called\n");
92 if ( (_parent != NULL) && (_parent->
isConnected()) )
94 std::ostringstream oss;
97 oss <<
"WBG? " << index
98 <<
", " << groupMember
109 isMember = ( boost::lexical_cast<
int>(vec[2]) == 1 );
113 this->
debug(
"[NDR472::WbddcGroupComponent::executeWbddcGroupMemberQuery] Returning %s\n",
virtual ~WbddcGroupComponent()
Destroys a WbddcGroupComponent object.
virtual WbddcGroupComponent & operator=(const WbddcGroupComponent &other)
Assignment operator for WbddcGroupComponent objects.
virtual bool executeWbddcGroupMemberQuery(int index, int groupMember, bool &isMember)
Executes the WBDDC group member query command.
WbddcGroupComponent(int index=1, ::LibCyberRadio::Driver::RadioHandler *parent=NULL, bool debug=false)
Constructs a WbddcGroupComponent object.
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 executeWbddcGroupEnableQuery(int index, bool &enabled)
Executes the WBDDC group enable query command.
virtual void initConfigurationDict()
Initializes the configuration dictionary, defining the allowed keys.
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.
Generic radio handler class.
virtual int debug(const char *format,...)
Outputs debug information.
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 const char * debugBool(bool x)
Gets a debug output string for a Boolean value.
WBDDC group component class for the NDR472.
virtual BasicStringList sendCommand(const std::string &cmdString, double timeout=-1)
Sends a command to the radio.