SatDump 2.0.0-alpha-76a915210
Loading...
Searching...
No Matches
satdump::handlers::ProcessingHandler Class Referenceabstract

ProcessingHandler base class. More...

#include <processing_handler.h>

Inheritance diagram for satdump::handlers::ProcessingHandler:
satdump::handlers::DatasetProductHandler satdump::handlers::ImageHandler satdump::handlers::ProductHandler satdump::handlers::ProjectionHandler satdump::handlers::ImageProductHandler satdump::handlers::PunctiformProductHandler

Public Member Functions

void process ()
 Performing processing. This is not multi-threaded, intended to call it externally.
void set_is_processing (bool v)
 Set the processing status externally, to force waiting before starting a new thread.
void asyncProcess ()
 Perform processing asynchronously, in a thread.

Static Public Member Functions

static std::string getID ()
static std::shared_ptr< HandlergetInstance ()

Protected Member Functions

virtual void do_process ()=0
 Actual processing function to be implemented by the child class.

Protected Attributes

bool is_processing = false
std::mutex is_processing_mtx
std::thread async_thread

Detailed Description

ProcessingHandler base class.

Some handlers implement a lot of processing already in order to allow manipulating products, images, or more. Therefore, it'd be stupid not to re-use this code for headless processing as well! :-)

This is a common interface Handlers can implement if required that allows implementing processing in a way common to both the UI and headless uses. This implements the multi-threaded processing required in the UI as well.

Parameters
is_processingvariable to be used in the UI to disable controls while processing is ongoing

Member Function Documentation

◆ do_process()

virtual void satdump::handlers::ProcessingHandler::do_process ( )
protectedpure virtual

◆ set_is_processing()

void satdump::handlers::ProcessingHandler::set_is_processing ( bool v)
inline

Set the processing status externally, to force waiting before starting a new thread.

Parameters
vto set if it's processing or not

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