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
22namespace 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,
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 int debug(const char *format,...)
Outputs debug information.
A configuration dictionary.
bool executeFreqCommand(int index, double &freq) override
Executes the WBDDC frequency set command.
bool setRateIndex(int index) override
Sets the WBDDC's rate index.
bool executeWbddcCommand(int index, int &rateIndex, int &udpDestination, bool &enabled, int &vitaEnable, unsigned int &streamId) override
Executes the WBDDC configuration set command.
virtual WbddcComponent & operator=(const WbddcComponent &other)
Assignment operator for WbddcComponent objects.
virtual bool setConfiguration(ConfigurationDict &cfg) override
Sets the configuration dictionary for this component.
bool setSource(int source) override
Sets the WBDDC's source (which tuner is supplying the signal).
bool setUdpDestination(int dest) override
Sets the WBDDC's UDP destination.
bool executeWbddcQuery(int index, int &rateIndex, int &udpDestination, bool &enabled, int &vitaEnable, unsigned int &streamId)
Execute a JSON wbddc Query.
void queryConfiguration() override
Tells the component to query its hardware configuration in order to create its configuration dictiona...
bool setFrequency(double freq) override
Sets the WBDDC tuned frequency.
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.
void initConfigurationDict() override
Setup Config Dict.
bool executeSourceCommand(int index, int &source) override
Executes the WBDDC source set command.
bool executeDataPortCommand(int index, int &dataPort) override
Executes the WBDDC data port set command.
virtual ~WbddcComponent()
Destroys a WbddcComponent object.
virtual void updateConfigurationDict() override
Updates the configuration dictionary from component settings.
Generic radio handler class.
Base WBDDC 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