18#ifndef PACS_NETWORK_DIMSE_STATUS_CODES_HPP
19#define PACS_NETWORK_DIMSE_STATUS_CODES_HPP
55constexpr status_code status_refused_out_of_resources = 0xA700;
58constexpr status_code status_refused_out_of_resources_matches = 0xA701;
61constexpr status_code status_refused_out_of_resources_subops = 0xA702;
64constexpr status_code status_refused_move_destination_unknown = 0xA801;
67constexpr status_code status_refused_sop_class_not_supported = 0x0122;
79constexpr status_code status_error_duplicate_sop_instance = 0x0111;
85constexpr status_code status_error_missing_attribute_value = 0x0121;
186 return (status & 0xF000) == 0xB000;
198 const auto high_nibble = (status & 0xF000) >> 12;
199 return high_nibble == 0xA || high_nibble == 0xC ||
200 (status >= 0x0100 && status <= 0x02FF);
231 return "Refused: Unable to calculate number of matches";
233 return "Refused: Unable to perform sub-operations";
235 return "Refused: Move destination unknown";
237 return "Refused: SOP class not supported";
239 return "Error: Data set does not match SOP class";
243 return "Error: Duplicate SOP instance";
246 return "Error: Missing attribute value";
248 return "Error: Attribute list error";
250 return "Error: Attribute value out of range";
252 return "Error: Invalid object instance";
254 return "Error: No such SOP class";
256 return "Error: Class-instance conflict";
258 return "Error: Not authorized";
260 return "Error: Duplicate invocation";
262 return "Error: Unrecognized operation";
264 return "Error: Mistyped argument";
266 return "Error: Resource limitation";
268 return "Error: No such action type";
270 return "Error: No such event type";
272 return "Error: Processing failure";
275 return "Warning: Data set does not match SOP class";
277 return "Warning: Elements discarded";
283 return "Unknown status";
constexpr status_code status_refused_sop_class_not_supported
Refused: SOP class not supported.
constexpr status_code status_error_duplicate_sop_instance
Error: Duplicate SOP instance.
constexpr status_code status_pending
Operation pending (more results available)
constexpr status_code status_refused_out_of_resources_matches
Refused: Out of resources - Unable to calculate number of matches.
constexpr status_code status_error_attribute_value_out_of_range
Error: Attribute value out of range (N-SET)
constexpr status_code status_warning_elements_discarded
Warning: Elements discarded.
constexpr status_code status_error_no_such_action_type
Error: No such action type (N-ACTION)
constexpr status_code status_refused_out_of_resources_subops
Refused: Out of resources - Unable to perform sub-operations.
constexpr status_code status_error_attribute_list_error
Error: Attribute list error (N-CREATE)
constexpr bool is_warning(status_code status) noexcept
Check if status indicates a warning.
constexpr status_code status_error_dataset_mismatch
Error: Data set does not match SOP class.
constexpr status_code status_error_no_such_event_type
Error: No such event type (N-EVENT-REPORT)
constexpr status_code status_warning_dataset_mismatch
Warning: Data set does not match SOP class (non-fatal)
constexpr std::string_view status_description(status_code status) noexcept
Get a human-readable description of a status code.
constexpr bool is_cancel(status_code status) noexcept
Check if status indicates cancellation.
constexpr status_code status_warning_coercion
Warning: Coercion of data elements.
constexpr status_code status_warning_subops_complete_failures
Warning: Sub-operations complete with failures.
constexpr status_code status_error_unable_to_process
Error: Unable to process.
constexpr status_code status_refused_out_of_resources
Refused: Out of resources.
constexpr bool is_final(status_code status) noexcept
Check if this is a final status (operation complete)
constexpr status_code status_error_mistyped_argument
Error: Mistyped argument (All DIMSE-N)
constexpr status_code status_error_invalid_object_instance
Error: Invalid object instance (N-SET, N-GET, N-ACTION, N-DELETE)
constexpr status_code status_error_missing_attribute
Error: Missing attribute.
constexpr status_code status_error_missing_attribute_value
Error: Missing attribute value.
constexpr status_code status_success
Operation completed successfully.
constexpr status_code status_error_class_instance_conflict
Error: Class-instance conflict (All DIMSE-N)
constexpr bool is_success(status_code status) noexcept
Check if status indicates success.
constexpr status_code status_error_no_such_sop_class
Error: No such SOP class (All DIMSE-N)
constexpr status_code status_pending_warning
Pending with optional keys not supported.
constexpr bool is_pending(status_code status) noexcept
Check if status indicates pending (more results)
constexpr bool is_failure(status_code status) noexcept
Check if status indicates a failure.
constexpr status_code status_error_not_authorized
Error: Not authorized (All DIMSE-N)
constexpr status_code status_error_unrecognized_operation
Error: Unrecognized operation (All DIMSE-N)
constexpr status_code status_error_cannot_understand
Error: Cannot understand.
constexpr std::string_view status_category(status_code status) noexcept
Get the category name for a status code.
constexpr status_code status_error_resource_limitation
Error: Resource limitation (All DIMSE-N)
constexpr status_code status_cancel
Operation was canceled.
uint16_t status_code
DIMSE status code type alias.
constexpr status_code status_error_duplicate_invocation
Error: Duplicate invocation (All DIMSE-N)
constexpr status_code status_refused_move_destination_unknown
Refused: Move destination unknown.
constexpr status_code status_error_processing_failure
Error: Processing failure (All DIMSE-N)