#include <ddtSubscriber.hpp>
Classes | |
| struct | SignalConnection |
Public Member Functions | |
| DdtSubscriber () | |
| ~DdtSubscriber () final | |
| ddt::InitCodes | Init (int argc, char *argv[]) |
| ddt::InitCodes | Init (const std::vector< std::string > &args) |
| int | Run () final |
| int | RunTransfer () |
| void | Stop () |
| SignalConnection | ConnectNewImage (std::function< void()> callback) |
| ::cpl_image * | GetCurrentImageCopy () |
| uintptr_t | GetCurrentImageCopyAsRawPtr () |
Public Member Functions inherited from ddt::DdtDataSubscriberApplication | |
| DdtDataSubscriberApplication ()=default | |
| virtual | ~DdtDataSubscriberApplication ()=default |
This class provides the subscriber functionality.
| DdtSubscriber::DdtSubscriber | ( | ) |
Constructor
|
final |
Destructor
| ddt::DdtSubscriber::SignalConnection DdtSubscriber::ConnectNewImage | ( | std::function< void()> | callback | ) |
Callback for new image signal. The provided callback is invoked each time a new image is available.
| callback | Callback function to be invoked when a new image is available. |
| cpl_image * DdtSubscriber::GetCurrentImageCopy | ( | ) |
| uintptr_t DdtSubscriber::GetCurrentImageCopyAsRawPtr | ( | ) |
| ddt::InitCodes DdtSubscriber::Init | ( | const std::vector< std::string > & | args | ) |
Python-friendly initialization method.
| args | Command-line arguments (first element is the program name). |
| ddt::InitCodes ddt::DdtSubscriber::Init | ( | int | argc, |
| char * | argv[] ) |
Initialization method.
| argc | Number of arguments. |
| argv | Array that contains arguments. |
|
finalvirtual |
Main method of the application
Implements ddt::DdtDataSubscriberApplication.
| int DdtSubscriber::RunTransfer | ( | ) |
Main method of the application for image transfer
| void DdtSubscriber::Stop | ( | ) |
Request the simulator to stop. Can be called from any thread (e.g. from Python) to terminate the Run/RunTransfer loop without relying on Unix signals.