Main Page
Namespaces
Classes
Files
File List
File Members
src
panels
status_panel.cpp
Go to the documentation of this file.
1
28
#include <
log_view/panels/status_panel.h
>
29
30
namespace
log_view
{
31
32
void
StatusPanel::refresh
() {
33
wattron(
window_
, A_REVERSE);
34
std::string clear(
width_
,
' '
);
35
mvwprintw(
window_
, 0, 0, clear.c_str());
36
mvwprintw(
window_
, 0, 0,
"status: %s logs: %zu"
,
connected_
?
"connected"
:
"not connected"
,
logs_
->size());
37
38
std::string system_time =
toString
(
system_time_
.
toSec
(), 2);
39
std::string ros_time =
"--"
;
40
if
(
ros_time_
!=
ros::Time
(0)) {
41
ros_time =
toString
(
ros_time_
.
toSec
(), 2);
42
}
43
44
std::string time_str =
"ros time: "
+ ros_time +
" system time: "
+ system_time;
45
mvwprintw(
window_
, 0,
width_
- time_str.size(), time_str.c_str());
46
wattroff(
window_
, A_REVERSE);
47
}
48
49
}
// namespace log_view
log_view::StatusPanel::ros_time_
ros::Time ros_time_
Definition:
status_panel.h:48
log_view::StatusPanel::system_time_
ros::WallTime system_time_
Definition:
status_panel.h:49
ros::Time
log_view::StatusPanel::refresh
virtual void refresh()
Definition:
status_panel.cpp:32
log_view::toString
std::string toString(double val, int precision)
Definition:
utils.cpp:37
log_view::PanelInterface::window_
WINDOW * window_
Definition:
panel_interface.h:94
log_view::StatusPanel::connected_
bool connected_
Definition:
status_panel.h:47
log_view::PanelInterface::width_
int width_
Definition:
panel_interface.h:98
status_panel.h
log_view::StatusPanel::logs_
LogStorePtr logs_
Definition:
status_panel.h:50
log_view
Definition:
datatypes.h:35
TimeBase< WallTime, WallDuration >::toSec
double toSec() const
log_view
Author(s): Marc Alban
autogenerated on Thu Mar 4 2021 03:21:52