![]() |
SLProject
4.3.020
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
|
#include <SENSRecorder.h>
Public Member Functions | |
| SENSRecorder (const std::string &outputDir) | |
| ~SENSRecorder () | |
| bool | activateGps (SENSGps *sensor) |
| bool | deactivateGps () |
| bool | activateOrientation (SENSOrientation *sensor) |
| bool | deactivateOrientation () |
| bool | activateCamera (SENSCamera *sensor) |
| bool | deactivateCamera () |
| bool | start () |
| void | stop () |
| Stops a running recording session. More... | |
| bool | getGpsHandlerError (std::string &errorMsg) |
| bool | getOrientationHandlerError (std::string &errorMsg) |
| bool | getCameraHandlerError (std::string &errorMsg) |
| bool | isRunning () const |
| const std::string & | outputDir () const |
Public Member Functions inherited from SENSGpsListener | |
| virtual | ~SENSGpsListener () |
Public Member Functions inherited from SENSOrientationListener | |
| virtual | ~SENSOrientationListener () |
Public Member Functions inherited from SENSCameraListener | |
| virtual | ~SENSCameraListener () |
Private Member Functions | |
| void | onGps (const SENSTimePt &timePt, const SENSGps::Location &loc) override |
| gps listener callback More... | |
| void | onOrientation (const SENSTimePt &timePt, const SENSOrientation::Quat &ori) override |
| orientation listener callback More... | |
| void | onFrame (const SENSTimePt &timePt, cv::Mat frame) override |
| camera listener callback More... | |
| void | onCameraConfigChanged (const SENSCameraConfig &config) override |
Private Attributes | |
| std::string | _outputDir |
| SENSGpsRecorderDataHandler * | _gpsDataHandler = nullptr |
| SENSOrientationRecorderDataHandler * | _orientationDataHandler = nullptr |
| SENSCameraRecorderDataHandler * | _cameraDataHandler = nullptr |
| SENSGps * | _gps = nullptr |
| SENSOrientation * | _orientation = nullptr |
| SENSCamera * | _camera = nullptr |
| std::atomic_bool | _running {false} |
SENSRecorder This class records implemented sensor classes to file. The output directory has to be transfered during instantiation. Activate or deactivate a sensor by calling activate or deactivate methods. The functions return true on success, a change is only possible if the recorder is not running (use isRunning method). Call start() and stop() to start or stop recording of sensors. The SENSRecorder listens to sensors and informs SENSRecorderDataHandler backends about new data. The SENSRecorderDataHandler stores values to file.
Definition at line 18 of file SENSRecorder.h.
| SENSRecorder::SENSRecorder | ( | const std::string & | outputDir | ) |
Definition at line 4 of file SENSRecorder.cpp.
| SENSRecorder::~SENSRecorder | ( | ) |
Definition at line 17 of file SENSRecorder.cpp.
| bool SENSRecorder::activateCamera | ( | SENSCamera * | sensor | ) |
Definition at line 76 of file SENSRecorder.cpp.
| bool SENSRecorder::activateGps | ( | SENSGps * | sensor | ) |
Definition at line 30 of file SENSRecorder.cpp.
| bool SENSRecorder::activateOrientation | ( | SENSOrientation * | sensor | ) |
Definition at line 52 of file SENSRecorder.cpp.
| bool SENSRecorder::deactivateCamera | ( | ) |
Definition at line 88 of file SENSRecorder.cpp.
| bool SENSRecorder::deactivateGps | ( | ) |
Definition at line 41 of file SENSRecorder.cpp.
| bool SENSRecorder::deactivateOrientation | ( | ) |
Definition at line 64 of file SENSRecorder.cpp.
| bool SENSRecorder::getCameraHandlerError | ( | std::string & | errorMsg | ) |
Definition at line 177 of file SENSRecorder.cpp.
| bool SENSRecorder::getGpsHandlerError | ( | std::string & | errorMsg | ) |
Definition at line 161 of file SENSRecorder.cpp.
| bool SENSRecorder::getOrientationHandlerError | ( | std::string & | errorMsg | ) |
Definition at line 169 of file SENSRecorder.cpp.
|
inline |
Definition at line 43 of file SENSRecorder.h.
|
overrideprivatevirtual |
Implements SENSCameraListener.
Definition at line 206 of file SENSRecorder.cpp.
|
overrideprivatevirtual |
camera listener callback
Implements SENSCameraListener.
Definition at line 199 of file SENSRecorder.cpp.
|
overrideprivatevirtual |
|
overrideprivatevirtual |
orientation listener callback
Implements SENSOrientationListener.
Definition at line 192 of file SENSRecorder.cpp.
|
inline |
Definition at line 44 of file SENSRecorder.h.
| bool SENSRecorder::start | ( | ) |
Start the recording of activated sensors (Registers listeners and starts SENSRecorderDataHandler backends). Returns true on success. Possible reasons for fail are: Output directory does not exist or recorder is already running.
Definition at line 99 of file SENSRecorder.cpp.
| void SENSRecorder::stop | ( | ) |
Stops a running recording session.
Definition at line 135 of file SENSRecorder.cpp.
|
private |
Definition at line 63 of file SENSRecorder.h.
|
private |
Definition at line 59 of file SENSRecorder.h.
|
private |
Definition at line 61 of file SENSRecorder.h.
|
private |
Definition at line 57 of file SENSRecorder.h.
|
private |
Definition at line 62 of file SENSRecorder.h.
|
private |
Definition at line 58 of file SENSRecorder.h.
|
private |
Definition at line 55 of file SENSRecorder.h.
|
private |
Definition at line 65 of file SENSRecorder.h.