![]() |
libcyberradio
22.01.24
|
Transmit packetizer class. More...
#include <TransmitPacketizer.h>
Public Member Functions | |
| TransmitPacketizer (const std::string &radioHostName="", int radioTcpPort=8617, unsigned int ducChannel=1, const std::string &ifname="eth0", unsigned int tenGigIndex=1, int dipIndex=-1, unsigned int ducRate=0, unsigned int ducTxChannels=0, float ducFreq=900e6, float ducAtten=0, double txFreq=900, float txAtten=0, unsigned int streamId=40001, bool config_tx=false, bool debug=false) | |
| Constructs a TransmitPacketizer object. More... | |
| virtual | ~TransmitPacketizer () |
| Destroys a TransmitPacketizer object. | |
| bool | setRadioHostName (const std::string &radioHostName) |
| Sets the radio host name. More... | |
| bool | setRadioTcpPort (int radioTcpPort) |
| Sets the radio TCP port. More... | |
| bool | setDucChannel (unsigned int ducChannel) |
| Sets the DUC channel number. More... | |
| bool | setDucInterface (const std::string &ifname, unsigned int tenGigIndex) |
| Sets the DUC interface parameters. More... | |
| bool | setDucRate (unsigned int ducRate) |
| Sets the DUC rate index. More... | |
| bool | setDucTxChannels (unsigned int ducTxChannels) |
| Sets the DUC transmit channel bitmap. More... | |
| bool | setDucFreq (float ducFreq) |
| Sets the DUC frequency. More... | |
| bool | setDucTxinvMode (unsigned int txinvMode) |
| Sets the DUC TX Inversion Mode. More... | |
| bool | setDucAtten (float ducAtten) |
| Sets the DUC attenuation. More... | |
| bool | setTxFreq (double txFreq) |
| Sets the transmitter frequency. More... | |
| bool | setTxAtten (float txAtten) |
| Sets the transmitter attenuation. More... | |
| bool | setStreamId (unsigned int streamId) |
| Sets the stream ID. More... | |
| bool | setDebug (bool debug) |
| Sets whether or not to produce debug output. More... | |
| bool | setRadioParameters (const std::string &radioHostName, int radioTcpPort) |
| Sets the radio parameters. More... | |
| bool | setDucParameters (unsigned int tenGigIndex, unsigned int ducRate, unsigned int ducTxChannels, float ducFreq, float ducAtten, double txFreq, float txAtten, unsigned int streamId) |
| Sets the DUC parameters. More... | |
| void | start () |
| Starts the packetizer. | |
| void | stop () |
| Stops the packetizer. | |
| unsigned int | sendFrame (short *samples) |
| Sends a number of samples as a VITA 49 frame. More... | |
| bool | isConnected (void) |
| Gets whether or not the packetizer is connected. More... | |
| bool | isReadyToReceive (void) |
| Gets whether or not the packetizer is ready to receive data. 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... | |
Transmit packetizer class.
Definition at line 37 of file TransmitPacketizer.h.
| TransmitPacketizer | ( | const std::string & | radioHostName = "", |
| int | radioTcpPort = 8617, |
||
| unsigned int | ducChannel = 1, |
||
| const std::string & | ifname = "eth0", |
||
| unsigned int | tenGigIndex = 1, |
||
| int | dipIndex = -1, |
||
| unsigned int | ducRate = 0, |
||
| unsigned int | ducTxChannels = 0, |
||
| float | ducFreq = 900e6, |
||
| float | ducAtten = 0, |
||
| double | txFreq = 900, |
||
| float | txAtten = 0, |
||
| unsigned int | streamId = 40001, |
||
| bool | config_tx = false, |
||
| bool | debug = false |
||
| ) |
Constructs a TransmitPacketizer object.
| radioHostName | Radio host name |
| radioTcpPort | Radio TCP port number |
| ducChannel | DUC channel number |
| ifname | Ethernet interface name for the 10GigE interface to use |
| tenGigIndex | 10GigE interface index |
| dipIndex | |
| ducRate | DUC rate index |
| ducTxChannels | Bitmap of transmitters the DUC will use |
| ducFreq | DUC frequency (Hz) |
| ducAtten | DUC attenuation (dB) |
| txFreq | Transmitter frequency (Hz) |
| txAtten | Transmitter attenuation (dB) |
| streamId | Stream ID |
| config_tx | Whether or not to configure the transmitter |
| debug | Whether or not to produce debug output |
Definition at line 57 of file TransmitPacketizer.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.
|
virtualinherited |
Gets the debug name for this object.
Definition at line 138 of file Debuggable.cpp.
| bool isConnected | ( | void | ) |
Gets whether or not the packetizer is connected.
Definition at line 536 of file TransmitPacketizer.cpp.
|
virtualinherited |
Gets whether this object produces debug output.
Definition at line 133 of file Debuggable.cpp.
| bool isReadyToReceive | ( | void | ) |
Gets whether or not the packetizer is ready to receive data.
Definition at line 542 of file TransmitPacketizer.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.
| unsigned int sendFrame | ( | short * | samples | ) |
Sends a number of samples as a VITA 49 frame.
| samples | Buffer of samples. This buffer must be twice the number of samples in a VITA 49 frame payload. |
Definition at line 501 of file TransmitPacketizer.cpp.
| bool setDebug | ( | bool | debug | ) |
Sets whether or not to produce debug output.
| debug | Whether or not to produce debug output |
Definition at line 349 of file TransmitPacketizer.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.
| bool setDucAtten | ( | float | ducAtten | ) |
Sets the DUC attenuation.
| ducAtten | DUC attenuation (dB) |
Definition at line 254 of file TransmitPacketizer.cpp.
| bool setDucChannel | ( | unsigned int | ducChannel | ) |
Sets the DUC channel number.
| ducChannel | DUC channel number |
Definition at line 150 of file TransmitPacketizer.cpp.
| bool setDucFreq | ( | float | ducFreq | ) |
Sets the DUC frequency.
| ducFreq | DUC frequency (Hz) |
Definition at line 228 of file TransmitPacketizer.cpp.
| bool setDucInterface | ( | const std::string & | ifname, |
| unsigned int | tenGigIndex | ||
| ) |
Sets the DUC interface parameters.
| ifname | Ethernet interface name for the 10GigE interface to use |
| tenGigIndex | 10GigE interface index |
Definition at line 172 of file TransmitPacketizer.cpp.
| bool setDucParameters | ( | unsigned int | tenGigIndex, |
| unsigned int | ducRate, | ||
| unsigned int | ducTxChannels, | ||
| float | ducFreq, | ||
| float | ducAtten, | ||
| double | txFreq, | ||
| float | txAtten, | ||
| unsigned int | streamId | ||
| ) |
Sets the DUC parameters.
| tenGigIndex | 10GigE interface index |
| ducRate | DUC rate index |
| ducTxChannels | Bitmap of transmitters the DUC will use |
| ducFreq | DUC frequency (Hz) |
| ducAtten | DUC attenuation (dB) |
| txFreq | Transmitter frequency (Hz) |
| txAtten | Transmitter attenuation (dB) |
| streamId | Stream ID |
Definition at line 403 of file TransmitPacketizer.cpp.
| bool setDucRate | ( | unsigned int | ducRate | ) |
Sets the DUC rate index.
| ducRate | DUC rate index |
Definition at line 202 of file TransmitPacketizer.cpp.
| bool setDucTxChannels | ( | unsigned int | ducTxChannels | ) |
Sets the DUC transmit channel bitmap.
| ducTxChannels | Bitmap of transmitters the DUC will use |
Definition at line 215 of file TransmitPacketizer.cpp.
| bool setDucTxinvMode | ( | unsigned int | txinvMode | ) |
Sets the DUC TX Inversion Mode.
| txinvMode | TX Inversion Mode (0=normal, 1=inverted) |
Definition at line 241 of file TransmitPacketizer.cpp.
| bool setRadioHostName | ( | const std::string & | radioHostName | ) |
Sets the radio host name.
| radioHostName | Radio host name |
Definition at line 140 of file TransmitPacketizer.cpp.
| bool setRadioParameters | ( | const std::string & | radioHostName, |
| int | radioTcpPort | ||
| ) |
Sets the radio parameters.
| radioHostName | Radio host name |
| radioTcpPort | Radio TCP port number |
Definition at line 355 of file TransmitPacketizer.cpp.
| bool setRadioTcpPort | ( | int | radioTcpPort | ) |
Sets the radio TCP port.
| radioTcpPort | Radio TCP port number |
Definition at line 145 of file TransmitPacketizer.cpp.
| bool setStreamId | ( | unsigned int | streamId | ) |
Sets the stream ID.
| streamId | Stream ID |
Definition at line 334 of file TransmitPacketizer.cpp.
| bool setTxAtten | ( | float | txAtten | ) |
Sets the transmitter attenuation.
| txAtten | Transmitter attenuation (dB) |
Definition at line 321 of file TransmitPacketizer.cpp.
| bool setTxFreq | ( | double | txFreq | ) |
Sets the transmitter frequency.
| txFreq | Transmitter frequency (Hz) |
Definition at line 299 of file TransmitPacketizer.cpp.