log.cpp
Go to the documentation of this file.
00001 #include "mrta/log.h"
00002 #include "mrta/history.h"
00003 #include <ros/console.h>
00004 
00005 namespace mrta
00006 {
00007 Log::Log(History* history, const ros::Time& timestamp, Log::Type type,
00008          Severity severity, const QString& id, int state)
00009     : QObject(history), timestamp_(timestamp), type_(type), severity_(severity),
00010       id_(id), state_(state)
00011 {
00012 }
00013 
00014 Log::Log(const Log& log)
00015     : QObject(log.parent()), timestamp_(log.timestamp_), type_(log.type_),
00016       severity_(log.severity_), id_(log.id_), state_(log.state_)
00017 {
00018 }
00019 
00020 Log::~Log()
00021 {
00022   ROS_INFO_STREAM("[~Log]");
00023 }
00024 
00025 ros::Time Log::getTimestamp() const { return timestamp_; }
00026 
00027 Log::Type Log::getType() const { return type_; }
00028 
00029 Log::Severity Log::getSeverity() const { return severity_; }
00030 
00031 QString Log::getId() const { return id_; }
00032 
00033 int Log::getState() const { return state_; }
00034 
00035 QString Log::toString() const
00036 {
00037   return "[" + QString::number(timestamp_.toSec()) + "] [" + QString::number(type_) +
00038          "] [" + QString::number(severity_) + "] id: " + id_ + ", state: " +
00039       QString::number(state_);
00040 }
00041 
00042 const char *Log::toCString() const
00043 {
00044   return toString().toStdString().c_str();
00045 }
00046 }


rqt_mrta
Author(s): Adriano Henrique Rossette Leite
autogenerated on Thu Jun 6 2019 18:50:52