|
PACS System 0.1.0
PACS DICOM system library
|
Job for decoding raw PDU bytes. More...
#include <pdu_decode_job.h>


Public Types | |
| using | decode_callback = std::function<void(const decoded_pdu& pdu)> |
| Callback type for decoded PDU. | |
| using | error_callback |
| Callback type for decode errors. | |
Public Member Functions | |
| pdu_decode_job (uint64_t session_id, std::vector< uint8_t > raw_data, decode_callback on_decoded=nullptr, error_callback on_error=nullptr) | |
| Construct a decode job. | |
| ~pdu_decode_job () override=default | |
| pdu_decode_job (const pdu_decode_job &)=delete | |
| pdu_decode_job & | operator= (const pdu_decode_job &)=delete |
| pdu_decode_job (pdu_decode_job &&)=default | |
| pdu_decode_job & | operator= (pdu_decode_job &&)=default |
| auto | execute (pipeline_coordinator &coordinator) -> VoidResult override |
| Execute the decode job. | |
| auto | get_context () const noexcept -> const job_context &override |
| Get the job context. | |
| auto | get_context () noexcept -> job_context &override |
| Get the job context (mutable) | |
| auto | get_name () const -> std::string override |
| Get the job name. | |
| auto | get_raw_data () const noexcept -> const std::vector< uint8_t > & |
| Get the raw PDU data. | |
Public Member Functions inherited from kcenon::pacs::network::pipeline::pipeline_job_base | |
| virtual | ~pipeline_job_base ()=default |
| Virtual destructor. | |
Private Member Functions | |
| auto | decode_pdu () -> Result< decoded_pdu > |
| Internal decode method. | |
Private Attributes | |
| job_context | context_ |
| std::vector< uint8_t > | raw_data_ |
| decode_callback | on_decoded_ |
| error_callback | on_error_ |
Additional Inherited Members | |
Protected Member Functions inherited from kcenon::pacs::network::pipeline::pipeline_job_base | |
| pipeline_job_base ()=default | |
| pipeline_job_base (const pipeline_job_base &)=delete | |
| pipeline_job_base & | operator= (const pipeline_job_base &)=delete |
| pipeline_job_base (pipeline_job_base &&)=default | |
| pipeline_job_base & | operator= (pipeline_job_base &&)=default |
Job for decoding raw PDU bytes.
Stage 2 of the pipeline. Decodes PDU bytes and submits the decoded result to the DIMSE processing stage.
Definition at line 66 of file pdu_decode_job.h.
| using kcenon::pacs::network::pipeline::pdu_decode_job::decode_callback = std::function<void(const decoded_pdu& pdu)> |
Callback type for decoded PDU.
Definition at line 69 of file pdu_decode_job.h.
Callback type for decode errors.
Definition at line 72 of file pdu_decode_job.h.
| kcenon::pacs::network::pipeline::pdu_decode_job::pdu_decode_job | ( | uint64_t | session_id, |
| std::vector< uint8_t > | raw_data, | ||
| decode_callback | on_decoded = nullptr, | ||
| error_callback | on_error = nullptr ) |
Construct a decode job.
| session_id | The session/connection identifier |
| raw_data | The raw PDU bytes to decode |
| on_decoded | Callback to invoke when PDU is decoded |
| on_error | Callback to invoke on errors |
Definition at line 20 of file pdu_decode_job.cpp.
References kcenon::pacs::network::pipeline::job_context::category, context_, kcenon::pacs::network::pipeline::job_context::enqueue_time_ns, kcenon::pacs::network::pipeline::other, kcenon::pacs::network::pipeline::pdu_decode, kcenon::pacs::network::pipeline::job_context::session_id, and kcenon::pacs::network::pipeline::job_context::stage.
|
overridedefault |
|
delete |
|
default |
|
nodiscardprivate |
Internal decode method.
Definition at line 107 of file pdu_decode_job.cpp.
References kcenon::pacs::network::pipeline::decoded_pdu::data, kcenon::pacs::error_codes::incomplete_pdu, kcenon::pacs::error_codes::insufficient_data, kcenon::pacs::network::pipeline::decoded_pdu::is_last_fragment, kcenon::pacs::network::p_data_tf, kcenon::pacs::pacs_error(), kcenon::pacs::network::pipeline::decoded_pdu::presentation_context_id, kcenon::pacs::network::pipeline::decoded_pdu::session_id, and kcenon::pacs::network::pipeline::decoded_pdu::type.

|
nodiscardoverridevirtual |
Execute the decode job.
Decodes the PDU and submits to the DIMSE processing stage.
| coordinator | Pipeline coordinator for stage submission |
Implements kcenon::pacs::network::pipeline::pipeline_job_base.
Definition at line 38 of file pdu_decode_job.cpp.
References kcenon::pacs::network::abort, kcenon::pacs::network::associate_ac, kcenon::pacs::network::associate_rj, kcenon::pacs::network::associate_rq, kcenon::pacs::network::pipeline::association, kcenon::pacs::network::pipeline::dimse_process, kcenon::pacs::error_codes::insufficient_data, kcenon::pacs::pacs_void_error(), kcenon::pacs::network::release_rp, and kcenon::pacs::network::release_rq.

|
nodiscardoverridevirtualnoexcept |
Get the job context.
Implements kcenon::pacs::network::pipeline::pipeline_job_base.
Definition at line 88 of file pdu_decode_job.cpp.
References context_.
|
nodiscardoverridevirtualnoexcept |
Get the job context (mutable)
Implements kcenon::pacs::network::pipeline::pipeline_job_base.
Definition at line 92 of file pdu_decode_job.cpp.
References context_.
|
nodiscardoverridevirtual |
Get the job name.
Implements kcenon::pacs::network::pipeline::pipeline_job_base.
Definition at line 96 of file pdu_decode_job.cpp.
References context_, raw_data_, and kcenon::pacs::network::pipeline::job_context::session_id.
|
nodiscardnoexcept |
Get the raw PDU data.
Definition at line 102 of file pdu_decode_job.cpp.
References raw_data_.
|
delete |
|
default |
|
private |
Definition at line 123 of file pdu_decode_job.h.
Referenced by get_context(), get_context(), get_name(), and pdu_decode_job().
|
private |
Definition at line 125 of file pdu_decode_job.h.
|
private |
Definition at line 126 of file pdu_decode_job.h.
|
private |
Definition at line 124 of file pdu_decode_job.h.
Referenced by get_name(), and get_raw_data().