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

Namespaces

namespace  detail
 
namespace  dimse
 
namespace  pipeline
 
namespace  v2
 

Classes

struct  abort_pdu
 A-ABORT PDU data. More...
 
struct  accepted_presentation_context
 Accepted presentation context after negotiation. More...
 
struct  associate_ac
 A-ASSOCIATE-AC PDU data. More...
 
struct  associate_rj
 A-ASSOCIATE-RJ PDU data. More...
 
struct  associate_rq
 A-ASSOCIATE-RQ PDU data. More...
 
class  association
 
struct  association_config
 Configuration for SCU association request. More...
 
class  dicom_server
 
struct  p_data_tf_pdu
 P-DATA-TF PDU data. More...
 
class  pdu_buffer_pool
 
class  pdu_decoder
 Decoder for DICOM PDU (Protocol Data Unit) messages. More...
 
class  pdu_encoder
 Encoder for DICOM PDU (Protocol Data Unit) messages. More...
 
struct  pdu_pool_statistics
 Statistics for PDU buffer pool usage monitoring. More...
 
class  pooled_buffer
 Pooled byte buffer for PDU data. More...
 
struct  presentation_context_ac
 Presentation Context for A-ASSOCIATE-AC. More...
 
struct  presentation_context_rq
 Presentation Context for A-ASSOCIATE-RQ. More...
 
struct  presentation_data_value
 Presentation Data Value (PDV) item for P-DATA-TF. More...
 
struct  proposed_presentation_context
 Proposed presentation context for SCU association request. More...
 
struct  rejection_info
 Information about an association rejection. More...
 
struct  release_rp_pdu
 A-RELEASE-RP has no data fields. More...
 
struct  release_rq_pdu
 PDU variant type representing any DICOM Upper Layer PDU.A-RELEASE-RQ has no data fields. More...
 
struct  scp_config
 Configuration for SCP to accept associations. More...
 
struct  scp_scu_role_selection
 SCP/SCU Role Selection Sub-item. More...
 
struct  server_config
 
struct  server_statistics
 Statistics for server monitoring. More...
 
class  tracked_pdu_pool
 Pool wrapper with statistics tracking for PDU buffers. More...
 
struct  user_information
 User Information for A-ASSOCIATE-RQ/AC. More...
 

Typedefs

template<typename T >
using Result = kcenon::pacs::Result<T>
 Result type alias using standardized kcenon::pacs::Result<T>
 
using VoidResult = kcenon::pacs::VoidResult
 VoidResult type alias for operations without return value.
 
using pdu
 Variant type that can hold any PDU.
 
template<typename T >
using DecodeResult = kcenon::pacs::Result<T>
 Result type alias for PDU decoding operations using standardized kcenon::pacs::Result<T>
 

Enumerations

enum class  association_state {
  idle , awaiting_associate_ac , awaiting_associate_rq , established ,
  awaiting_release_rp , awaiting_release_rq , released , aborted
}
 DICOM Association state machine states per PS3.8. More...
 
enum class  association_error {
  success = 0 , connection_failed , connection_timeout , association_rejected ,
  association_aborted , invalid_state , negotiation_failed , no_acceptable_context ,
  pdu_encoding_error , pdu_decoding_error , send_failed , receive_failed ,
  receive_timeout , protocol_error , release_failed , already_released
}
 Error codes for association operations. More...
 
enum class  pdu_decode_error : int {
  success = 0 , incomplete_header = 1 , incomplete_pdu = 2 , invalid_pdu_type = 3 ,
  invalid_protocol_version = 4 , invalid_item_type = 5 , malformed_pdu = 6 , buffer_overflow = 7
}
 Error codes for PDU decoding errors. More...
 
enum class  pdu_type : uint8_t {
  associate_rq = 0x01 , associate_ac = 0x02 , associate_rj = 0x03 , p_data_tf = 0x04 ,
  release_rq = 0x05 , release_rp = 0x06 , abort = 0x07
}
 PDU (Protocol Data Unit) types as defined in DICOM PS3.8. More...
 
enum class  item_type : uint8_t {
  application_context = 0x10 , presentation_context_rq = 0x20 , presentation_context_ac = 0x21 , user_information = 0x50 ,
  abstract_syntax = 0x30 , transfer_syntax = 0x40 , maximum_length = 0x51 , implementation_class_uid = 0x52 ,
  implementation_version_name = 0x55 , async_operations_window = 0x53 , scp_scu_role_selection = 0x54 , sop_class_extended_negotiation = 0x56 ,
  sop_class_common_extended_negotiation = 0x57 , user_identity_rq = 0x58 , user_identity_ac = 0x59
}
 Item types used in variable items of PDUs. More...
 
enum class  presentation_context_result : uint8_t {
  acceptance = 0 , user_rejection = 1 , no_reason = 2 , abstract_syntax_not_supported = 3 ,
  transfer_syntaxes_not_supported = 4
}
 Result values for A-ASSOCIATE-AC presentation context. More...
 
enum class  abort_source : uint8_t { service_user = 0 , reserved = 1 , service_provider = 2 }
 Abort source values. More...
 
enum class  abort_reason : uint8_t {
  not_specified = 0 , unrecognized_pdu = 1 , unexpected_pdu = 2 , reserved = 3 ,
  unrecognized_pdu_parameter = 4 , unexpected_pdu_parameter = 5 , invalid_pdu_parameter = 6
}
 Abort reason values when source is service-provider. More...
 
enum class  reject_result : uint8_t { rejected_permanent = 1 , rejected_transient = 2 }
 Reject result values. More...
 
enum class  reject_source : uint8_t { service_user = 1 , service_provider_acse = 2 , service_provider_presentation = 3 }
 Reject source values. More...
 
enum class  reject_reason_user : uint8_t { no_reason = 1 , application_context_not_supported = 2 , calling_ae_not_recognized = 3 , called_ae_not_recognized = 7 }
 Reject reason values when source is service-user. More...
 
enum class  reject_reason_provider_acse : uint8_t { no_reason = 1 , protocol_version_not_supported = 2 }
 Reject reason values when source is service-provider (ACSE). More...
 
enum class  reject_reason_provider_presentation : uint8_t { temporary_congestion = 1 , local_limit_exceeded = 2 }
 Reject reason values when source is service-provider (Presentation). More...
 

Functions

constexpr const char * to_string (association_state state) noexcept
 Convert association_state to string representation.
 
constexpr std::string_view to_string (association_error err) noexcept
 Convert association_error to string representation.
 
auto make_pooled_pdu_buffer () -> tracked_pdu_pool< pooled_buffer >::unique_ptr_type
 Create a pooled byte buffer.
 
auto make_pooled_pdu_buffer (std::size_t size) -> tracked_pdu_pool< pooled_buffer >::unique_ptr_type
 Create a pooled byte buffer with initial size.
 
auto make_pooled_pdv (uint8_t context_id=0, bool is_command=false, bool is_last=true) -> tracked_pdu_pool< presentation_data_value >::unique_ptr_type
 Create a pooled presentation_data_value.
 
auto make_pooled_p_data_tf () -> tracked_pdu_pool< p_data_tf_pdu >::unique_ptr_type
 Create a pooled p_data_tf_pdu.
 
constexpr const char * to_string (pdu_decode_error err) noexcept
 Convert pdu_decode_error to string description.
 
Conversion Functions
constexpr const char * to_string (pdu_type type) noexcept
 Converts a pdu_type to its string representation.
 

Variables

static std::mutex registry_mutex_
 
static std::map< uint16_t, dicom_server * > server_registry_
 
Constants
constexpr const char * DICOM_APPLICATION_CONTEXT = "1.2.840.10008.3.1.1.1"
 Default DICOM Application Context Name (PS3.7)
 
constexpr uint16_t DICOM_PROTOCOL_VERSION = 0x0001
 DICOM Protocol Version.
 
constexpr size_t AE_TITLE_LENGTH = 16
 AE Title length (fixed 16 characters, space-padded)
 
constexpr uint32_t DEFAULT_MAX_PDU_LENGTH = 16384
 Maximum PDU length recommended by DICOM (16384 bytes)
 
constexpr uint32_t UNLIMITED_MAX_PDU_LENGTH = 0
 Maximum PDU length that can be negotiated (0 = unlimited)
 

Typedef Documentation

◆ DecodeResult

Result type alias for PDU decoding operations using standardized kcenon::pacs::Result<T>

Definition at line 105 of file pdu_decoder.h.

◆ pdu

◆ Result

◆ VoidResult

Enumeration Type Documentation

◆ abort_reason

enum class kcenon::pacs::network::abort_reason : uint8_t
strong

Abort reason values when source is service-provider.

Enumerator
not_specified 

Reason not specified.

unrecognized_pdu 

Unrecognized PDU.

unexpected_pdu 

Unexpected PDU.

reserved 

Reserved.

unrecognized_pdu_parameter 

Unrecognized PDU parameter.

unexpected_pdu_parameter 

Unexpected PDU parameter.

invalid_pdu_parameter 

Invalid PDU parameter value.

Definition at line 79 of file pdu_types.h.

79 : uint8_t {
80 not_specified = 0,
82 unexpected_pdu = 2,
83 reserved = 3,
87};
@ unrecognized_pdu_parameter
Unrecognized PDU parameter.
@ not_specified
Reason not specified.
@ invalid_pdu_parameter
Invalid PDU parameter value.
@ unexpected_pdu_parameter
Unexpected PDU parameter.

◆ abort_source

enum class kcenon::pacs::network::abort_source : uint8_t
strong

Abort source values.

Enumerator
service_user 

DICOM UL service-user.

reserved 

Reserved.

service_provider 

DICOM UL service-provider (ACSE)

Definition at line 70 of file pdu_types.h.

70 : uint8_t {
71 service_user = 0,
72 reserved = 1,
74};
@ service_user
DICOM UL service-user.
@ service_provider
DICOM UL service-provider (ACSE)

◆ association_error

Error codes for association operations.

Enumerator
success 
connection_failed 
connection_timeout 
association_rejected 
association_aborted 
invalid_state 
negotiation_failed 
no_acceptable_context 
pdu_encoding_error 
pdu_decoding_error 
send_failed 
receive_failed 
receive_timeout 
protocol_error 
release_failed 
already_released 

Definition at line 107 of file association.h.

107 {
108 success = 0,
109 connection_failed,
110 connection_timeout,
111 association_rejected,
112 association_aborted,
114 negotiation_failed,
115 no_acceptable_context,
116 pdu_encoding_error,
117 pdu_decoding_error,
118 send_failed,
119 receive_failed,
120 receive_timeout,
122 release_failed,
123 already_released
124};

◆ association_state

DICOM Association state machine states per PS3.8.

Simplified state model based on DICOM PS3.8 Table 9-1.

Enumerator
idle 

Sta1: No TCP connection, waiting for transport.

awaiting_associate_ac 

Sta5: Awaiting A-ASSOCIATE response (SCU)

awaiting_associate_rq 

Sta2: Awaiting A-ASSOCIATE request (SCP)

established 

Sta6: Association established, ready for DIMSE.

awaiting_release_rp 

Sta7: Awaiting A-RELEASE response (initiator)

awaiting_release_rq 

Sta8: Awaiting potential A-RELEASE request.

released 

Association gracefully released.

aborted 

Association aborted (error condition)

Definition at line 70 of file association.h.

70 {
71 idle,
77 released,
78 aborted
79};
@ released
Association gracefully released.
@ awaiting_release_rp
Sta7: Awaiting A-RELEASE response (initiator)
@ awaiting_associate_ac
Sta5: Awaiting A-ASSOCIATE response (SCU)
@ established
Sta6: Association established, ready for DIMSE.
@ aborted
Association aborted (error condition)
@ awaiting_release_rq
Sta8: Awaiting potential A-RELEASE request.
@ awaiting_associate_rq
Sta2: Awaiting A-ASSOCIATE request (SCP)
@ idle
Sta1: No TCP connection, waiting for transport.

◆ item_type

enum class kcenon::pacs::network::item_type : uint8_t
strong

Item types used in variable items of PDUs.

Enumerator
application_context 

Application Context Item.

presentation_context_rq 

Presentation Context Item (RQ)

presentation_context_ac 

Presentation Context Item (AC)

user_information 

User Information Item.

abstract_syntax 

Abstract Syntax Sub-item.

transfer_syntax 

Transfer Syntax Sub-item.

maximum_length 

Maximum Length Sub-item.

implementation_class_uid 

Implementation Class UID Sub-item.

implementation_version_name 

Implementation Version Name Sub-item.

async_operations_window 

Asynchronous Operations Window Sub-item.

scp_scu_role_selection 

SCP/SCU Role Selection Sub-item.

sop_class_extended_negotiation 

SOP Class Extended Negotiation.

sop_class_common_extended_negotiation 

SOP Class Common Extended Negotiation.

user_identity_rq 

User Identity RQ Sub-item.

user_identity_ac 

User Identity AC Sub-item.

Definition at line 38 of file pdu_types.h.

38 : uint8_t {
39 application_context = 0x10,
42 user_information = 0x50,
43 abstract_syntax = 0x30,
44 transfer_syntax = 0x40,
45 maximum_length = 0x51,
46 implementation_class_uid = 0x52,
47 implementation_version_name = 0x55,
52 user_identity_rq = 0x58,
53 user_identity_ac = 0x59,
54};
@ maximum_length
Maximum Length Sub-item.
@ sop_class_extended_negotiation
SOP Class Extended Negotiation.
@ abstract_syntax
Abstract Syntax Sub-item.
@ user_identity_rq
User Identity RQ Sub-item.
@ async_operations_window
Asynchronous Operations Window Sub-item.
@ user_identity_ac
User Identity AC Sub-item.
@ application_context
Application Context Item.
@ sop_class_common_extended_negotiation
SOP Class Common Extended Negotiation.
Presentation Context for A-ASSOCIATE-AC.
Definition pdu_types.h:165
Presentation Context for A-ASSOCIATE-RQ.
Definition pdu_types.h:149
SCP/SCU Role Selection Sub-item.
Definition pdu_types.h:180
User Information for A-ASSOCIATE-RQ/AC.
Definition pdu_types.h:193

◆ pdu_decode_error

enum class kcenon::pacs::network::pdu_decode_error : int
strong

Error codes for PDU decoding errors.

Enumerator
success 
incomplete_header 

Less than 6 bytes available.

incomplete_pdu 

PDU length exceeds available data.

invalid_pdu_type 

Unknown PDU type byte.

invalid_protocol_version 

Unsupported protocol version.

invalid_item_type 

Unknown item type in variable items.

malformed_pdu 

PDU structure is invalid.

buffer_overflow 

Item length exceeds PDU bounds.

Definition at line 75 of file pdu_decoder.h.

75 : int {
76 success = 0,
78 incomplete_pdu = 2,
79 invalid_pdu_type = 3,
82 malformed_pdu = 6,
83 buffer_overflow = 7,
84};
@ incomplete_header
Less than 6 bytes available.
@ buffer_overflow
Item length exceeds PDU bounds.
@ invalid_item_type
Unknown item type in variable items.
@ invalid_protocol_version
Unsupported protocol version.

◆ pdu_type

enum class kcenon::pacs::network::pdu_type : uint8_t
strong

PDU (Protocol Data Unit) types as defined in DICOM PS3.8.

These values represent the type field in PDU headers.

Enumerator
associate_rq 

A-ASSOCIATE-RQ (Association Request)

associate_ac 

A-ASSOCIATE-AC (Association Accept)

associate_rj 

A-ASSOCIATE-RJ (Association Reject)

p_data_tf 

P-DATA-TF (Data Transfer)

release_rq 

A-RELEASE-RQ (Release Request)

release_rp 

A-RELEASE-RP (Release Response)

abort 

A-ABORT (Abort)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/integration/dicom_session.h.

Definition at line 25 of file pdu_types.h.

25 : uint8_t {
26 associate_rq = 0x01,
27 associate_ac = 0x02,
28 associate_rj = 0x03,
29 p_data_tf = 0x04,
30 release_rq = 0x05,
31 release_rp = 0x06,
32 abort = 0x07,
33};
@ p_data_tf
P-DATA-TF (Data Transfer)
@ release_rq
A-RELEASE-RQ (Release Request)
@ release_rp
A-RELEASE-RP (Release Response)
A-ASSOCIATE-AC PDU data.
Definition pdu_types.h:218
A-ASSOCIATE-RJ PDU data.
Definition pdu_types.h:231
A-ASSOCIATE-RQ PDU data.
Definition pdu_types.h:205

◆ presentation_context_result

Result values for A-ASSOCIATE-AC presentation context.

Enumerator
acceptance 

Accepted.

user_rejection 

User-rejection.

no_reason 

No reason (provider rejection)

abstract_syntax_not_supported 

Abstract-syntax-not-supported.

transfer_syntaxes_not_supported 

Transfer-syntaxes-not-supported.

Definition at line 59 of file pdu_types.h.

◆ reject_reason_provider_acse

Reject reason values when source is service-provider (ACSE).

Enumerator
no_reason 

No reason given.

protocol_version_not_supported 

Protocol-version not supported.

Definition at line 119 of file pdu_types.h.

119 : uint8_t {
120 no_reason = 1,
122};
@ protocol_version_not_supported
Protocol-version not supported.

◆ reject_reason_provider_presentation

Reject reason values when source is service-provider (Presentation).

Enumerator
temporary_congestion 

Temporary congestion.

local_limit_exceeded 

Local limit exceeded.

Definition at line 127 of file pdu_types.h.

◆ reject_reason_user

enum class kcenon::pacs::network::reject_reason_user : uint8_t
strong

Reject reason values when source is service-user.

Enumerator
no_reason 

No reason given.

application_context_not_supported 

Application-context-name not supported.

calling_ae_not_recognized 

Calling-AE-title not recognized.

called_ae_not_recognized 

Called-AE-title not recognized.

Definition at line 109 of file pdu_types.h.

109 : uint8_t {
110 no_reason = 1,
114};
@ called_ae_not_recognized
Called-AE-title not recognized.
@ application_context_not_supported
Application-context-name not supported.
@ calling_ae_not_recognized
Calling-AE-title not recognized.

◆ reject_result

enum class kcenon::pacs::network::reject_result : uint8_t
strong

Reject result values.

Enumerator
rejected_permanent 

Rejected-permanent.

rejected_transient 

Rejected-transient.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/v2/dicom_association_handler.h.

Definition at line 92 of file pdu_types.h.

92 : uint8_t {
95};
@ rejected_permanent
Rejected-permanent.
@ rejected_transient
Rejected-transient.

◆ reject_source

enum class kcenon::pacs::network::reject_source : uint8_t
strong

Reject source values.

Enumerator
service_user 

DICOM UL service-user.

service_provider_acse 

DICOM UL service-provider (ACSE)

service_provider_presentation 

DICOM UL service-provider (Presentation)

Definition at line 100 of file pdu_types.h.

100 : uint8_t {
101 service_user = 1,
104};
@ service_provider_acse
DICOM UL service-provider (ACSE)
@ service_provider_presentation
DICOM UL service-provider (Presentation)

Function Documentation

◆ make_pooled_p_data_tf()

auto kcenon::pacs::network::make_pooled_p_data_tf ( ) -> tracked_pdu_pool<p_data_tf_pdu>::unique_ptr_type
inlinenodiscard

Create a pooled p_data_tf_pdu.

Returns
A unique_ptr to the pooled P-DATA-TF PDU
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/pdu_buffer_pool.h.

Definition at line 388 of file pdu_buffer_pool.h.

389 {
390 return pdu_buffer_pool::get().acquire_p_data_tf();
391}

References kcenon::pacs::network::pdu_buffer_pool::get().

Here is the call graph for this function:

◆ make_pooled_pdu_buffer() [1/2]

auto kcenon::pacs::network::make_pooled_pdu_buffer ( ) -> tracked_pdu_pool<pooled_buffer>::unique_ptr_type
inlinenodiscard

Create a pooled byte buffer.

Returns
A unique_ptr to the pooled buffer
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/pdu_buffer_pool.h.

Definition at line 353 of file pdu_buffer_pool.h.

354 {
355 return pdu_buffer_pool::get().acquire_buffer();
356}

References kcenon::pacs::network::pdu_buffer_pool::get().

Here is the call graph for this function:

◆ make_pooled_pdu_buffer() [2/2]

auto kcenon::pacs::network::make_pooled_pdu_buffer ( std::size_t size) -> tracked_pdu_pool<pooled_buffer>::unique_ptr_type
inlinenodiscard

Create a pooled byte buffer with initial size.

Parameters
sizeInitial size of the buffer
Returns
A unique_ptr to the pooled buffer

Definition at line 363 of file pdu_buffer_pool.h.

364 {
365 auto buffer = pdu_buffer_pool::get().acquire_buffer();
366 buffer->resize(size);
367 return buffer;
368}

References kcenon::pacs::network::pdu_buffer_pool::get().

Here is the call graph for this function:

◆ make_pooled_pdv()

auto kcenon::pacs::network::make_pooled_pdv ( uint8_t context_id = 0,
bool is_command = false,
bool is_last = true ) -> tracked_pdu_pool<presentation_data_value>::unique_ptr_type
inlinenodiscard

Create a pooled presentation_data_value.

Parameters
context_idPresentation Context ID
is_commandWhether this is a command message
is_lastWhether this is the last fragment
Returns
A unique_ptr to the pooled PDV
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/pdu_buffer_pool.h.

Definition at line 377 of file pdu_buffer_pool.h.

380 {
381 return pdu_buffer_pool::get().acquire_pdv(context_id, is_command, is_last);
382}

References kcenon::pacs::network::pdu_buffer_pool::get().

Here is the call graph for this function:

◆ to_string() [1/4]

std::string_view kcenon::pacs::network::to_string ( association_error err)
nodiscardconstexprnoexcept

Convert association_error to string representation.

Definition at line 129 of file association.h.

129 {
130 switch (err) {
131 case association_error::success: return "Success";
132 case association_error::connection_failed: return "Connection failed";
133 case association_error::connection_timeout: return "Connection timeout";
134 case association_error::association_rejected: return "Association rejected";
135 case association_error::association_aborted: return "Association aborted";
136 case association_error::invalid_state: return "Invalid state for operation";
137 case association_error::negotiation_failed: return "Negotiation failed";
138 case association_error::no_acceptable_context: return "No acceptable presentation context";
139 case association_error::pdu_encoding_error: return "PDU encoding error";
140 case association_error::pdu_decoding_error: return "PDU decoding error";
141 case association_error::send_failed: return "Send failed";
142 case association_error::receive_failed: return "Receive failed";
143 case association_error::receive_timeout: return "Receive timeout";
144 case association_error::protocol_error: return "Protocol error";
145 case association_error::release_failed: return "Release failed";
146 case association_error::already_released: return "Already released";
147 default: return "Unknown error";
148 }
149}

References already_released, association_aborted, association_rejected, connection_failed, connection_timeout, invalid_state, negotiation_failed, no_acceptable_context, pdu_decoding_error, pdu_encoding_error, protocol_error, receive_failed, receive_timeout, release_failed, send_failed, and success.

◆ to_string() [2/4]

const char * kcenon::pacs::network::to_string ( association_state state)
nodiscardconstexprnoexcept

Convert association_state to string representation.

Parameters
stateThe state to convert
Returns
String representation of the state

Definition at line 86 of file association.h.

86 {
87 switch (state) {
88 case association_state::idle: return "Idle (Sta1)";
89 case association_state::awaiting_associate_ac: return "Awaiting A-ASSOCIATE-AC (Sta5)";
90 case association_state::awaiting_associate_rq: return "Awaiting A-ASSOCIATE-RQ (Sta2)";
91 case association_state::established: return "Established (Sta6)";
92 case association_state::awaiting_release_rp: return "Awaiting A-RELEASE-RP (Sta7)";
93 case association_state::awaiting_release_rq: return "Awaiting A-RELEASE-RQ (Sta8)";
94 case association_state::released: return "Released";
95 case association_state::aborted: return "Aborted";
96 default: return "Unknown";
97 }
98}

References aborted, awaiting_associate_ac, awaiting_associate_rq, awaiting_release_rp, awaiting_release_rq, established, idle, and released.

◆ to_string() [3/4]

const char * kcenon::pacs::network::to_string ( pdu_decode_error err)
nodiscardconstexprnoexcept

Convert pdu_decode_error to string description.

Definition at line 89 of file pdu_decoder.h.

89 {
90 switch (err) {
91 case pdu_decode_error::success: return "Success";
92 case pdu_decode_error::incomplete_header: return "Incomplete PDU header";
93 case pdu_decode_error::incomplete_pdu: return "Incomplete PDU data";
94 case pdu_decode_error::invalid_pdu_type: return "Invalid PDU type";
95 case pdu_decode_error::invalid_protocol_version: return "Invalid protocol version";
96 case pdu_decode_error::invalid_item_type: return "Invalid item type";
97 case pdu_decode_error::malformed_pdu: return "Malformed PDU";
98 case pdu_decode_error::buffer_overflow: return "Buffer overflow";
99 default: return "Unknown error";
100 }
101}

References buffer_overflow, incomplete_header, incomplete_pdu, invalid_item_type, invalid_pdu_type, invalid_protocol_version, malformed_pdu, and success.

◆ to_string() [4/4]

const char * kcenon::pacs::network::to_string ( pdu_type type)
nodiscardconstexprnoexcept

Converts a pdu_type to its string representation.

Definition at line 248 of file pdu_types.h.

248 {
249 switch (type) {
250 case pdu_type::associate_rq: return "A-ASSOCIATE-RQ";
251 case pdu_type::associate_ac: return "A-ASSOCIATE-AC";
252 case pdu_type::associate_rj: return "A-ASSOCIATE-RJ";
253 case pdu_type::p_data_tf: return "P-DATA-TF";
254 case pdu_type::release_rq: return "A-RELEASE-RQ";
255 case pdu_type::release_rp: return "A-RELEASE-RP";
256 case pdu_type::abort: return "A-ABORT";
257 default: return "UNKNOWN";
258 }
259}

References abort, associate_ac, associate_rj, associate_rq, p_data_tf, release_rp, and release_rq.

Variable Documentation

◆ AE_TITLE_LENGTH

size_t kcenon::pacs::network::AE_TITLE_LENGTH = 16
constexpr

◆ DEFAULT_MAX_PDU_LENGTH

uint32_t kcenon::pacs::network::DEFAULT_MAX_PDU_LENGTH = 16384
constexpr

Maximum PDU length recommended by DICOM (16384 bytes)

Definition at line 276 of file pdu_types.h.

◆ DICOM_APPLICATION_CONTEXT

const char* kcenon::pacs::network::DICOM_APPLICATION_CONTEXT = "1.2.840.10008.3.1.1.1"
constexpr

◆ DICOM_PROTOCOL_VERSION

uint16_t kcenon::pacs::network::DICOM_PROTOCOL_VERSION = 0x0001
constexpr

◆ registry_mutex_

std::mutex kcenon::pacs::network::registry_mutex_
static

◆ server_registry_

std::map<uint16_t, dicom_server*> kcenon::pacs::network::server_registry_
static

◆ UNLIMITED_MAX_PDU_LENGTH

uint32_t kcenon::pacs::network::UNLIMITED_MAX_PDU_LENGTH = 0
constexpr

Maximum PDU length that can be negotiated (0 = unlimited)

Definition at line 279 of file pdu_types.h.