11#ifndef INCLUDED_LIBCYBERRADIO_DRIVER_WBDDCCOMPONENT_H
12#define INCLUDED_LIBCYBERRADIO_DRIVER_WBDDCCOMPONENT_H
14#include "LibCyberRadio/Driver/RadioComponent.h"
15#include "LibCyberRadio/Common/BasicDict.h"
16#include "LibCyberRadio/Common/BasicList.h"
100 bool tunable =
false,
101 bool selectableSource =
false,
102 bool selectableDataPort =
false,
104 double freqRangeMin = 0.0,
105 double freqRangeMax = 0.0,
106 double freqRes = 1.0,
107 double freqUnits = 1.0,
110 double frequency = 0.0,
112 int udpDestination = 0,
114 unsigned int streamId = 0);
136 virtual bool enable(
bool enabled =
true);
314 unsigned int& streamId);
330 unsigned int& streamId);
393 bool _selectableSource;
395 bool _selectableDataPort;
399 double _freqRangeMin;
401 double _freqRangeMax;
419 unsigned int _streamId;
virtual int debug(const char *format,...)
Outputs debug information.
A configuration dictionary.
RadioComponent(const std::string &name="<unknown>", int index=0, RadioHandler *parent=NULL, bool debug=false)
Constructs a RadioComponent object.
Generic radio handler class.
virtual bool enable(bool enabled=true)
Enables this component.
virtual bool setConfiguration(ConfigurationDict &cfg)
Sets the configuration dictionary for this component.
virtual int getSource() const
Gets the WBDDC's source (which tuner is supplying the signal).
virtual bool executeSourceQuery(int index, int &source)
Executes the WBDDC source query command.
virtual WbddcComponent & operator=(const WbddcComponent &other)
Assignment operator for WbddcComponent objects.
virtual int getUdpDestination() const
Gets the WBDDC's UDP destination.
virtual BasicDoubleList getFrequencyRange() const
Gets the tunable frequency range.
virtual bool setVitaEnable(int enable)
Sets the WBDDC's VITA 49 setting.
virtual bool executeWbddcCommand(int index, int &rateIndex, int &udpDestination, bool &enabled, int &vitaEnable, unsigned int &streamId)
Executes the WBDDC configuration set command.
virtual bool setFrequency(double freq)
Sets the WBDDC tuned frequency.
virtual bool executeSourceCommand(int index, int &source)
Executes the WBDDC source set command.
virtual bool isAgcSupported() const
Gets whether or not the WBDDC supports AGC.
virtual int getDataPort() const
Gets the WBDDC's data port.
virtual double getFrequency() const
Gets the tuned frequency.
virtual BasicDoubleList getRateList() const
Gets the list of allowed sample rates, based on the rate set.
virtual bool executeWbddcQuery(int index, int &rateIndex, int &udpDestination, bool &enabled, int &vitaEnable, unsigned int &streamId)
Executes the WBDDC configuration query command.
virtual bool executeFreqCommand(int index, double &freq)
Executes the WBDDC frequency set command.
virtual unsigned int getStreamId() const
Gets the WBDDC's VITA 49 stream ID.
virtual bool isSourceSelectable() const
Gets whether or not the WBDDC supports selectable source.
virtual int getRateIndex() const
Gets the WBDDC's rate index.
virtual bool setUdpDestination(int dest)
Sets the WBDDC's UDP destination.
virtual bool setRateSet(const WbddcRateSet &set)
Sets the WBDDC rate set.
virtual void queryConfiguration()
Tells the component to query its hardware configuration in order to create its configuration dictiona...
virtual bool setDataPort(int port)
Sets the WBDDC's data port.
virtual bool executeFreqQuery(int index, double &freq)
Executes the WBDDC frequency query command.
virtual bool setStreamId(unsigned int sid)
Sets the WBDDC's VITA 49 stream ID.
virtual WbddcRateSet getRateSet() const
Gets the WBDDC's rate set.
virtual void updateConfigurationDict()
Updates the configuration dictionary from component settings.
WbddcComponent(const std::string &name="WBDDC", int index=1, RadioHandler *parent=NULL, bool debug=false, bool tunable=false, bool selectableSource=false, bool selectableDataPort=false, bool agc=false, double freqRangeMin=0.0, double freqRangeMax=0.0, double freqRes=1.0, double freqUnits=1.0, int source=1, int dataPort=1, double frequency=0.0, int rateIndex=0, int udpDestination=0, int vitaEnable=0, unsigned int streamId=0)
Constructs a WbddcComponent object.
virtual bool isTunable() const
Gets whether or not the WBDDC is tunable.
virtual ~WbddcComponent()
Destroys a WbddcComponent object.
virtual bool setRateIndex(int index)
Sets the WBDDC's rate index.
virtual void initConfigurationDict()
Initializes the configuration dictionary, defining the allowed keys.
virtual bool executeDataPortQuery(int index, int &dataPort)
Executes the WBDDC data port query command.
virtual double getFrequencyUnit() const
Gets the tuned frequency units.
virtual int getVitaEnable() const
Gets the WBDDC's VITA 49 setting.
virtual bool setSource(int source)
Sets the WBDDC's source (which tuner is supplying the signal).
virtual bool executeDataPortCommand(int index, int &dataPort)
Executes the WBDDC data port set command.
virtual double getFrequencyRes() const
Gets the tuned frequency resolution.
Provides programming elements for driving CRS NDR-class radios.
BASIC_DICT_CONTAINER< int, WbddcComponent * > WbddcComponentDict
A dictionary of WBDDC components, keyed by index.
BASIC_DICT_CONTAINER< int, double > WbddcRateSet
A rate set for a WBDDC.
Defines functionality for LibCyberRadio applications.
BASIC_LIST_CONTAINER< double > BasicDoubleList
Type representing a list of doubles.