18#ifndef PACS_SERVICES_STORAGE_STATUS_HPP
19#define PACS_SERVICES_STORAGE_STATUS_HPP
80 const auto value =
static_cast<uint16_t
>(status);
81 return (value & 0xF000) == 0xB000;
90 const auto value =
static_cast<uint16_t
>(status);
91 const auto high_nibble = (value & 0xF000) >> 12;
92 return high_nibble == 0xA || high_nibble == 0xC ||
93 (value >= 0x0100 && value <= 0x01FF);
106 return "Warning: Coercion of data elements";
108 return "Warning: Data set does not match SOP class";
110 return "Warning: Elements discarded";
112 return "Failure: Duplicate SOP instance";
114 return "Failure: Out of resources";
116 return "Failure: Out of resources - Unable to store";
118 return "Failure: Data set does not match SOP class";
120 return "Failure: Cannot understand";
122 return "Failure: Storage error";
124 return "Unknown status";
134 return static_cast<uint16_t
>(status);
constexpr bool is_failure(storage_status status) noexcept
Check if the status indicates a failure.
constexpr bool is_success(storage_status status) noexcept
Check if the status indicates success.
storage_status
Storage operation status codes.
@ elements_discarded
Warning: Elements discarded (0xB006)
@ storage_error
Failure: Unable to process - storage error (0xC001)
@ data_set_does_not_match_sop_class
Failure: Data set does not match SOP class (0xA900)
@ data_set_does_not_match_sop_class_warning
Warning: Data set does not match SOP class (0xB007)
@ success
Success - image stored successfully (0x0000)
@ out_of_resources
Failure: Out of resources (0xA700)
@ cannot_understand
Failure: Cannot understand - processing failure (0xC000)
@ duplicate_sop_instance
Failure: Duplicate SOP instance - already exists (0x0111)
@ out_of_resources_unable_to_store
Failure: Out of resources - Unable to store (0xA701)
@ coercion_of_data_elements
Warning: Coercion of data elements (0xB000)
constexpr bool is_warning(storage_status status) noexcept
Check if the status indicates a warning.
auto to_string(mpps_status status) -> std::string_view
Convert mpps_status to DICOM string representation.
constexpr uint16_t to_status_code(storage_status status) noexcept
Convert storage_status to DIMSE status_code.