PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
kcenon::pacs::integration Namespace Reference

Namespaces

namespace  metrics
 

Classes

struct  connection_config
 Configuration for client connections. More...
 
class  container_adapter
 
class  dicom_session
 DICOM session wrapper for network_system sessions. More...
 
struct  error_info
 Simple error info for fallback when common_system is unavailable. More...
 
class  lambda_job
 IJob implementation that wraps a callable. More...
 
class  logger_adapter
 Adapter for DICOM audit logging using logger_system. More...
 
struct  logger_config
 Configuration options for the logger adapter. More...
 
class  monitoring_adapter
 Adapter for PACS performance metrics and distributed tracing. More...
 
struct  monitoring_config
 Configuration options for the monitoring adapter. More...
 
class  network_adapter
 Adapter for integrating network_system for DICOM protocol. More...
 
struct  pdu_data
 Container for received PDU data. More...
 
class  Result
 Simple result type for error handling when common_system is unavailable. More...
 
class  thread_pool_adapter
 Concrete implementation of thread_pool_interface. More...
 
struct  thread_pool_config
 Configuration options for the thread pool. More...
 
class  thread_pool_executor_adapter
 IExecutor implementation using kcenon::thread::thread_pool. More...
 
class  thread_pool_interface
 
struct  tls_config
 Configuration for TLS/SSL secure transport. More...
 

Enumerations

enum class  log_level {
  trace = 0 , debug = 1 , info = 2 , warn = 3 ,
  error = 4 , fatal = 5 , off = 6
}
 Log severity levels. More...
 
enum class  storage_status {
  success , out_of_resources , dataset_error , cannot_understand ,
  processing_failure , duplicate_rejected , duplicate_stored , unknown_error
}
 Status of DICOM C-STORE operations. More...
 
enum class  move_status {
  success , partial_success , refused_out_of_resources , refused_move_destination_unknown ,
  identifier_does_not_match , unable_to_process , cancelled , unknown_error
}
 Status of DICOM C-MOVE operations. More...
 
enum class  query_level {
  patient , study , series , image ,
  patient , study , series , image
}
 DICOM query retrieve level. More...
 
enum class  security_event_type {
  authentication_success , authentication_failure , access_denied , configuration_change ,
  data_export , association_rejected , invalid_request
}
 Types of security events for audit logging. More...
 
enum class  query_level {
  patient , study , series , image ,
  patient , study , series , image
}
 
enum class  job_priority { critical = 0 , high = 1 , normal = 2 , low = 3 }
 Priority levels for job scheduling. More...
 

Functions

std::shared_ptr< kcenon::common::interfaces::IExecutor > make_executor (std::shared_ptr< thread_pool_interface > pool_interface)
 Create an IExecutor from a thread_pool_interface.
 

Enumeration Type Documentation

◆ job_priority

Priority levels for job scheduling.

Jobs with higher priority (lower numeric value) are processed first. This enables critical DICOM operations to be handled with urgency.

Enumerator
critical 

C-ECHO, association handling - highest priority.

high 

C-STORE responses.

normal 

C-FIND queries.

low 

Background tasks (cleanup, maintenance)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/integration/thread_pool_adapter.h, and /home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/integration/thread_pool_interface.h.

Definition at line 42 of file thread_pool_interface.h.

42 {
43 critical = 0,
44 high = 1,
45 normal = 2,
46 low = 3
47};
@ critical
C-ECHO, association handling - highest priority.

◆ log_level

◆ move_status

Status of DICOM C-MOVE operations.

Enumerator
success 
partial_success 
refused_out_of_resources 
refused_move_destination_unknown 
identifier_does_not_match 
unable_to_process 
cancelled 
unknown_error 
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/integration/logger_adapter.h.

Definition at line 70 of file logger_adapter.h.

◆ query_level [1/2]

DICOM query retrieve level.

DICOM query retrieve level for metrics.

Enumerator
patient 
study 
series 
image 
patient 
study 
series 
image 

Definition at line 88 of file logger_adapter.h.

88{ patient, study, series, image };

◆ query_level [2/2]

Enumerator
patient 
study 
series 
image 
patient 
study 
series 
image 

Definition at line 43 of file monitoring_adapter.h.

43{ patient, study, series, image };

◆ security_event_type

Types of security events for audit logging.

Enumerator
authentication_success 
authentication_failure 
access_denied 
configuration_change 
data_export 
association_rejected 
invalid_request 
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/integration/logger_adapter.h.

Definition at line 95 of file logger_adapter.h.

◆ storage_status

Status of DICOM C-STORE operations.

Enumerator
success 
out_of_resources 
dataset_error 
cannot_understand 
processing_failure 
duplicate_rejected 
duplicate_stored 
unknown_error 

Definition at line 55 of file logger_adapter.h.

Function Documentation

◆ make_executor()

std::shared_ptr< kcenon::common::interfaces::IExecutor > kcenon::pacs::integration::make_executor ( std::shared_ptr< thread_pool_interface > pool_interface)
nodiscard

Create an IExecutor from a thread_pool_interface.

Factory function that creates an appropriate executor adapter from a thread_pool_interface implementation.

Parameters
pool_interfaceThe thread pool interface to wrap
Returns
Shared pointer to IExecutor implementation

Definition at line 251 of file executor_adapter.cpp.

251 {
252 if (!pool_interface) {
253 throw std::invalid_argument("Pool interface cannot be null");
254 }
255
256 // Create an executor that uses the pool interface
257 // This requires creating a custom adapter that works with the interface
258
259 class interface_executor_adapter : public kcenon::common::interfaces::IExecutor {
260 public:
261 explicit interface_executor_adapter(std::shared_ptr<thread_pool_interface> pool)
262 : pool_(std::move(pool)) {}
263
265 std::unique_ptr<kcenon::common::interfaces::IJob>&& job) override {
266
267 if (!pool_ || !pool_->is_running()) {
269 kcenon::common::error_info{-1, "Pool is not running", "executor"});
270 }
271
272 auto shared_job = std::shared_ptr<kcenon::common::interfaces::IJob>(std::move(job));
273
274 auto future = pool_->submit([shared_job]() {
275 auto result = shared_job->execute();
276 if (result.is_err()) {
277 throw std::runtime_error(result.error().message);
278 }
279 });
280
281 return kcenon::common::Result<std::future<void>>::ok(std::move(future));
282 }
283
285 std::unique_ptr<kcenon::common::interfaces::IJob>&& /*job*/,
286 std::chrono::milliseconds /*delay*/) override {
287 // Not supported through interface
289 kcenon::common::error_info{-4, "Delayed execution not supported through pool interface", "executor"});
290 }
291
292 std::size_t worker_count() const override {
293 return pool_ ? pool_->get_thread_count() : 0;
294 }
295
296 bool is_running() const override {
297 return pool_ && pool_->is_running();
298 }
299
300 std::size_t pending_tasks() const override {
301 return pool_ ? pool_->get_pending_task_count() : 0;
302 }
303
304 void shutdown(bool wait_for_completion) override {
305 if (pool_) {
306 pool_->shutdown(wait_for_completion);
307 }
308 }
309
310 private:
311 std::shared_ptr<thread_pool_interface> pool_;
312 };
313
314 return std::make_shared<interface_executor_adapter>(std::move(pool_interface));
315}