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


Public Member Functions | |
| ups_push_scp (std::shared_ptr< di::ILogger > logger=nullptr) | |
| Construct UPS Push SCP with optional logger. | |
| ~ups_push_scp () override=default | |
| void | set_create_handler (ups_create_handler handler) |
| void | set_set_handler (ups_set_handler handler) |
| void | set_get_handler (ups_get_handler handler) |
| void | set_change_state_handler (ups_change_state_handler handler) |
| void | set_request_cancel_handler (ups_request_cancel_handler handler) |
| std::vector< std::string > | supported_sop_classes () const override |
| Get the list of SOP Class UIDs supported by this service. | |
| network::Result< std::monostate > | handle_message (network::association &assoc, uint8_t context_id, const network::dimse::dimse_message &request) override |
| Handle an incoming DIMSE message. | |
| std::string_view | service_name () const noexcept override |
| Get the service name for logging/debugging. | |
| size_t | creates_processed () const noexcept |
| size_t | sets_processed () const noexcept |
| size_t | gets_processed () const noexcept |
| size_t | actions_processed () const noexcept |
| size_t | state_changes () const noexcept |
| size_t | cancel_requests () const noexcept |
| void | reset_statistics () noexcept |
Public Member Functions inherited from kcenon::pacs::services::scp_service | |
| scp_service (std::shared_ptr< di::ILogger > logger=nullptr) | |
| Construct SCP service with optional logger. | |
| virtual | ~scp_service ()=default |
| scp_service (const scp_service &)=delete | |
| scp_service & | operator= (const scp_service &)=delete |
| scp_service (scp_service &&)=default | |
| scp_service & | operator= (scp_service &&)=default |
| void | set_logger (std::shared_ptr< di::ILogger > logger) |
| Set the logger instance. | |
| const std::shared_ptr< di::ILogger > & | logger () const noexcept |
| Get the current logger instance. | |
| bool | supports_sop_class (std::string_view sop_class_uid) const |
| Check if this service supports a specific SOP Class. | |
Private Member Functions | |
| network::Result< std::monostate > | handle_n_create (network::association &assoc, uint8_t context_id, const network::dimse::dimse_message &request) |
| network::Result< std::monostate > | handle_n_set (network::association &assoc, uint8_t context_id, const network::dimse::dimse_message &request) |
| network::Result< std::monostate > | handle_n_get (network::association &assoc, uint8_t context_id, const network::dimse::dimse_message &request) |
| network::Result< std::monostate > | handle_n_action (network::association &assoc, uint8_t context_id, const network::dimse::dimse_message &request) |
| network::Result< std::monostate > | send_n_create_response (network::association &assoc, uint8_t context_id, uint16_t message_id, const std::string &sop_instance_uid, network::dimse::status_code status) |
| network::Result< std::monostate > | send_n_set_response (network::association &assoc, uint8_t context_id, uint16_t message_id, const std::string &sop_instance_uid, network::dimse::status_code status) |
| network::Result< std::monostate > | send_n_get_response (network::association &assoc, uint8_t context_id, uint16_t message_id, const std::string &sop_instance_uid, network::dimse::status_code status, core::dicom_dataset *dataset=nullptr) |
| network::Result< std::monostate > | send_n_action_response (network::association &assoc, uint8_t context_id, uint16_t message_id, const std::string &sop_instance_uid, uint16_t action_type_id, network::dimse::status_code status) |
Private Attributes | |
| ups_create_handler | create_handler_ |
| ups_set_handler | set_handler_ |
| ups_get_handler | get_handler_ |
| ups_change_state_handler | change_state_handler_ |
| ups_request_cancel_handler | request_cancel_handler_ |
| std::atomic< size_t > | creates_processed_ {0} |
| std::atomic< size_t > | sets_processed_ {0} |
| std::atomic< size_t > | gets_processed_ {0} |
| std::atomic< size_t > | actions_processed_ {0} |
| std::atomic< size_t > | state_changes_ {0} |
| std::atomic< size_t > | cancel_requests_ {0} |
Additional Inherited Members | |
Protected Attributes inherited from kcenon::pacs::services::scp_service | |
| std::shared_ptr< di::ILogger > | logger_ |
| Logger instance for service logging. | |
Definition at line 171 of file ups_push_scp.h.
|
explicit |
Construct UPS Push SCP with optional logger.
| logger | Logger instance for service logging (nullptr uses null_logger) |
Definition at line 21 of file ups_push_scp.cpp.
|
overridedefault |
|
nodiscardnoexcept |
Definition at line 104 of file ups_push_scp.cpp.
References actions_processed_.
|
nodiscardnoexcept |
Definition at line 112 of file ups_push_scp.cpp.
References cancel_requests_.
|
nodiscardnoexcept |
Definition at line 92 of file ups_push_scp.cpp.
References creates_processed_.
|
nodiscardnoexcept |
Definition at line 100 of file ups_push_scp.cpp.
References gets_processed_.
|
nodiscardoverridevirtual |
Handle an incoming DIMSE message.
Processes the request and sends appropriate response(s) via the association.
| assoc | The association on which the message was received |
| context_id | The presentation context ID for the message |
| request | The incoming DIMSE request message |
Implements kcenon::pacs::services::scp_service.
Definition at line 56 of file ups_push_scp.cpp.
References kcenon::pacs::network::dimse::dimse_message::command(), handle_n_action(), handle_n_create(), handle_n_get(), handle_n_set(), kcenon::pacs::pacs_void_error(), kcenon::pacs::services::to_string(), and kcenon::pacs::error_codes::ups_unexpected_command.

|
nodiscardprivate |
Definition at line 365 of file ups_push_scp.cpp.
References kcenon::pacs::network::dimse::dimse_message::action_type_id(), actions_processed_, kcenon::pacs::network::dimse::dimse_message::affected_sop_instance_uid(), cancel_requests_, change_state_handler_, kcenon::pacs::network::dimse::dimse_message::dataset(), kcenon::pacs::network::dimse::dimse_message::has_dataset(), kcenon::pacs::storage::in_progress, kcenon::pacs::network::dimse::dimse_message::message_id(), kcenon::pacs::pacs_void_error(), kcenon::pacs::storage::parse_ups_state(), kcenon::pacs::services::ups_tags::procedure_step_state, kcenon::pacs::services::ups_tags::reason_for_cancellation, request_cancel_handler_, kcenon::pacs::network::dimse::dimse_message::requested_sop_instance_uid(), send_n_action_response(), state_changes_, kcenon::pacs::services::ups_tags::transaction_uid, kcenon::pacs::services::ups_action_change_state, kcenon::pacs::services::ups_action_request_cancel, kcenon::pacs::error_codes::ups_handler_not_set, and kcenon::pacs::error_codes::ups_invalid_action_type.
Referenced by handle_message().


|
nodiscardprivate |
Definition at line 129 of file ups_push_scp.cpp.
References kcenon::pacs::network::dimse::dimse_message::affected_sop_class_uid(), kcenon::pacs::network::dimse::dimse_message::affected_sop_instance_uid(), create_handler_, creates_processed_, kcenon::pacs::network::dimse::dimse_message::dataset(), kcenon::pacs::network::dimse::dimse_message::has_dataset(), kcenon::pacs::network::dimse::dimse_message::message_id(), kcenon::pacs::pacs_void_error(), kcenon::pacs::storage::parse_ups_state(), kcenon::pacs::storage::ups_workitem::priority, kcenon::pacs::services::ups_tags::procedure_step_label, kcenon::pacs::storage::ups_workitem::procedure_step_label, kcenon::pacs::services::ups_tags::procedure_step_state, kcenon::pacs::storage::scheduled, kcenon::pacs::services::ups_tags::scheduled_procedure_step_priority, send_n_create_response(), kcenon::pacs::storage::ups_workitem::state, kcenon::pacs::error_codes::ups_handler_not_set, kcenon::pacs::services::ups_push_sop_class_uid, kcenon::pacs::storage::ups_workitem::workitem_uid, kcenon::pacs::services::ups_tags::worklist_label, and kcenon::pacs::storage::ups_workitem::worklist_label.
Referenced by handle_message().


|
nodiscardprivate |
Definition at line 289 of file ups_push_scp.cpp.
References kcenon::pacs::encoding::CS, kcenon::pacs::encoding::DS, get_handler_, gets_processed_, kcenon::pacs::encoding::LO, kcenon::pacs::network::dimse::dimse_message::message_id(), kcenon::pacs::pacs_void_error(), kcenon::pacs::services::ups_tags::procedure_step_label, kcenon::pacs::services::ups_tags::procedure_step_progress, kcenon::pacs::services::ups_tags::procedure_step_state, kcenon::pacs::network::dimse::dimse_message::requested_sop_instance_uid(), kcenon::pacs::services::ups_tags::scheduled_procedure_step_priority, send_n_get_response(), kcenon::pacs::core::dicom_dataset::set_string(), kcenon::pacs::services::ups_tags::transaction_uid, kcenon::pacs::encoding::UI, kcenon::pacs::error_codes::ups_handler_not_set, and kcenon::pacs::services::ups_tags::worklist_label.
Referenced by handle_message().


|
nodiscardprivate |
Definition at line 219 of file ups_push_scp.cpp.
References kcenon::pacs::network::dimse::dimse_message::affected_sop_instance_uid(), kcenon::pacs::storage::canceled, kcenon::pacs::network::dimse::dimse_message::command_set(), kcenon::pacs::storage::completed, kcenon::pacs::network::dimse::dimse_message::dataset(), kcenon::pacs::network::dimse::dimse_message::has_dataset(), kcenon::pacs::network::dimse::dimse_message::message_id(), kcenon::pacs::pacs_void_error(), kcenon::pacs::storage::parse_ups_state(), kcenon::pacs::services::ups_tags::procedure_step_state, send_n_set_response(), set_handler_, sets_processed_, and kcenon::pacs::error_codes::ups_handler_not_set.
Referenced by handle_message().


|
noexcept |
Definition at line 116 of file ups_push_scp.cpp.
References actions_processed_, cancel_requests_, creates_processed_, gets_processed_, sets_processed_, and state_changes_.
|
nodiscardprivate |
Definition at line 559 of file ups_push_scp.cpp.
References kcenon::pacs::network::association::send_dimse(), and kcenon::pacs::services::ups_push_sop_class_uid.
Referenced by handle_n_action().


|
nodiscardprivate |
Definition at line 497 of file ups_push_scp.cpp.
References kcenon::pacs::network::association::send_dimse(), and kcenon::pacs::services::ups_push_sop_class_uid.
Referenced by handle_n_create().


|
nodiscardprivate |
Definition at line 539 of file ups_push_scp.cpp.
References kcenon::pacs::network::association::send_dimse(), and kcenon::pacs::services::ups_push_sop_class_uid.
Referenced by handle_n_get().


|
nodiscardprivate |
Definition at line 518 of file ups_push_scp.cpp.
References kcenon::pacs::network::association::send_dimse(), and kcenon::pacs::services::ups_push_sop_class_uid.
Referenced by handle_n_set().


|
nodiscardoverridevirtualnoexcept |
Get the service name for logging/debugging.
Implements kcenon::pacs::services::scp_service.
Definition at line 84 of file ups_push_scp.cpp.
| void kcenon::pacs::services::ups_push_scp::set_change_state_handler | ( | ups_change_state_handler | handler | ) |
Definition at line 40 of file ups_push_scp.cpp.
References change_state_handler_.
| void kcenon::pacs::services::ups_push_scp::set_create_handler | ( | ups_create_handler | handler | ) |
Definition at line 28 of file ups_push_scp.cpp.
References create_handler_.
| void kcenon::pacs::services::ups_push_scp::set_get_handler | ( | ups_get_handler | handler | ) |
Definition at line 36 of file ups_push_scp.cpp.
References get_handler_.
| void kcenon::pacs::services::ups_push_scp::set_request_cancel_handler | ( | ups_request_cancel_handler | handler | ) |
Definition at line 44 of file ups_push_scp.cpp.
References request_cancel_handler_.
| void kcenon::pacs::services::ups_push_scp::set_set_handler | ( | ups_set_handler | handler | ) |
Definition at line 32 of file ups_push_scp.cpp.
References set_handler_.
|
nodiscardnoexcept |
Definition at line 96 of file ups_push_scp.cpp.
References sets_processed_.
|
nodiscardnoexcept |
Definition at line 108 of file ups_push_scp.cpp.
References state_changes_.
|
nodiscardoverridevirtual |
Get the list of SOP Class UIDs supported by this service.
Implements kcenon::pacs::services::scp_service.
Definition at line 52 of file ups_push_scp.cpp.
References kcenon::pacs::services::ups_push_sop_class_uid.
|
private |
Definition at line 290 of file ups_push_scp.h.
Referenced by actions_processed(), handle_n_action(), and reset_statistics().
|
private |
Definition at line 292 of file ups_push_scp.h.
Referenced by cancel_requests(), handle_n_action(), and reset_statistics().
|
private |
Definition at line 284 of file ups_push_scp.h.
Referenced by handle_n_action(), and set_change_state_handler().
|
private |
Definition at line 281 of file ups_push_scp.h.
Referenced by handle_n_create(), and set_create_handler().
|
private |
Definition at line 287 of file ups_push_scp.h.
Referenced by creates_processed(), handle_n_create(), and reset_statistics().
|
private |
Definition at line 283 of file ups_push_scp.h.
Referenced by handle_n_get(), and set_get_handler().
|
private |
Definition at line 289 of file ups_push_scp.h.
Referenced by gets_processed(), handle_n_get(), and reset_statistics().
|
private |
Definition at line 285 of file ups_push_scp.h.
Referenced by handle_n_action(), and set_request_cancel_handler().
|
private |
Definition at line 282 of file ups_push_scp.h.
Referenced by handle_n_set(), and set_set_handler().
|
private |
Definition at line 288 of file ups_push_scp.h.
Referenced by handle_n_set(), reset_statistics(), and sets_processed().
|
private |
Definition at line 291 of file ups_push_scp.h.
Referenced by handle_n_action(), reset_statistics(), and state_changes().