11 #ifndef INCLUDED_LIBCYBERRADIO_DRIVER_DUCCOMPONENT_H 12 #define INCLUDED_LIBCYBERRADIO_DRIVER_DUCCOMPONENT_H 14 #include "LibCyberRadio/Driver/RadioComponent.h" 15 #include "LibCyberRadio/Common/BasicDict.h" 16 #include "LibCyberRadio/Common/BasicList.h" 99 double freqRangeMin = 0.0,
100 double freqRangeMax = 0.0,
101 double freqRes = 1.0,
102 double freqUnits = 1.0,
103 double attRangeMin = 0.0,
104 double attRangeMax = 10.0,
107 double frequency = 0.0,
108 double attenuation = 0.0,
112 unsigned int streamId = 0);
134 virtual bool enable(
bool enabled =
true);
244 virtual bool setMode(
int mode);
293 unsigned int startSample = 0,
294 unsigned int samples = 0);
335 unsigned int& streamId);
355 unsigned int& streamId);
365 const std::string& filename,
366 unsigned int startSample,
367 unsigned int samples);
371 double _freqRangeMin;
373 double _freqRangeMax;
397 unsigned int _streamId;
399 bool _supportsSnapLoad;
401 std::string _snapFilename;
403 unsigned int _snapStartSample;
405 unsigned int _snapSamples;
407 bool _supportsSnapTransmit;
409 bool _snapSinglePlayback;
411 bool _snapPauseUntilEnabled;
427 #endif // INCLUDED_LIBCYBERRADIO_DRIVER_DUCCOMPONENT_H virtual bool executeDucCommand(int index, int &dataPort, double &frequency, double &attenuation, int &rateIndex, int &txChannels, int &mode, unsigned int &streamId)
Executes the DUC configuration set command.
virtual bool setAttenuation(double atten)
Sets the attenuation.
virtual void initConfigurationDict()
Initializes the configuration dictionary, defining the allowed keys.
virtual bool supportsSnapshotTransmit() const
Gets whether or not the DUC supports transmitting snapshots.
DucComponent(const std::string &name="DUC", int index=1, RadioHandler *parent=NULL, bool debug=false, double freqRangeMin=0.0, double freqRangeMax=0.0, double freqRes=1.0, double freqUnits=1.0, double attRangeMin=0.0, double attRangeMax=10.0, double attRes=1.0, int dataPort=0, double frequency=0.0, double attenuation=0.0, int rateIndex=0, int txChannels=0, int mode=0, unsigned int streamId=0)
Constructs a DucComponent object.
virtual bool supportsSnapshotLoad() const
Gets whether or not the DUC supports loading snapshot files.
BASIC_DICT_CONTAINER< int, DucComponent * > DucComponentDict
A dictionary of DUC components, keyed by index.
virtual int getMode() const
Gets the DUC's mode.
Base hardware component class.
BASIC_LIST_CONTAINER< double > BasicDoubleList
Type representing a list of doubles.
virtual bool executeSnapshotLoadCommand(int index, const std::string &filename, unsigned int startSample, unsigned int samples)
Executes the DUC snapshot load command.
virtual bool executeDucQuery(int index, int &dataPort, double &frequency, double &attenuation, int &rateIndex, int &txChannels, int &mode, unsigned int &streamId)
Executes the DUC configuration query command.
virtual bool setFrequency(double freq)
Sets the DUC tuned frequency.
virtual bool setTxChannelBitmap(int txChannels)
Sets the DUC's transmit channel bitmap.
virtual bool setStreamId(unsigned int sid)
Sets the DUC's VITA 49 stream ID.
virtual ~DucComponent()
Destroys a DucComponent object.
virtual double getFrequencyRes() const
Gets the tuned frequency resolution.
virtual double getAttenuation() const
Gets the attenuation.
virtual int getRateIndex() const
Gets the DUC's rate index.
virtual double getFrequencyUnit() const
Gets the tuned frequency units.
virtual DucComponent & operator=(const DucComponent &other)
Assignment operator for DucComponent objects.
Generic radio handler class.
virtual int debug(const char *format,...)
Outputs debug information.
virtual BasicDoubleList getAttenuationRange() const
Gets the attenuation range.
BASIC_DICT_CONTAINER< int, double > DucRateSet
A rate set for a DUC.
virtual int getDataPort() const
Gets the DUC's data port.
virtual void updateConfigurationDict()
Updates the configuration dictionary from component settings.
virtual DucRateSet getRateSet() const
Gets the DUC's rate set.
Defines functionality for LibCyberRadio applications.
virtual bool setDataPort(int port)
Sets the DUC's data port.
virtual void queryConfiguration()
Tells the component to query its hardware configuration in order to create its configuration dictiona...
A configuration dictionary.
virtual double getFrequency() const
Gets the tuned frequency.
virtual int getTxChannelBitmap() const
Gets the DUC's transmit channel bitmap.
virtual unsigned int getStreamId() const
Gets the DUC's VITA 49 stream ID.
virtual BasicDoubleList getFrequencyRange() const
Gets the tunable frequency range.
virtual bool enable(bool enabled=true)
Enables this component.
Base DUC component class.
virtual double getAttenuationRes() const
Gets the attenuation resolution.
virtual BasicDoubleList getRateList() const
Gets the list of allowed sample rates, based on the rate set.
virtual bool setRateSet(const DucRateSet &set)
Sets the DUC rate set.
virtual bool loadSnapshot(const std::string &filename, unsigned int startSample=0, unsigned int samples=0)
Load a snapshot file into the DUC's memory block.
virtual bool setMode(int mode)
Sets the DUC's mode.
virtual bool setRateIndex(int index)
Sets the DUC's rate index.
virtual bool setConfiguration(ConfigurationDict &cfg)
Sets the configuration dictionary for this component.