libcyberradio  22.01.24
WbddcComponent.h
1 /***************************************************************************
2  * \file WbddcComponent.h
3  * \brief Defines the WBDDC 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_WBDDCCOMPONENT_H
12 #define INCLUDED_LIBCYBERRADIO_DRIVER_NDR551_WBDDCCOMPONENT_H
13 
14 #include "LibCyberRadio/Driver/WbddcComponent.h"
15 #include "LibCyberRadio/Common/BasicDict.h"
16 #include <string>
17 
18 
22 namespace LibCyberRadio
23 {
27  namespace Driver
28  {
29  // Forward declaration for RadioHandler
30  class RadioHandler;
31 
35  namespace NDR551
36  {
37 
51  {
52  public:
66  WbddcComponent(int index = 1,
67  ::LibCyberRadio::Driver::RadioHandler* parent = NULL,
68  bool debug = false,
69  int dataPort = 1,
70  int rateIndex = 0,
71  int udpDestination = 0,
72  int vitaEnable = 0,
73  int streamId = 0);
77  virtual ~WbddcComponent();
82  WbddcComponent(const WbddcComponent& other);
88  virtual WbddcComponent& operator=(const WbddcComponent& other);
92  void initConfigurationDict() override;
103  bool executeWbddcQuery(int index, int& rateIndex,
104  int& udpDestination, bool& enabled, int& vitaEnable,
105  unsigned int& streamId);
106 
107  void queryConfiguration() override;
113  virtual bool setConfiguration(ConfigurationDict& cfg) override;
114 
115  bool executeDataPortCommand(int index, int& dataPort) override;
116  bool executeSourceCommand(int index, int& source) override;
117  bool executeFreqCommand(int index, double& freq) override;
118  bool executeWbddcCommand(int index, int& rateIndex,
119  int& udpDestination, bool& enabled, int& vitaEnable,
120  unsigned int& streamId) override;
121  bool setRateIndex(int index) override;
122  bool setSource(int source) override;
123  bool setUdpDestination(int dest) override;
124  bool setFrequency(double freq) override;
125 
126  private:
128  protected:
132  virtual void updateConfigurationDict() override;
133  std::string _type;
134  int32_t _ovs;
135  int32_t _decimation;
136  int32_t _gddcid;
137  int32_t _dgv;
138  int32_t _dul;
139  int32_t _dll;
140  int32_t _dtl;
141  int32_t _dal;
142  int32_t _ddl;
143  int32_t _dao;
144  int32_t _ddo;
145  int32_t _datc;
146  int32_t _ddtc;
147  int32_t _dat;
148  int32_t _ddt;
149  std::string _mode;
150 
151  }; // class WbddcComponent
152 
153  } /* namespace NDR551 */
154 
155  } // namespace Driver
156 
157 } // namespace LibCyberRadio
158 
159 
160 #endif // INCLUDED_LIBCYBERRADIO_DRIVER_NDR551_WBDDCCOMPONENT_H
virtual void updateConfigurationDict() override
Updates the configuration dictionary from component settings.
virtual WbddcComponent & operator=(const WbddcComponent &other)
Assignment operator for WbddcComponent objects.
bool setUdpDestination(int dest) override
Sets the WBDDC&#39;s UDP destination.
bool executeFreqCommand(int index, double &freq) override
Executes the WBDDC frequency set command.
bool executeSourceCommand(int index, int &source) override
Executes the WBDDC source set command.
void initConfigurationDict() override
Setup Config Dict.
WbddcComponent(int index=1, ::LibCyberRadio::Driver::RadioHandler *parent=NULL, bool debug=false, int dataPort=1, int rateIndex=0, int udpDestination=0, int vitaEnable=0, int streamId=0)
Constructs a WbddcComponent object.
virtual bool setConfiguration(ConfigurationDict &cfg) override
Sets the configuration dictionary for this component.
bool setSource(int source) override
Sets the WBDDC&#39;s source (which tuner is supplying the signal).
bool executeWbddcCommand(int index, int &rateIndex, int &udpDestination, bool &enabled, int &vitaEnable, unsigned int &streamId) override
Executes the WBDDC configuration set command.
Generic radio handler class.
Definition: RadioHandler.h:54
virtual int debug(const char *format,...)
Outputs debug information.
Definition: Debuggable.cpp:95
WBDDC component class for the NDR551.
bool setRateIndex(int index) override
Sets the WBDDC&#39;s rate index.
Defines functionality for LibCyberRadio applications.
Definition: App.h:23
Base WBDDC component class.
A configuration dictionary.
Definition: Configurable.h:51
virtual ~WbddcComponent()
Destroys a WbddcComponent object.
void queryConfiguration() override
Tells the component to query its hardware configuration in order to create its configuration dictiona...
bool executeDataPortCommand(int index, int &dataPort) override
Executes the WBDDC data port set command.
bool executeWbddcQuery(int index, int &rateIndex, int &udpDestination, bool &enabled, int &vitaEnable, unsigned int &streamId)
Execute a JSON wbddc Query.
bool setFrequency(double freq) override
Sets the WBDDC tuned frequency.