libcyberradio 22.01.24
TunerComponent.h
1/***************************************************************************
2 * \file TunerComponent.h
3 * \brief Defines the tuner interface for the NDR551.
4 * \author DA
5 * \author NH
6 * \author MN
7 * \copyright (c) 2017 CyberRadio Solutions, Inc. All rights reserved.
8 *
9 ***************************************************************************/
10
11#ifndef INCLUDED_LIBCYBERRADIO_DRIVER_NDR551_TUNERCOMPONENT_H
12#define INCLUDED_LIBCYBERRADIO_DRIVER_NDR551_TUNERCOMPONENT_H
13
14#include "LibCyberRadio/Driver/TunerComponent.h"
15#include <string>
16
17
21namespace LibCyberRadio
22{
26 namespace Driver
27 {
28 // Forward declaration for RadioHandler
29 class RadioHandler;
30
34 namespace NDR551
35 {
36
48 {
49 public:
60 TunerComponent(int index = 1,
62 bool debug = false,
63 double frequency = 800e6,
64 double attenuation = 0.0,
65 int filter = 0);
69 virtual ~TunerComponent();
74 TunerComponent(const TunerComponent& other);
80 virtual TunerComponent& operator=(const TunerComponent& other);
81
82 bool executeFreqCommand(int index, double& freq) override;
83 void queryConfiguration();
84 bool executeCommand( void );
85 bool executeEnableCommand(int index, bool& enabled) override;
86 bool executeAttenCommand(int index, double& atten) override;
87 void updateConfigurationDict() override;
88 bool setConfiguration(ConfigurationDict& cfg) override;
89
90 protected:
91 void initConfigurationDict() override;
92 unsigned int _if;
93 std::string _mode;
94
95
96 }; /* class TunerComponent */
97
98 } /* namespace NDR551 */
99
100 } // namespace Driver
101
102} // namespace LibCyberRadio
103
104
105#endif // INCLUDED_LIBCYBERRADIO_DRIVER_NDR551_TUNERCOMPONENT_H
virtual int debug(const char *format,...)
Outputs debug information.
A configuration dictionary.
bool executeFreqCommand(int index, double &freq) override
Executes the tuner frequency set command.
bool executeAttenCommand(int index, double &atten) override
Executes the tuner attenuation set command.
bool setConfiguration(ConfigurationDict &cfg) override
Sets the configuration dictionary for this component.
virtual TunerComponent & operator=(const TunerComponent &other)
Assignment operator for TunerComponent objects.
void queryConfiguration()
Tells the component to query its hardware configuration in order to create its configuration dictiona...
void initConfigurationDict() override
Initializes the configuration dictionary, defining the allowed keys.
TunerComponent(int index=1, ::LibCyberRadio::Driver::RadioHandler *parent=NULL, bool debug=false, double frequency=800e6, double attenuation=0.0, int filter=0)
Constructs a TunerComponent object.
virtual ~TunerComponent()
Destroys a TunerComponent object.
bool executeEnableCommand(int index, bool &enabled) override
Executes the tuner enable command.
void updateConfigurationDict() override
Updates the configuration dictionary from component settings.
Generic radio handler class.
Base tuner component class.
Provides programming elements for driving NDR551 radios.
Definition DataPort.h:36
Provides programming elements for driving CRS NDR-class radios.
Defines functionality for LibCyberRadio applications.
Definition App.h:24