class mrpt::obs::CAction

Declares a class for storing a robot action.

It is used in mrpt::obs::CRawlog, for logs storage and particle filter based simulations. See derived classes for implementations.

See also:

CActionCollection, CRawlog

#include <mrpt/obs/CAction.h>

class CAction: public mrpt::serialization::CSerializable
{
public:
    //
fields

    mrpt::system::TTimeStamp timestamp {INVALID_TIMESTAMP};

    // construction

    CAction();

    //
methods

    virtual void getDescriptionAsText(std::ostream& o) const;
    std::string getDescriptionAsTextValue() const;
};

// direct descendants

class CActionRobotMovement2D;
class CActionRobotMovement3D;

Fields

mrpt::system::TTimeStamp timestamp {INVALID_TIMESTAMP}

The associated time-stamp.

Construction

CAction()

Default ctor.

Methods

virtual void getDescriptionAsText(std::ostream& o) const

Build a detailed, multi-line textual description of the action contents and dump it to the output stream.

If overried by derived classes, call base CAction::getDescriptionAsText() first to show common information.

std::string getDescriptionAsTextValue() const

Return by value version of getDescriptionAsText(std::ostream&)