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 | Private Attributes | List of all members
leansdr::itemcounter< Tin, Tout > Struct Template Reference

#include <generic.h>

+ Inheritance diagram for leansdr::itemcounter< Tin, Tout >:
+ Collaboration diagram for leansdr::itemcounter< Tin, Tout >:

Public Member Functions

 itemcounter (scheduler *sch, pipebuf< Tin > &_in, pipebuf< Tout > &_out)
 
void run ()
 
- 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 ()
 

Private Attributes

pipereader< Tin > in
 
pipewriter< Tout > out
 

Additional Inherited Members

- Public Attributes inherited from leansdr::runnable_common
const char * name
 
- Protected Attributes inherited from leansdr::runnable
schedulersch
 

Detailed Description

template<typename Tin, typename Tout>
struct leansdr::itemcounter< Tin, Tout >

Definition at line 283 of file generic.h.

Constructor & Destructor Documentation

◆ itemcounter()

template<typename Tin , typename Tout >
leansdr::itemcounter< Tin, Tout >::itemcounter ( scheduler sch,
pipebuf< Tin > &  _in,
pipebuf< Tout > &  _out 
)
inline

Definition at line 285 of file generic.h.

286  : runnable(sch, "itemcounter"),
287  in(_in), out(_out)
288  {
289  }
runnable(scheduler *_sch, const char *name)
Definition: framework.h:193
pipewriter< Tout > out
Definition: generic.h:303
pipereader< Tin > in
Definition: generic.h:302
scheduler * sch
Definition: framework.h:199

Member Function Documentation

◆ run()

template<typename Tin , typename Tout >
void leansdr::itemcounter< Tin, Tout >::run ( )
inlinevirtual

Reimplemented from leansdr::runnable_common.

Definition at line 290 of file generic.h.

References leansdr::file_reader< T >::out.

291  {
292  if (out.writable() < 1)
293  return;
294  unsigned long count = in.readable();
295  if (!count)
296  return;
297  out.write(count);
298  in.read(count);
299  }
pipewriter< Tout > out
Definition: generic.h:303
pipereader< Tin > in
Definition: generic.h:302
void write(const T &e)
Definition: framework.h:319
void read(unsigned long n)
Definition: framework.h:367

Member Data Documentation

◆ in

template<typename Tin , typename Tout >
pipereader<Tin> leansdr::itemcounter< Tin, Tout >::in
private

Definition at line 302 of file generic.h.

◆ out

template<typename Tin , typename Tout >
pipewriter<Tout> leansdr::itemcounter< Tin, Tout >::out
private

Definition at line 303 of file generic.h.


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