mc_rtc::log Namespace Reference

Namespaces

 details
 

Classes

struct  callback_is_serializable
 
struct  FlatLog
 
struct  GetLogType
 
struct  GetLogType< Eigen::Matrix< double, N, 1, _Options, _MaxRows, _MaxCols > >
 
struct  GetLogType< Eigen::Ref< Type, Options, StrideType > >
 
struct  GetLogType< std::array< double, N > >
 
struct  GetLogType< std::vector< double, A > >
 
struct  is_serializable
 
struct  is_serializable_getter
 
struct  is_serializable_getter< MethodRetT(T::*)() const >
 
struct  is_serializable_member
 
struct  is_serializable_member< MemberT T::* >
 
struct  IterateBinaryLogData
 
struct  log_type_to_type
 
struct  LogWriter
 

Typedefs

using copy_callback = std::function< void(mc_rtc::MessagePackBuilder &, const std::vector< std::string > &)>
 
using iterate_binary_log_callback = std::function< bool(IterateBinaryLogData)>
 
using binary_log_callback = std::function< bool(const std::vector< std::string > &, std::vector< FlatLog::record > &, double)>
 
using binary_log_copy_callback = std::function< bool(const std::vector< std::string > &, std::vector< FlatLog::record > &, double, const copy_callback &, const char *, uint64_t)>
 
template<typename... >
using void_t = void
 
template<LogType type>
using log_type_to_type_t = typename log_type_to_type< type >::type
 

Enumerations

enum  LogType {
  LogType::None = 0, LogType::Bool, LogType::Int8_t, LogType::Int16_t,
  LogType::Int32_t, LogType::Int64_t, LogType::Uint8_t, LogType::Uint16_t,
  LogType::Uint32_t, LogType::Uint64_t, LogType::Float, LogType::Double,
  LogType::String, LogType::Vector2d, LogType::Vector3d, LogType::Vector6d,
  LogType::VectorXd, LogType::Quaterniond, LogType::PTransformd, LogType::ForceVecd,
  LogType::MotionVecd, LogType::VectorDouble
}
 

Functions

MC_RTC_UTILS_DLLAPI void deprecated (const std::string &source, const std::string &old, const std::string &replace)
 
bool MC_RTC_UTILS_DLLAPI iterate_binary_log (const std::string &fpath, const iterate_binary_log_callback &callback, bool extract, const std::string &time="t")
 
bool iterate_binary_log (const std::string &fpath, const binary_log_copy_callback &callback, bool extract, const std::string &time="t")
 
bool iterate_binary_log (const std::string &fpath, const binary_log_callback &callback, bool extract, const std::string &time="t")
 
const char ** LogTypeNames ()
 
const char * LogTypeName (LogType t)
 
 IMPL_MAPPING (bool, Bool)
 
 IMPL_MAPPING (int8_t, Int8_t)
 
 IMPL_MAPPING (int16_t, Int16_t)
 
 IMPL_MAPPING (int32_t, Int32_t)
 
 IMPL_MAPPING (int64_t, Int64_t)
 
 IMPL_MAPPING (uint8_t, Uint8_t)
 
 IMPL_MAPPING (uint16_t, Uint16_t)
 
 IMPL_MAPPING (uint32_t, Uint32_t)
 
 IMPL_MAPPING (uint64_t, Uint64_t)
 
 IMPL_MAPPING (float, Float)
 
 IMPL_MAPPING (double, Double)
 
 IMPL_MAPPING (std::string, String)
 
 IMPL_MAPPING (Eigen::Vector2d, Vector2d)
 
 IMPL_MAPPING (Eigen::Vector3d, Vector3d)
 
 IMPL_MAPPING (Eigen::Vector6d, Vector6d)
 
 IMPL_MAPPING (Eigen::VectorXd, VectorXd)
 
 IMPL_MAPPING (Eigen::Quaterniond, Quaterniond)
 
 IMPL_MAPPING (sva::PTransformd, PTransformd)
 
 IMPL_MAPPING (sva::ForceVecd, ForceVecd)
 
 IMPL_MAPPING (sva::MotionVecd, MotionVecd)
 
 IMPL_MAPPING (sva::ImpedanceVecd, MotionVecd)
 
 IMPL_MAPPING (mc_rbdyn::Gains2d, Vector2d)
 
 IMPL_MAPPING (mc_rbdyn::Gains3d, Vector3d)
 
 IMPL_MAPPING (mc_rbdyn::Gains6d, Vector6d)
 
 IMPL_MAPPING (Bool, bool)
 
 IMPL_MAPPING (Int8_t, int8_t)
 
 IMPL_MAPPING (Int16_t, int16_t)
 
 IMPL_MAPPING (Int32_t, int32_t)
 
 IMPL_MAPPING (Int64_t, int64_t)
 
 IMPL_MAPPING (Uint8_t, uint8_t)
 
 IMPL_MAPPING (Uint16_t, uint16_t)
 
 IMPL_MAPPING (Uint32_t, uint32_t)
 
 IMPL_MAPPING (Uint64_t, uint64_t)
 
 IMPL_MAPPING (Float, float)
 
 IMPL_MAPPING (Double, double)
 
 IMPL_MAPPING (String, std::string)
 
 IMPL_MAPPING (Vector2d, Eigen::Vector2d)
 
 IMPL_MAPPING (Vector3d, Eigen::Vector3d)
 
 IMPL_MAPPING (Vector6d, Eigen::Vector6d)
 
 IMPL_MAPPING (VectorXd, Eigen::VectorXd)
 
 IMPL_MAPPING (Quaterniond, Eigen::Quaterniond)
 
 IMPL_MAPPING (PTransformd, sva::PTransformd)
 
 IMPL_MAPPING (ForceVecd, sva::ForceVecd)
 
 IMPL_MAPPING (MotionVecd, sva::MotionVecd)
 
 IMPL_MAPPING (VectorDouble, std::vector< double >)
 
template<typename ExceptionT = std::runtime_error, typename... Args>
void error_and_throw (Args &&... args)
 
template<typename... Args>
void critical (Args &&... args)
 
template<typename... Args>
void error (Args &&... args)
 
template<typename... Args>
void warning (Args &&... args)
 
template<typename... Args>
void info (Args &&... args)
 
template<typename... Args>
void success (Args &&... args)
 
template<typename... Args>
void notify (Args &&... args)
 

Typedef Documentation

◆ binary_log_callback

using mc_rtc::log::binary_log_callback = typedef std::function<bool(const std::vector<std::string> &, std::vector<FlatLog::record> &, double)>

◆ binary_log_copy_callback

using mc_rtc::log::binary_log_copy_callback = typedef std::function<bool(const std::vector<std::string> &, std::vector<FlatLog::record> &, double, const copy_callback &, const char *, uint64_t)>

◆ copy_callback

using mc_rtc::log::copy_callback = typedef std::function<void(mc_rtc::MessagePackBuilder &, const std::vector<std::string> &)>

◆ iterate_binary_log_callback

using mc_rtc::log::iterate_binary_log_callback = typedef std::function<bool(IterateBinaryLogData)>

◆ log_type_to_type_t

template<LogType type>
using mc_rtc::log::log_type_to_type_t = typedef typename log_type_to_type<type>::type

◆ void_t

template<typename... >
using mc_rtc::log::void_t = typedef void

Enumeration Type Documentation

◆ LogType

enum mc_rtc::log::LogType
strong

Enum representing the type of data being logged

Enumerator
None 
Bool 
Int8_t 
Int16_t 
Int32_t 
Int64_t 
Uint8_t 
Uint16_t 
Uint32_t 
Uint64_t 
Float 
Double 
String 
Vector2d 
Vector3d 
Vector6d 
VectorXd 
Quaterniond 
PTransformd 
ForceVecd 
MotionVecd 
VectorDouble 

Function Documentation

◆ critical()

template<typename... Args>
void mc_rtc::log::critical ( Args &&...  args)

◆ deprecated()

MC_RTC_UTILS_DLLAPI void mc_rtc::log::deprecated ( const std::string &  source,
const std::string &  old,
const std::string &  replace 
)

Used when replace should be used instead of old

◆ error()

template<typename... Args>
void mc_rtc::log::error ( Args &&...  args)

◆ error_and_throw()

template<typename ExceptionT = std::runtime_error, typename... Args>
void mc_rtc::log::error_and_throw ( Args &&...  args)

◆ IMPL_MAPPING() [1/45]

mc_rtc::log::IMPL_MAPPING ( bool  ,
Bool   
)

◆ IMPL_MAPPING() [2/45]

mc_rtc::log::IMPL_MAPPING ( Bool  ,
bool   
)

◆ IMPL_MAPPING() [3/45]

mc_rtc::log::IMPL_MAPPING ( double  ,
Double   
)

◆ IMPL_MAPPING() [4/45]

mc_rtc::log::IMPL_MAPPING ( Double  ,
double   
)

◆ IMPL_MAPPING() [5/45]

mc_rtc::log::IMPL_MAPPING ( Eigen::Quaterniond  ,
Quaterniond   
)

◆ IMPL_MAPPING() [6/45]

mc_rtc::log::IMPL_MAPPING ( Eigen::Vector2d  ,
Vector2d   
)

◆ IMPL_MAPPING() [7/45]

mc_rtc::log::IMPL_MAPPING ( Eigen::Vector3d  ,
Vector3d   
)

◆ IMPL_MAPPING() [8/45]

mc_rtc::log::IMPL_MAPPING ( Eigen::Vector6d  ,
Vector6d   
)

◆ IMPL_MAPPING() [9/45]

mc_rtc::log::IMPL_MAPPING ( Eigen::VectorXd  ,
VectorXd   
)

◆ IMPL_MAPPING() [10/45]

mc_rtc::log::IMPL_MAPPING ( float  ,
Float   
)

◆ IMPL_MAPPING() [11/45]

mc_rtc::log::IMPL_MAPPING ( Float  ,
float   
)

◆ IMPL_MAPPING() [12/45]

mc_rtc::log::IMPL_MAPPING ( ForceVecd  ,
sva::ForceVecd   
)

◆ IMPL_MAPPING() [13/45]

mc_rtc::log::IMPL_MAPPING ( int16_t  ,
Int16_t   
)

◆ IMPL_MAPPING() [14/45]

mc_rtc::log::IMPL_MAPPING ( Int16_t  ,
int16_t   
)

◆ IMPL_MAPPING() [15/45]

mc_rtc::log::IMPL_MAPPING ( int32_t  ,
Int32_t   
)

◆ IMPL_MAPPING() [16/45]

mc_rtc::log::IMPL_MAPPING ( Int32_t  ,
int32_t   
)

◆ IMPL_MAPPING() [17/45]

mc_rtc::log::IMPL_MAPPING ( int64_t  ,
Int64_t   
)

◆ IMPL_MAPPING() [18/45]

mc_rtc::log::IMPL_MAPPING ( Int64_t  ,
int64_t   
)

◆ IMPL_MAPPING() [19/45]

mc_rtc::log::IMPL_MAPPING ( int8_t  ,
Int8_t   
)

◆ IMPL_MAPPING() [20/45]

mc_rtc::log::IMPL_MAPPING ( Int8_t  ,
int8_t   
)

◆ IMPL_MAPPING() [21/45]

mc_rtc::log::IMPL_MAPPING ( mc_rbdyn::Gains2d  ,
Vector2d   
)

◆ IMPL_MAPPING() [22/45]

mc_rtc::log::IMPL_MAPPING ( mc_rbdyn::Gains3d  ,
Vector3d   
)

◆ IMPL_MAPPING() [23/45]

mc_rtc::log::IMPL_MAPPING ( mc_rbdyn::Gains6d  ,
Vector6d   
)

◆ IMPL_MAPPING() [24/45]

mc_rtc::log::IMPL_MAPPING ( MotionVecd  ,
sva::MotionVecd   
)

◆ IMPL_MAPPING() [25/45]

mc_rtc::log::IMPL_MAPPING ( PTransformd  ,
sva::PTransformd   
)

◆ IMPL_MAPPING() [26/45]

mc_rtc::log::IMPL_MAPPING ( Quaterniond  ,
Eigen::Quaterniond   
)

◆ IMPL_MAPPING() [27/45]

mc_rtc::log::IMPL_MAPPING ( std::string  ,
String   
)

◆ IMPL_MAPPING() [28/45]

mc_rtc::log::IMPL_MAPPING ( String  ,
std::string   
)

◆ IMPL_MAPPING() [29/45]

mc_rtc::log::IMPL_MAPPING ( sva::ForceVecd  ,
ForceVecd   
)

◆ IMPL_MAPPING() [30/45]

mc_rtc::log::IMPL_MAPPING ( sva::ImpedanceVecd  ,
MotionVecd   
)

◆ IMPL_MAPPING() [31/45]

mc_rtc::log::IMPL_MAPPING ( sva::MotionVecd  ,
MotionVecd   
)

◆ IMPL_MAPPING() [32/45]

mc_rtc::log::IMPL_MAPPING ( sva::PTransformd  ,
PTransformd   
)

◆ IMPL_MAPPING() [33/45]

mc_rtc::log::IMPL_MAPPING ( uint16_t  ,
Uint16_t   
)

◆ IMPL_MAPPING() [34/45]

mc_rtc::log::IMPL_MAPPING ( Uint16_t  ,
uint16_t   
)

◆ IMPL_MAPPING() [35/45]

mc_rtc::log::IMPL_MAPPING ( uint32_t  ,
Uint32_t   
)

◆ IMPL_MAPPING() [36/45]

mc_rtc::log::IMPL_MAPPING ( Uint32_t  ,
uint32_t   
)

◆ IMPL_MAPPING() [37/45]

mc_rtc::log::IMPL_MAPPING ( uint64_t  ,
Uint64_t   
)

◆ IMPL_MAPPING() [38/45]

mc_rtc::log::IMPL_MAPPING ( Uint64_t  ,
uint64_t   
)

◆ IMPL_MAPPING() [39/45]

mc_rtc::log::IMPL_MAPPING ( uint8_t  ,
Uint8_t   
)

◆ IMPL_MAPPING() [40/45]

mc_rtc::log::IMPL_MAPPING ( Uint8_t  ,
uint8_t   
)

◆ IMPL_MAPPING() [41/45]

mc_rtc::log::IMPL_MAPPING ( Vector2d  ,
Eigen::Vector2d   
)

◆ IMPL_MAPPING() [42/45]

mc_rtc::log::IMPL_MAPPING ( Vector3d  ,
Eigen::Vector3d   
)

◆ IMPL_MAPPING() [43/45]

mc_rtc::log::IMPL_MAPPING ( Vector6d  ,
Eigen::Vector6d   
)

◆ IMPL_MAPPING() [44/45]

mc_rtc::log::IMPL_MAPPING ( VectorDouble  ,
std::vector< double >   
)

◆ IMPL_MAPPING() [45/45]

mc_rtc::log::IMPL_MAPPING ( VectorXd  ,
Eigen::VectorXd   
)

◆ info()

template<typename... Args>
void mc_rtc::log::info ( Args &&...  args)

◆ iterate_binary_log() [1/3]

bool mc_rtc::log::iterate_binary_log ( const std::string &  fpath,
const binary_log_callback callback,
bool  extract,
const std::string &  time = "t" 
)
inline

Provided for backward compatibility

◆ iterate_binary_log() [2/3]

bool mc_rtc::log::iterate_binary_log ( const std::string &  fpath,
const binary_log_copy_callback callback,
bool  extract,
const std::string &  time = "t" 
)
inline

Provided for backward compatibility

◆ iterate_binary_log() [3/3]

bool MC_RTC_UTILS_DLLAPI mc_rtc::log::iterate_binary_log ( const std::string &  fpath,
const iterate_binary_log_callback callback,
bool  extract,
const std::string &  time = "t" 
)

Iterate over a given binary log data

For each entry in the log, this will call the provided callback see IterateBinaryLogData for a documentation of the data available

If the callback returns false the parsing is interrupted.

Returns
True if the parsing was successful, false otherwise

◆ LogTypeName()

const char* mc_rtc::log::LogTypeName ( LogType  t)
inline

◆ LogTypeNames()

const char** mc_rtc::log::LogTypeNames ( )
inline

◆ notify()

template<typename... Args>
void mc_rtc::log::notify ( Args &&...  args)

◆ success()

template<typename... Args>
void mc_rtc::log::success ( Args &&...  args)

◆ warning()

template<typename... Args>
void mc_rtc::log::warning ( Args &&...  args)