11#ifndef INCLUDED_LIBCYBERRADIO_DRIVER_NBDDCCOMPONENT_H
12#define INCLUDED_LIBCYBERRADIO_DRIVER_NBDDCCOMPONENT_H
14#include "LibCyberRadio/Driver/RadioComponent.h"
15#include "LibCyberRadio/Common/BasicDict.h"
16#include "LibCyberRadio/Common/BasicList.h"
101 bool nbddcCommandSetsFreq =
false,
102 bool nbddcCommandSetsSource =
false,
103 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);
135 virtual bool enable(
bool enabled =
true);
301 unsigned int& streamId,
323 unsigned int& streamId,
386 bool _nbddcCommandSetsFreq;
388 bool _nbddcCommandSetsSource;
390 bool _selectableDataPort;
392 double _freqRangeMin;
394 double _freqRangeMax;
412 unsigned int _streamId;
virtual int debug(const char *format,...)
Outputs debug information.
A configuration dictionary.
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 NBDDC's source (which tuner is supplying the signal).
virtual bool executeNbddcQuery(int index, int &rateIndex, int &udpDestination, bool &enabled, int &vitaEnable, unsigned int &streamId, double &frequency, int &source)
Executes the NBDDC configuration query command.
virtual bool executeSourceQuery(int index, int &source)
Executes the NBDDC source query command.
virtual int getUdpDestination() const
Gets the NBDDC's UDP destination.
virtual BasicDoubleList getFrequencyRange() const
Gets the tunable frequency range.
virtual bool setVitaEnable(int enable)
Sets the NBDDC's VITA 49 setting.
virtual bool setFrequency(double freq)
Sets the NBDDC tuned frequency.
virtual bool executeSourceCommand(int index, int &source)
Executes the NBDDC source set command.
virtual int getDataPort() const
Gets the NBDDC'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 executeFreqCommand(int index, double &freq)
Executes the NBDDC frequency set command.
virtual unsigned int getStreamId() const
Gets the NBDDC's VITA 49 stream ID.
virtual int getRateIndex() const
Gets the NBDDC's rate index.
virtual NbddcRateSet getRateSet() const
Gets the NBDDC's rate set.
virtual bool setUdpDestination(int dest)
Sets the NBDDC's UDP destination.
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 NBDDC's data port.
virtual bool setRateSet(const NbddcRateSet &set)
Sets the NBDDC rate set.
virtual bool executeFreqQuery(int index, double &freq)
Executes the NBDDC frequency query command.
virtual bool setStreamId(unsigned int sid)
Sets the NBDDC's VITA 49 stream ID.
virtual void updateConfigurationDict()
Updates the configuration dictionary from component settings.
virtual bool executeNbddcCommand(int index, int &rateIndex, int &udpDestination, bool &enabled, int &vitaEnable, unsigned int &streamId, double &frequency, int &source)
Executes the NBDDC configuration set command.
virtual ~NbddcComponent()
Destroys a NbddcComponent object.
virtual bool setRateIndex(int index)
Sets the NBDDC's rate index.
virtual NbddcComponent & operator=(const NbddcComponent &other)
Assignment operator for NbddcComponent objects.
virtual void initConfigurationDict()
Initializes the configuration dictionary, defining the allowed keys.
virtual bool executeDataPortQuery(int index, int &dataPort)
Executes the NBDDC data port query command.
virtual double getFrequencyUnit() const
Gets the tuned frequency units.
NbddcComponent(const std::string &name="NBDDC", int index=1, RadioHandler *parent=NULL, bool debug=false, bool nbddcCommandSetsFreq=false, bool nbddcCommandSetsSource=false, bool selectableDataPort=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 NbddcComponent object.
virtual int getVitaEnable() const
Gets the NBDDC's VITA 49 setting.
virtual bool setSource(int source)
Sets the NBDDC's source (which tuner is supplying the signal).
virtual bool executeDataPortCommand(int index, int &dataPort)
Executes the NBDDC data port set command.
virtual double getFrequencyRes() const
Gets the tuned frequency resolution.
RadioComponent(const std::string &name="<unknown>", int index=0, RadioHandler *parent=NULL, bool debug=false)
Constructs a RadioComponent object.
Generic radio handler class.
Provides programming elements for driving CRS NDR-class radios.
BASIC_DICT_CONTAINER< int, double > NbddcRateSet
A rate set for a NBDDC.
BASIC_DICT_CONTAINER< int, NbddcComponent * > NbddcComponentDict
A dictionary of NBDDC components, keyed by index.
Defines functionality for LibCyberRadio applications.
BASIC_LIST_CONTAINER< double > BasicDoubleList
Type representing a list of doubles.