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

Public Member Functions | |
| ups_push_scu (std::shared_ptr< di::ILogger > logger=nullptr) | |
| Construct UPS Push SCU with default configuration. | |
| ups_push_scu (const ups_push_scu_config &config, std::shared_ptr< di::ILogger > logger=nullptr) | |
| Construct UPS Push SCU with custom configuration. | |
| ~ups_push_scu ()=default | |
| ups_push_scu (const ups_push_scu &)=delete | |
| ups_push_scu & | operator= (const ups_push_scu &)=delete |
| ups_push_scu (ups_push_scu &&)=delete | |
| ups_push_scu & | operator= (ups_push_scu &&)=delete |
| network::Result< ups_result > | create (network::association &assoc, const ups_create_data &data) |
| Create a new UPS workitem on the remote SCP (N-CREATE) | |
| network::Result< ups_result > | set (network::association &assoc, const ups_set_data &data) |
| Modify an existing UPS workitem (N-SET) | |
| network::Result< ups_result > | get (network::association &assoc, const ups_get_data &data) |
| Retrieve UPS workitem attributes from remote SCP (N-GET) | |
| network::Result< ups_result > | change_state (network::association &assoc, const ups_change_state_data &data) |
| Change UPS workitem state (N-ACTION Type 1) | |
| network::Result< ups_result > | request_cancel (network::association &assoc, const ups_request_cancel_data &data) |
| Request cancellation of a UPS workitem (N-ACTION Type 3) | |
| size_t | creates_performed () const noexcept |
| size_t | sets_performed () const noexcept |
| size_t | gets_performed () const noexcept |
| size_t | actions_performed () const noexcept |
| void | reset_statistics () noexcept |
Private Member Functions | |
| core::dicom_dataset | build_create_dataset (const ups_create_data &data) const |
| core::dicom_dataset | build_change_state_dataset (const ups_change_state_data &data) const |
| core::dicom_dataset | build_request_cancel_dataset (const ups_request_cancel_data &data) const |
| std::string | generate_workitem_uid () const |
| uint16_t | next_message_id () noexcept |
Private Attributes | |
| std::shared_ptr< di::ILogger > | logger_ |
| ups_push_scu_config | config_ |
| std::atomic< uint16_t > | message_id_counter_ {1} |
| std::atomic< size_t > | creates_performed_ {0} |
| std::atomic< size_t > | sets_performed_ {0} |
| std::atomic< size_t > | gets_performed_ {0} |
| std::atomic< size_t > | actions_performed_ {0} |
Definition at line 229 of file ups_push_scu.h.
|
explicit |
Construct UPS Push SCU with default configuration.
| logger | Logger instance (nullptr uses null_logger) |
Definition at line 78 of file ups_push_scu.cpp.
|
explicit |
Construct UPS Push SCU with custom configuration.
| config | Configuration options |
| logger | Logger instance (nullptr uses null_logger) |
Definition at line 81 of file ups_push_scu.cpp.
|
default |
|
delete |
|
delete |
|
nodiscardnoexcept |
Definition at line 579 of file ups_push_scu.cpp.
References actions_performed_.
|
nodiscardprivate |
Definition at line 647 of file ups_push_scu.cpp.
References kcenon::pacs::services::ups_tags::procedure_step_state, kcenon::pacs::services::ups_change_state_data::requested_state, kcenon::pacs::services::ups_change_state_data::transaction_uid, and kcenon::pacs::services::ups_tags::transaction_uid.
Referenced by change_state().

|
nodiscardprivate |
Definition at line 594 of file ups_push_scu.cpp.
References kcenon::pacs::services::ups_create_data::expected_completion_datetime, kcenon::pacs::services::ups_create_data::priority, kcenon::pacs::services::ups_create_data::procedure_step_label, kcenon::pacs::services::ups_tags::procedure_step_label, kcenon::pacs::services::ups_tags::procedure_step_state, kcenon::pacs::services::ups_tags::scheduled_procedure_step_priority, kcenon::pacs::services::ups_create_data::scheduled_start_datetime, kcenon::pacs::services::ups_create_data::scheduled_station_name, kcenon::pacs::services::ups_create_data::worklist_label, and kcenon::pacs::services::ups_tags::worklist_label.
Referenced by create().

|
nodiscardprivate |
Definition at line 666 of file ups_push_scu.cpp.
References kcenon::pacs::services::ups_request_cancel_data::reason, and kcenon::pacs::services::ups_tags::reason_for_cancellation.
Referenced by request_cancel().

|
nodiscard |
Change UPS workitem state (N-ACTION Type 1)
Requests a state transition for the specified workitem. Valid transitions: SCHEDULED→IN PROGRESS, IN PROGRESS→COMPLETED, IN PROGRESS→CANCELED, SCHEDULED→CANCELED.
| assoc | The established association to use |
| data | The state change data including Transaction UID |
Definition at line 375 of file ups_push_scu.cpp.
References kcenon::pacs::network::association::accepted_context_id(), actions_performed_, kcenon::pacs::error_codes::association_not_established, build_change_state_dataset(), config_, kcenon::pacs::services::ups_result::elapsed, kcenon::pacs::services::ups_result::error_comment, kcenon::pacs::network::association::is_established(), kcenon::pacs::services::ups_result::is_success(), logger_, next_message_id(), kcenon::pacs::pacs_error(), kcenon::pacs::network::association::receive_dimse(), kcenon::pacs::services::ups_change_state_data::requested_state, kcenon::pacs::network::association::send_dimse(), kcenon::pacs::services::ups_result::status, kcenon::pacs::services::ups_push_scu_config::timeout, kcenon::pacs::services::to_string(), kcenon::pacs::services::ups_change_state_data::transaction_uid, kcenon::pacs::services::ups_action_change_state, kcenon::pacs::error_codes::ups_context_not_accepted, kcenon::pacs::error_codes::ups_missing_transaction_uid, kcenon::pacs::error_codes::ups_missing_uid, kcenon::pacs::services::ups_push_sop_class_uid, kcenon::pacs::error_codes::ups_unexpected_command, kcenon::pacs::services::ups_change_state_data::workitem_uid, and kcenon::pacs::services::ups_result::workitem_uid.

|
nodiscard |
Create a new UPS workitem on the remote SCP (N-CREATE)
Creates a new workitem with SCHEDULED state. If workitem_uid is empty and auto_generate_uid is true, a unique UID will be generated.
| assoc | The established association to use |
| data | The workitem creation data |
Definition at line 90 of file ups_push_scu.cpp.
References kcenon::pacs::network::association::accepted_context_id(), kcenon::pacs::error_codes::association_not_established, kcenon::pacs::services::ups_push_scu_config::auto_generate_uid, build_create_dataset(), config_, creates_performed_, kcenon::pacs::services::ups_result::elapsed, kcenon::pacs::services::ups_result::error_comment, generate_workitem_uid(), kcenon::pacs::network::association::is_established(), kcenon::pacs::services::ups_result::is_success(), logger_, next_message_id(), kcenon::pacs::pacs_error(), kcenon::pacs::network::association::receive_dimse(), kcenon::pacs::network::association::send_dimse(), kcenon::pacs::services::ups_result::status, kcenon::pacs::services::ups_push_scu_config::timeout, kcenon::pacs::services::to_string(), uid, kcenon::pacs::error_codes::ups_context_not_accepted, kcenon::pacs::error_codes::ups_missing_uid, kcenon::pacs::services::ups_push_sop_class_uid, kcenon::pacs::error_codes::ups_unexpected_command, kcenon::pacs::services::ups_create_data::workitem_uid, and kcenon::pacs::services::ups_result::workitem_uid.
Referenced by operator=().


|
nodiscardnoexcept |
Definition at line 567 of file ups_push_scu.cpp.
References creates_performed_.
|
nodiscardprivate |
Definition at line 686 of file ups_push_scu.cpp.
Referenced by create().

|
nodiscard |
Retrieve UPS workitem attributes from remote SCP (N-GET)
| assoc | The established association to use |
| data | The query data including workitem UID and optional tags |
Definition at line 276 of file ups_push_scu.cpp.
References kcenon::pacs::network::association::accepted_context_id(), kcenon::pacs::error_codes::association_not_established, kcenon::pacs::services::ups_get_data::attribute_tags, kcenon::pacs::services::ups_result::attributes, config_, kcenon::pacs::services::ups_result::elapsed, kcenon::pacs::services::ups_result::error_comment, kcenon::pacs::core::dicom_dataset::get(), gets_performed_, kcenon::pacs::network::association::is_established(), kcenon::pacs::services::ups_result::is_success(), logger_, next_message_id(), kcenon::pacs::pacs_error(), kcenon::pacs::network::association::receive_dimse(), kcenon::pacs::network::association::send_dimse(), kcenon::pacs::services::ups_result::status, kcenon::pacs::services::ups_push_scu_config::timeout, kcenon::pacs::services::to_string(), kcenon::pacs::error_codes::ups_context_not_accepted, kcenon::pacs::error_codes::ups_missing_uid, kcenon::pacs::services::ups_push_sop_class_uid, kcenon::pacs::error_codes::ups_unexpected_command, kcenon::pacs::services::ups_get_data::workitem_uid, and kcenon::pacs::services::ups_result::workitem_uid.

|
nodiscardnoexcept |
Definition at line 575 of file ups_push_scu.cpp.
References gets_performed_.
|
nodiscardprivatenoexcept |
Definition at line 698 of file ups_push_scu.cpp.
References message_id_counter_.
Referenced by change_state(), create(), get(), request_cancel(), and set().

|
delete |
|
delete |
|
nodiscard |
Request cancellation of a UPS workitem (N-ACTION Type 3)
| assoc | The established association to use |
| data | The cancellation request data |
Definition at line 471 of file ups_push_scu.cpp.
References kcenon::pacs::network::association::accepted_context_id(), actions_performed_, kcenon::pacs::error_codes::association_not_established, build_request_cancel_dataset(), config_, kcenon::pacs::services::ups_result::elapsed, kcenon::pacs::services::ups_result::error_comment, kcenon::pacs::network::association::is_established(), kcenon::pacs::services::ups_result::is_success(), logger_, next_message_id(), kcenon::pacs::pacs_error(), kcenon::pacs::services::ups_request_cancel_data::reason, kcenon::pacs::network::association::receive_dimse(), kcenon::pacs::network::association::send_dimse(), kcenon::pacs::services::ups_result::status, kcenon::pacs::services::ups_push_scu_config::timeout, kcenon::pacs::services::to_string(), kcenon::pacs::services::ups_action_request_cancel, kcenon::pacs::error_codes::ups_context_not_accepted, kcenon::pacs::error_codes::ups_missing_uid, kcenon::pacs::services::ups_push_sop_class_uid, kcenon::pacs::error_codes::ups_unexpected_command, kcenon::pacs::services::ups_request_cancel_data::workitem_uid, and kcenon::pacs::services::ups_result::workitem_uid.

|
noexcept |
Definition at line 583 of file ups_push_scu.cpp.
References actions_performed_, creates_performed_, gets_performed_, and sets_performed_.
|
nodiscard |
Modify an existing UPS workitem (N-SET)
| assoc | The established association to use |
| data | The modification data including workitem UID and dataset |
Definition at line 189 of file ups_push_scu.cpp.
References kcenon::pacs::network::association::accepted_context_id(), kcenon::pacs::error_codes::association_not_established, config_, kcenon::pacs::services::ups_result::elapsed, kcenon::pacs::services::ups_result::error_comment, kcenon::pacs::network::association::is_established(), kcenon::pacs::services::ups_result::is_success(), logger_, kcenon::pacs::services::ups_set_data::modifications, next_message_id(), kcenon::pacs::pacs_error(), kcenon::pacs::network::association::receive_dimse(), kcenon::pacs::network::association::send_dimse(), sets_performed_, kcenon::pacs::services::ups_result::status, kcenon::pacs::services::ups_push_scu_config::timeout, kcenon::pacs::services::to_string(), kcenon::pacs::error_codes::ups_context_not_accepted, kcenon::pacs::error_codes::ups_missing_uid, kcenon::pacs::services::ups_push_sop_class_uid, kcenon::pacs::error_codes::ups_unexpected_command, kcenon::pacs::services::ups_result::workitem_uid, and kcenon::pacs::services::ups_set_data::workitem_uid.
Referenced by operator=().


|
nodiscardnoexcept |
Definition at line 571 of file ups_push_scu.cpp.
References sets_performed_.
|
private |
Definition at line 376 of file ups_push_scu.h.
Referenced by actions_performed(), change_state(), request_cancel(), and reset_statistics().
|
private |
Definition at line 371 of file ups_push_scu.h.
Referenced by change_state(), create(), get(), request_cancel(), and set().
|
private |
Definition at line 373 of file ups_push_scu.h.
Referenced by create(), creates_performed(), and reset_statistics().
|
private |
Definition at line 375 of file ups_push_scu.h.
Referenced by get(), gets_performed(), and reset_statistics().
|
private |
Definition at line 370 of file ups_push_scu.h.
Referenced by change_state(), create(), get(), request_cancel(), and set().
|
private |
|
private |
Definition at line 374 of file ups_push_scu.h.
Referenced by reset_statistics(), set(), and sets_performed().