GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
ControlThread Class Reference

This class represents the main thread of the application, so the name is ControlThread. This is the GNSS Receiver Control Plane: it connects the flowgraph, starts running it, and while it does not stop, reads the control messages generated by the blocks, processes them, and applies the corresponding actions. More...

#include <control_thread.h>

Public Member Functions

 ControlThread ()
 Default constructor.
 ControlThread (std::shared_ptr< ConfigurationInterface > configuration)
 Constructor that initializes the class with parameters.
 ~ControlThread ()
 Destructor.
int run ()
 Runs the control thread.
void set_control_queue (std::shared_ptr< Concurrent_Queue< pmt::pmt_t > > control_queue)
 Sets the control_queue.
unsigned int processed_control_messages () const
unsigned int applied_actions () const
std::shared_ptr< GNSSFlowgraphflowgraph ()
 Instantiates a flowgraph.

Static Public Attributes

static ControlThreadme

Detailed Description

This class represents the main thread of the application, so the name is ControlThread. This is the GNSS Receiver Control Plane: it connects the flowgraph, starts running it, and while it does not stop, reads the control messages generated by the blocks, processes them, and applies the corresponding actions.

Definition at line 64 of file control_thread.h.

Constructor & Destructor Documentation

◆ ControlThread() [1/2]

ControlThread::ControlThread ( )

Default constructor.

◆ ControlThread() [2/2]

ControlThread::ControlThread ( std::shared_ptr< ConfigurationInterface > configuration)
explicit

Constructor that initializes the class with parameters.

Parameters
[in]configurationPointer to a ConfigurationInterface

◆ ~ControlThread()

ControlThread::~ControlThread ( )

Destructor.

Member Function Documentation

◆ applied_actions()

unsigned int ControlThread::applied_actions ( ) const
inline

Definition at line 111 of file control_thread.h.

◆ flowgraph()

std::shared_ptr< GNSSFlowgraph > ControlThread::flowgraph ( )
inline

Instantiates a flowgraph.

Returns
Returns a smart pointer to a flowgraph object

Definition at line 121 of file control_thread.h.

◆ processed_control_messages()

unsigned int ControlThread::processed_control_messages ( ) const
inline

Definition at line 106 of file control_thread.h.

◆ run()

int ControlThread::run ( )

Runs the control thread.

This is the main loop that reads and process the control messages:

  • Connect the GNSS receiver flowgraph;
  • Start the GNSS receiver flowgraph;

while (flowgraph_->running() && !stop_){

  • Read control messages and process them; }

◆ set_control_queue()

void ControlThread::set_control_queue ( std::shared_ptr< Concurrent_Queue< pmt::pmt_t > > control_queue)

Sets the control_queue.

Parameters
[in]std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>control_queue

Member Data Documentation

◆ me

ControlThread* ControlThread::me
static

Definition at line 67 of file control_thread.h.


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