18#ifndef PACS_NETWORK_DIMSE_COMMAND_FIELD_HPP
19#define PACS_NETWORK_DIMSE_COMMAND_FIELD_HPP
112 return (
static_cast<uint16_t
>(cmd) & 0x8000) == 0;
121 return (
static_cast<uint16_t
>(cmd) & 0x8000) != 0;
131 const auto value =
static_cast<uint16_t
>(cmd) & 0x7FFF;
132 return value <= 0x0030 || value == 0x0FFF;
142 const auto value =
static_cast<uint16_t
>(cmd) & 0x7FFF;
143 return value >= 0x0100 && value <= 0x0150;
154 return static_cast<command_field>(
static_cast<uint16_t
>(request) | 0x8000);
164 return static_cast<command_field>(
static_cast<uint16_t
>(response) & 0x7FFF);
197 default:
return "UNKNOWN";
constexpr bool is_dimse_c(command_field cmd) noexcept
Check if a command is a DIMSE-C command.
constexpr std::string_view to_string(command_field cmd) noexcept
Convert command field to string representation.
constexpr bool is_response(command_field cmd) noexcept
Check if a command field represents a response.
constexpr bool is_dimse_n(command_field cmd) noexcept
Check if a command is a DIMSE-N command.
constexpr command_field get_request_command(command_field response) noexcept
Get the corresponding request command for a response.
constexpr bool is_request(command_field cmd) noexcept
Check if a command field represents a request.
constexpr command_field get_response_command(command_field request) noexcept
Get the corresponding response command for a request.
command_field
DIMSE command field values.
@ n_get_rq
N-GET Request - Get attribute values.
@ n_delete_rsp
N-DELETE Response.
@ c_echo_rsp
C-ECHO Response.
@ c_cancel_rq
C-CANCEL Request - Cancel pending operation.
@ c_store_rq
C-STORE Request - Store composite SOP instance.
@ n_set_rsp
N-SET Response.
@ n_create_rsp
N-CREATE Response.
@ n_get_rsp
N-GET Response.
@ n_create_rq
N-CREATE Request - Create SOP instance.
@ c_get_rsp
C-GET Response.
@ n_set_rq
N-SET Request - Set attribute values.
@ c_echo_rq
C-ECHO Request - Verify DICOM connection.
@ c_store_rsp
C-STORE Response.
@ 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.
@ n_action_rsp
N-ACTION Response.
@ c_move_rsp
C-MOVE Response.
@ 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.
@ c_find_rsp
C-FIND Response.