Electroneum
Loading...
Searching...
No Matches
hw::device_cold::tx_progress Class Reference

#include <device_cold.hpp>

Inheritance diagram for hw::device_cold::tx_progress:
Collaboration diagram for hw::device_cold::tx_progress:

Public Member Functions

 tx_progress ()
 tx_progress (size_t cur_tx, size_t max_tx, size_t cur_step, size_t max_step, size_t cur_substep, size_t max_substep)
double progress () const override
bool indeterminate () const override
Public Member Functions inherited from hw::device_cold::op_progress
 op_progress ()
 op_progress (double progress, bool indeterminate=false)

Protected Attributes

size_t m_cur_tx
size_t m_max_tx
size_t m_cur_step
size_t m_max_step
size_t m_cur_substep
size_t m_max_substep
Protected Attributes inherited from hw::device_cold::op_progress
double m_progress
bool m_indeterminate

Detailed Description

Definition at line 69 of file device_cold.hpp.

Constructor & Destructor Documentation

◆ tx_progress() [1/2]

hw::device_cold::tx_progress::tx_progress ( )
inline

◆ tx_progress() [2/2]

hw::device_cold::tx_progress::tx_progress ( size_t cur_tx,
size_t max_tx,
size_t cur_step,
size_t max_step,
size_t cur_substep,
size_t max_substep )
inline

Definition at line 76 of file device_cold.hpp.

76 :
77 m_cur_tx(cur_tx), m_max_tx(max_tx),
78 m_cur_step(cur_tx), m_max_step(max_tx),
79 m_cur_substep(cur_tx), m_max_substep(max_tx){}

Member Function Documentation

◆ indeterminate()

bool hw::device_cold::tx_progress::indeterminate ( ) const
inlineoverridevirtual

Reimplemented from hw::device_cold::op_progress.

Definition at line 86 of file device_cold.hpp.

86{ return false; }

◆ progress()

double hw::device_cold::tx_progress::progress ( ) const
inlineoverridevirtual

Reimplemented from hw::device_cold::op_progress.

Definition at line 81 of file device_cold.hpp.

81 {
82 return std::max(1.0, (double)m_cur_tx / m_max_tx
83 + (double)m_cur_step / (m_max_tx * m_max_step)
85 }

Member Data Documentation

◆ m_cur_step

size_t hw::device_cold::tx_progress::m_cur_step
protected

Definition at line 91 of file device_cold.hpp.

◆ m_cur_substep

size_t hw::device_cold::tx_progress::m_cur_substep
protected

Definition at line 93 of file device_cold.hpp.

◆ m_cur_tx

size_t hw::device_cold::tx_progress::m_cur_tx
protected

Definition at line 89 of file device_cold.hpp.

◆ m_max_step

size_t hw::device_cold::tx_progress::m_max_step
protected

Definition at line 92 of file device_cold.hpp.

◆ m_max_substep

size_t hw::device_cold::tx_progress::m_max_substep
protected

Definition at line 94 of file device_cold.hpp.

◆ m_max_tx

size_t hw::device_cold::tx_progress::m_max_tx
protected

Definition at line 90 of file device_cold.hpp.


The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/src/device/device_cold.hpp