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

Storage subsystem health information. More...

#include <health_status.h>

Collaboration diagram for kcenon::pacs::monitoring::storage_status:
Collaboration graph

Public Member Functions

double usage_percent () const noexcept
 Storage usage percentage (0-100)
 

Public Attributes

bool writable {false}
 Whether storage is writable.
 
bool readable {false}
 Whether storage is readable.
 
std::uint64_t total_bytes {0}
 Total storage capacity in bytes.
 
std::uint64_t used_bytes {0}
 Used storage space in bytes.
 
std::uint64_t available_bytes {0}
 Available storage space in bytes.
 
std::optional< std::string > error_message
 Error message if storage check failed.
 

Detailed Description

Storage subsystem health information.

Definition at line 90 of file health_status.h.

Member Function Documentation

◆ usage_percent()

double kcenon::pacs::monitoring::storage_status::usage_percent ( ) const
inlinenodiscardnoexcept

Storage usage percentage (0-100)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/monitoring/health_status.h.

Definition at line 107 of file health_status.h.

107 {
108 if (total_bytes == 0) {
109 return 0.0;
110 }
111 return static_cast<double>(used_bytes) / static_cast<double>(total_bytes) *
112 100.0;
113 }
std::uint64_t used_bytes
Used storage space in bytes.
std::uint64_t total_bytes
Total storage capacity in bytes.

References total_bytes, and used_bytes.

Referenced by kcenon::pacs::monitoring::health_status::update_level().

Here is the caller graph for this function:

Member Data Documentation

◆ available_bytes

std::uint64_t kcenon::pacs::monitoring::storage_status::available_bytes {0}

Available storage space in bytes.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/monitoring/health_status.h.

Definition at line 104 of file health_status.h.

104{0};

◆ error_message

std::optional<std::string> kcenon::pacs::monitoring::storage_status::error_message

Error message if storage check failed.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/monitoring/health_status.h.

Definition at line 116 of file health_status.h.

◆ readable

bool kcenon::pacs::monitoring::storage_status::readable {false}

◆ total_bytes

std::uint64_t kcenon::pacs::monitoring::storage_status::total_bytes {0}

Total storage capacity in bytes.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/monitoring/health_status.h.

Definition at line 98 of file health_status.h.

98{0};

Referenced by usage_percent().

◆ used_bytes

std::uint64_t kcenon::pacs::monitoring::storage_status::used_bytes {0}

Used storage space in bytes.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/monitoring/health_status.h.

Definition at line 101 of file health_status.h.

101{0};

Referenced by usage_percent().

◆ writable

bool kcenon::pacs::monitoring::storage_status::writable {false}

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