RobWorkProject  23.9.11-
Public Types | Public Member Functions | Static Public Member Functions | List of all members
LogVelocities Class Reference

Logging of body velocities. More...

#include <LogVelocities.hpp>

Inherits SimulatorLogEntry.

Public Types

typedef rw::core::Ptr< LogVelocitiesPtr
 Smart pointer type of LogVelocities.
 
- Public Types inherited from SimulatorLogEntry
typedef rw::core::Ptr< SimulatorLogEntryPtr
 Smart pointer type of SimulatorLogEntry.
 
- Public Types inherited from SimulatorLog
typedef rw::core::Ptr< SimulatorLogPtr
 Smart pointer type of SimulatorLog.
 
typedef rw::core::Ptr< const SimulatorLogCPtr
 Smart pointer type of const SimulatorLog.
 

Public Member Functions

 LogVelocities (SimulatorLogScope *parent)
 Constructor. More...
 
virtual ~LogVelocities ()
 Destructor.
 
virtual void read (class rw::common::InputArchive &iarchive, const std::string &id)
 
virtual void write (class rw::common::OutputArchive &oarchive, const std::string &id) const
 
virtual std::string getType () const
 Get a textual representation of the type of the item. More...
 
virtual bool operator== (const SimulatorLog &b) const
 Check if logs are identical. More...
 
virtual std::list< SimulatorLogEntry::PtrgetLinkedEntries () const
 Get a list of other entries that this entry is linked to. More...
 
virtual bool autoLink ()
 Do automatic linking to other entries. More...
 
virtual SimulatorLogEntry::Ptr createNew (SimulatorLogScope *parent) const
 Create a new entry of the same type (no data is copied). More...
 
rw::core::Ptr< LogPositionsgetPositions () const
 Get the positions of the bodies. More...
 
const std::map< std::string, rw::math::VelocityScrew6D<> > & getVelocities () const
 Get the velocity map. More...
 
const rw::math::VelocityScrew6DgetVelocity (const std::string &name) const
 Get a velocity. More...
 
bool has (const std::string &name) const
 Check if a velocity with the given name exists. More...
 
void setVelocities (const std::map< std::string, rw::math::VelocityScrew6D<>> &velocities)
 Set the velocities. More...
 
void setVelocity (const std::string &name, const rw::math::VelocityScrew6D<> &velocity)
 Set a velocity. More...
 
std::size_t size () const
 Get the number of velocities stored. More...
 
- Public Member Functions inherited from SimulatorLogEntry
 SimulatorLogEntry (SimulatorLogScope *parent)
 Constructor. More...
 
virtual ~SimulatorLogEntry ()
 Destructor.
 
virtual std::size_t children () const
 Get the number of children under this log item. More...
 
virtual int line () const
 Get the line number in the file where this entry was added. More...
 
virtual void setLine (int line)
 Set the line number where this entry was added. More...
 
- Public Member Functions inherited from SimulatorLog
 SimulatorLog (SimulatorLogScope *parent=NULL)
 Constructor. More...
 
virtual ~SimulatorLog ()
 Destructor.
 
virtual SimulatorLogScopegetParent () const
 Get the parent of this log item. More...
 
virtual bool operator!= (const SimulatorLog &b) const
 Check if logs are non-identical. More...
 
virtual std::string getFilename () const
 Get the full filename with path for where this log entry was created. More...
 
virtual void setFilename (const std::string &file)
 Set the name of the file where this log entry was created. More...
 
virtual void setFilename (const char *file)
 Set the name of the file where this log entry was created. More...
 
virtual std::string getDescription () const
 Get a string describing this entry. More...
 
virtual void setDescription (const std::string &description)
 Set a very short description of this entry. More...
 
- Public Member Functions inherited from Serializable
virtual ~Serializable ()
 destructor
 

Static Public Member Functions

static std::string getTypeID ()
 Get the type id of this entry type. More...
 

Detailed Description

Logging of body velocities.

Constructor & Destructor Documentation

◆ LogVelocities()

Constructor.

Note
This item will not be added as a child to the parent scope using this constructor.
Parameters
parentthe parent of this log item.

Member Function Documentation

◆ autoLink()

virtual bool autoLink ( )
virtual

Do automatic linking to other entries.

Returns
true if linking succeeded, false otherwise.

Implements SimulatorLogEntry.

◆ createNew()

virtual SimulatorLogEntry::Ptr createNew ( SimulatorLogScope parent) const
virtual

Create a new entry of the same type (no data is copied).

Parameters
parentthe parent of the new entry.
Returns
the new entry.

Implements SimulatorLogEntry.

◆ getLinkedEntries()

virtual std::list<SimulatorLogEntry::Ptr> getLinkedEntries ( ) const
virtual

Get a list of other entries that this entry is linked to.

Using linked entries makes it possible to avoid logging too much redundant information.

Returns
a list of linked entries.

Implements SimulatorLogEntry.

◆ getPositions()

rw::core::Ptr<LogPositions> getPositions ( ) const

Get the positions of the bodies.

This is similar to getLinkedEntries.

Returns
the log entry with positions of bodies (or NULL if not linked).

◆ getType()

virtual std::string getType ( ) const
virtual

Get a textual representation of the type of the item.

Returns
the type of item as a string.

Implements SimulatorLogEntry.

◆ getTypeID()

static std::string getTypeID ( )
static

Get the type id of this entry type.

Returns
the type id.

◆ getVelocities()

const std::map<std::string, rw::math::VelocityScrew6D<> >& getVelocities ( ) const

Get the velocity map.

Returns
the velocity map.

◆ getVelocity()

const rw::math::VelocityScrew6D& getVelocity ( const std::string &  name) const

Get a velocity.

Parameters
name[in] the name of the body to get velocity for.
Returns
the velocity.

◆ has()

bool has ( const std::string &  name) const

Check if a velocity with the given name exists.

Parameters
name[in] the name to look for.
Returns
true if found, false if not.

◆ operator==()

virtual bool operator== ( const SimulatorLog b) const
virtual

Check if logs are identical.

Parameters
b[in] other log to compare with.
Returns
true if identical, false otherwise.

Reimplemented from SimulatorLogEntry.

◆ read()

virtual void read ( class rw::common::InputArchive iarchive,
const std::string &  id 
)
virtual

Enable read-serialization of inherited class by implementing this method. Data is read from iarchive and filled into this object.

Parameters
iarchive[in] the InputArchive from which to read data.
id[in] The id of the serialized sobject.
Note
the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.

Reimplemented from SimulatorLogEntry.

◆ setVelocities()

void setVelocities ( const std::map< std::string, rw::math::VelocityScrew6D<>> &  velocities)

Set the velocities.

Parameters
velocities[in] the velocities.

◆ setVelocity()

void setVelocity ( const std::string &  name,
const rw::math::VelocityScrew6D<> &  velocity 
)

Set a velocity.

Parameters
name[in] the name of the body to set velocity for.
velocity[in] the velocity.

◆ size()

std::size_t size ( ) const

Get the number of velocities stored.

Returns
the number of velocities.

◆ write()

virtual void write ( class rw::common::OutputArchive oarchive,
const std::string &  id 
) const
virtual

Enable write-serialization of inherited class by implementing this method. Data is written to oarchive from this object.

Parameters
oarchive[out] the OutputArchive in which data should be written.
id[in] The id of the serialized sobject.
Note
the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.

Reimplemented from SimulatorLogEntry.


The documentation for this class was generated from the following file: