|
PACS System 0.1.0
PACS DICOM system library
|
#include <association.h>

Public Types | |
| using | clock = std::chrono::steady_clock |
| using | duration = std::chrono::milliseconds |
| using | time_point = clock::time_point |
Public Member Functions | |
| association () | |
| Default constructor (creates idle association). | |
| association (association &&other) noexcept | |
| Move constructor. | |
| association & | operator= (association &&other) noexcept |
| Move assignment operator. | |
| ~association () | |
| Destructor (aborts if still established). | |
| association (const association &)=delete | |
| association & | operator= (const association &)=delete |
| association_state | state () const noexcept |
| Get current association state. | |
| bool | is_established () const noexcept |
| Check if association is established and ready for DIMSE. | |
| bool | is_closed () const noexcept |
| Check if association has been released or aborted. | |
| std::string_view | calling_ae () const noexcept |
| Get calling AE title. | |
| std::string_view | called_ae () const noexcept |
| Get called AE title. | |
| uint32_t | max_pdu_size () const noexcept |
| Get negotiated maximum PDU size. | |
| std::string_view | remote_implementation_class () const noexcept |
| Get remote implementation class UID. | |
| std::string_view | remote_implementation_version () const noexcept |
| Get remote implementation version name. | |
| bool | has_accepted_context (std::string_view abstract_syntax) const |
| Check if a presentation context for the abstract syntax was accepted. | |
| std::optional< uint8_t > | accepted_context_id (std::string_view abstract_syntax) const |
| Get the presentation context ID for an abstract syntax. | |
| Result< encoding::transfer_syntax > | context_transfer_syntax (uint8_t pc_id) const |
| Get the transfer syntax for an accepted context. | |
| const std::vector< accepted_presentation_context > & | accepted_contexts () const noexcept |
| Get all accepted presentation contexts. | |
| Result< std::monostate > | send_dimse (uint8_t context_id, const dimse::dimse_message &msg) |
| Send a DIMSE message. | |
| Result< std::pair< uint8_t, dimse::dimse_message > > | receive_dimse (duration timeout=default_timeout) |
| Receive a DIMSE message. | |
| associate_rq | build_associate_rq () const |
| Build A-ASSOCIATE-RQ PDU for sending. | |
| associate_ac | build_associate_ac () const |
| Build A-ASSOCIATE-AC PDU for sending. | |
| bool | process_associate_ac (const associate_ac &ac) |
| Process received A-ASSOCIATE-AC PDU. | |
| void | process_associate_rj (const associate_rj &rj) |
| Process received A-ASSOCIATE-RJ PDU. | |
| std::optional< rejection_info > | get_rejection_info () const |
| Get rejection info if association was rejected. | |
| Result< std::monostate > | release (duration timeout=default_timeout) |
| Gracefully release the association. | |
| void | process_release_rq () |
| Process received A-RELEASE-RQ. | |
| void | process_release_rp () |
| Process received A-RELEASE-RP. | |
| void | abort (uint8_t source=0, uint8_t reason=0) |
| Abort the association immediately. | |
| void | process_abort (const abort_source &source, const abort_reason &reason) |
| Process received A-ABORT PDU. | |
| void | set_state (association_state new_state) |
| Force state transition (for testing). | |
| void | set_peer (association *peer) |
| Set peer association for in-memory testing. | |
| void | enqueue_message (uint8_t context_id, dimse::dimse_message msg) |
| Enqueue message from peer (for in-memory testing). | |
| void | update_peer (association *old_peer, association *new_peer) |
| Update peer pointer (for in-memory testing). | |
Static Public Member Functions | |
| static Result< association > | connect (const std::string &host, uint16_t port, const association_config &config, duration timeout=default_timeout) |
| Initiate an SCU association to a remote SCP. | |
| static association | accept (const associate_rq &rq, const scp_config &config) |
| Accept an incoming SCP association. | |
| static associate_rj | reject (reject_result result, uint8_t source, uint8_t reason) |
| Reject an incoming association request. | |
Static Public Attributes | |
| static constexpr duration | default_timeout {30000} |
| Default timeout for operations. | |
Private Types | |
| using | message_type = std::pair<uint8_t, dimse::dimse_message> |
| Incoming message queue for in-memory testing (thread-safe) | |
| using | message_queue_type = kcenon::thread::detail::concurrent_queue<message_type> |
Private Member Functions | |
| bool | can_transition_to (association_state new_state) const |
| Validate state transition. | |
| void | transition (association_state new_state) |
| Perform state transition. | |
| void | build_context_map () |
| Build presentation context map from accepted contexts. | |
| void | negotiate_contexts (const associate_rq &rq, const scp_config &config) |
| Negotiate presentation contexts for SCP. | |
Private Attributes | |
| association_state | state_ {association_state::idle} |
| Current state. | |
| std::string | calling_ae_ |
| Calling AE Title. | |
| std::string | called_ae_ |
| Called AE Title. | |
| std::string | our_ae_ |
| Our AE Title (may be calling or called depending on role) | |
| uint32_t | max_pdu_size_ {DEFAULT_MAX_PDU_LENGTH} |
| Negotiated maximum PDU size. | |
| std::string | our_implementation_class_ |
| Our implementation class UID. | |
| std::string | our_implementation_version_ |
| Our implementation version name. | |
| std::string | remote_implementation_class_ |
| Remote implementation class UID. | |
| std::string | remote_implementation_version_ |
| Remote implementation version name. | |
| std::vector< proposed_presentation_context > | proposed_contexts_ |
| Proposed presentation contexts (SCU) | |
| std::vector< accepted_presentation_context > | accepted_contexts_ |
| Accepted presentation contexts. | |
| std::map< std::string, uint8_t > | abstract_syntax_to_context_ |
| Map from abstract syntax to accepted context ID. | |
| std::map< uint8_t, encoding::transfer_syntax > | context_to_transfer_syntax_ |
| Map from context ID to transfer syntax. | |
| std::optional< rejection_info > | rejection_info_ |
| Rejection information (if rejected) | |
| uint8_t | abort_source_ {0} |
| Abort source (if aborted) | |
| uint8_t | abort_reason_ {0} |
| Abort reason (if aborted) | |
| std::mutex | mutex_ |
| Thread safety mutex. | |
| bool | is_scu_ {true} |
| Is this an SCU (true) or SCP (false)? | |
| association * | peer_ {nullptr} |
| Peer association for in-memory testing. | |
| std::unique_ptr< message_queue_type > | incoming_queue_ |
Definition at line 279 of file association.h.
| using kcenon::pacs::network::association::clock = std::chrono::steady_clock |
Definition at line 285 of file association.h.
| using kcenon::pacs::network::association::duration = std::chrono::milliseconds |
Definition at line 286 of file association.h.
|
private |
Definition at line 638 of file association.h.
|
private |
Incoming message queue for in-memory testing (thread-safe)
Definition at line 637 of file association.h.
| using kcenon::pacs::network::association::time_point = clock::time_point |
Definition at line 287 of file association.h.
|
default |
Default constructor (creates idle association).
|
noexcept |
Move constructor.
Definition at line 103 of file association.cpp.
References kcenon::pacs::network::idle.
| kcenon::pacs::network::association::~association | ( | ) |
Destructor (aborts if still established).
Definition at line 168 of file association.cpp.
References kcenon::pacs::network::aborted, kcenon::pacs::network::established, mutex_, and state_.
|
delete |
| void kcenon::pacs::network::association::abort | ( | uint8_t | source = 0, |
| uint8_t | reason = 0 ) |
Abort the association immediately.
| source | Abort source (0=service-user, 2=service-provider) |
| reason | Abort reason |
Definition at line 582 of file association.cpp.
References abort_reason_, abort_source_, kcenon::pacs::network::aborted, incoming_queue_, mutex_, and state_.
Referenced by kcenon::pacs::network::dicom_server::handle_association().

|
staticnodiscard |
Accept an incoming SCP association.
| rq | The received A-ASSOCIATE-RQ PDU |
| config | SCP configuration for negotiation |
Definition at line 227 of file association.cpp.
References accepted_contexts_, kcenon::pacs::network::scp_config::ae_title, build_context_map(), called_ae_, kcenon::pacs::network::associate_rq::called_ae_title, calling_ae_, kcenon::pacs::network::associate_rq::calling_ae_title, kcenon::pacs::network::established, kcenon::pacs::network::idle, kcenon::pacs::network::scp_config::implementation_class_uid, kcenon::pacs::network::user_information::implementation_class_uid, kcenon::pacs::network::scp_config::implementation_version_name, kcenon::pacs::network::user_information::implementation_version_name, is_scu_, kcenon::pacs::network::scp_config::max_pdu_length, kcenon::pacs::network::user_information::max_pdu_length, max_pdu_size_, negotiate_contexts(), our_ae_, our_implementation_class_, our_implementation_version_, remote_implementation_class_, remote_implementation_version_, state_, and kcenon::pacs::network::associate_rq::user_info.
Referenced by kcenon::pacs::network::v2::dicom_association_handler::handle_associate_rq(), and kcenon::pacs::network::dicom_server::simulate_association_request().


|
nodiscard |
Get the presentation context ID for an abstract syntax.
Definition at line 335 of file association.cpp.
References kcenon::pacs::network::abstract_syntax, abstract_syntax_to_context_, and mutex_.
Referenced by kcenon::pacs::services::query_scu::cancel(), kcenon::pacs::services::retrieve_scu::cancel(), kcenon::pacs::services::worklist_scu::cancel(), kcenon::pacs::services::ups_push_scu::change_state(), kcenon::pacs::services::mpps_scu::create(), kcenon::pacs::services::ups_push_scu::create(), kcenon::pacs::services::query_scu::find_impl(), kcenon::pacs::services::print_scu::find_print_context(), kcenon::pacs::services::query_scu::find_streaming(), kcenon::pacs::services::n_get_scu::get(), kcenon::pacs::services::ups_push_scu::get(), kcenon::pacs::services::retrieve_scp::handle_c_get(), kcenon::pacs::services::retrieve_scu::perform_get(), kcenon::pacs::services::retrieve_scu::perform_move(), kcenon::pacs::services::worklist_scu::query_impl(), kcenon::pacs::services::worklist_scu::query_streaming(), kcenon::pacs::services::ups_push_scu::request_cancel(), kcenon::pacs::services::ups_watch_scu::send_watch_action(), kcenon::pacs::services::mpps_scu::set(), kcenon::pacs::services::ups_push_scu::set(), kcenon::pacs::services::storage_scu::store_impl(), and TEST_CASE().

|
nodiscardnoexcept |
Get all accepted presentation contexts.
Definition at line 360 of file association.cpp.
References accepted_contexts_.
Referenced by kcenon::pacs::network::v2::dicom_association_handler::dispatch_to_service(), kcenon::pacs::network::v2::dicom_association_handler::handle_associate_rq(), and kcenon::pacs::network::v2::dicom_association_handler::handle_p_data_tf().

|
nodiscard |
Build A-ASSOCIATE-AC PDU for sending.
Definition at line 457 of file association.cpp.
References accepted_contexts_, kcenon::pacs::network::associate_ac::application_context, called_ae_, kcenon::pacs::network::associate_ac::called_ae_title, calling_ae_, kcenon::pacs::network::associate_ac::calling_ae_title, kcenon::pacs::network::DICOM_APPLICATION_CONTEXT, kcenon::pacs::network::user_information::implementation_class_uid, kcenon::pacs::network::user_information::implementation_version_name, kcenon::pacs::network::user_information::max_pdu_length, max_pdu_size_, mutex_, our_implementation_class_, our_implementation_version_, kcenon::pacs::network::associate_ac::presentation_contexts, and kcenon::pacs::network::associate_ac::user_info.
Referenced by kcenon::pacs::network::v2::dicom_association_handler::send_associate_ac().

|
nodiscard |
Build A-ASSOCIATE-RQ PDU for sending.
Definition at line 435 of file association.cpp.
References kcenon::pacs::network::associate_rq::application_context, called_ae_, kcenon::pacs::network::associate_rq::called_ae_title, calling_ae_, kcenon::pacs::network::associate_rq::calling_ae_title, kcenon::pacs::network::DICOM_APPLICATION_CONTEXT, kcenon::pacs::network::user_information::implementation_class_uid, kcenon::pacs::network::user_information::implementation_version_name, kcenon::pacs::network::user_information::max_pdu_length, max_pdu_size_, mutex_, our_implementation_class_, our_implementation_version_, kcenon::pacs::network::associate_rq::presentation_contexts, proposed_contexts_, and kcenon::pacs::network::associate_rq::user_info.
Referenced by connect().

|
private |
Build presentation context map from accepted contexts.
Definition at line 675 of file association.cpp.
References abstract_syntax_to_context_, accepted_contexts_, and context_to_transfer_syntax_.
Referenced by accept(), and process_associate_ac().

|
nodiscardnoexcept |
Get called AE title.
Definition at line 305 of file association.cpp.
References called_ae_, and mutex_.
Referenced by kcenon::pacs::network::v2::dicom_association_handler::called_ae(), kcenon::pacs::services::query_scp::handle_message(), kcenon::pacs::services::storage_scp::handle_message(), and kcenon::pacs::example::pacs_server_app::setup_server().

|
nodiscardnoexcept |
Get calling AE title.
Definition at line 300 of file association.cpp.
References calling_ae_, and mutex_.
Referenced by kcenon::pacs::network::v2::dicom_association_handler::calling_ae(), kcenon::pacs::services::retrieve_scp::handle_c_get(), kcenon::pacs::services::retrieve_scp::handle_c_move(), kcenon::pacs::services::query_scp::handle_message(), kcenon::pacs::services::storage_scp::handle_message(), kcenon::pacs::services::ups_query_scp::handle_message(), kcenon::pacs::services::worklist_scp::handle_message(), kcenon::pacs::services::ups_watch_scp::handle_subscribe(), kcenon::pacs::services::ups_watch_scp::handle_suspend_global(), kcenon::pacs::services::ups_watch_scp::handle_unsubscribe(), and kcenon::pacs::example::pacs_server_app::setup_server().

|
nodiscardprivate |
Validate state transition.
Definition at line 630 of file association.cpp.
References kcenon::pacs::network::aborted, kcenon::pacs::network::awaiting_associate_ac, kcenon::pacs::network::awaiting_associate_rq, kcenon::pacs::network::awaiting_release_rp, kcenon::pacs::network::awaiting_release_rq, kcenon::pacs::network::established, kcenon::pacs::network::idle, kcenon::pacs::network::released, and state_.
Referenced by transition().

|
staticnodiscard |
Initiate an SCU association to a remote SCP.
| host | Remote host address |
| port | Remote port (typically 104 or 11112) |
| config | Association configuration |
| timeout | Connection timeout |
Definition at line 180 of file association.cpp.
References kcenon::pacs::network::awaiting_associate_ac, build_associate_rq(), called_ae_, kcenon::pacs::network::association_config::called_ae_title, calling_ae_, kcenon::pacs::network::association_config::calling_ae_title, kcenon::pacs::network::dicom_server::get_server_on_port(), kcenon::pacs::network::association_config::implementation_class_uid, kcenon::pacs::network::association_config::implementation_version_name, is_scu_, kcenon::pacs::network::association_config::max_pdu_length, max_pdu_size_, kcenon::pacs::network::no_acceptable_context, our_ae_, our_implementation_class_, our_implementation_version_, process_associate_ac(), kcenon::pacs::network::association_config::proposed_contexts, proposed_contexts_, and transition().
Referenced by kcenon::pacs::client::remote_node_manager::acquire_association(), kcenon::pacs::workflow::auto_prefetch_service::prefetch_study(), kcenon::pacs::workflow::auto_prefetch_service::query_prior_studies(), and kcenon::pacs::web::endpoints::register_remote_nodes_endpoints_impl().


|
nodiscard |
Get the transfer syntax for an accepted context.
| pc_id | Presentation Context ID |
Definition at line 346 of file association.cpp.
References context_to_transfer_syntax_, mutex_, and kcenon::pacs::network::no_acceptable_context.
Referenced by kcenon::pacs::network::v2::dicom_association_handler::handle_p_data_tf().

| void kcenon::pacs::network::association::enqueue_message | ( | uint8_t | context_id, |
| dimse::dimse_message | msg ) |
Enqueue message from peer (for in-memory testing).
Definition at line 614 of file association.cpp.
References incoming_queue_.
Referenced by send_dimse().

|
nodiscard |
Get rejection info if association was rejected.
Definition at line 534 of file association.cpp.
References mutex_, and rejection_info_.
|
nodiscard |
Check if a presentation context for the abstract syntax was accepted.
Definition at line 329 of file association.cpp.
References kcenon::pacs::network::abstract_syntax, abstract_syntax_to_context_, and mutex_.
|
nodiscardnoexcept |
Check if association has been released or aborted.
Definition at line 289 of file association.cpp.
References kcenon::pacs::network::aborted, kcenon::pacs::network::idle, mutex_, kcenon::pacs::network::released, and state_.
|
nodiscardnoexcept |
Check if association is established and ready for DIMSE.
Definition at line 284 of file association.cpp.
References kcenon::pacs::network::established, mutex_, and state_.
Referenced by kcenon::pacs::services::ups_push_scu::change_state(), kcenon::pacs::services::mpps_scu::create(), kcenon::pacs::services::ups_push_scu::create(), kcenon::pacs::services::print_scu::create_film_box(), kcenon::pacs::services::print_scu::create_film_session(), kcenon::pacs::services::print_scu::delete_film_box(), kcenon::pacs::services::print_scu::delete_film_session(), kcenon::pacs::services::query_scu::find_impl(), kcenon::pacs::services::query_scu::find_streaming(), kcenon::pacs::services::n_get_scu::get(), kcenon::pacs::services::ups_push_scu::get(), kcenon::pacs::services::retrieve_scu::perform_get(), kcenon::pacs::services::retrieve_scu::perform_move(), kcenon::pacs::services::print_scu::print_film_box(), kcenon::pacs::services::worklist_scu::query_impl(), kcenon::pacs::services::print_scu::query_printer_status(), kcenon::pacs::services::worklist_scu::query_streaming(), kcenon::pacs::services::ups_push_scu::request_cancel(), kcenon::pacs::services::ups_watch_scu::send_watch_action(), kcenon::pacs::services::mpps_scu::set(), kcenon::pacs::services::ups_push_scu::set(), kcenon::pacs::services::print_scu::set_image_box(), and kcenon::pacs::services::storage_scu::store_impl().

|
nodiscardnoexcept |
Get negotiated maximum PDU size.
Definition at line 310 of file association.cpp.
References max_pdu_size_, and mutex_.
|
private |
Negotiate presentation contexts for SCP.
Definition at line 691 of file association.cpp.
References kcenon::pacs::network::abstract_syntax_not_supported, kcenon::pacs::network::acceptance, accepted_contexts_, kcenon::pacs::network::associate_rq::presentation_contexts, kcenon::pacs::network::scp_config::supported_abstract_syntaxes, kcenon::pacs::network::scp_config::supported_transfer_syntaxes, and kcenon::pacs::network::transfer_syntaxes_not_supported.
Referenced by accept().

|
noexcept |
Move assignment operator.
Definition at line 134 of file association.cpp.
References kcenon::pacs::network::idle.
|
delete |
| void kcenon::pacs::network::association::process_abort | ( | const abort_source & | source, |
| const abort_reason & | reason ) |
Process received A-ABORT PDU.
Definition at line 593 of file association.cpp.
References abort_reason_, abort_source_, kcenon::pacs::network::aborted, incoming_queue_, mutex_, and state_.
Referenced by kcenon::pacs::network::v2::dicom_association_handler::handle_abort().

| bool kcenon::pacs::network::association::process_associate_ac | ( | const associate_ac & | ac | ) |
Process received A-ASSOCIATE-AC PDU.
Definition at line 479 of file association.cpp.
References accepted_contexts_, kcenon::pacs::network::awaiting_associate_ac, build_context_map(), kcenon::pacs::network::established, kcenon::pacs::network::user_information::implementation_class_uid, kcenon::pacs::network::user_information::implementation_version_name, kcenon::pacs::network::user_information::max_pdu_length, max_pdu_size_, mutex_, kcenon::pacs::network::associate_ac::presentation_contexts, proposed_contexts_, remote_implementation_class_, remote_implementation_version_, state_, transition(), and kcenon::pacs::network::associate_ac::user_info.
Referenced by connect().


| void kcenon::pacs::network::association::process_associate_rj | ( | const associate_rj & | rj | ) |
Process received A-ASSOCIATE-RJ PDU.
Definition at line 527 of file association.cpp.
References kcenon::pacs::network::idle, mutex_, kcenon::pacs::network::associate_rj::reason, rejection_info_, kcenon::pacs::network::associate_rj::result, kcenon::pacs::network::associate_rj::source, and state_.
| void kcenon::pacs::network::association::process_release_rp | ( | ) |
Process received A-RELEASE-RP.
Definition at line 574 of file association.cpp.
References kcenon::pacs::network::awaiting_release_rp, mutex_, kcenon::pacs::network::released, and state_.
| void kcenon::pacs::network::association::process_release_rq | ( | ) |
Process received A-RELEASE-RQ.
Definition at line 566 of file association.cpp.
References kcenon::pacs::network::awaiting_release_rq, kcenon::pacs::network::established, mutex_, and state_.
Referenced by kcenon::pacs::network::v2::dicom_association_handler::handle_release_rq().

|
nodiscard |
Receive a DIMSE message.
| timeout | Receive timeout |
Definition at line 402 of file association.cpp.
References kcenon::pacs::network::association_aborted, kcenon::pacs::network::established, incoming_queue_, mutex_, kcenon::pacs::network::receive_timeout, and state_.
Referenced by kcenon::pacs::services::ups_push_scu::change_state(), kcenon::pacs::services::mpps_scu::create(), kcenon::pacs::services::ups_push_scu::create(), kcenon::pacs::services::print_scu::create_film_box(), kcenon::pacs::services::print_scu::create_film_session(), kcenon::pacs::services::print_scu::delete_film_box(), kcenon::pacs::services::print_scu::delete_film_session(), kcenon::pacs::services::query_scu::find_impl(), kcenon::pacs::services::query_scu::find_streaming(), kcenon::pacs::services::n_get_scu::get(), kcenon::pacs::services::ups_push_scu::get(), kcenon::pacs::services::retrieve_scp::handle_c_get(), kcenon::pacs::services::retrieve_scu::perform_get(), kcenon::pacs::services::retrieve_scu::perform_move(), kcenon::pacs::services::print_scu::print_film_box(), kcenon::pacs::services::worklist_scu::query_impl(), kcenon::pacs::services::print_scu::query_printer_status(), kcenon::pacs::services::worklist_scu::query_streaming(), kcenon::pacs::services::ups_push_scu::request_cancel(), kcenon::pacs::services::ups_watch_scu::send_watch_action(), kcenon::pacs::services::mpps_scu::set(), kcenon::pacs::services::ups_push_scu::set(), kcenon::pacs::services::print_scu::set_image_box(), kcenon::pacs::services::storage_scu::store_impl(), and TEST_CASE().

|
staticnodiscard |
Reject an incoming association request.
| result | Rejection result (permanent/transient) |
| source | Rejection source |
| reason | Rejection reason |
Definition at line 267 of file association.cpp.
|
nodiscard |
Gracefully release the association.
Sends A-RELEASE-RQ and waits for A-RELEASE-RP.
| timeout | Timeout for release handshake |
Definition at line 543 of file association.cpp.
References kcenon::pacs::network::already_released, kcenon::pacs::network::awaiting_release_rp, kcenon::pacs::network::established, mutex_, kcenon::pacs::network::released, and state_.
Referenced by TEST_CASE().

|
nodiscardnoexcept |
Get remote implementation class UID.
Definition at line 315 of file association.cpp.
References mutex_, and remote_implementation_class_.
|
nodiscardnoexcept |
Get remote implementation version name.
Definition at line 320 of file association.cpp.
References mutex_, and remote_implementation_version_.
|
nodiscard |
Send a DIMSE message.
| context_id | Presentation Context ID to use |
| msg | The DIMSE message to send |
Definition at line 369 of file association.cpp.
References context_to_transfer_syntax_, kcenon::pacs::error_codes::dimse_error, enqueue_message(), kcenon::pacs::network::established, kcenon::pacs::network::dimse::dimse_message::is_valid(), mutex_, peer_, and state_.
Referenced by kcenon::pacs::services::query_scu::cancel(), kcenon::pacs::services::retrieve_scu::cancel(), kcenon::pacs::services::worklist_scu::cancel(), kcenon::pacs::services::ups_push_scu::change_state(), kcenon::pacs::services::mpps_scu::create(), kcenon::pacs::services::ups_push_scu::create(), kcenon::pacs::services::print_scp::create_film_box(), kcenon::pacs::services::print_scu::create_film_box(), kcenon::pacs::services::print_scu::create_film_session(), kcenon::pacs::services::print_scu::delete_film_box(), kcenon::pacs::services::print_scu::delete_film_session(), kcenon::pacs::services::query_scu::find_impl(), kcenon::pacs::services::query_scu::find_streaming(), kcenon::pacs::services::n_get_scu::get(), kcenon::pacs::services::ups_push_scu::get(), kcenon::pacs::services::retrieve_scp::handle_c_get(), kcenon::pacs::services::retrieve_scp::handle_c_move(), kcenon::pacs::services::storage_scp::handle_message(), kcenon::pacs::services::verification_scp::handle_message(), kcenon::pacs::services::print_scp::handle_n_action(), kcenon::pacs::services::print_scp::handle_n_get(), kcenon::pacs::services::retrieve_scu::perform_get(), kcenon::pacs::services::retrieve_scu::perform_move(), kcenon::pacs::services::print_scu::print_film_box(), kcenon::pacs::services::worklist_scu::query_impl(), kcenon::pacs::services::print_scu::query_printer_status(), kcenon::pacs::services::worklist_scu::query_streaming(), kcenon::pacs::services::ups_push_scu::request_cancel(), kcenon::pacs::services::storage_commitment_scu::request_commitment(), kcenon::pacs::services::storage_commitment_scp::send_event_report(), kcenon::pacs::services::query_scp::send_final_response(), kcenon::pacs::services::retrieve_scp::send_final_response(), kcenon::pacs::services::ups_query_scp::send_final_response(), kcenon::pacs::services::worklist_scp::send_final_response(), kcenon::pacs::services::storage_commitment_scp::send_n_action_response(), kcenon::pacs::services::ups_push_scp::send_n_action_response(), kcenon::pacs::services::ups_watch_scp::send_n_action_response(), kcenon::pacs::services::mpps_scp::send_n_create_response(), kcenon::pacs::services::ups_push_scp::send_n_create_response(), kcenon::pacs::services::n_get_scp::send_n_get_response(), kcenon::pacs::services::ups_push_scp::send_n_get_response(), kcenon::pacs::services::mpps_scp::send_n_set_response(), kcenon::pacs::services::ups_push_scp::send_n_set_response(), kcenon::pacs::services::query_scp::send_pending_response(), kcenon::pacs::services::retrieve_scp::send_pending_response(), kcenon::pacs::services::ups_query_scp::send_pending_response(), kcenon::pacs::services::worklist_scp::send_pending_response(), kcenon::pacs::services::print_scp::send_response(), kcenon::pacs::services::ups_watch_scu::send_watch_action(), kcenon::pacs::services::mpps_scu::set(), kcenon::pacs::services::ups_push_scu::set(), kcenon::pacs::services::print_scu::set_image_box(), kcenon::pacs::services::storage_scu::store_impl(), and TEST_CASE().

| void kcenon::pacs::network::association::set_peer | ( | association * | peer | ) |
Set peer association for in-memory testing.
Definition at line 609 of file association.cpp.
Referenced by kcenon::pacs::network::dicom_server::simulate_association_request().

| void kcenon::pacs::network::association::set_state | ( | association_state | new_state | ) |
Force state transition (for testing).
Definition at line 604 of file association.cpp.
References mutex_, and state_.
Referenced by kcenon::pacs::network::v2::dicom_association_handler::handle_associate_rq().

|
nodiscardnoexcept |
|
private |
Perform state transition.
Definition at line 669 of file association.cpp.
References can_transition_to(), and state_.
Referenced by connect(), and process_associate_ac().


| void kcenon::pacs::network::association::update_peer | ( | association * | old_peer, |
| association * | new_peer ) |
|
private |
Abort reason (if aborted)
Definition at line 625 of file association.h.
Referenced by abort(), and process_abort().
|
private |
Abort source (if aborted)
Definition at line 622 of file association.h.
Referenced by abort(), and process_abort().
|
private |
Map from abstract syntax to accepted context ID.
Definition at line 613 of file association.h.
Referenced by accepted_context_id(), build_context_map(), and has_accepted_context().
|
private |
Accepted presentation contexts.
Definition at line 610 of file association.h.
Referenced by accept(), accepted_contexts(), build_associate_ac(), build_context_map(), negotiate_contexts(), and process_associate_ac().
|
private |
Called AE Title.
Definition at line 586 of file association.h.
Referenced by accept(), build_associate_ac(), build_associate_rq(), called_ae(), and connect().
|
private |
Calling AE Title.
Definition at line 583 of file association.h.
Referenced by accept(), build_associate_ac(), build_associate_rq(), calling_ae(), and connect().
|
private |
Map from context ID to transfer syntax.
Definition at line 616 of file association.h.
Referenced by build_context_map(), context_transfer_syntax(), and send_dimse().
|
staticconstexpr |
Default timeout for operations.
Definition at line 290 of file association.h.
|
mutableprivate |
Definition at line 639 of file association.h.
Referenced by abort(), enqueue_message(), process_abort(), and receive_dimse().
|
private |
|
private |
Negotiated maximum PDU size.
Definition at line 592 of file association.h.
Referenced by accept(), build_associate_ac(), build_associate_rq(), connect(), max_pdu_size(), and process_associate_ac().
|
mutableprivate |
Thread safety mutex.
Definition at line 628 of file association.h.
Referenced by abort(), accepted_context_id(), build_associate_ac(), build_associate_rq(), called_ae(), calling_ae(), context_transfer_syntax(), get_rejection_info(), has_accepted_context(), is_closed(), is_established(), max_pdu_size(), process_abort(), process_associate_ac(), process_associate_rj(), process_release_rp(), process_release_rq(), receive_dimse(), release(), remote_implementation_class(), remote_implementation_version(), send_dimse(), set_peer(), set_state(), state(), update_peer(), and ~association().
|
private |
Our AE Title (may be calling or called depending on role)
Definition at line 589 of file association.h.
|
private |
Our implementation class UID.
Definition at line 595 of file association.h.
Referenced by accept(), build_associate_ac(), build_associate_rq(), and connect().
|
private |
Our implementation version name.
Definition at line 598 of file association.h.
Referenced by accept(), build_associate_ac(), build_associate_rq(), and connect().
|
private |
Peer association for in-memory testing.
Definition at line 634 of file association.h.
Referenced by send_dimse(), set_peer(), and update_peer().
|
private |
Proposed presentation contexts (SCU)
Definition at line 607 of file association.h.
Referenced by build_associate_rq(), connect(), and process_associate_ac().
|
private |
Rejection information (if rejected)
Definition at line 619 of file association.h.
Referenced by get_rejection_info(), and process_associate_rj().
|
private |
Remote implementation class UID.
Definition at line 601 of file association.h.
Referenced by accept(), process_associate_ac(), and remote_implementation_class().
|
private |
Remote implementation version name.
Definition at line 604 of file association.h.
Referenced by accept(), process_associate_ac(), and remote_implementation_version().
|
private |
Current state.
Definition at line 580 of file association.h.
Referenced by abort(), accept(), can_transition_to(), is_closed(), is_established(), process_abort(), process_associate_ac(), process_associate_rj(), process_release_rp(), process_release_rq(), receive_dimse(), release(), send_dimse(), set_state(), state(), transition(), and ~association().