Program Listing for File status_panel.h

Return to documentation for file (/tmp/ws/src/log_view/include/log_view/panels/status_panel.h)

#ifndef LOG_VIEW_STATUS_PANEL_H_
#define LOG_VIEW_STATUS_PANEL_H_

#include <log_view/panel_interface.h>
#include <log_view/log_store.h>
#include <rclcpp/rclcpp.hpp>

namespace log_view {

class StatusPanel : public PanelInterface {
  public:
  StatusPanel(int height, int width, int y, int x, LogStorePtr& logs) : PanelInterface(height, width, y, x), logs_(logs) {}
  virtual ~StatusPanel() {}
  virtual void refresh();

  virtual void setRosTime(const rclcpp::Time& time) { ros_time_ = time; }
  virtual void setSystemTime(const rclcpp::Time& time) { system_time_ = time; }

  protected:
  rclcpp::Time ros_time_ = rclcpp::Time(0);
  rclcpp::Time system_time_ = rclcpp::Time(0);
  LogStorePtr logs_;
};
typedef std::shared_ptr<StatusPanel> StatusPanelPtr;

}  // namespace log_view

#endif  // LOG_VIEW_STATUS_PANEL_H_