class mrpt::apps::RawlogGrabberApp

RawlogGrabber application wrapper class.

If the environment variable MRPT_HWDRIVERS_VERBOSE=1 is defined before calling initialize(), verbosity level will be changed to LVL_DEBUG.

#include <mrpt/apps/RawlogGrabberApp.h>

class RawlogGrabberApp: public mrpt::system::COutputLogger
{
public:
    //
fields

    std::mutex params_mtx;
    double run_for_seconds = 0;
    bool show_sensor_thread_exceptions = true;
    mrpt::config::CConfigFileMemory params;
    std::mutex results_mtx;
    std::string rawlog_filename;
    std::size_t rawlog_saved_objects = 0;

    //
methods

    void initialize(int argc, const char** argv);

    void initialize(
        int argc,
        char** argv
        );

    void run();
    bool isRunning() const;
    void SensorThread(std::string sensor_label);
};

Inherited Members

public:
    // structs

    struct TMsg;

Fields

std::mutex params_mtx

Acquire this mutex if changing parameters while the app is running.

double run_for_seconds = 0

If >0, run() will return after this period (in seconds)

bool show_sensor_thread_exceptions = true

If enabled (default), exceptions in sensor threads will be reported to std::cerr.

mrpt::config::CConfigFileMemory params

Populated in initialize().

Can be replaced or manipulated by the user after that and before run() to change the parameters loaded from INI file.

std::mutex results_mtx

Acquire this mutex if reading these output variables while the app is running.

std::string rawlog_filename

The generated .rawlog file.

std::size_t rawlog_saved_objects = 0

Counter of saved objects.

Methods

void initialize(int argc, const char** argv)

Initializes the application from CLI parameters.

Refer to the manpage of rawlog-grabber. Throws on errors.

void run()

Runs with the current parameter set.

Throws on errors.