PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
kcenon::pacs::network::dimse Namespace Reference

Classes

class  dimse_message
 

Typedefs

template<typename T >
using dimse_result = kcenon::pacs::Result<T>
 Result type for DIMSE operations using standardized kcenon::pacs::Result<T>
 
using status_code = uint16_t
 DIMSE status code type alias.
 

Enumerations

enum class  command_field : uint16_t {
  c_store_rq = 0x0001 , c_store_rsp = 0x8001 , c_get_rq = 0x0010 , c_get_rsp = 0x8010 ,
  c_find_rq = 0x0020 , c_find_rsp = 0x8020 , c_move_rq = 0x0021 , c_move_rsp = 0x8021 ,
  c_echo_rq = 0x0030 , c_echo_rsp = 0x8030 , c_cancel_rq = 0x0FFF , n_event_report_rq = 0x0100 ,
  n_event_report_rsp = 0x8100 , n_get_rq = 0x0110 , n_get_rsp = 0x8110 , n_set_rq = 0x0120 ,
  n_set_rsp = 0x8120 , n_action_rq = 0x0130 , n_action_rsp = 0x8130 , n_create_rq = 0x0140 ,
  n_create_rsp = 0x8140 , n_delete_rq = 0x0150 , n_delete_rsp = 0x8150
}
 DIMSE command field values. More...
 
enum class  dimse_error {
  success = 0 , invalid_command_set , missing_required_field , invalid_data_format ,
  encoding_error , decoding_error
}
 Error codes for DIMSE message operations. More...
 

Functions

constexpr std::string_view to_string (dimse_error err) noexcept
 Get error description.
 
auto make_c_echo_rq (uint16_t message_id, std::string_view sop_class_uid="1.2.840.10008.1.1") -> dimse_message
 Create a C-ECHO request message.
 
auto make_c_echo_rsp (uint16_t message_id_responded_to, status_code status=status_success, std::string_view sop_class_uid="1.2.840.10008.1.1") -> dimse_message
 Create a C-ECHO response message.
 
auto make_c_store_rq (uint16_t message_id, std::string_view sop_class_uid, std::string_view sop_instance_uid, uint16_t priority=priority_medium) -> dimse_message
 Create a C-STORE request message.
 
auto make_c_store_rsp (uint16_t message_id_responded_to, std::string_view sop_class_uid, std::string_view sop_instance_uid, status_code status=status_success) -> dimse_message
 Create a C-STORE response message.
 
auto make_c_find_rq (uint16_t message_id, std::string_view sop_class_uid, uint16_t priority=priority_medium) -> dimse_message
 Create a C-FIND request message.
 
auto make_c_find_rsp (uint16_t message_id_responded_to, std::string_view sop_class_uid, status_code status) -> dimse_message
 Create a C-FIND response message.
 
auto make_n_create_rq (uint16_t message_id, std::string_view sop_class_uid, std::string_view sop_instance_uid="") -> dimse_message
 Create an N-CREATE request message.
 
auto make_n_create_rsp (uint16_t message_id_responded_to, std::string_view sop_class_uid, std::string_view sop_instance_uid, status_code status=status_success) -> dimse_message
 Create an N-CREATE response message.
 
auto make_n_set_rq (uint16_t message_id, std::string_view sop_class_uid, std::string_view sop_instance_uid) -> dimse_message
 Create an N-SET request message.
 
auto make_n_set_rsp (uint16_t message_id_responded_to, std::string_view sop_class_uid, std::string_view sop_instance_uid, status_code status=status_success) -> dimse_message
 Create an N-SET response message.
 
auto make_n_get_rq (uint16_t message_id, std::string_view sop_class_uid, std::string_view sop_instance_uid, const std::vector< core::dicom_tag > &attribute_tags={}) -> dimse_message
 Create an N-GET request message.
 
auto make_n_get_rsp (uint16_t message_id_responded_to, std::string_view sop_class_uid, std::string_view sop_instance_uid, status_code status=status_success) -> dimse_message
 Create an N-GET response message.
 
auto make_n_event_report_rq (uint16_t message_id, std::string_view sop_class_uid, std::string_view sop_instance_uid, uint16_t event_type_id) -> dimse_message
 Create an N-EVENT-REPORT request message.
 
auto make_n_event_report_rsp (uint16_t message_id_responded_to, std::string_view sop_class_uid, std::string_view sop_instance_uid, uint16_t event_type_id, status_code status=status_success) -> dimse_message
 Create an N-EVENT-REPORT response message.
 
auto make_n_action_rq (uint16_t message_id, std::string_view sop_class_uid, std::string_view sop_instance_uid, uint16_t action_type_id) -> dimse_message
 Create an N-ACTION request message.
 
auto make_n_action_rsp (uint16_t message_id_responded_to, std::string_view sop_class_uid, std::string_view sop_instance_uid, uint16_t action_type_id, status_code status=status_success) -> dimse_message
 Create an N-ACTION response message.
 
auto make_n_delete_rq (uint16_t message_id, std::string_view sop_class_uid, std::string_view sop_instance_uid) -> dimse_message
 Create an N-DELETE request message.
 
auto make_n_delete_rsp (uint16_t message_id_responded_to, std::string_view sop_class_uid, std::string_view sop_instance_uid, status_code status=status_success) -> dimse_message
 Create an N-DELETE response message.
 
Command Field Utilities
constexpr bool is_request (command_field cmd) noexcept
 Check if a command field represents a request.
 
constexpr bool is_response (command_field cmd) noexcept
 Check if a command field represents a response.
 
constexpr bool is_dimse_c (command_field cmd) noexcept
 Check if a command is a DIMSE-C command.
 
constexpr bool is_dimse_n (command_field cmd) noexcept
 Check if a command is a DIMSE-N command.
 
constexpr command_field get_response_command (command_field request) noexcept
 Get the corresponding response command for a request.
 
constexpr command_field get_request_command (command_field response) noexcept
 Get the corresponding request command for a response.
 
constexpr std::string_view to_string (command_field cmd) noexcept
 Convert command field to string representation.
 
Status Type Categories
constexpr bool is_success (status_code status) noexcept
 Check if status indicates success.
 
constexpr bool is_pending (status_code status) noexcept
 Check if status indicates pending (more results)
 
constexpr bool is_cancel (status_code status) noexcept
 Check if status indicates cancellation.
 
constexpr bool is_warning (status_code status) noexcept
 Check if status indicates a warning.
 
constexpr bool is_failure (status_code status) noexcept
 Check if status indicates a failure.
 
constexpr bool is_final (status_code status) noexcept
 Check if this is a final status (operation complete)
 
Status Code String Conversion
constexpr std::string_view status_description (status_code status) noexcept
 Get a human-readable description of a status code.
 
constexpr std::string_view status_category (status_code status) noexcept
 Get the category name for a status code.
 

Variables

DIMSE Command Tags
constexpr core::dicom_tag tag_command_group_length {0x0000, 0x0000}
 Command Group Length (0000,0000) - UL.
 
constexpr core::dicom_tag tag_affected_sop_class_uid {0x0000, 0x0002}
 Affected SOP Class UID (0000,0002) - UI.
 
constexpr core::dicom_tag tag_requested_sop_class_uid {0x0000, 0x0003}
 Requested SOP Class UID (0000,0003) - UI.
 
constexpr core::dicom_tag tag_command_field {0x0000, 0x0100}
 Command Field (0000,0100) - US.
 
constexpr core::dicom_tag tag_message_id {0x0000, 0x0110}
 Message ID (0000,0110) - US.
 
constexpr core::dicom_tag tag_message_id_responded_to {0x0000, 0x0120}
 Message ID Being Responded To (0000,0120) - US.
 
constexpr core::dicom_tag tag_move_destination {0x0000, 0x0600}
 Move Destination (0000,0600) - AE.
 
constexpr core::dicom_tag tag_priority {0x0000, 0x0700}
 Priority (0000,0700) - US.
 
constexpr core::dicom_tag tag_command_data_set_type {0x0000, 0x0800}
 Command Data Set Type (0000,0800) - US.
 
constexpr core::dicom_tag tag_status {0x0000, 0x0900}
 Status (0000,0900) - US.
 
constexpr core::dicom_tag tag_offending_element {0x0000, 0x0901}
 Offending Element (0000,0901) - AT.
 
constexpr core::dicom_tag tag_error_comment {0x0000, 0x0902}
 Error Comment (0000,0902) - LO.
 
constexpr core::dicom_tag tag_error_id {0x0000, 0x0903}
 Error ID (0000,0903) - US.
 
constexpr core::dicom_tag tag_affected_sop_instance_uid {0x0000, 0x1000}
 Affected SOP Instance UID (0000,1000) - UI.
 
constexpr core::dicom_tag tag_requested_sop_instance_uid {0x0000, 0x1001}
 Requested SOP Instance UID (0000,1001) - UI.
 
constexpr core::dicom_tag tag_event_type_id {0x0000, 0x1002}
 Event Type ID (0000,1002) - US.
 
constexpr core::dicom_tag tag_attribute_identifier_list {0x0000, 0x1005}
 Attribute Identifier List (0000,1005) - AT.
 
constexpr core::dicom_tag tag_action_type_id {0x0000, 0x1008}
 Action Type ID (0000,1008) - US.
 
constexpr core::dicom_tag tag_number_of_remaining_subops {0x0000, 0x1020}
 Number of Remaining Sub-operations (0000,1020) - US.
 
constexpr core::dicom_tag tag_number_of_completed_subops {0x0000, 0x1021}
 Number of Completed Sub-operations (0000,1021) - US.
 
constexpr core::dicom_tag tag_number_of_failed_subops {0x0000, 0x1022}
 Number of Failed Sub-operations (0000,1022) - US.
 
constexpr core::dicom_tag tag_number_of_warning_subops {0x0000, 0x1023}
 Number of Warning Sub-operations (0000,1023) - US.
 
constexpr core::dicom_tag tag_move_originator_aet {0x0000, 0x1030}
 Move Originator Application Entity Title (0000,1030) - AE.
 
constexpr core::dicom_tag tag_move_originator_message_id {0x0000, 0x1031}
 Move Originator Message ID (0000,1031) - US.
 
Command Data Set Type Values
constexpr uint16_t command_data_set_type_null = 0x0101
 Null value indicating no data set present.
 
constexpr uint16_t command_data_set_type_present = 0x0001
 Value indicating data set is present (any value other than 0x0101)
 
Priority Values
constexpr uint16_t priority_low = 0x0002
 Low priority.
 
constexpr uint16_t priority_medium = 0x0000
 Medium priority.
 
constexpr uint16_t priority_high = 0x0001
 High priority.
 
General Status Codes
constexpr status_code status_success = 0x0000
 Operation completed successfully.
 
constexpr status_code status_pending = 0xFF00
 Operation pending (more results available)
 
constexpr status_code status_pending_warning = 0xFF01
 Pending with optional keys not supported.
 
constexpr status_code status_cancel = 0xFE00
 Operation was canceled.
 
Failure Status Codes (0xCxxx, 0xAxxx)
constexpr status_code status_refused_out_of_resources = 0xA700
 Refused: Out of resources.
 
constexpr status_code status_refused_out_of_resources_matches = 0xA701
 Refused: Out of resources - Unable to calculate number of matches.
 
constexpr status_code status_refused_out_of_resources_subops = 0xA702
 Refused: Out of resources - Unable to perform sub-operations.
 
constexpr status_code status_refused_move_destination_unknown = 0xA801
 Refused: Move destination unknown.
 
constexpr status_code status_refused_sop_class_not_supported = 0x0122
 Refused: SOP class not supported.
 
constexpr status_code status_error_dataset_mismatch = 0xA900
 Error: Data set does not match SOP class.
 
constexpr status_code status_error_cannot_understand = 0xC000
 Error: Cannot understand.
 
constexpr status_code status_error_unable_to_process = 0xC001
 Error: Unable to process.
 
constexpr status_code status_error_duplicate_sop_instance = 0x0111
 Error: Duplicate SOP instance.
 
constexpr status_code status_error_missing_attribute = 0x0120
 Error: Missing attribute.
 
constexpr status_code status_error_missing_attribute_value = 0x0121
 Error: Missing attribute value.
 
DIMSE-N Specific Failure Status Codes
constexpr status_code status_error_attribute_list_error = 0x0107
 Error: Attribute list error (N-CREATE)
 
constexpr status_code status_error_attribute_value_out_of_range = 0x0116
 Error: Attribute value out of range (N-SET)
 
constexpr status_code status_error_invalid_object_instance = 0x0117
 Error: Invalid object instance (N-SET, N-GET, N-ACTION, N-DELETE)
 
constexpr status_code status_error_no_such_sop_class = 0x0118
 Error: No such SOP class (All DIMSE-N)
 
constexpr status_code status_error_class_instance_conflict = 0x0119
 Error: Class-instance conflict (All DIMSE-N)
 
constexpr status_code status_error_not_authorized = 0x0124
 Error: Not authorized (All DIMSE-N)
 
constexpr status_code status_error_duplicate_invocation = 0x0210
 Error: Duplicate invocation (All DIMSE-N)
 
constexpr status_code status_error_unrecognized_operation = 0x0211
 Error: Unrecognized operation (All DIMSE-N)
 
constexpr status_code status_error_mistyped_argument = 0x0212
 Error: Mistyped argument (All DIMSE-N)
 
constexpr status_code status_error_resource_limitation = 0x0213
 Error: Resource limitation (All DIMSE-N)
 
constexpr status_code status_error_no_such_action_type = 0x0123
 Error: No such action type (N-ACTION)
 
constexpr status_code status_error_no_such_event_type = 0x0113
 Error: No such event type (N-EVENT-REPORT)
 
constexpr status_code status_error_processing_failure = 0x0110
 Error: Processing failure (All DIMSE-N)
 
Warning Status Codes (0xBxxx)
constexpr status_code status_warning_coercion = 0xB000
 Warning: Coercion of data elements.
 
constexpr status_code status_warning_dataset_mismatch = 0xB007
 Warning: Data set does not match SOP class (non-fatal)
 
constexpr status_code status_warning_elements_discarded = 0xB006
 Warning: Elements discarded.
 
constexpr status_code status_warning_subops_complete_failures = 0xB000
 Warning: Sub-operations complete with failures.
 

Typedef Documentation

◆ dimse_result

Result type for DIMSE operations using standardized kcenon::pacs::Result<T>

Template Parameters
TThe success value type
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 176 of file dimse_message.h.

◆ status_code

DIMSE status code type alias.

Status codes are 16-bit unsigned integers. The high nibble indicates the status type (Success, Warning, Failure, etc.)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 32 of file status_codes.h.

Enumeration Type Documentation

◆ command_field

enum class kcenon::pacs::network::dimse::command_field : uint16_t
strong

DIMSE command field values.

These values represent the Command Field (0000,0100) in DICOM command sets. Request commands have values in the range 0x0001-0x0FFF, while response commands have values in the range 0x8001-0x8FFF.

The pattern is: response = request | 0x8000

Enumerator
c_store_rq 

C-STORE Request - Store composite SOP instance.

c_store_rsp 

C-STORE Response.

c_get_rq 

C-GET Request - Retrieve composite SOP instances.

c_get_rsp 

C-GET Response.

c_find_rq 

C-FIND Request - Query for matching instances.

c_find_rsp 

C-FIND Response.

c_move_rq 

C-MOVE Request - Move composite SOP instances.

c_move_rsp 

C-MOVE Response.

c_echo_rq 

C-ECHO Request - Verify DICOM connection.

c_echo_rsp 

C-ECHO Response.

c_cancel_rq 

C-CANCEL Request - Cancel pending operation.

n_event_report_rq 

N-EVENT-REPORT Request - Report event notification.

n_event_report_rsp 

N-EVENT-REPORT Response.

n_get_rq 

N-GET Request - Get attribute values.

n_get_rsp 

N-GET Response.

n_set_rq 

N-SET Request - Set attribute values.

n_set_rsp 

N-SET Response.

n_action_rq 

N-ACTION Request - Request action.

n_action_rsp 

N-ACTION Response.

n_create_rq 

N-CREATE Request - Create SOP instance.

n_create_rsp 

N-CREATE Response.

n_delete_rq 

N-DELETE Request - Delete SOP instance.

n_delete_rsp 

N-DELETE Response.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 35 of file command_field.h.

35 : uint16_t {
36 // ========================================================================
37 // DIMSE-C Commands (Composite SOP Classes)
38 // ========================================================================
39
41 c_store_rq = 0x0001,
43 c_store_rsp = 0x8001,
44
46 c_get_rq = 0x0010,
48 c_get_rsp = 0x8010,
49
51 c_find_rq = 0x0020,
53 c_find_rsp = 0x8020,
54
56 c_move_rq = 0x0021,
58 c_move_rsp = 0x8021,
59
61 c_echo_rq = 0x0030,
63 c_echo_rsp = 0x8030,
64
66 c_cancel_rq = 0x0FFF,
67
68 // ========================================================================
69 // DIMSE-N Commands (Normalized SOP Classes)
70 // ========================================================================
71
73 n_event_report_rq = 0x0100,
75 n_event_report_rsp = 0x8100,
76
78 n_get_rq = 0x0110,
80 n_get_rsp = 0x8110,
81
83 n_set_rq = 0x0120,
85 n_set_rsp = 0x8120,
86
88 n_action_rq = 0x0130,
90 n_action_rsp = 0x8130,
91
93 n_create_rq = 0x0140,
95 n_create_rsp = 0x8140,
96
98 n_delete_rq = 0x0150,
100 n_delete_rsp = 0x8150,
101};
@ n_get_rq
N-GET Request - Get attribute values.
@ c_cancel_rq
C-CANCEL Request - Cancel pending operation.
@ c_store_rq
C-STORE Request - Store composite SOP instance.
@ n_create_rq
N-CREATE Request - Create SOP instance.
@ n_set_rq
N-SET Request - Set attribute values.
@ c_echo_rq
C-ECHO Request - Verify DICOM connection.
@ c_find_rq
C-FIND Request - Query for matching instances.
@ n_delete_rq
N-DELETE Request - Delete SOP instance.
@ n_event_report_rsp
N-EVENT-REPORT Response.
@ n_event_report_rq
N-EVENT-REPORT Request - Report event notification.
@ c_get_rq
C-GET Request - Retrieve composite SOP instances.
@ c_move_rq
C-MOVE Request - Move composite SOP instances.
@ n_action_rq
N-ACTION Request - Request action.

◆ dimse_error

Error codes for DIMSE message operations.

Enumerator
success 
invalid_command_set 
missing_required_field 
invalid_data_format 
encoding_error 
decoding_error 
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 146 of file dimse_message.h.

Function Documentation

◆ get_request_command()

command_field kcenon::pacs::network::dimse::get_request_command ( command_field response)
nodiscardconstexprnoexcept

Get the corresponding request command for a response.

Parameters
responseThe response command field
Returns
The corresponding request command field

Definition at line 162 of file command_field.h.

163 {
164 return static_cast<command_field>(static_cast<uint16_t>(response) & 0x7FFF);
165}
command_field
DIMSE command field values.

◆ get_response_command()

command_field kcenon::pacs::network::dimse::get_response_command ( command_field request)
nodiscardconstexprnoexcept

Get the corresponding response command for a request.

Parameters
requestThe request command field
Returns
The corresponding response command field
Note
Behavior is undefined if called with C-CANCEL-RQ (has no response)

Definition at line 152 of file command_field.h.

153 {
154 return static_cast<command_field>(static_cast<uint16_t>(request) | 0x8000);
155}

◆ is_cancel()

bool kcenon::pacs::network::dimse::is_cancel ( status_code status)
nodiscardconstexprnoexcept

Check if status indicates cancellation.

Parameters
statusThe status code to check
Returns
true if operation was canceled

Definition at line 176 of file status_codes.h.

176 {
177 return status == status_cancel;
178}

References status_cancel.

Referenced by status_category().

Here is the caller graph for this function:

◆ is_dimse_c()

bool kcenon::pacs::network::dimse::is_dimse_c ( command_field cmd)
nodiscardconstexprnoexcept

Check if a command is a DIMSE-C command.

Parameters
cmdThe command field to check
Returns
true if the command is a DIMSE-C (composite) command

Definition at line 129 of file command_field.h.

129 {
130 // Remove response bit (0x8000) and check range
131 const auto value = static_cast<uint16_t>(cmd) & 0x7FFF;
132 return value <= 0x0030 || value == 0x0FFF;
133}

◆ is_dimse_n()

bool kcenon::pacs::network::dimse::is_dimse_n ( command_field cmd)
nodiscardconstexprnoexcept

Check if a command is a DIMSE-N command.

Parameters
cmdThe command field to check
Returns
true if the command is a DIMSE-N (normalized) command

Definition at line 140 of file command_field.h.

140 {
141 // Remove response bit (0x8000) and check range
142 const auto value = static_cast<uint16_t>(cmd) & 0x7FFF;
143 return value >= 0x0100 && value <= 0x0150;
144}

◆ is_failure()

bool kcenon::pacs::network::dimse::is_failure ( status_code status)
nodiscardconstexprnoexcept

Check if status indicates a failure.

Parameters
statusThe status code to check
Returns
true if operation failed

Failure status codes start with 0xA or 0xC in the high nibble, or have specific values like 0x01xx (DIMSE-N errors) or 0x02xx (protocol errors).

Definition at line 197 of file status_codes.h.

197 {
198 const auto high_nibble = (status & 0xF000) >> 12;
199 return high_nibble == 0xA || high_nibble == 0xC ||
200 (status >= 0x0100 && status <= 0x02FF);
201}

Referenced by status_category(), and status_description().

Here is the caller graph for this function:

◆ is_final()

bool kcenon::pacs::network::dimse::is_final ( status_code status)
nodiscardconstexprnoexcept

Check if this is a final status (operation complete)

Parameters
statusThe status code to check
Returns
true if this indicates the operation is complete

Definition at line 208 of file status_codes.h.

208 {
209 return !is_pending(status);
210}

References is_pending().

Here is the call graph for this function:

◆ is_pending()

bool kcenon::pacs::network::dimse::is_pending ( status_code status)
nodiscardconstexprnoexcept

Check if status indicates pending (more results)

Parameters
statusThe status code to check
Returns
true if more results are pending

Definition at line 167 of file status_codes.h.

167 {
168 return status == status_pending || status == status_pending_warning;
169}

References status_pending_warning.

Referenced by is_final(), status_category(), and status_description().

Here is the caller graph for this function:

◆ is_request()

bool kcenon::pacs::network::dimse::is_request ( command_field cmd)
nodiscardconstexprnoexcept

Check if a command field represents a request.

Parameters
cmdThe command field to check
Returns
true if the command is a request (not a response)

Definition at line 111 of file command_field.h.

111 {
112 return (static_cast<uint16_t>(cmd) & 0x8000) == 0;
113}

Referenced by kcenon::pacs::network::dimse::dimse_message::decode(), and kcenon::pacs::network::dimse::dimse_message::is_request().

Here is the caller graph for this function:

◆ is_response()

bool kcenon::pacs::network::dimse::is_response ( command_field cmd)
nodiscardconstexprnoexcept

Check if a command field represents a response.

Parameters
cmdThe command field to check
Returns
true if the command is a response

Definition at line 120 of file command_field.h.

120 {
121 return (static_cast<uint16_t>(cmd) & 0x8000) != 0;
122}

Referenced by kcenon::pacs::network::dimse::dimse_message::is_response().

Here is the caller graph for this function:

◆ is_success()

bool kcenon::pacs::network::dimse::is_success ( status_code status)
nodiscardconstexprnoexcept

Check if status indicates success.

Parameters
statusThe status code to check
Returns
true if operation was successful

Definition at line 158 of file status_codes.h.

158 {
159 return status == status_success;
160}

References status_success.

Referenced by status_category(), and status_description().

Here is the caller graph for this function:

◆ is_warning()

bool kcenon::pacs::network::dimse::is_warning ( status_code status)
nodiscardconstexprnoexcept

Check if status indicates a warning.

Parameters
statusThe status code to check
Returns
true if operation completed with warning

Definition at line 185 of file status_codes.h.

185 {
186 return (status & 0xF000) == 0xB000;
187}

Referenced by status_category(), and status_description().

Here is the caller graph for this function:

◆ make_c_echo_rq()

auto kcenon::pacs::network::dimse::make_c_echo_rq ( uint16_t message_id,
std::string_view sop_class_uid = "1.2.840.10008.1.1" ) -> dimse_message
nodiscard

Create a C-ECHO request message.

Parameters
message_idThe message ID
sop_class_uidThe Verification SOP Class UID
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 386 of file dimse_message.cpp.

387 {
388 dimse_message msg(command_field::c_echo_rq, message_id);
389 msg.set_affected_sop_class_uid(sop_class_uid);
390 return msg;
391}

References c_echo_rq, and kcenon::pacs::network::dimse::dimse_message::set_affected_sop_class_uid().

Referenced by TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_c_echo_rsp()

auto kcenon::pacs::network::dimse::make_c_echo_rsp ( uint16_t message_id_responded_to,
status_code status = status_success,
std::string_view sop_class_uid = "1.2.840.10008.1.1" ) -> dimse_message
nodiscard

Create a C-ECHO response message.

Parameters
message_id_responded_toThe message ID being responded to
statusThe response status code
sop_class_uidThe Verification SOP Class UID
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 393 of file dimse_message.cpp.

394 {
395 dimse_message msg(command_field::c_echo_rsp, 0);
396 msg.set_message_id_responded_to(message_id_responded_to);
397 msg.set_affected_sop_class_uid(sop_class_uid);
398 msg.set_status(status);
399 return msg;
400}

References c_echo_rsp, kcenon::pacs::network::dimse::dimse_message::set_affected_sop_class_uid(), kcenon::pacs::network::dimse::dimse_message::set_message_id_responded_to(), and kcenon::pacs::network::dimse::dimse_message::set_status().

Here is the call graph for this function:

◆ make_c_find_rq()

auto kcenon::pacs::network::dimse::make_c_find_rq ( uint16_t message_id,
std::string_view sop_class_uid,
uint16_t priority = priority_medium ) -> dimse_message
nodiscard

Create a C-FIND request message.

Parameters
message_idThe message ID
sop_class_uidThe Query/Retrieve SOP Class UID
priorityOperation priority
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 424 of file dimse_message.cpp.

425 {
426 dimse_message msg(command_field::c_find_rq, message_id);
427 msg.set_affected_sop_class_uid(sop_class_uid);
428 msg.set_priority(priority);
429 return msg;
430}

References c_find_rq, kcenon::pacs::network::dimse::dimse_message::set_affected_sop_class_uid(), and kcenon::pacs::network::dimse::dimse_message::set_priority().

Referenced by TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_c_find_rsp()

auto kcenon::pacs::network::dimse::make_c_find_rsp ( uint16_t message_id_responded_to,
std::string_view sop_class_uid,
status_code status ) -> dimse_message
nodiscard

Create a C-FIND response message.

Parameters
message_id_responded_toThe message ID being responded to
sop_class_uidThe Query/Retrieve SOP Class UID
statusThe response status code
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 432 of file dimse_message.cpp.

434 {
435 dimse_message msg(command_field::c_find_rsp, 0);
436 msg.set_message_id_responded_to(message_id_responded_to);
437 msg.set_affected_sop_class_uid(sop_class_uid);
438 msg.set_status(status);
439 return msg;
440}

References c_find_rsp, kcenon::pacs::network::dimse::dimse_message::set_affected_sop_class_uid(), kcenon::pacs::network::dimse::dimse_message::set_message_id_responded_to(), and kcenon::pacs::network::dimse::dimse_message::set_status().

Here is the call graph for this function:

◆ make_c_store_rq()

auto kcenon::pacs::network::dimse::make_c_store_rq ( uint16_t message_id,
std::string_view sop_class_uid,
std::string_view sop_instance_uid,
uint16_t priority = priority_medium ) -> dimse_message
nodiscard

Create a C-STORE request message.

Parameters
message_idThe message ID
sop_class_uidThe SOP Class UID
sop_instance_uidThe SOP Instance UID
priorityOperation priority
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 402 of file dimse_message.cpp.

404 {
405 dimse_message msg(command_field::c_store_rq, message_id);
406 msg.set_affected_sop_class_uid(sop_class_uid);
407 msg.set_affected_sop_instance_uid(sop_instance_uid);
408 msg.set_priority(priority);
409 return msg;
410}

References c_store_rq, kcenon::pacs::network::dimse::dimse_message::set_affected_sop_class_uid(), kcenon::pacs::network::dimse::dimse_message::set_affected_sop_instance_uid(), and kcenon::pacs::network::dimse::dimse_message::set_priority().

Here is the call graph for this function:

◆ make_c_store_rsp()

auto kcenon::pacs::network::dimse::make_c_store_rsp ( uint16_t message_id_responded_to,
std::string_view sop_class_uid,
std::string_view sop_instance_uid,
status_code status = status_success ) -> dimse_message
nodiscard

Create a C-STORE response message.

Parameters
message_id_responded_toThe message ID being responded to
sop_class_uidThe SOP Class UID
sop_instance_uidThe SOP Instance UID
statusThe response status code
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 412 of file dimse_message.cpp.

415 {
416 dimse_message msg(command_field::c_store_rsp, 0);
417 msg.set_message_id_responded_to(message_id_responded_to);
418 msg.set_affected_sop_class_uid(sop_class_uid);
419 msg.set_affected_sop_instance_uid(sop_instance_uid);
420 msg.set_status(status);
421 return msg;
422}

References c_store_rsp, kcenon::pacs::network::dimse::dimse_message::set_affected_sop_class_uid(), kcenon::pacs::network::dimse::dimse_message::set_affected_sop_instance_uid(), kcenon::pacs::network::dimse::dimse_message::set_message_id_responded_to(), and kcenon::pacs::network::dimse::dimse_message::set_status().

Here is the call graph for this function:

◆ make_n_action_rq()

auto kcenon::pacs::network::dimse::make_n_action_rq ( uint16_t message_id,
std::string_view sop_class_uid,
std::string_view sop_instance_uid,
uint16_t action_type_id ) -> dimse_message
nodiscard

Create an N-ACTION request message.

Parameters
message_idThe message ID
sop_class_uidThe Requested SOP Class UID
sop_instance_uidThe Requested SOP Instance UID
action_type_idThe action type identifier
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 537 of file dimse_message.cpp.

539 {
540 dimse_message msg(command_field::n_action_rq, message_id);
541 msg.set_requested_sop_class_uid(sop_class_uid);
542 msg.set_requested_sop_instance_uid(sop_instance_uid);
543 msg.set_action_type_id(action_type_id);
544 return msg;
545}

References n_action_rq, kcenon::pacs::network::dimse::dimse_message::set_action_type_id(), kcenon::pacs::network::dimse::dimse_message::set_requested_sop_class_uid(), and kcenon::pacs::network::dimse::dimse_message::set_requested_sop_instance_uid().

Here is the call graph for this function:

◆ make_n_action_rsp()

auto kcenon::pacs::network::dimse::make_n_action_rsp ( uint16_t message_id_responded_to,
std::string_view sop_class_uid,
std::string_view sop_instance_uid,
uint16_t action_type_id,
status_code status = status_success ) -> dimse_message
nodiscard

Create an N-ACTION response message.

Parameters
message_id_responded_toThe message ID being responded to
sop_class_uidThe Affected SOP Class UID
sop_instance_uidThe Affected SOP Instance UID
action_type_idThe action type identifier
statusThe response status code
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 547 of file dimse_message.cpp.

550 {
551 dimse_message msg(command_field::n_action_rsp, 0);
552 msg.set_message_id_responded_to(message_id_responded_to);
553 msg.set_affected_sop_class_uid(sop_class_uid);
554 msg.set_affected_sop_instance_uid(sop_instance_uid);
555 msg.set_action_type_id(action_type_id);
556 msg.set_status(status);
557 return msg;
558}

References n_action_rsp, kcenon::pacs::network::dimse::dimse_message::set_action_type_id(), kcenon::pacs::network::dimse::dimse_message::set_affected_sop_class_uid(), kcenon::pacs::network::dimse::dimse_message::set_affected_sop_instance_uid(), kcenon::pacs::network::dimse::dimse_message::set_message_id_responded_to(), and kcenon::pacs::network::dimse::dimse_message::set_status().

Here is the call graph for this function:

◆ make_n_create_rq()

auto kcenon::pacs::network::dimse::make_n_create_rq ( uint16_t message_id,
std::string_view sop_class_uid,
std::string_view sop_instance_uid = "" ) -> dimse_message
nodiscard

Create an N-CREATE request message.

Parameters
message_idThe message ID
sop_class_uidThe Affected SOP Class UID
sop_instance_uidOptional Affected SOP Instance UID (may be generated by SCP)
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 446 of file dimse_message.cpp.

447 {
448 dimse_message msg(command_field::n_create_rq, message_id);
449 msg.set_affected_sop_class_uid(sop_class_uid);
450 if (!sop_instance_uid.empty()) {
451 msg.set_affected_sop_instance_uid(sop_instance_uid);
452 }
453 return msg;
454}

References n_create_rq, kcenon::pacs::network::dimse::dimse_message::set_affected_sop_class_uid(), and kcenon::pacs::network::dimse::dimse_message::set_affected_sop_instance_uid().

Referenced by TEST_CASE(), TEST_CASE(), and TEST_CASE().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_n_create_rsp()

auto kcenon::pacs::network::dimse::make_n_create_rsp ( uint16_t message_id_responded_to,
std::string_view sop_class_uid,
std::string_view sop_instance_uid,
status_code status = status_success ) -> dimse_message
nodiscard

Create an N-CREATE response message.

Parameters
message_id_responded_toThe message ID being responded to
sop_class_uidThe Affected SOP Class UID
sop_instance_uidThe Affected SOP Instance UID (returned by SCP)
statusThe response status code
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 456 of file dimse_message.cpp.

459 {
460 dimse_message msg(command_field::n_create_rsp, 0);
461 msg.set_message_id_responded_to(message_id_responded_to);
462 msg.set_affected_sop_class_uid(sop_class_uid);
463 msg.set_affected_sop_instance_uid(sop_instance_uid);
464 msg.set_status(status);
465 return msg;
466}

References n_create_rsp, kcenon::pacs::network::dimse::dimse_message::set_affected_sop_class_uid(), kcenon::pacs::network::dimse::dimse_message::set_affected_sop_instance_uid(), kcenon::pacs::network::dimse::dimse_message::set_message_id_responded_to(), and kcenon::pacs::network::dimse::dimse_message::set_status().

Here is the call graph for this function:

◆ make_n_delete_rq()

auto kcenon::pacs::network::dimse::make_n_delete_rq ( uint16_t message_id,
std::string_view sop_class_uid,
std::string_view sop_instance_uid ) -> dimse_message
nodiscard

Create an N-DELETE request message.

Parameters
message_idThe message ID
sop_class_uidThe Requested SOP Class UID
sop_instance_uidThe Requested SOP Instance UID
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 560 of file dimse_message.cpp.

561 {
562 dimse_message msg(command_field::n_delete_rq, message_id);
563 msg.set_requested_sop_class_uid(sop_class_uid);
564 msg.set_requested_sop_instance_uid(sop_instance_uid);
565 return msg;
566}

References n_delete_rq, kcenon::pacs::network::dimse::dimse_message::set_requested_sop_class_uid(), and kcenon::pacs::network::dimse::dimse_message::set_requested_sop_instance_uid().

Here is the call graph for this function:

◆ make_n_delete_rsp()

auto kcenon::pacs::network::dimse::make_n_delete_rsp ( uint16_t message_id_responded_to,
std::string_view sop_class_uid,
std::string_view sop_instance_uid,
status_code status = status_success ) -> dimse_message
nodiscard

Create an N-DELETE response message.

Parameters
message_id_responded_toThe message ID being responded to
sop_class_uidThe Affected SOP Class UID
sop_instance_uidThe Affected SOP Instance UID
statusThe response status code
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 568 of file dimse_message.cpp.

571 {
572 dimse_message msg(command_field::n_delete_rsp, 0);
573 msg.set_message_id_responded_to(message_id_responded_to);
574 msg.set_affected_sop_class_uid(sop_class_uid);
575 msg.set_affected_sop_instance_uid(sop_instance_uid);
576 msg.set_status(status);
577 return msg;
578}

References n_delete_rsp, kcenon::pacs::network::dimse::dimse_message::set_affected_sop_class_uid(), kcenon::pacs::network::dimse::dimse_message::set_affected_sop_instance_uid(), kcenon::pacs::network::dimse::dimse_message::set_message_id_responded_to(), and kcenon::pacs::network::dimse::dimse_message::set_status().

Here is the call graph for this function:

◆ make_n_event_report_rq()

auto kcenon::pacs::network::dimse::make_n_event_report_rq ( uint16_t message_id,
std::string_view sop_class_uid,
std::string_view sop_instance_uid,
uint16_t event_type_id ) -> dimse_message
nodiscard

Create an N-EVENT-REPORT request message.

Parameters
message_idThe message ID
sop_class_uidThe Affected SOP Class UID
sop_instance_uidThe Affected SOP Instance UID
event_type_idThe event type identifier
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 513 of file dimse_message.cpp.

515 {
516 dimse_message msg(command_field::n_event_report_rq, message_id);
517 msg.set_affected_sop_class_uid(sop_class_uid);
518 msg.set_affected_sop_instance_uid(sop_instance_uid);
519 msg.set_event_type_id(event_type_id);
520 return msg;
521}

References n_event_report_rq, kcenon::pacs::network::dimse::dimse_message::set_affected_sop_class_uid(), kcenon::pacs::network::dimse::dimse_message::set_affected_sop_instance_uid(), and kcenon::pacs::network::dimse::dimse_message::set_event_type_id().

Here is the call graph for this function:

◆ make_n_event_report_rsp()

auto kcenon::pacs::network::dimse::make_n_event_report_rsp ( uint16_t message_id_responded_to,
std::string_view sop_class_uid,
std::string_view sop_instance_uid,
uint16_t event_type_id,
status_code status = status_success ) -> dimse_message
nodiscard

Create an N-EVENT-REPORT response message.

Parameters
message_id_responded_toThe message ID being responded to
sop_class_uidThe Affected SOP Class UID
sop_instance_uidThe Affected SOP Instance UID
event_type_idThe event type identifier
statusThe response status code
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 523 of file dimse_message.cpp.

527 {
528 dimse_message msg(command_field::n_event_report_rsp, 0);
529 msg.set_message_id_responded_to(message_id_responded_to);
530 msg.set_affected_sop_class_uid(sop_class_uid);
531 msg.set_affected_sop_instance_uid(sop_instance_uid);
532 msg.set_event_type_id(event_type_id);
533 msg.set_status(status);
534 return msg;
535}

References n_event_report_rsp, kcenon::pacs::network::dimse::dimse_message::set_affected_sop_class_uid(), kcenon::pacs::network::dimse::dimse_message::set_affected_sop_instance_uid(), kcenon::pacs::network::dimse::dimse_message::set_event_type_id(), kcenon::pacs::network::dimse::dimse_message::set_message_id_responded_to(), and kcenon::pacs::network::dimse::dimse_message::set_status().

Here is the call graph for this function:

◆ make_n_get_rq()

auto kcenon::pacs::network::dimse::make_n_get_rq ( uint16_t message_id,
std::string_view sop_class_uid,
std::string_view sop_instance_uid,
const std::vector< core::dicom_tag > & attribute_tags = {} ) -> dimse_message
nodiscard

Create an N-GET request message.

Parameters
message_idThe message ID
sop_class_uidThe Requested SOP Class UID
sop_instance_uidThe Requested SOP Instance UID
attribute_tagsOptional list of attribute tags to retrieve
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 488 of file dimse_message.cpp.

491 {
492 dimse_message msg(command_field::n_get_rq, message_id);
493 msg.set_requested_sop_class_uid(sop_class_uid);
494 msg.set_requested_sop_instance_uid(sop_instance_uid);
495 if (!attribute_tags.empty()) {
496 msg.set_attribute_identifier_list(attribute_tags);
497 }
498 return msg;
499}

References n_get_rq, kcenon::pacs::network::dimse::dimse_message::set_attribute_identifier_list(), kcenon::pacs::network::dimse::dimse_message::set_requested_sop_class_uid(), and kcenon::pacs::network::dimse::dimse_message::set_requested_sop_instance_uid().

Here is the call graph for this function:

◆ make_n_get_rsp()

auto kcenon::pacs::network::dimse::make_n_get_rsp ( uint16_t message_id_responded_to,
std::string_view sop_class_uid,
std::string_view sop_instance_uid,
status_code status = status_success ) -> dimse_message
nodiscard

Create an N-GET response message.

Parameters
message_id_responded_toThe message ID being responded to
sop_class_uidThe Affected SOP Class UID
sop_instance_uidThe Affected SOP Instance UID
statusThe response status code
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 501 of file dimse_message.cpp.

504 {
505 dimse_message msg(command_field::n_get_rsp, 0);
506 msg.set_message_id_responded_to(message_id_responded_to);
507 msg.set_affected_sop_class_uid(sop_class_uid);
508 msg.set_affected_sop_instance_uid(sop_instance_uid);
509 msg.set_status(status);
510 return msg;
511}

References n_get_rsp, kcenon::pacs::network::dimse::dimse_message::set_affected_sop_class_uid(), kcenon::pacs::network::dimse::dimse_message::set_affected_sop_instance_uid(), kcenon::pacs::network::dimse::dimse_message::set_message_id_responded_to(), and kcenon::pacs::network::dimse::dimse_message::set_status().

Here is the call graph for this function:

◆ make_n_set_rq()

auto kcenon::pacs::network::dimse::make_n_set_rq ( uint16_t message_id,
std::string_view sop_class_uid,
std::string_view sop_instance_uid ) -> dimse_message
nodiscard

Create an N-SET request message.

Parameters
message_idThe message ID
sop_class_uidThe Requested SOP Class UID
sop_instance_uidThe Requested SOP Instance UID
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 468 of file dimse_message.cpp.

469 {
470 dimse_message msg(command_field::n_set_rq, message_id);
471 msg.set_requested_sop_class_uid(sop_class_uid);
472 msg.set_requested_sop_instance_uid(sop_instance_uid);
473 return msg;
474}

References n_set_rq, kcenon::pacs::network::dimse::dimse_message::set_requested_sop_class_uid(), and kcenon::pacs::network::dimse::dimse_message::set_requested_sop_instance_uid().

Referenced by TEST_CASE(), TEST_CASE(), and TEST_CASE().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_n_set_rsp()

auto kcenon::pacs::network::dimse::make_n_set_rsp ( uint16_t message_id_responded_to,
std::string_view sop_class_uid,
std::string_view sop_instance_uid,
status_code status = status_success ) -> dimse_message
nodiscard

Create an N-SET response message.

Parameters
message_id_responded_toThe message ID being responded to
sop_class_uidThe Affected SOP Class UID
sop_instance_uidThe Affected SOP Instance UID
statusThe response status code
Returns
The constructed message
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 476 of file dimse_message.cpp.

479 {
480 dimse_message msg(command_field::n_set_rsp, 0);
481 msg.set_message_id_responded_to(message_id_responded_to);
482 msg.set_affected_sop_class_uid(sop_class_uid);
483 msg.set_affected_sop_instance_uid(sop_instance_uid);
484 msg.set_status(status);
485 return msg;
486}

References n_set_rsp, kcenon::pacs::network::dimse::dimse_message::set_affected_sop_class_uid(), kcenon::pacs::network::dimse::dimse_message::set_affected_sop_instance_uid(), kcenon::pacs::network::dimse::dimse_message::set_message_id_responded_to(), and kcenon::pacs::network::dimse::dimse_message::set_status().

Here is the call graph for this function:

◆ status_category()

std::string_view kcenon::pacs::network::dimse::status_category ( status_code status)
nodiscardconstexprnoexcept

Get the category name for a status code.

Parameters
statusThe status code to categorize
Returns
Category name (Success, Pending, Warning, Failure, or Unknown)

Definition at line 292 of file status_codes.h.

293 {
294 if (is_success(status)) return "Success";
295 if (is_pending(status)) return "Pending";
296 if (is_cancel(status)) return "Cancel";
297 if (is_warning(status)) return "Warning";
298 if (is_failure(status)) return "Failure";
299 return "Unknown";
300}
constexpr bool is_cancel(status_code status) noexcept
Check if status indicates cancellation.

References is_cancel(), is_failure(), is_pending(), is_success(), and is_warning().

Here is the call graph for this function:

◆ status_description()

std::string_view kcenon::pacs::network::dimse::status_description ( status_code status)
nodiscardconstexprnoexcept

Get a human-readable description of a status code.

Parameters
statusThe status code to describe
Returns
Description string

Definition at line 222 of file status_codes.h.

223 {
224 switch (status) {
225 case status_success: return "Success";
226 case status_pending: return "Pending";
227 case status_pending_warning: return "Pending (Warning)";
228 case status_cancel: return "Canceled";
229 case status_refused_out_of_resources: return "Refused: Out of resources";
230 case status_refused_out_of_resources_matches:
231 return "Refused: Unable to calculate number of matches";
232 case status_refused_out_of_resources_subops:
233 return "Refused: Unable to perform sub-operations";
234 case status_refused_move_destination_unknown:
235 return "Refused: Move destination unknown";
236 case status_refused_sop_class_not_supported:
237 return "Refused: SOP class not supported";
238 case status_error_dataset_mismatch:
239 return "Error: Data set does not match SOP class";
240 case status_error_cannot_understand: return "Error: Cannot understand";
241 case status_error_unable_to_process: return "Error: Unable to process";
242 case status_error_duplicate_sop_instance:
243 return "Error: Duplicate SOP instance";
244 case status_error_missing_attribute: return "Error: Missing attribute";
245 case status_error_missing_attribute_value:
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";
273 case status_warning_coercion: return "Warning: Coercion of data elements";
274 case status_warning_dataset_mismatch:
275 return "Warning: Data set does not match SOP class";
276 case status_warning_elements_discarded:
277 return "Warning: Elements discarded";
278 default:
279 if (is_success(status)) return "Success";
280 if (is_pending(status)) return "Pending";
281 if (is_warning(status)) return "Warning";
282 if (is_failure(status)) return "Failure";
283 return "Unknown status";
284 }
285}
constexpr status_code status_error_attribute_value_out_of_range
Error: Attribute value out of range (N-SET)
constexpr status_code status_error_no_such_action_type
Error: No such action type (N-ACTION)
constexpr status_code status_error_attribute_list_error
Error: Attribute list error (N-CREATE)
constexpr status_code status_error_no_such_event_type
Error: No such event type (N-EVENT-REPORT)
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_class_instance_conflict
Error: Class-instance conflict (All DIMSE-N)
constexpr status_code status_error_no_such_sop_class
Error: No such SOP class (All DIMSE-N)
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_resource_limitation
Error: Resource limitation (All DIMSE-N)
constexpr status_code status_error_duplicate_invocation
Error: Duplicate invocation (All DIMSE-N)
constexpr status_code status_error_processing_failure
Error: Processing failure (All DIMSE-N)

References is_failure(), is_pending(), is_success(), is_warning(), status_cancel, status_error_attribute_list_error, status_error_attribute_value_out_of_range, status_error_cannot_understand, status_error_class_instance_conflict, status_error_dataset_mismatch, status_error_duplicate_invocation, status_error_duplicate_sop_instance, status_error_invalid_object_instance, status_error_missing_attribute, status_error_missing_attribute_value, status_error_mistyped_argument, status_error_no_such_action_type, status_error_no_such_event_type, status_error_no_such_sop_class, status_error_not_authorized, status_error_processing_failure, status_error_resource_limitation, status_error_unable_to_process, status_error_unrecognized_operation, status_pending, status_pending_warning, status_refused_move_destination_unknown, status_refused_out_of_resources, status_refused_out_of_resources_matches, status_refused_out_of_resources_subops, status_refused_sop_class_not_supported, status_success, status_warning_coercion, status_warning_dataset_mismatch, and status_warning_elements_discarded.

Here is the call graph for this function:

◆ to_string() [1/2]

std::string_view kcenon::pacs::network::dimse::to_string ( command_field cmd)
nodiscardconstexprnoexcept

Convert command field to string representation.

Parameters
cmdThe command field to convert
Returns
Human-readable string representation
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 172 of file command_field.h.

172 {
173 switch (cmd) {
174 case command_field::c_store_rq: return "C-STORE-RQ";
175 case command_field::c_store_rsp: return "C-STORE-RSP";
176 case command_field::c_get_rq: return "C-GET-RQ";
177 case command_field::c_get_rsp: return "C-GET-RSP";
178 case command_field::c_find_rq: return "C-FIND-RQ";
179 case command_field::c_find_rsp: return "C-FIND-RSP";
180 case command_field::c_move_rq: return "C-MOVE-RQ";
181 case command_field::c_move_rsp: return "C-MOVE-RSP";
182 case command_field::c_echo_rq: return "C-ECHO-RQ";
183 case command_field::c_echo_rsp: return "C-ECHO-RSP";
184 case command_field::c_cancel_rq: return "C-CANCEL-RQ";
185 case command_field::n_event_report_rq: return "N-EVENT-REPORT-RQ";
186 case command_field::n_event_report_rsp: return "N-EVENT-REPORT-RSP";
187 case command_field::n_get_rq: return "N-GET-RQ";
188 case command_field::n_get_rsp: return "N-GET-RSP";
189 case command_field::n_set_rq: return "N-SET-RQ";
190 case command_field::n_set_rsp: return "N-SET-RSP";
191 case command_field::n_action_rq: return "N-ACTION-RQ";
192 case command_field::n_action_rsp: return "N-ACTION-RSP";
193 case command_field::n_create_rq: return "N-CREATE-RQ";
194 case command_field::n_create_rsp: return "N-CREATE-RSP";
195 case command_field::n_delete_rq: return "N-DELETE-RQ";
196 case command_field::n_delete_rsp: return "N-DELETE-RSP";
197 default: return "UNKNOWN";
198 }
199}

References c_cancel_rq, c_echo_rq, c_echo_rsp, c_find_rq, c_find_rsp, c_get_rq, c_get_rsp, c_move_rq, c_move_rsp, c_store_rq, c_store_rsp, n_action_rq, n_action_rsp, n_create_rq, n_create_rsp, n_delete_rq, n_delete_rsp, n_event_report_rq, n_event_report_rsp, n_get_rq, n_get_rsp, n_set_rq, and n_set_rsp.

◆ to_string() [2/2]

std::string_view kcenon::pacs::network::dimse::to_string ( dimse_error err)
nodiscardconstexprnoexcept

Get error description.

Definition at line 158 of file dimse_message.h.

158 {
159 switch (err) {
160 case dimse_error::success: return "Success";
161 case dimse_error::invalid_command_set: return "Invalid command set";
162 case dimse_error::missing_required_field: return "Missing required field";
163 case dimse_error::invalid_data_format: return "Invalid data format";
164 case dimse_error::encoding_error: return "Encoding error";
165 case dimse_error::decoding_error: return "Decoding error";
166 default: return "Unknown error";
167 }
168}

References decoding_error, encoding_error, invalid_command_set, invalid_data_format, missing_required_field, and success.

Variable Documentation

◆ command_data_set_type_null

uint16_t kcenon::pacs::network::dimse::command_data_set_type_null = 0x0101
constexpr

◆ command_data_set_type_present

uint16_t kcenon::pacs::network::dimse::command_data_set_type_present = 0x0001
constexpr

Value indicating data set is present (any value other than 0x0101)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 125 of file dimse_message.h.

Referenced by kcenon::pacs::network::dimse::dimse_message::update_data_set_type().

◆ priority_high

uint16_t kcenon::pacs::network::dimse::priority_high = 0x0001
constexpr

◆ priority_low

uint16_t kcenon::pacs::network::dimse::priority_low = 0x0002
constexpr

◆ priority_medium

uint16_t kcenon::pacs::network::dimse::priority_medium = 0x0000
constexpr

◆ status_cancel

status_code kcenon::pacs::network::dimse::status_cancel = 0xFE00
constexpr

Operation was canceled.

Definition at line 47 of file status_codes.h.

Referenced by is_cancel(), and status_description().

◆ status_error_attribute_list_error

status_code kcenon::pacs::network::dimse::status_error_attribute_list_error = 0x0107
constexpr

Error: Attribute list error (N-CREATE)

Definition at line 93 of file status_codes.h.

Referenced by status_description().

◆ status_error_attribute_value_out_of_range

status_code kcenon::pacs::network::dimse::status_error_attribute_value_out_of_range = 0x0116
constexpr

Error: Attribute value out of range (N-SET)

Definition at line 96 of file status_codes.h.

Referenced by status_description().

◆ status_error_cannot_understand

status_code kcenon::pacs::network::dimse::status_error_cannot_understand = 0xC000
constexpr

Error: Cannot understand.

Definition at line 73 of file status_codes.h.

Referenced by status_description().

◆ status_error_class_instance_conflict

status_code kcenon::pacs::network::dimse::status_error_class_instance_conflict = 0x0119
constexpr

Error: Class-instance conflict (All DIMSE-N)

Definition at line 105 of file status_codes.h.

Referenced by status_description().

◆ status_error_dataset_mismatch

status_code kcenon::pacs::network::dimse::status_error_dataset_mismatch = 0xA900
constexpr

Error: Data set does not match SOP class.

Definition at line 70 of file status_codes.h.

Referenced by status_description().

◆ status_error_duplicate_invocation

status_code kcenon::pacs::network::dimse::status_error_duplicate_invocation = 0x0210
constexpr

Error: Duplicate invocation (All DIMSE-N)

Definition at line 111 of file status_codes.h.

Referenced by status_description().

◆ status_error_duplicate_sop_instance

status_code kcenon::pacs::network::dimse::status_error_duplicate_sop_instance = 0x0111
constexpr

Error: Duplicate SOP instance.

Definition at line 79 of file status_codes.h.

Referenced by status_description().

◆ status_error_invalid_object_instance

status_code kcenon::pacs::network::dimse::status_error_invalid_object_instance = 0x0117
constexpr

Error: Invalid object instance (N-SET, N-GET, N-ACTION, N-DELETE)

Definition at line 99 of file status_codes.h.

Referenced by status_description().

◆ status_error_missing_attribute

status_code kcenon::pacs::network::dimse::status_error_missing_attribute = 0x0120
constexpr

Error: Missing attribute.

Definition at line 82 of file status_codes.h.

Referenced by status_description().

◆ status_error_missing_attribute_value

status_code kcenon::pacs::network::dimse::status_error_missing_attribute_value = 0x0121
constexpr

Error: Missing attribute value.

Definition at line 85 of file status_codes.h.

Referenced by status_description().

◆ status_error_mistyped_argument

status_code kcenon::pacs::network::dimse::status_error_mistyped_argument = 0x0212
constexpr

Error: Mistyped argument (All DIMSE-N)

Definition at line 117 of file status_codes.h.

Referenced by status_description().

◆ status_error_no_such_action_type

status_code kcenon::pacs::network::dimse::status_error_no_such_action_type = 0x0123
constexpr

Error: No such action type (N-ACTION)

Definition at line 123 of file status_codes.h.

Referenced by status_description().

◆ status_error_no_such_event_type

status_code kcenon::pacs::network::dimse::status_error_no_such_event_type = 0x0113
constexpr

Error: No such event type (N-EVENT-REPORT)

Definition at line 126 of file status_codes.h.

Referenced by status_description().

◆ status_error_no_such_sop_class

status_code kcenon::pacs::network::dimse::status_error_no_such_sop_class = 0x0118
constexpr

Error: No such SOP class (All DIMSE-N)

Definition at line 102 of file status_codes.h.

Referenced by status_description().

◆ status_error_not_authorized

status_code kcenon::pacs::network::dimse::status_error_not_authorized = 0x0124
constexpr

Error: Not authorized (All DIMSE-N)

Definition at line 108 of file status_codes.h.

Referenced by status_description().

◆ status_error_processing_failure

status_code kcenon::pacs::network::dimse::status_error_processing_failure = 0x0110
constexpr

Error: Processing failure (All DIMSE-N)

Definition at line 129 of file status_codes.h.

Referenced by status_description().

◆ status_error_resource_limitation

status_code kcenon::pacs::network::dimse::status_error_resource_limitation = 0x0213
constexpr

Error: Resource limitation (All DIMSE-N)

Definition at line 120 of file status_codes.h.

Referenced by status_description().

◆ status_error_unable_to_process

status_code kcenon::pacs::network::dimse::status_error_unable_to_process = 0xC001
constexpr

Error: Unable to process.

Definition at line 76 of file status_codes.h.

Referenced by status_description().

◆ status_error_unrecognized_operation

status_code kcenon::pacs::network::dimse::status_error_unrecognized_operation = 0x0211
constexpr

Error: Unrecognized operation (All DIMSE-N)

Definition at line 114 of file status_codes.h.

Referenced by status_description().

◆ status_pending

status_code kcenon::pacs::network::dimse::status_pending = 0xFF00
constexpr

Operation pending (more results available)

Definition at line 41 of file status_codes.h.

Referenced by status_description().

◆ status_pending_warning

status_code kcenon::pacs::network::dimse::status_pending_warning = 0xFF01
constexpr

Pending with optional keys not supported.

Definition at line 44 of file status_codes.h.

Referenced by is_pending(), and status_description().

◆ status_refused_move_destination_unknown

status_code kcenon::pacs::network::dimse::status_refused_move_destination_unknown = 0xA801
constexpr

Refused: Move destination unknown.

Definition at line 64 of file status_codes.h.

Referenced by status_description().

◆ status_refused_out_of_resources

status_code kcenon::pacs::network::dimse::status_refused_out_of_resources = 0xA700
constexpr

Refused: Out of resources.

Definition at line 55 of file status_codes.h.

Referenced by status_description().

◆ status_refused_out_of_resources_matches

status_code kcenon::pacs::network::dimse::status_refused_out_of_resources_matches = 0xA701
constexpr

Refused: Out of resources - Unable to calculate number of matches.

Definition at line 58 of file status_codes.h.

Referenced by status_description().

◆ status_refused_out_of_resources_subops

status_code kcenon::pacs::network::dimse::status_refused_out_of_resources_subops = 0xA702
constexpr

Refused: Out of resources - Unable to perform sub-operations.

Definition at line 61 of file status_codes.h.

Referenced by status_description().

◆ status_refused_sop_class_not_supported

status_code kcenon::pacs::network::dimse::status_refused_sop_class_not_supported = 0x0122
constexpr

Refused: SOP class not supported.

Definition at line 67 of file status_codes.h.

Referenced by status_description().

◆ status_success

status_code kcenon::pacs::network::dimse::status_success = 0x0000
constexpr

Operation completed successfully.

Definition at line 38 of file status_codes.h.

Referenced by is_success(), status_description(), and TEST_CASE().

◆ status_warning_coercion

status_code kcenon::pacs::network::dimse::status_warning_coercion = 0xB000
constexpr

Warning: Coercion of data elements.

Definition at line 137 of file status_codes.h.

Referenced by status_description().

◆ status_warning_dataset_mismatch

status_code kcenon::pacs::network::dimse::status_warning_dataset_mismatch = 0xB007
constexpr

Warning: Data set does not match SOP class (non-fatal)

Definition at line 140 of file status_codes.h.

Referenced by status_description().

◆ status_warning_elements_discarded

status_code kcenon::pacs::network::dimse::status_warning_elements_discarded = 0xB006
constexpr

Warning: Elements discarded.

Definition at line 143 of file status_codes.h.

Referenced by status_description().

◆ status_warning_subops_complete_failures

status_code kcenon::pacs::network::dimse::status_warning_subops_complete_failures = 0xB000
constexpr

Warning: Sub-operations complete with failures.

Definition at line 146 of file status_codes.h.

◆ tag_action_type_id

core::dicom_tag kcenon::pacs::network::dimse::tag_action_type_id {0x0000, 0x1008}
constexpr

◆ tag_affected_sop_class_uid

core::dicom_tag kcenon::pacs::network::dimse::tag_affected_sop_class_uid {0x0000, 0x0002}
constexpr

◆ tag_affected_sop_instance_uid

core::dicom_tag kcenon::pacs::network::dimse::tag_affected_sop_instance_uid {0x0000, 0x1000}
constexpr

◆ tag_attribute_identifier_list

core::dicom_tag kcenon::pacs::network::dimse::tag_attribute_identifier_list {0x0000, 0x1005}
constexpr

◆ tag_command_data_set_type

core::dicom_tag kcenon::pacs::network::dimse::tag_command_data_set_type {0x0000, 0x0800}
constexpr

Command Data Set Type (0000,0800) - US.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 69 of file dimse_message.h.

69{0x0000, 0x0800};

Referenced by kcenon::pacs::network::dimse::dimse_message::update_data_set_type().

◆ tag_command_field

◆ tag_command_group_length

core::dicom_tag kcenon::pacs::network::dimse::tag_command_group_length {0x0000, 0x0000}
constexpr

◆ tag_error_comment

core::dicom_tag kcenon::pacs::network::dimse::tag_error_comment {0x0000, 0x0902}
constexpr

Error Comment (0000,0902) - LO.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 78 of file dimse_message.h.

78{0x0000, 0x0902};

◆ tag_error_id

core::dicom_tag kcenon::pacs::network::dimse::tag_error_id {0x0000, 0x0903}
constexpr

Error ID (0000,0903) - US.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 81 of file dimse_message.h.

81{0x0000, 0x0903};

◆ tag_event_type_id

core::dicom_tag kcenon::pacs::network::dimse::tag_event_type_id {0x0000, 0x1002}
constexpr

◆ tag_message_id

◆ tag_message_id_responded_to

core::dicom_tag kcenon::pacs::network::dimse::tag_message_id_responded_to {0x0000, 0x0120}
constexpr

◆ tag_move_destination

core::dicom_tag kcenon::pacs::network::dimse::tag_move_destination {0x0000, 0x0600}
constexpr

Move Destination (0000,0600) - AE.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 63 of file dimse_message.h.

63{0x0000, 0x0600};

Referenced by kcenon::pacs::services::retrieve_scp::get_move_destination().

◆ tag_move_originator_aet

core::dicom_tag kcenon::pacs::network::dimse::tag_move_originator_aet {0x0000, 0x1030}
constexpr

Move Originator Application Entity Title (0000,1030) - AE.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 111 of file dimse_message.h.

111{0x0000, 0x1030};

◆ tag_move_originator_message_id

core::dicom_tag kcenon::pacs::network::dimse::tag_move_originator_message_id {0x0000, 0x1031}
constexpr

Move Originator Message ID (0000,1031) - US.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 114 of file dimse_message.h.

114{0x0000, 0x1031};

◆ tag_number_of_completed_subops

core::dicom_tag kcenon::pacs::network::dimse::tag_number_of_completed_subops {0x0000, 0x1021}
constexpr

◆ tag_number_of_failed_subops

core::dicom_tag kcenon::pacs::network::dimse::tag_number_of_failed_subops {0x0000, 0x1022}
constexpr

◆ tag_number_of_remaining_subops

core::dicom_tag kcenon::pacs::network::dimse::tag_number_of_remaining_subops {0x0000, 0x1020}
constexpr

◆ tag_number_of_warning_subops

core::dicom_tag kcenon::pacs::network::dimse::tag_number_of_warning_subops {0x0000, 0x1023}
constexpr

◆ tag_offending_element

core::dicom_tag kcenon::pacs::network::dimse::tag_offending_element {0x0000, 0x0901}
constexpr

Offending Element (0000,0901) - AT.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/dimse/dimse_message.h.

Definition at line 75 of file dimse_message.h.

75{0x0000, 0x0901};

◆ tag_priority

core::dicom_tag kcenon::pacs::network::dimse::tag_priority {0x0000, 0x0700}
constexpr

◆ tag_requested_sop_class_uid

core::dicom_tag kcenon::pacs::network::dimse::tag_requested_sop_class_uid {0x0000, 0x0003}
constexpr

◆ tag_requested_sop_instance_uid

core::dicom_tag kcenon::pacs::network::dimse::tag_requested_sop_instance_uid {0x0000, 0x1001}
constexpr

◆ tag_status

core::dicom_tag kcenon::pacs::network::dimse::tag_status {0x0000, 0x0900}
constexpr