SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Types | Public Member Functions | Public Attributes | List of all members
ATVModSettings Struct Reference

#include <atvmodsettings.h>

+ Collaboration diagram for ATVModSettings:

Public Types

enum  ATVStd {
  ATVStdPAL625, ATVStdPAL525, ATVStd405, ATVStdShortInterleaved,
  ATVStdShort, ATVStdHSkip
}
 
enum  ATVModInput {
  ATVModInputUniform, ATVModInputHBars, ATVModInputVBars, ATVModInputChessboard,
  ATVModInputHGradient, ATVModInputVGradient, ATVModInputImage, ATVModInputVideo,
  ATVModInputCamera
}
 
enum  ATVModulation {
  ATVModulationAM, ATVModulationFM, ATVModulationUSB, ATVModulationLSB,
  ATVModulationVestigialUSB, ATVModulationVestigialLSB
}
 

Public Member Functions

 ATVModSettings ()
 
void resetToDefaults ()
 
void setChannelMarker (Serializable *channelMarker)
 
QByteArray serialize () const
 
bool deserialize (const QByteArray &data)
 

Public Attributes

qint64 m_inputFrequencyOffset
 offset from baseband center frequency More...
 
Real m_rfBandwidth
 Bandwidth of modulated signal or direct sideband for SSB / vestigial SSB. More...
 
Real m_rfOppBandwidth
 Bandwidth of opposite sideband for vestigial SSB. More...
 
ATVStd m_atvStd
 Standard. More...
 
int m_nbLines
 Number of lines per full frame. More...
 
int m_fps
 Number of frames per second. More...
 
ATVModInput m_atvModInput
 Input source type. More...
 
Real m_uniformLevel
 Percentage between black and white for uniform screen display. More...
 
ATVModulation m_atvModulation
 RF modulation type. More...
 
bool m_videoPlayLoop
 Play video in a loop. More...
 
bool m_videoPlay
 True to play video and false to pause. More...
 
bool m_cameraPlay
 True to play camera video and false to pause. More...
 
bool m_channelMute
 Mute channel baseband output. More...
 
bool m_invertedVideo
 True if video signal is inverted before modulation. More...
 
float m_rfScalingFactor
 Scaling factor from +/-1 to +/-2^15. More...
 
float m_fmExcursion
 FM excursion factor relative to full bandwidth. More...
 
bool m_forceDecimator
 Forces decimator even when channel and source sample rates are equal. More...
 
bool m_showOverlayText
 Show overlay text on image. More...
 
QString m_overlayText
 
quint32 m_rgbColor
 
QString m_title
 
bool m_useReverseAPI
 
QString m_reverseAPIAddress
 
uint16_t m_reverseAPIPort
 
uint16_t m_reverseAPIDeviceIndex
 
uint16_t m_reverseAPIChannelIndex
 
Serializablem_channelMarker
 

Detailed Description

Definition at line 27 of file atvmodsettings.h.

Member Enumeration Documentation

◆ ATVModInput

◆ ATVModulation

◆ ATVStd

Enumerator
ATVStdPAL625 
ATVStdPAL525 
ATVStd405 
ATVStdShortInterleaved 
ATVStdShort 
ATVStdHSkip 

Definition at line 29 of file atvmodsettings.h.

Constructor & Destructor Documentation

◆ ATVModSettings()

ATVModSettings::ATVModSettings ( )

Definition at line 25 of file atvmodsettings.cpp.

References resetToDefaults().

25  :
27 {
29 }
Serializable * m_channelMarker
+ Here is the call graph for this function:

Member Function Documentation

◆ deserialize()

bool ATVModSettings::deserialize ( const QByteArray &  data)

Definition at line 94 of file atvmodsettings.cpp.

References Serializable::deserialize(), SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_atvModInput, m_atvModulation, m_atvStd, m_channelMarker, m_fmExcursion, m_fps, m_inputFrequencyOffset, m_invertedVideo, m_nbLines, m_overlayText, m_reverseAPIAddress, m_reverseAPIChannelIndex, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_rfBandwidth, m_rfOppBandwidth, m_rfScalingFactor, m_rgbColor, m_title, m_uniformLevel, m_useReverseAPI, SimpleDeserializer::readBlob(), SimpleDeserializer::readBool(), SimpleDeserializer::readReal(), SimpleDeserializer::readS32(), SimpleDeserializer::readString(), SimpleDeserializer::readU32(), and resetToDefaults().

Referenced by ATVModGUI::deserialize(), ATVMod::deserialize(), and setChannelMarker().

95 {
96  SimpleDeserializer d(data);
97 
98  if(!d.isValid())
99  {
100  resetToDefaults();
101  return false;
102  }
103 
104  if(d.getVersion() == 1)
105  {
106  QByteArray bytetmp;
107  qint32 tmp;
108  uint32_t utmp;
109 
110  d.readS32(1, &tmp, 0);
112  d.readReal(2, &m_rfBandwidth, 1000000);
113  d.readS32(3, &tmp, 100);
114  m_uniformLevel = tmp / 100.0; // percent
115  d.readS32(4, &tmp, 0);
116  m_atvStd = (ATVStd) tmp;
117  d.readS32(5, &tmp, 0);
118  m_atvModInput = (ATVModInput) tmp;
119  d.readU32(6, &m_rgbColor, 0);
120  d.readReal(7, &m_rfOppBandwidth, 0);
121  d.readS32(8, &tmp, 0);
123  d.readBool(9, &m_invertedVideo, false);
124  d.readS32(10, &m_nbLines, 625);
125  d.readS32(11, &m_fps, 25);
126  d.readS32(12, &tmp, 80);
127  m_rfScalingFactor = tmp * 327.68f;
128  d.readS32(13, &tmp, 250);
129  m_fmExcursion = tmp / 1000.0; // pro mill
130  d.readString(14, &m_overlayText, "ATV");
131 
132  if (m_channelMarker)
133  {
134  d.readBlob(15, &bytetmp);
135  m_channelMarker->deserialize(bytetmp);
136  }
137 
138  d.readString(16, &m_title, "ATV Modulator");
139  d.readBool(17, &m_useReverseAPI, false);
140  d.readString(18, &m_reverseAPIAddress, "127.0.0.1");
141  d.readU32(19, &utmp, 0);
142 
143  if ((utmp > 1023) && (utmp < 65535)) {
144  m_reverseAPIPort = utmp;
145  } else {
146  m_reverseAPIPort = 8888;
147  }
148 
149  d.readU32(20, &utmp, 0);
150  m_reverseAPIDeviceIndex = utmp > 99 ? 99 : utmp;
151  d.readU32(21, &utmp, 0);
152  m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp;
153  return true;
154  }
155  else
156  {
157  resetToDefaults();
158  return false;
159  }
160 }
float m_rfScalingFactor
Scaling factor from +/-1 to +/-2^15.
ATVModulation m_atvModulation
RF modulation type.
uint16_t m_reverseAPIDeviceIndex
int m_nbLines
Number of lines per full frame.
quint32 m_rgbColor
qint64 m_inputFrequencyOffset
offset from baseband center frequency
unsigned int uint32_t
Definition: rtptypes_win.h:46
QString m_overlayText
int m_fps
Number of frames per second.
uint16_t m_reverseAPIChannelIndex
QString m_reverseAPIAddress
float m_fmExcursion
FM excursion factor relative to full bandwidth.
bool m_invertedVideo
True if video signal is inverted before modulation.
virtual bool deserialize(const QByteArray &data)=0
ATVStd m_atvStd
Standard.
ATVModInput m_atvModInput
Input source type.
Real m_uniformLevel
Percentage between black and white for uniform screen display.
Serializable * m_channelMarker
Real m_rfBandwidth
Bandwidth of modulated signal or direct sideband for SSB / vestigial SSB.
uint16_t m_reverseAPIPort
Real m_rfOppBandwidth
Bandwidth of opposite sideband for vestigial SSB.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void ATVModSettings::resetToDefaults ( )

Definition at line 31 of file atvmodsettings.cpp.

References ATVModInputHBars, ATVModulationAM, ATVStdPAL625, m_atvModInput, m_atvModulation, m_atvStd, m_cameraPlay, m_channelMute, m_fmExcursion, m_forceDecimator, m_fps, m_inputFrequencyOffset, m_invertedVideo, m_nbLines, m_overlayText, m_reverseAPIAddress, m_reverseAPIChannelIndex, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_rfBandwidth, m_rfOppBandwidth, m_rfScalingFactor, m_rgbColor, m_showOverlayText, m_title, m_uniformLevel, m_useReverseAPI, m_videoPlay, m_videoPlayLoop, and SDR_TX_SCALEF.

Referenced by ATVModSettings(), ATVModGUI::deserialize(), deserialize(), ATVMod::deserialize(), and ATVModGUI::resetToDefaults().

32 {
34  m_rfBandwidth = 1000000;
35  m_rfOppBandwidth = 0;
37  m_nbLines = 625;
38  m_fps = 25;
40  m_uniformLevel = 0.5f;
42  m_videoPlayLoop = false;
43  m_videoPlay = false;
44  m_cameraPlay = false;
45  m_channelMute = false;
46  m_invertedVideo = false;
47  m_rfScalingFactor = 0.891235351562f * SDR_TX_SCALEF; // -1dB
48  m_fmExcursion = 0.5f; // half bandwidth
49  m_forceDecimator = false;
50  m_showOverlayText = false;
51  m_overlayText = "ATV";
52  m_rgbColor = QColor(255, 255, 255).rgb();
53  m_title = "ATV Modulator";
54  m_useReverseAPI = false;
55  m_reverseAPIAddress = "127.0.0.1";
56  m_reverseAPIPort = 8888;
59 }
float m_rfScalingFactor
Scaling factor from +/-1 to +/-2^15.
ATVModulation m_atvModulation
RF modulation type.
uint16_t m_reverseAPIDeviceIndex
int m_nbLines
Number of lines per full frame.
quint32 m_rgbColor
qint64 m_inputFrequencyOffset
offset from baseband center frequency
QString m_overlayText
bool m_channelMute
Mute channel baseband output.
bool m_forceDecimator
Forces decimator even when channel and source sample rates are equal.
#define SDR_TX_SCALEF
Definition: dsptypes.h:39
int m_fps
Number of frames per second.
uint16_t m_reverseAPIChannelIndex
QString m_reverseAPIAddress
float m_fmExcursion
FM excursion factor relative to full bandwidth.
bool m_showOverlayText
Show overlay text on image.
bool m_invertedVideo
True if video signal is inverted before modulation.
ATVStd m_atvStd
Standard.
ATVModInput m_atvModInput
Input source type.
bool m_videoPlay
True to play video and false to pause.
bool m_cameraPlay
True to play camera video and false to pause.
Real m_uniformLevel
Percentage between black and white for uniform screen display.
Real m_rfBandwidth
Bandwidth of modulated signal or direct sideband for SSB / vestigial SSB.
uint16_t m_reverseAPIPort
Real m_rfOppBandwidth
Bandwidth of opposite sideband for vestigial SSB.
bool m_videoPlayLoop
Play video in a loop.
+ Here is the caller graph for this function:

◆ serialize()

QByteArray ATVModSettings::serialize ( ) const

Definition at line 61 of file atvmodsettings.cpp.

References SimpleSerializer::final(), m_atvModInput, m_atvModulation, m_atvStd, m_channelMarker, m_fmExcursion, m_fps, m_inputFrequencyOffset, m_invertedVideo, m_nbLines, m_overlayText, m_reverseAPIAddress, m_reverseAPIChannelIndex, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_rfBandwidth, m_rfOppBandwidth, m_rfScalingFactor, m_rgbColor, m_title, m_uniformLevel, m_useReverseAPI, Serializable::serialize(), SimpleSerializer::writeBlob(), SimpleSerializer::writeBool(), SimpleSerializer::writeReal(), SimpleSerializer::writeS32(), SimpleSerializer::writeString(), and SimpleSerializer::writeU32().

Referenced by ATVModGUI::serialize(), ATVMod::serialize(), and setChannelMarker().

62 {
63  SimpleSerializer s(1);
64 
65  s.writeS32(1, m_inputFrequencyOffset);
66  s.writeReal(2, m_rfBandwidth);
67  s.writeS32(3, roundf(m_uniformLevel * 100.0)); // percent
68  s.writeS32(4, (int) m_atvStd);
69  s.writeS32(5, (int) m_atvModInput);
70  s.writeU32(6, m_rgbColor);
71  s.writeReal(7, m_rfOppBandwidth);
72  s.writeS32(8, (int) m_atvModulation);
73  s.writeBool(9, m_invertedVideo);
74  s.writeS32(10, m_nbLines);
75  s.writeS32(11, m_fps);
76  s.writeS32(12, roundf(m_rfScalingFactor / 327.68f));
77  s.writeS32(13, roundf(m_fmExcursion * 1000.0)); // pro mill
78  s.writeString(14, m_overlayText);
79 
80  if (m_channelMarker) {
81  s.writeBlob(15, m_channelMarker->serialize());
82  }
83 
84  s.writeString(16, m_title);
85  s.writeBool(17, m_useReverseAPI);
86  s.writeString(18, m_reverseAPIAddress);
87  s.writeU32(19, m_reverseAPIPort);
88  s.writeU32(20, m_reverseAPIDeviceIndex);
89  s.writeU32(21, m_reverseAPIChannelIndex);
90 
91  return s.final();
92 }
float m_rfScalingFactor
Scaling factor from +/-1 to +/-2^15.
ATVModulation m_atvModulation
RF modulation type.
uint16_t m_reverseAPIDeviceIndex
int m_nbLines
Number of lines per full frame.
quint32 m_rgbColor
qint64 m_inputFrequencyOffset
offset from baseband center frequency
QString m_overlayText
int m_fps
Number of frames per second.
uint16_t m_reverseAPIChannelIndex
QString m_reverseAPIAddress
float m_fmExcursion
FM excursion factor relative to full bandwidth.
bool m_invertedVideo
True if video signal is inverted before modulation.
ATVStd m_atvStd
Standard.
ATVModInput m_atvModInput
Input source type.
virtual QByteArray serialize() const =0
Real m_uniformLevel
Percentage between black and white for uniform screen display.
Serializable * m_channelMarker
Real m_rfBandwidth
Bandwidth of modulated signal or direct sideband for SSB / vestigial SSB.
uint16_t m_reverseAPIPort
Real m_rfOppBandwidth
Bandwidth of opposite sideband for vestigial SSB.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setChannelMarker()

void ATVModSettings::setChannelMarker ( Serializable channelMarker)
inline

Definition at line 93 of file atvmodsettings.h.

References deserialize(), and serialize().

Referenced by ATVModGUI::ATVModGUI().

93 { m_channelMarker = channelMarker; }
Serializable * m_channelMarker
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_atvModInput

ATVModInput ATVModSettings::m_atvModInput

◆ m_atvModulation

ATVModulation ATVModSettings::m_atvModulation

◆ m_atvStd

ATVStd ATVModSettings::m_atvStd

◆ m_cameraPlay

bool ATVModSettings::m_cameraPlay

◆ m_channelMarker

Serializable* ATVModSettings::m_channelMarker

Definition at line 89 of file atvmodsettings.h.

Referenced by deserialize(), and serialize().

◆ m_channelMute

bool ATVModSettings::m_channelMute

◆ m_fmExcursion

float ATVModSettings::m_fmExcursion

◆ m_forceDecimator

bool ATVModSettings::m_forceDecimator

◆ m_fps

int ATVModSettings::m_fps

◆ m_inputFrequencyOffset

qint64 ATVModSettings::m_inputFrequencyOffset

◆ m_invertedVideo

bool ATVModSettings::m_invertedVideo

◆ m_nbLines

int ATVModSettings::m_nbLines

◆ m_overlayText

QString ATVModSettings::m_overlayText

◆ m_reverseAPIAddress

QString ATVModSettings::m_reverseAPIAddress

◆ m_reverseAPIChannelIndex

uint16_t ATVModSettings::m_reverseAPIChannelIndex

◆ m_reverseAPIDeviceIndex

uint16_t ATVModSettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t ATVModSettings::m_reverseAPIPort

◆ m_rfBandwidth

Real ATVModSettings::m_rfBandwidth

◆ m_rfOppBandwidth

Real ATVModSettings::m_rfOppBandwidth

◆ m_rfScalingFactor

float ATVModSettings::m_rfScalingFactor

◆ m_rgbColor

quint32 ATVModSettings::m_rgbColor

◆ m_showOverlayText

bool ATVModSettings::m_showOverlayText

◆ m_title

QString ATVModSettings::m_title

◆ m_uniformLevel

Real ATVModSettings::m_uniformLevel

◆ m_useReverseAPI

bool ATVModSettings::m_useReverseAPI

◆ m_videoPlay

bool ATVModSettings::m_videoPlay

◆ m_videoPlayLoop

bool ATVModSettings::m_videoPlayLoop

The documentation for this struct was generated from the following files: