|
SatDump 2.0.0-alpha-520736c72
|
ProcessingHandler base class. More...
#include <processing_handler.h>
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. | |
| bool | get_is_processing () |
| Get the processing status externally. | |
| void | asyncProcess () |
| Perform processing asynchronously, in a thread. | |
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 |
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.
| is_processing | variable to be used in the UI to disable controls while processing is ongoing |
|
protectedpure virtual |
Actual processing function to be implemented by the child class.
Implemented in satdump::handlers::DatasetProductHandler, satdump::handlers::ImageProductHandler, satdump::handlers::ProjectionHandler, and satdump::handlers::PunctiformProductHandler.
|
inline |
Get the processing status externally.
|
inline |
Set the processing status externally, to force waiting before starting a new thread.
| v | to set if it's processing or not |