Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
swri_console_util::ProgressBar Class Reference

#include <progress_bar.h>

Public Member Functions

void CheckForPause ()
 
void PrintTime ()
 
 ProgressBar ()
 
char ReadCharFromStdin ()
 
void SetProgress (double percent_complete)
 
void SetStartTime (const ros::WallTime &start_time)
 
 ~ProgressBar ()
 

Static Public Member Functions

static std::string GetTimeString (double seconds)
 
static std::string IntToString (int64_t i, int width=0)
 

Private Member Functions

void RestoreTerminal ()
 
void SetupTerminal ()
 

Private Attributes

int maxfd_
 
termios orig_flags_
 
bool paused_
 
ros::WallDuration paused_time_
 
double percent_complete_
 
ros::WallTime start_time_
 
fd_set stdin_fdset_
 

Detailed Description

Definition at line 40 of file progress_bar.h.

Constructor & Destructor Documentation

◆ ProgressBar()

swri_console_util::ProgressBar::ProgressBar ( )

Definition at line 37 of file progress_bar.cpp.

◆ ~ProgressBar()

swri_console_util::ProgressBar::~ProgressBar ( )

Definition at line 46 of file progress_bar.cpp.

Member Function Documentation

◆ CheckForPause()

void swri_console_util::ProgressBar::CheckForPause ( )

Definition at line 105 of file progress_bar.cpp.

◆ GetTimeString()

std::string swri_console_util::ProgressBar::GetTimeString ( double  seconds)
static

Definition at line 173 of file progress_bar.cpp.

◆ IntToString()

std::string swri_console_util::ProgressBar::IntToString ( int64_t  i,
int  width = 0 
)
static

Definition at line 222 of file progress_bar.cpp.

◆ PrintTime()

void swri_console_util::ProgressBar::PrintTime ( )

Definition at line 61 of file progress_bar.cpp.

◆ ReadCharFromStdin()

char swri_console_util::ProgressBar::ReadCharFromStdin ( )

Definition at line 134 of file progress_bar.cpp.

◆ RestoreTerminal()

void swri_console_util::ProgressBar::RestoreTerminal ( )
private

Definition at line 167 of file progress_bar.cpp.

◆ SetProgress()

void swri_console_util::ProgressBar::SetProgress ( double  percent_complete)

Definition at line 56 of file progress_bar.cpp.

◆ SetStartTime()

void swri_console_util::ProgressBar::SetStartTime ( const ros::WallTime start_time)

Definition at line 51 of file progress_bar.cpp.

◆ SetupTerminal()

void swri_console_util::ProgressBar::SetupTerminal ( )
private

Definition at line 150 of file progress_bar.cpp.

Member Data Documentation

◆ maxfd_

int swri_console_util::ProgressBar::maxfd_
private

Definition at line 68 of file progress_bar.h.

◆ orig_flags_

termios swri_console_util::ProgressBar::orig_flags_
private

Definition at line 66 of file progress_bar.h.

◆ paused_

bool swri_console_util::ProgressBar::paused_
private

Definition at line 59 of file progress_bar.h.

◆ paused_time_

ros::WallDuration swri_console_util::ProgressBar::paused_time_
private

Definition at line 64 of file progress_bar.h.

◆ percent_complete_

double swri_console_util::ProgressBar::percent_complete_
private

Definition at line 61 of file progress_bar.h.

◆ start_time_

ros::WallTime swri_console_util::ProgressBar::start_time_
private

Definition at line 63 of file progress_bar.h.

◆ stdin_fdset_

fd_set swri_console_util::ProgressBar::stdin_fdset_
private

Definition at line 67 of file progress_bar.h.


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


swri_console_util
Author(s): Marc Alban
autogenerated on Sat Jan 21 2023 03:13:13