Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
rc::TrajectoryTime Class Reference

Represents a time stamp to query the trajectory of rcvisard's slam module. More...

#include <trajectory_time.h>

Public Member Functions

long getNsec () const
 
long getSec () const
 
bool isRelative () const
 
 TrajectoryTime (long sec, long nsec, bool relative)
 Full constructor for specifiying a time either as relative offset or as absolute timestamp. More...
 

Static Public Member Functions

static TrajectoryTime Absolute (unsigned long sec, unsigned long nsec)
 Creates an absolute time stamp of the given values. More...
 
static TrajectoryTime RelativeToEnd (unsigned long sec=0, unsigned long nsec=0)
 Creates a time stamp from the given values as an offset from the end point of the trajectory. More...
 
static TrajectoryTime RelativeToStart (unsigned long sec=0, unsigned long nsec=0)
 Creates a time stamp from the given values as an offset to the start point of the trajectory. More...
 

Protected Attributes

long nsec_
 
bool relative_
 
long sec_
 

Detailed Description

Represents a time stamp to query the trajectory of rcvisard's slam module.

This class serves as convenience object to be used in conjunction with RemoteInterface::getSlamTrajectory(...)

A TrajectoryTime can be defined either as an absolute time stamp (see Absolute()), or as a relative reference to either the start time of the trajectory (see RelativeToStartOfTrajectory(...)) or its end (see RelativeToEndOfTrajectory(...)).

Internally, relative times are represented with signed values: positive values define an offset of the trajectory's start, negative values an offset to the trajectory's end (see getSe(), getNsec().

Definition at line 56 of file trajectory_time.h.

Constructor & Destructor Documentation

rc::TrajectoryTime::TrajectoryTime ( long  sec,
long  nsec,
bool  relative 
)

Full constructor for specifiying a time either as relative offset or as absolute timestamp.

Parameters
secseconds of absolute timestamp, or of relative offset to either trajectory start (positive values) or trajectory end (negative values)
nsecnanoseconds of absolute timestamp, or of relative offset to either trajectory start (positive values) or trajectory end (negative values)
relativeif true, sec and nsec values are treated as relative offset; otherwise they are treated as absolute timestamp

Definition at line 57 of file trajectory_time.cc.

Member Function Documentation

TrajectoryTime rc::TrajectoryTime::Absolute ( unsigned long  sec,
unsigned long  nsec 
)
static

Creates an absolute time stamp of the given values.

Parameters
secUnix time stamp (seconds since Jan 01 1970 UTC)
nsecnanoseconds added to sec
Returns

Definition at line 42 of file trajectory_time.cc.

long rc::TrajectoryTime::getNsec ( ) const
inline

Definition at line 107 of file trajectory_time.h.

long rc::TrajectoryTime::getSec ( ) const
inline

Definition at line 102 of file trajectory_time.h.

bool rc::TrajectoryTime::isRelative ( ) const
inline

Definition at line 97 of file trajectory_time.h.

TrajectoryTime rc::TrajectoryTime::RelativeToEnd ( unsigned long  sec = 0,
unsigned long  nsec = 0 
)
static

Creates a time stamp from the given values as an offset from the end point of the trajectory.

Parameters
secseconds to the end of trajectory
nsecnanoseconds added to sec
Returns

Definition at line 52 of file trajectory_time.cc.

TrajectoryTime rc::TrajectoryTime::RelativeToStart ( unsigned long  sec = 0,
unsigned long  nsec = 0 
)
static

Creates a time stamp from the given values as an offset to the start point of the trajectory.

Parameters
secseconds since the start of trajectory
nsecnanoseconds added to sec
Returns

Definition at line 47 of file trajectory_time.cc.

Member Data Documentation

long rc::TrajectoryTime::nsec_
protected

Definition at line 114 of file trajectory_time.h.

bool rc::TrajectoryTime::relative_
protected

Definition at line 113 of file trajectory_time.h.

long rc::TrajectoryTime::sec_
protected

Definition at line 114 of file trajectory_time.h.


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


rc_dynamics_api
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Endres
autogenerated on Thu May 9 2019 02:51:36