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 
21 namespace 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,
61  ::LibCyberRadio::Driver::RadioHandler* parent = NULL,
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 ~TunerComponent()
Destroys a TunerComponent object.
bool executeFreqCommand(int index, double &freq) override
Executes the tuner frequency set command.
Tuner component class for the NDR551.
bool executeAttenCommand(int index, double &atten) override
Executes the tuner attenuation set command.
void initConfigurationDict() override
Initializes the configuration dictionary, defining the allowed keys.
Generic radio handler class.
Definition: RadioHandler.h:54
virtual TunerComponent & operator=(const TunerComponent &other)
Assignment operator for TunerComponent objects.
virtual int debug(const char *format,...)
Outputs debug information.
Definition: Debuggable.cpp:95
Defines functionality for LibCyberRadio applications.
Definition: App.h:23
bool executeEnableCommand(int index, bool &enabled) override
Executes the tuner enable command.
A configuration dictionary.
Definition: Configurable.h:51
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.
void queryConfiguration()
Tells the component to query its hardware configuration in order to create its configuration dictiona...
Base tuner component class.
bool setConfiguration(ConfigurationDict &cfg) override
Sets the configuration dictionary for this component.
void updateConfigurationDict() override
Updates the configuration dictionary from component settings.