PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
kcenon::pacs::services::retrieve_progress Struct Reference

Progress information for a retrieve operation. More...

#include <retrieve_scu.h>

Collaboration diagram for kcenon::pacs::services::retrieve_progress:
Collaboration graph

Public Member Functions

uint16_t total () const noexcept
 Get total number of sub-operations.
 
float percent () const noexcept
 Get completion percentage.
 
std::chrono::milliseconds elapsed () const noexcept
 Get elapsed time since start.
 

Public Attributes

uint16_t remaining {0}
 Number of remaining sub-operations.
 
uint16_t completed {0}
 Number of completed sub-operations.
 
uint16_t failed {0}
 Number of failed sub-operations.
 
uint16_t warning {0}
 Number of sub-operations with warnings.
 
std::chrono::steady_clock::time_point start_time
 

Detailed Description

Progress information for a retrieve operation.

Tracks the progress of sub-operations during C-MOVE or C-GET.

Definition at line 77 of file retrieve_scu.h.

Member Function Documentation

◆ elapsed()

std::chrono::milliseconds kcenon::pacs::services::retrieve_progress::elapsed ( ) const
inlinenodiscardnoexcept

Get elapsed time since start.

Returns
Elapsed time in milliseconds

Definition at line 106 of file retrieve_scu.h.

106 {
107 return std::chrono::duration_cast<std::chrono::milliseconds>(
108 std::chrono::steady_clock::now() - start_time);
109 }
std::chrono::steady_clock::time_point start_time

References start_time.

◆ percent()

float kcenon::pacs::services::retrieve_progress::percent ( ) const
inlinenodiscardnoexcept

Get completion percentage.

Returns
Percentage complete (0.0 to 100.0)

Definition at line 96 of file retrieve_scu.h.

96 {
97 uint16_t t = total();
98 if (t == 0) return 0.0f;
99 return (static_cast<float>(completed + failed + warning) / t) * 100.0f;
100 }
uint16_t failed
Number of failed sub-operations.
uint16_t completed
Number of completed sub-operations.
uint16_t warning
Number of sub-operations with warnings.
uint16_t total() const noexcept
Get total number of sub-operations.

References completed, failed, total(), and warning.

Here is the call graph for this function:

◆ total()

uint16_t kcenon::pacs::services::retrieve_progress::total ( ) const
inlinenodiscardnoexcept

Get total number of sub-operations.

Returns
Total count (remaining + completed + failed + warning)

Definition at line 88 of file retrieve_scu.h.

88 {
89 return remaining + completed + failed + warning;
90 }
uint16_t remaining
Number of remaining sub-operations.

References completed, failed, remaining, and warning.

Referenced by percent().

Here is the caller graph for this function:

Member Data Documentation

◆ completed

uint16_t kcenon::pacs::services::retrieve_progress::completed {0}

Number of completed sub-operations.

Definition at line 79 of file retrieve_scu.h.

79{0};

Referenced by percent(), kcenon::pacs::services::retrieve_scu::perform_get(), kcenon::pacs::services::retrieve_scu::perform_move(), and total().

◆ failed

uint16_t kcenon::pacs::services::retrieve_progress::failed {0}

Number of failed sub-operations.

Definition at line 80 of file retrieve_scu.h.

80{0};

Referenced by percent(), kcenon::pacs::services::retrieve_scu::perform_get(), kcenon::pacs::services::retrieve_scu::perform_move(), and total().

◆ remaining

uint16_t kcenon::pacs::services::retrieve_progress::remaining {0}

Number of remaining sub-operations.

Definition at line 78 of file retrieve_scu.h.

78{0};

Referenced by kcenon::pacs::services::retrieve_scu::perform_get(), kcenon::pacs::services::retrieve_scu::perform_move(), and total().

◆ start_time

std::chrono::steady_clock::time_point kcenon::pacs::services::retrieve_progress::start_time

◆ warning

uint16_t kcenon::pacs::services::retrieve_progress::warning {0}

Number of sub-operations with warnings.

Definition at line 81 of file retrieve_scu.h.

81{0};

Referenced by percent(), kcenon::pacs::services::retrieve_scu::perform_get(), kcenon::pacs::services::retrieve_scu::perform_move(), and total().


The documentation for this struct was generated from the following file: