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

Classes

struct  category_metrics
 Metrics for a job category (e.g., C-STORE, C-FIND) More...
 
struct  decoded_pdu
 Result of PDU decoding containing the PDU type and data. More...
 
class  dimse_process_job
 Job for processing DIMSE messages. More...
 
struct  dimse_request
 Parsed DIMSE request for service execution. More...
 
struct  encoded_response
 Encoded PDU ready for network transmission. More...
 
struct  job_context
 Context information attached to pipeline jobs for tracking. More...
 
class  pdu_decode_job
 Job for decoding raw PDU bytes. More...
 
class  pipeline_adapter
 Adapter for integrating pipeline with DICOM server components. More...
 
struct  pipeline_config
 Configuration options for the pipeline coordinator. More...
 
class  pipeline_coordinator
 Coordinates the 6-stage DICOM I/O pipeline. More...
 
class  pipeline_job_base
 Base class for all pipeline jobs. More...
 
class  pipeline_metrics
 Centralized metrics collection for the entire pipeline. More...
 
class  receive_network_io_job
 Job for receiving PDU data from network connections. More...
 
class  response_encode_job
 Job for encoding DIMSE responses into PDU bytes. More...
 
class  send_network_io_job
 Job for sending PDU data over network connections. More...
 
struct  service_result
 Result from service execution. More...
 
struct  session_context
 Context for a DICOM association session. More...
 
struct  stage_metrics
 Metrics for a single pipeline stage. More...
 
class  storage_query_exec_job
 Job for executing storage and query operations. More...
 

Enumerations

enum class  dimse_command_type : uint16_t {
  c_store_rq = 0x0001 , c_store_rsp = 0x8001 , c_get_rq = 0x0010 , c_get_rsp = 0x8010 ,
  c_find_rq = 0x0020 , c_find_rsp = 0x8020 , c_move_rq = 0x0021 , c_move_rsp = 0x8021 ,
  c_echo_rq = 0x0030 , c_echo_rsp = 0x8030 , n_event_report_rq = 0x0100 , n_event_report_rsp = 0x8100 ,
  n_get_rq = 0x0110 , n_get_rsp = 0x8110 , n_set_rq = 0x0120 , n_set_rsp = 0x8120 ,
  n_action_rq = 0x0130 , n_action_rsp = 0x8130 , n_create_rq = 0x0140 , n_create_rsp = 0x8140 ,
  n_delete_rq = 0x0150 , n_delete_rsp = 0x8150 , c_cancel_rq = 0x0FFF
}
 DICOM DIMSE command types. More...
 
enum class  dimse_status : uint16_t {
  success = 0x0000 , pending = 0xFF00 , pending_warning = 0xFF01 , cancel = 0xFE00 ,
  warning_attribute_list_error = 0xB000 , warning_attribute_value_out_of_range = 0xB006 , failure_refused_out_of_resources = 0xA700 , failure_refused_sop_class_not_supported = 0x0122 ,
  failure_invalid_sop_instance = 0x0117 , failure_unable_to_process = 0xC000 , failure_more_than_one_match = 0xC100 , failure_unable_to_perform = 0xC200
}
 DICOM DIMSE status codes. More...
 
enum class  pipeline_stage : uint8_t {
  network_receive = 0 , pdu_decode = 1 , dimse_process = 2 , storage_query_exec = 3 ,
  response_encode = 4 , network_send = 5 , stage_count = 6
}
 Identifies the 6 stages of the DICOM I/O pipeline. More...
 
enum class  job_category : uint8_t {
  echo = 0 , store = 1 , find = 2 , get = 3 ,
  move = 4 , association = 5 , control = 6 , other = 7
}
 Categories for pipeline jobs used in metrics and monitoring. More...
 

Functions

constexpr auto get_stage_name (pipeline_stage stage) noexcept -> std::string_view
 Get the human-readable name of a pipeline stage.
 
constexpr auto is_blocking_stage (pipeline_stage stage) noexcept -> bool
 Check if a stage allows blocking operations.
 
constexpr auto is_network_io_stage (pipeline_stage stage) noexcept -> bool
 Check if a stage handles network I/O.
 
constexpr auto get_category_name (job_category category) noexcept -> std::string_view
 Get the human-readable name of a job category.
 

Enumeration Type Documentation

◆ dimse_command_type

DICOM DIMSE command types.

Enumerator
c_store_rq 
c_store_rsp 
c_get_rq 
c_get_rsp 
c_find_rq 
c_find_rsp 
c_move_rq 
c_move_rsp 
c_echo_rq 
c_echo_rsp 
n_event_report_rq 
n_event_report_rsp 
n_get_rq 
n_get_rsp 
n_set_rq 
n_set_rsp 
n_action_rq 
n_action_rsp 
n_create_rq 
n_create_rsp 
n_delete_rq 
n_delete_rsp 
c_cancel_rq 
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/pipeline/jobs/dimse_process_job.h, /home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/pipeline/jobs/storage_query_exec_job.h, and /home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/pipeline/pipeline_adapter.h.

Definition at line 36 of file dimse_process_job.h.

36 : uint16_t {
37 c_store_rq = 0x0001,
38 c_store_rsp = 0x8001,
39 c_get_rq = 0x0010,
40 c_get_rsp = 0x8010,
41 c_find_rq = 0x0020,
42 c_find_rsp = 0x8020,
43 c_move_rq = 0x0021,
44 c_move_rsp = 0x8021,
45 c_echo_rq = 0x0030,
46 c_echo_rsp = 0x8030,
47 n_event_report_rq = 0x0100,
48 n_event_report_rsp = 0x8100,
49 n_get_rq = 0x0110,
50 n_get_rsp = 0x8110,
51 n_set_rq = 0x0120,
52 n_set_rsp = 0x8120,
53 n_action_rq = 0x0130,
54 n_action_rsp = 0x8130,
55 n_create_rq = 0x0140,
56 n_create_rsp = 0x8140,
57 n_delete_rq = 0x0150,
58 n_delete_rsp = 0x8150,
59 c_cancel_rq = 0x0FFF,
60};

◆ dimse_status

enum class kcenon::pacs::network::pipeline::dimse_status : uint16_t
strong

DICOM DIMSE status codes.

Enumerator
success 
pending 
pending_warning 
cancel 
warning_attribute_list_error 
warning_attribute_value_out_of_range 
failure_refused_out_of_resources 
failure_refused_sop_class_not_supported 
failure_invalid_sop_instance 
failure_unable_to_process 
failure_more_than_one_match 
failure_unable_to_perform 
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/pipeline/jobs/storage_query_exec_job.h.

Definition at line 36 of file storage_query_exec_job.h.

◆ job_category

enum class kcenon::pacs::network::pipeline::job_category : uint8_t
strong

Categories for pipeline jobs used in metrics and monitoring.

Enumerator
echo 

C-ECHO verification request/response.

store 

C-STORE storage request/response.

find 

C-FIND query request/response.

get 

C-GET retrieve request/response.

move 

C-MOVE move request/response.

association 

Association management (A-ASSOCIATE, A-RELEASE, A-ABORT)

control 

Internal pipeline control messages.

other 

Unknown or other category.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/pipeline/jobs/storage_query_exec_job.h, and /home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/pipeline/metrics/pipeline_metrics.h.

Definition at line 122 of file pipeline_job_types.h.

122 : uint8_t {
124 echo = 0,
125
127 store = 1,
128
130 find = 2,
131
133 get = 3,
134
136 move = 4,
137
139 association = 5,
140
142 control = 6,
143
145 other = 7
146};
@ move
C-MOVE move request/response.
@ get
C-GET retrieve request/response.
@ echo
C-ECHO verification request/response.
@ find
C-FIND query request/response.
@ control
Internal pipeline control messages.

◆ pipeline_stage

Identifies the 6 stages of the DICOM I/O pipeline.

Each stage has dedicated worker threads optimized for its workload:

  • Network I/O stages: Low latency, non-blocking
  • Protocol stages: CPU-bound parsing/encoding
  • Execution stage: Blocking I/O allowed (database, file system)
Enumerator
network_receive 

Stage 1: Receive raw PDU bytes from network.

pdu_decode 

Stage 2: Decode PDU bytes into structured data.

dimse_process 

Stage 3: Process DIMSE messages and route requests.

storage_query_exec 

Stage 4: Execute storage/query operations (blocking allowed)

response_encode 

Stage 5: Encode response into PDU bytes.

network_send 

Stage 6: Send PDU bytes to network.

stage_count 

Total number of stages.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/pipeline/metrics/pipeline_metrics.h, /home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/pipeline/pipeline_adapter.h, and /home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/network/pipeline/pipeline_coordinator.h.

Definition at line 49 of file pipeline_job_types.h.

49 : uint8_t {
52
54 pdu_decode = 1,
55
57 dimse_process = 2,
58
61
64
66 network_send = 5,
67
69 stage_count = 6
70};
@ storage_query_exec
Stage 4: Execute storage/query operations (blocking allowed)
@ dimse_process
Stage 3: Process DIMSE messages and route requests.
@ response_encode
Stage 5: Encode response into PDU bytes.
@ network_send
Stage 6: Send PDU bytes to network.
@ network_receive
Stage 1: Receive raw PDU bytes from network.
@ pdu_decode
Stage 2: Decode PDU bytes into structured data.

Function Documentation

◆ get_category_name()

auto kcenon::pacs::network::pipeline::get_category_name ( job_category category) -> std::string_view
nodiscardconstexprnoexcept

Get the human-readable name of a job category.

Parameters
categoryThe job category
Returns
String view of the category name

Definition at line 153 of file pipeline_job_types.h.

154 {
155 switch (category) {
156 case job_category::echo:
157 return "echo";
158 case job_category::store:
159 return "store";
160 case job_category::find:
161 return "find";
162 case job_category::get:
163 return "get";
164 case job_category::move:
165 return "move";
166 case job_category::association:
167 return "association";
168 case job_category::control:
169 return "control";
170 default:
171 return "other";
172 }
173}

References association, control, echo, find, get, move, and store.

◆ get_stage_name()

auto kcenon::pacs::network::pipeline::get_stage_name ( pipeline_stage stage) -> std::string_view
nodiscardconstexprnoexcept

Get the human-readable name of a pipeline stage.

Parameters
stageThe pipeline stage
Returns
String view of the stage name

Definition at line 77 of file pipeline_job_types.h.

78 {
79 switch (stage) {
80 case pipeline_stage::network_receive:
81 return "network_receive";
82 case pipeline_stage::pdu_decode:
83 return "pdu_decode";
84 case pipeline_stage::dimse_process:
85 return "dimse_process";
86 case pipeline_stage::storage_query_exec:
87 return "storage_query_exec";
88 case pipeline_stage::response_encode:
89 return "response_encode";
90 case pipeline_stage::network_send:
91 return "network_send";
92 default:
93 return "unknown";
94 }
95}

References dimse_process, network_receive, network_send, pdu_decode, response_encode, and storage_query_exec.

Referenced by kcenon::pacs::network::pipeline::pipeline_coordinator::create_stage_pool(), kcenon::pacs::network::pipeline::pipeline_adapter::on_backpressure(), and kcenon::pacs::network::pipeline::pipeline_coordinator::start().

Here is the caller graph for this function:

◆ is_blocking_stage()

auto kcenon::pacs::network::pipeline::is_blocking_stage ( pipeline_stage stage) -> bool
nodiscardconstexprnoexcept

Check if a stage allows blocking operations.

Parameters
stageThe pipeline stage
Returns
true if blocking I/O is allowed in this stage

Definition at line 102 of file pipeline_job_types.h.

103 {
104 return stage == pipeline_stage::storage_query_exec;
105}

References storage_query_exec.

◆ is_network_io_stage()

auto kcenon::pacs::network::pipeline::is_network_io_stage ( pipeline_stage stage) -> bool
nodiscardconstexprnoexcept

Check if a stage handles network I/O.

Parameters
stageThe pipeline stage
Returns
true if this is a network I/O stage

Definition at line 112 of file pipeline_job_types.h.

113 {
114 return stage == pipeline_stage::network_receive ||
115 stage == pipeline_stage::network_send;
116}

References network_receive, and network_send.