18#ifndef PACS_SERVICES_N_GET_SCP_HPP
19#define PACS_SERVICES_N_GET_SCP_HPP
51using n_get_handler = std::function<network::Result<core::dicom_dataset>(
52 const std::string& sop_class_uid,
53 const std::string& sop_instance_uid,
54 const std::vector<core::dicom_tag>& attribute_tags)>;
174 [[nodiscard]] std::string_view
service_name() const noexcept override;
199 network::association& assoc,
202 const std::
string& sop_class_uid,
203 const std::
string& sop_instance_uid,
204 network::dimse::status_code status,
205 core::dicom_dataset* dataset =
nullptr);
std::vector< std::string > supported_sop_classes_
network::Result< std::monostate > send_n_get_response(network::association &assoc, uint8_t context_id, uint16_t message_id, const std::string &sop_class_uid, const std::string &sop_instance_uid, network::dimse::status_code status, core::dicom_dataset *dataset=nullptr)
Send N-GET response.
void set_handler(n_get_handler handler)
Set the N-GET handler function.
std::atomic< size_t > gets_processed_
std::vector< std::string > supported_sop_classes() const override
Get supported SOP Class UIDs.
n_get_scp(std::shared_ptr< di::ILogger > logger=nullptr)
Construct N-GET SCP with optional logger.
void reset_statistics() noexcept
Reset statistics counters.
size_t gets_processed() const noexcept
Get total number of N-GET requests processed.
~n_get_scp() override=default
network::Result< std::monostate > handle_message(network::association &assoc, uint8_t context_id, const network::dimse::dimse_message &request) override
Handle an incoming N-GET-RQ message.
void add_supported_sop_class(std::string sop_class_uid)
Add a SOP Class UID that this SCP supports.
std::string_view service_name() const noexcept override
Get the service name.
const std::shared_ptr< di::ILogger > & logger() const noexcept
Get the current logger instance.
std::function< network::Result< core::dicom_dataset >( const std::string &sop_class_uid, const std::string &sop_instance_uid, const std::vector< core::dicom_tag > &attribute_tags)> n_get_handler
N-GET handler function type.
Base class for DICOM SCP (Service Class Provider) services.