![]() |
libcyberradio
22.01.24
|
DUC sink class. More...
#include <DUCSink.h>
Public Member Functions | |
| DUCSink (const std::string &name="DUCSink", const std::string &radio_host_name="", unsigned int radio_tcp_port=8617, unsigned int tengig_iface_index=1, float iq_scale_factor=1.0, unsigned int duc_channel=1, const std::string &duc_iface_string="eth0", unsigned int duc_rate_index=0, long duc_frequency=0, float duc_attenuation=0, unsigned int duc_tx_channels=0, double duc_tx_frequency=900, unsigned int duc_tx_attenuation=0, unsigned int duc_stream_id=40001, bool config_tx=false, bool debug=false, unsigned int fc_update_rate=20, bool use_udp=false, bool use_ring_buffer=false, unsigned int duchsPfThresh=25, unsigned int duchsPeThresh=24, unsigned int duchsPeriod=10, bool updatePE=false, int txinv_mode=0) | |
| Creates a DUCSink object. More... | |
| ~DUCSink () | |
| Destroys a DUCSink object. | |
| std::string | get_radio_host_name () const |
| Gets the radio host name. More... | |
| int | get_radio_tcp_port () const |
| Gets the radio TCP port. More... | |
| std::vector< std::string > | get_tengig_iface_list () const |
| Gets the 10GigE interface list for the radio. More... | |
| void | set_radio_params (const std::string &radio_host_name, int radio_tcp_port, const std::vector< std::string > &tengig_iface_list) |
| Sets the radio parameters. More... | |
| float | get_iq_scale_factor () const |
| Gets the I/Q scale factor used for the radio. More... | |
| void | set_iq_scale_factor (float iq_scale_factor) |
| Sets the I/Q scale factor used for the radio. More... | |
| int | get_duc_channel () const |
| Gets the channel number for the DUC in use. More... | |
| void | set_duc_channel (int duc_channel) |
| Sets the channel number for the DUC in use. More... | |
| std::string | get_duc_iface_string () const |
| Gets the interface name for the DUC in use. More... | |
| int | get_duc_iface_index () const |
| Gets the interface index (one-based) for the DUC in use. More... | |
| void | set_duc_iface_string (const std::string &duc_iface_string) |
| Sets the interface name for the DUC in use. More... | |
| int | get_duc_rate_index () const |
| Gets the rate index (zero-based) for the DUC in use. More... | |
| void | set_duc_rate_index (int duc_rate_index) |
| Sets the rate index (zero-based) for the DUC in use. More... | |
| long | get_duc_frequency () const |
| Gets the frequency offset for the DUC in use. More... | |
| void | set_duc_frequency (long duc_frequency) |
| Sets the frequency offset for the DUC in use. More... | |
| void | set_duc_txinv_mode (int duc_txinv_mode) |
| Sets the TX inversion mode for the DUC in use. More... | |
| float | get_duc_attenuation () const |
| Gets the attenuation for the DUC in use. More... | |
| void | set_duc_attenuation (float duc_attenuation) |
| Sets the attenuation for the DUC in use. More... | |
| unsigned int | get_duc_tx_channels () const |
| Gets the transmit channel mask for the DUC in use. More... | |
| void | set_duc_tx_channels (unsigned int duc_tx_channels) |
| Sets the transmit channel mask for the DUC in use. More... | |
| double | get_duc_tx_frequency () const |
| Gets the transmit center frequency (in MHz) for the DUC in use. More... | |
| void | set_duc_tx_frequency (double duc_tx_frequency) |
| Sets the transmit center frequency (in MHz) for the DUC in use. More... | |
| unsigned int | get_duc_tx_attenuation () const |
| Gets the transmit attenuation (in dB) for the DUC in use. More... | |
| void | set_duc_tx_attenuation (unsigned int duc_tx_attenuation) |
| Sets the transmit attenuation (in dB) for the DUC in use. More... | |
| unsigned int | get_duc_stream_id () const |
| Gets the VITA stream ID for the DUC. More... | |
| void | set_duc_stream_id (unsigned int duc_stream_id) |
| Sets the VITA stream ID for the DUC. More... | |
| long | get_duc_sample_rate () const |
| Gets the sample rate (in Hz) for the DUC in use, based on the rate index. More... | |
| bool | start () |
| Starts the sink. | |
| bool | stop () |
| Stops the sink. | |
| int | sendFrames (int noutput_items, std::complex< float > *input_items) |
| Sends a number of VITA 49 frames. More... | |
| virtual void | setDebugName (const std::string &debug_name) |
| Sets the debug name for this object. More... | |
| virtual void | setDebugFile (FILE *debug_fp) |
| Sets the debug file pointer for this object. More... | |
| virtual void | setDebugTimeFormat (const std::string &debug_timefmt) |
| Sets the debug time format for this object. More... | |
| virtual int | debug (const char *format,...) |
| Outputs debug information. More... | |
| virtual const char * | debugBool (bool x) |
| Gets a debug output string for a Boolean value. More... | |
| virtual bool | isDebug () const |
| Gets whether this object produces debug output. More... | |
| virtual std::string | getDebugName () const |
| Gets the debug name for this object. More... | |
| virtual std::string | rawString (const std::string &data) |
| Gets a "raw" string representation of a given data string. More... | |
| DUCSink | ( | const std::string & | name = "DUCSink", |
| const std::string & | radio_host_name = "", |
||
| unsigned int | radio_tcp_port = 8617, |
||
| unsigned int | tengig_iface_index = 1, |
||
| float | iq_scale_factor = 1.0, |
||
| unsigned int | duc_channel = 1, |
||
| const std::string & | duc_iface_string = "eth0", |
||
| unsigned int | duc_rate_index = 0, |
||
| long | duc_frequency = 0, |
||
| float | duc_attenuation = 0, |
||
| unsigned int | duc_tx_channels = 0, |
||
| double | duc_tx_frequency = 900, |
||
| unsigned int | duc_tx_attenuation = 0, |
||
| unsigned int | duc_stream_id = 40001, |
||
| bool | config_tx = false, |
||
| bool | debug = false, |
||
| unsigned int | fc_update_rate = 20, |
||
| bool | use_udp = false, |
||
| bool | use_ring_buffer = false, |
||
| unsigned int | duchsPfThresh = 25, |
||
| unsigned int | duchsPeThresh = 24, |
||
| unsigned int | duchsPeriod = 10, |
||
| bool | updatePE = false, |
||
| int | txinv_mode = 0 |
||
| ) |
Creates a DUCSink object.
| name | Name to give to this object for debug purposes. |
| radio_host_name | The radio host name. If this is an empty string, then the block will not connect to a radio. |
| radio_tcp_port | The radio TCP port. |
| tengig_iface_index | The 10GigE interface index. |
| iq_scale_factor | Scale factor for converting I/Q data from complex input to native sample format. |
| duc_channel | The channel number for the DUC in use. |
| duc_iface_string | The interface string for the DUC in use. |
| duc_rate_index | The rate index for the DUC in use. |
| duc_frequency | The frequency offset for the DUC in use. |
| duc_attenuation | The attenuation for the DUC in use. |
| duc_tx_channels | The transmit channel mask for the DUC in use. |
| duc_tx_frequency | The transmit center frequency for the DUC in use. |
| duc_tx_attenuation | The transmit attenuation for the DUC in use. |
| duc_stream_id | The stream ID/UDP port for the DUC in use. |
| config_tx | Whether or not to configure the transmitter. |
| debug | Whether the block should produce debug output. Defaults to False. |
| fc_update_rate | Number of updates to make per second. |
| use_udp | Whether or not to use UDP. |
| use_ring_buffer | Whether or not to use a ring buffer. |
| duchsPfThresh | |
| duchsPeThresh | |
| duchsPeriod | |
| updatePE | |
| txinv_mode |
Definition at line 27 of file DUCSink.cpp.
|
virtualinherited |
Outputs debug information.
This method follows the same semantics as printf(). Output is preceded by a timestamp and the name of the object, if provided.
| format | The printf()-style format string. |
| ... | Comma-separated list of arguments to print. Note that these need to be arguments that can be supported natively through printf(). |
Definition at line 95 of file Debuggable.cpp.
|
virtualinherited |
Gets a debug output string for a Boolean value.
| x | Boolean value |
Definition at line 126 of file Debuggable.cpp.
| float get_duc_attenuation | ( | ) | const |
Gets the attenuation for the DUC in use.
Definition at line 190 of file DUCSink.cpp.
| int get_duc_channel | ( | ) | const |
Gets the channel number for the DUC in use.
Definition at line 129 of file DUCSink.cpp.
| long get_duc_frequency | ( | ) | const |
Gets the frequency offset for the DUC in use.
Definition at line 171 of file DUCSink.cpp.
| int get_duc_iface_index | ( | ) | const |
Gets the interface index (one-based) for the DUC in use.
Definition at line 146 of file DUCSink.cpp.
| std::string get_duc_iface_string | ( | ) | const |
Gets the interface name for the DUC in use.
Definition at line 141 of file DUCSink.cpp.
| int get_duc_rate_index | ( | ) | const |
Gets the rate index (zero-based) for the DUC in use.
Definition at line 159 of file DUCSink.cpp.
| long get_duc_sample_rate | ( | ) | const |
Gets the sample rate (in Hz) for the DUC in use, based on the rate index.
Definition at line 250 of file DUCSink.cpp.
| unsigned int get_duc_stream_id | ( | ) | const |
Gets the VITA stream ID for the DUC.
Definition at line 238 of file DUCSink.cpp.
| unsigned int get_duc_tx_attenuation | ( | ) | const |
Gets the transmit attenuation (in dB) for the DUC in use.
Definition at line 226 of file DUCSink.cpp.
| unsigned int get_duc_tx_channels | ( | ) | const |
Gets the transmit channel mask for the DUC in use.
Definition at line 202 of file DUCSink.cpp.
| double get_duc_tx_frequency | ( | ) | const |
Gets the transmit center frequency (in MHz) for the DUC in use.
Definition at line 214 of file DUCSink.cpp.
| float get_iq_scale_factor | ( | ) | const |
Gets the I/Q scale factor used for the radio.
Definition at line 119 of file DUCSink.cpp.
| std::string get_radio_host_name | ( | ) | const |
| int get_radio_tcp_port | ( | ) | const |
| std::vector< std::string > get_tengig_iface_list | ( | ) | const |
Gets the 10GigE interface list for the radio.
Definition at line 114 of file DUCSink.cpp.
|
virtualinherited |
Gets the debug name for this object.
Definition at line 138 of file Debuggable.cpp.
|
virtualinherited |
Gets whether this object produces debug output.
Definition at line 133 of file Debuggable.cpp.
|
virtualinherited |
Gets a "raw" string representation of a given data string.
"Raw" string representations mimic Python string representations. Whitespace characters are denoted by backslash representations ("\\r", "\\n", "\\t", "\\v", "\\f"), while other non-printable characters are represented with hex representation ("\\x00", etc.)
| data | Data string |
Definition at line 143 of file Debuggable.cpp.
| int sendFrames | ( | int | noutput_items, |
| std::complex< float > * | input_items | ||
| ) |
Sends a number of VITA 49 frames.
| noutput_items | Number of VITA 49 frames to send. |
| input_items | Pointer to an array of complex samples. This buffer must have enough samples to fill the number of VITA frames requested. |
Definition at line 298 of file DUCSink.cpp.
| void set_duc_attenuation | ( | float | duc_attenuation | ) |
Sets the attenuation for the DUC in use.
| duc_attenuation | The attenuation for the DUC in use. |
Definition at line 195 of file DUCSink.cpp.
| void set_duc_channel | ( | int | duc_channel | ) |
Sets the channel number for the DUC in use.
| duc_channel | The channel number for the DUC in use. |
Definition at line 134 of file DUCSink.cpp.
| void set_duc_frequency | ( | long | duc_frequency | ) |
Sets the frequency offset for the DUC in use.
| duc_frequency | The frequency offset for the DUC in use. |
Definition at line 176 of file DUCSink.cpp.
| void set_duc_iface_string | ( | const std::string & | duc_iface_string | ) |
Sets the interface name for the DUC in use.
| duc_iface_string | The interface string for the DUC in use. |
Definition at line 151 of file DUCSink.cpp.
| void set_duc_rate_index | ( | int | duc_rate_index | ) |
Sets the rate index (zero-based) for the DUC in use.
| duc_rate_index | The rate index for the DUC in use. |
Definition at line 164 of file DUCSink.cpp.
| void set_duc_stream_id | ( | unsigned int | duc_stream_id | ) |
Sets the VITA stream ID for the DUC.
| duc_stream_id | The stream ID. |
Definition at line 243 of file DUCSink.cpp.
| void set_duc_tx_attenuation | ( | unsigned int | duc_tx_attenuation | ) |
Sets the transmit attenuation (in dB) for the DUC in use.
| duc_tx_attenuation | The transmit attenuation for the DUC in use. |
Definition at line 231 of file DUCSink.cpp.
| void set_duc_tx_channels | ( | unsigned int | duc_tx_channels | ) |
Sets the transmit channel mask for the DUC in use.
| duc_tx_channels | The transmit channel mask for the DUC in use. |
Definition at line 207 of file DUCSink.cpp.
| void set_duc_tx_frequency | ( | double | duc_tx_frequency | ) |
Sets the transmit center frequency (in MHz) for the DUC in use.
| duc_tx_frequency | The transmit center frequency for the DUC in use. |
Definition at line 219 of file DUCSink.cpp.
| void set_duc_txinv_mode | ( | int | duc_txinv_mode | ) |
Sets the TX inversion mode for the DUC in use.
| duc_txinv_mode | 1 to enable tx inversion, 0 to disable. |
Definition at line 183 of file DUCSink.cpp.
| void set_iq_scale_factor | ( | float | iq_scale_factor | ) |
Sets the I/Q scale factor used for the radio.
| iq_scale_factor | The scale factor. |
Definition at line 124 of file DUCSink.cpp.
| void set_radio_params | ( | const std::string & | radio_host_name, |
| int | radio_tcp_port, | ||
| const std::vector< std::string > & | tengig_iface_list | ||
| ) |
Sets the radio parameters.
| radio_host_name | The radio host name. |
| radio_tcp_port | The port number. |
| tengig_iface_list | The 10GigE interface list. |
Definition at line 342 of file DUCSink.cpp.
|
virtualinherited |
Sets the debug file pointer for this object.
| debug_fp | File to send debug output to. |
Definition at line 81 of file Debuggable.cpp.
|
virtualinherited |
Sets the debug name for this object.
Use this method to set unique debug names for objects of the same class for easy differentiation.
| debug_name | Name for identifying this object in debug output. |
Definition at line 74 of file Debuggable.cpp.
|
virtualinherited |
Sets the debug time format for this object.
| debug_timefmt | Format string for displaying timestamp, as compatible with strftime(). If this is an empty string, don't display a timestamp. |
Definition at line 88 of file Debuggable.cpp.