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 Member Functions | Public Attributes | List of all members
leansdr::datvdvbs2constellation< T > Struct Template Reference

#include <datvdvbs2constellation.h>

+ Inheritance diagram for leansdr::datvdvbs2constellation< T >:
+ Collaboration diagram for leansdr::datvdvbs2constellation< T >:

Public Member Functions

 datvdvbs2constellation (scheduler *sch, pipebuf< complex< T > > &_in, T _xymin, T _xymax, const char *_name=nullptr, TVScreen *objDATVScreen=nullptr)
 
void run ()
 
void draw_begin ()
 
void calculate_cstln_points ()
 
- Public Member Functions inherited from leansdr::runnable
 runnable (scheduler *_sch, const char *name)
 
- Public Member Functions inherited from leansdr::runnable_common
 runnable_common (const char *_name)
 
virtual ~runnable_common ()
 
virtual void shutdown ()
 

Public Attributes

xymin
 
xymax
 
unsigned long decimation
 
long pixels_per_frame
 
cstln_base ** cstln
 
TVScreenm_objDATVScreen
 
pipereader< complex< T > > in
 
unsigned long phase
 
std::vector< int > cstln_rows
 
std::vector< int > cstln_cols
 
- Public Attributes inherited from leansdr::runnable_common
const char * name
 

Additional Inherited Members

- Protected Attributes inherited from leansdr::runnable
schedulersch
 

Detailed Description

template<typename T>
struct leansdr::datvdvbs2constellation< T >

Definition at line 113 of file datvdvbs2constellation.h.

Constructor & Destructor Documentation

◆ datvdvbs2constellation()

template<typename T>
leansdr::datvdvbs2constellation< T >::datvdvbs2constellation ( scheduler sch,
pipebuf< complex< T > > &  _in,
_xymin,
_xymax,
const char *  _name = nullptr,
TVScreen objDATVScreen = nullptr 
)
inline

Definition at line 125 of file datvdvbs2constellation.h.

131  :
132  runnable(sch, _name ? _name : _in.name),
133  xymin(_xymin),
134  xymax(_xymax),
135  decimation(DEFAULT_GUI_DVBS2_DECIMATION),
136  pixels_per_frame(1024),
137  cstln(0),
138  m_objDATVScreen(objDATVScreen),
139  in(_in),
140  phase(0)
141  {
142  }
runnable(scheduler *_sch, const char *name)
Definition: framework.h:193
scheduler * sch
Definition: framework.h:199

Member Function Documentation

◆ calculate_cstln_points()

template<typename T>
void leansdr::datvdvbs2constellation< T >::calculate_cstln_points ( )
inline

Definition at line 193 of file datvdvbs2constellation.h.

Referenced by DATVDemod::feed().

194  {
195  if (!(*cstln)) {
196  return;
197  }
198 
199  cstln_rows.clear();
200  cstln_cols.clear();
201 
202  for (int i = 0; i < (*cstln)->nsymbols; ++i)
203  {
204  complex<signed char> *p = &(*cstln)->symbols[i];
205  int x = 256 * (p->re - xymin) / (xymax - xymin);
206  int y = 256 - 256 * (p->im - xymin) / (xymax - xymin);
207 
208  for (int d = -4; d <= 4; ++d)
209  {
210  cstln_rows.push_back(x + d);
211  cstln_cols.push_back(y);
212  cstln_rows.push_back(x);
213  cstln_cols.push_back(y + d);
214  }
215  }
216  }
int32_t i
Definition: decimators.h:244
+ Here is the caller graph for this function:

◆ draw_begin()

template<typename T>
void leansdr::datvdvbs2constellation< T >::draw_begin ( )
inline

Definition at line 189 of file datvdvbs2constellation.h.

190  {
191  }

◆ run()

template<typename T>
void leansdr::datvdvbs2constellation< T >::run ( )
inlinevirtual

Reimplemented from leansdr::runnable_common.

Definition at line 144 of file datvdvbs2constellation.h.

145  {
146 
147  phase=0;
148  //Symbols
149  while (in.readable() >= pixels_per_frame)
150  {
151  if ((!phase) && m_objDATVScreen)
152  {
154 
155  complex<T> *p = in.rd(), *pend = p + pixels_per_frame;
156 
157  for (; p < pend; ++p)
158  {
159  m_objDATVScreen->selectRow(256 * (p->re - xymin) / (xymax - xymin));
161  256 - 256 * ((p->im - xymin) / (xymax - xymin)),
162  255, 0, 255);
163  }
164 
165  if (cstln && (*cstln))
166  {
167  // Plot constellation points
168  std::vector<int>::const_iterator row_it = cstln_rows.begin();
169  std::vector<int>::const_iterator col_it = cstln_cols.begin();
170 
171  for (;(row_it != cstln_rows.end()) && (col_it != cstln_cols.end()); ++row_it, ++col_it)
172  {
173  m_objDATVScreen->selectRow(*row_it);
174  m_objDATVScreen->setDataColor(*col_it, 250, 250, 250);
175  }
176  }
177 
179  }
180 
181  in.read(pixels_per_frame);
182 
183  if (++phase >= decimation) {
184  phase = 0;
185  }
186  }
187  }
bool setDataColor(int intCol, int intRed, int intGreen, int intBlue)
Definition: tvscreen.cpp:224
void resetImage()
Definition: tvscreen.cpp:76
void renderImage(unsigned char *objData)
Definition: tvscreen.cpp:70
bool selectRow(int intLine)
Definition: tvscreen.cpp:212

Member Data Documentation

◆ cstln

template<typename T>
cstln_base** leansdr::datvdvbs2constellation< T >::cstln

Definition at line 118 of file datvdvbs2constellation.h.

◆ cstln_cols

template<typename T>
std::vector<int> leansdr::datvdvbs2constellation< T >::cstln_cols

Definition at line 123 of file datvdvbs2constellation.h.

◆ cstln_rows

template<typename T>
std::vector<int> leansdr::datvdvbs2constellation< T >::cstln_rows

Definition at line 122 of file datvdvbs2constellation.h.

◆ decimation

template<typename T>
unsigned long leansdr::datvdvbs2constellation< T >::decimation

Definition at line 116 of file datvdvbs2constellation.h.

◆ in

template<typename T>
pipereader<complex<T> > leansdr::datvdvbs2constellation< T >::in

Definition at line 120 of file datvdvbs2constellation.h.

◆ m_objDATVScreen

template<typename T>
TVScreen* leansdr::datvdvbs2constellation< T >::m_objDATVScreen

◆ phase

template<typename T>
unsigned long leansdr::datvdvbs2constellation< T >::phase

Definition at line 121 of file datvdvbs2constellation.h.

◆ pixels_per_frame

template<typename T>
long leansdr::datvdvbs2constellation< T >::pixels_per_frame

◆ xymax

template<typename T>
T leansdr::datvdvbs2constellation< T >::xymax

Definition at line 115 of file datvdvbs2constellation.h.

◆ xymin

template<typename T>
T leansdr::datvdvbs2constellation< T >::xymin

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