15#ifndef PACS_SERVICES_UPS_WATCH_SCU_HPP
16#define PACS_SERVICES_UPS_WATCH_SCU_HPP
142 explicit ups_watch_scu(std::shared_ptr<di::ILogger> logger =
nullptr);
151 std::shared_ptr<di::ILogger> logger =
nullptr);
248 network::association& assoc,
249 const std::
string& sop_instance_uid,
250 uint16_t action_type_id);
253 uint16_t event_type_id,
254 const std::
string& workitem_uid,
255 const core::dicom_dataset& dataset);
DICOM Association management per PS3.8.
UPS Watch SCU service for subscribing to events on remote systems.
event_received_callback event_callback_
network::Result< ups_result > send_watch_action(network::association &assoc, const std::string &sop_instance_uid, uint16_t action_type_id)
size_t unsubscribes_performed() const noexcept
network::Result< ups_result > subscribe(network::association &assoc, const ups_subscribe_data &data)
Subscribe to UPS workitem events (N-ACTION Type 3)
std::atomic< size_t > unsubscribes_performed_
std::function< void( const ups_watch_event &event)> event_received_callback
Callback type for received event notifications.
size_t subscribes_performed() const noexcept
ups_watch_scu_config config_
std::shared_ptr< di::ILogger > logger_
std::atomic< size_t > events_received_
void set_event_received_callback(event_received_callback cb)
Set callback for received event notifications.
ups_watch_scu & operator=(const ups_watch_scu &)=delete
ups_watch_scu(ups_watch_scu &&)=delete
ups_watch_scu(const ups_watch_scu &)=delete
network::Result< ups_result > suspend_global(network::association &assoc)
Suspend global subscription (N-ACTION Type 5)
ups_watch_scu(std::shared_ptr< di::ILogger > logger=nullptr)
Construct UPS Watch SCU with default configuration.
std::atomic< size_t > subscribes_performed_
uint16_t next_message_id() noexcept
size_t events_received() const noexcept
void reset_statistics() noexcept
std::atomic< uint16_t > message_id_counter_
network::Result< ups_result > unsubscribe(network::association &assoc, const ups_unsubscribe_data &data)
Unsubscribe from UPS workitem events (N-ACTION Type 4)
ups_watch_scu & operator=(ups_watch_scu &&)=delete
network::Result< ups_watch_event > handle_event_report(const network::dimse::dimse_message &event_rq)
Handle an N-EVENT-REPORT-RQ received from the SCP.
static ups_watch_event parse_event_dataset(uint16_t event_type_id, const std::string &workitem_uid, const core::dicom_dataset &dataset)
DICOM Dataset - ordered collection of Data Elements.
DIMSE message encoding and decoding.
Logger interface for dependency injection.
Result of a UPS SCU operation.
Data for N-ACTION subscribe request.
bool deletion_lock
Whether to request a deletion lock.
std::string workitem_uid
Workitem SOP Instance UID (empty for global subscription)
Data for N-ACTION unsubscribe request.
std::string workitem_uid
Workitem SOP Instance UID (empty for global unsubscription)
Parsed UPS event notification received from SCP.
uint16_t event_type_id
Event type ID (ups_event_state_report, ups_event_cancel_requested, etc.)
std::string workitem_uid
Workitem SOP Instance UID that triggered the event.
std::string procedure_step_state
New procedure step state (for state report events)
core::dicom_dataset event_info
Full event dataset (for custom processing)
std::string progress
Progress percentage (for progress report events)
std::chrono::system_clock::time_point timestamp
Timestamp when the event was received.
std::string cancellation_reason
Cancellation reason (for cancel requested events)
Configuration for UPS Watch SCU service.
std::chrono::milliseconds timeout
Timeout for receiving DIMSE response.
DICOM UPS (Unified Procedure Step) Push SCU service.
DICOM UPS Watch SCP service (subscription and event notification)