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";
71 if ( _parent->getLastCommandErrorInfo() ==
"" )
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
100 rsp = _parent->sendCommand(oss.str(), 2.0);
101 if ( _parent->getLastCommandErrorInfo() ==
"" )
109 isMember = ( boost::lexical_cast<int>(vec[2]) == 1 );
113 this->
debug(
"[NDR472::WbddcGroupComponent::executeWbddcGroupMemberQuery] Returning %s\n",
virtual const char * debugBool(bool x)
Gets a debug output string for a Boolean value.
virtual int debug(const char *format,...)
Outputs debug information.
virtual ~WbddcGroupComponent()
Destroys a WbddcGroupComponent object.
WbddcGroupComponent(int index=1, ::LibCyberRadio::Driver::RadioHandler *parent=NULL, bool debug=false)
Constructs a WbddcGroupComponent object.
virtual bool executeWbddcGroupMemberQuery(int index, int groupMember, bool &isMember)
Executes the WBDDC group member query command.
virtual WbddcGroupComponent & operator=(const WbddcGroupComponent &other)
Assignment operator for WbddcGroupComponent objects.
virtual bool executeWbddcGroupEnableQuery(int index, bool &enabled)
Executes the WBDDC group enable query command.
Generic radio handler class.
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.
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.
Provides programming elements for driving NDR472 radios.
Provides programming elements for driving CRS NDR-class radios.
Defines functionality for LibCyberRadio applications.
BASIC_LIST_CONTAINER< std::string > BasicStringList
Type representing a list of strings.