|
PACS System 0.1.0
PACS DICOM system library
|
Job for encoding DIMSE responses into PDU bytes. More...
#include <response_encode_job.h>


Public Types | |
| using | encode_callback = std::function<void(const encoded_response& response)> |
| Callback type for encoded response. | |
| using | error_callback |
| Callback type for encoding errors. | |
Public Member Functions | |
| response_encode_job (service_result result, uint32_t max_pdu_size=16384, encode_callback on_encoded=nullptr, error_callback on_error=nullptr) | |
| Construct an encode job. | |
| ~response_encode_job () override=default | |
| response_encode_job (const response_encode_job &)=delete | |
| response_encode_job & | operator= (const response_encode_job &)=delete |
| response_encode_job (response_encode_job &&)=default | |
| response_encode_job & | operator= (response_encode_job &&)=default |
| auto | execute (pipeline_coordinator &coordinator) -> VoidResult override |
| Execute the encode 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_result () const noexcept -> const service_result & |
| Get the service result. | |
Public Member Functions inherited from kcenon::pacs::network::pipeline::pipeline_job_base | |
| virtual | ~pipeline_job_base ()=default |
| Virtual destructor. | |
Private Member Functions | |
| auto | encode_response () -> Result< std::vector< encoded_response > > |
| Encode the response into PDU bytes. | |
| auto | encode_dimse_command () -> Result< std::vector< uint8_t > > |
| Encode DIMSE command. | |
| auto | fragment_data (const std::vector< uint8_t > &data) -> std::vector< std::vector< uint8_t > > |
| Fragment large data if needed. | |
Private Attributes | |
| job_context | context_ |
| service_result | result_ |
| uint32_t | max_pdu_size_ |
| encode_callback | on_encoded_ |
| 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 encoding DIMSE responses into PDU bytes.
Stage 5 of the pipeline. Encodes service results into PDU format and submits to the network send stage.
Definition at line 62 of file response_encode_job.h.
| using kcenon::pacs::network::pipeline::response_encode_job::encode_callback = std::function<void(const encoded_response& response)> |
Callback type for encoded response.
Definition at line 65 of file response_encode_job.h.
Callback type for encoding errors.
Definition at line 68 of file response_encode_job.h.
| kcenon::pacs::network::pipeline::response_encode_job::response_encode_job | ( | service_result | result, |
| uint32_t | max_pdu_size = 16384, | ||
| encode_callback | on_encoded = nullptr, | ||
| error_callback | on_error = nullptr ) |
Construct an encode job.
| result | The service result to encode |
| max_pdu_size | Maximum PDU size for fragmentation |
| on_encoded | Callback for encoded response |
| on_error | Callback for errors |
Definition at line 20 of file response_encode_job.cpp.
References context_, kcenon::pacs::network::pipeline::job_context::enqueue_time_ns, kcenon::pacs::network::pipeline::job_context::message_id, kcenon::pacs::network::pipeline::service_result::message_id, kcenon::pacs::network::pipeline::response_encode, result_, kcenon::pacs::network::pipeline::job_context::session_id, kcenon::pacs::network::pipeline::service_result::session_id, and kcenon::pacs::network::pipeline::job_context::stage.
|
overridedefault |
|
delete |
|
default |
|
nodiscardprivate |
Encode DIMSE command.
Definition at line 216 of file response_encode_job.cpp.
References kcenon::pacs::network::pipeline::c_get_rsp, kcenon::pacs::network::pipeline::c_move_rsp, kcenon::pacs::network::pipeline::pending, and kcenon::pacs::network::pipeline::pending_warning.
|
nodiscardprivate |
Encode the response into PDU bytes.
Definition at line 102 of file response_encode_job.cpp.
References kcenon::pacs::network::pipeline::control, kcenon::pacs::network::pipeline::encoded_response::is_final, kcenon::pacs::network::pipeline::encoded_response::message_id, kcenon::pacs::network::pipeline::encoded_response::pdu_data, and kcenon::pacs::network::pipeline::encoded_response::session_id.
|
nodiscardoverridevirtual |
Execute the encode job.
Encodes the result and submits to the network send stage.
| coordinator | Pipeline coordinator for stage submission |
Implements kcenon::pacs::network::pipeline::pipeline_job_base.
Definition at line 39 of file response_encode_job.cpp.
References kcenon::pacs::network::pipeline::network_send.
|
nodiscardprivate |
Fragment large data if needed.
Definition at line 311 of file response_encode_job.cpp.
|
nodiscardoverridevirtualnoexcept |
Get the job context.
Implements kcenon::pacs::network::pipeline::pipeline_job_base.
Definition at line 83 of file response_encode_job.cpp.
References context_.
|
nodiscardoverridevirtualnoexcept |
Get the job context (mutable)
Implements kcenon::pacs::network::pipeline::pipeline_job_base.
Definition at line 87 of file response_encode_job.cpp.
References context_.
|
nodiscardoverridevirtual |
Get the job name.
Implements kcenon::pacs::network::pipeline::pipeline_job_base.
Definition at line 91 of file response_encode_job.cpp.
References context_, kcenon::pacs::network::pipeline::service_result::message_id, result_, kcenon::pacs::network::pipeline::job_context::session_id, and kcenon::pacs::network::pipeline::service_result::status.
|
nodiscardnoexcept |
|
delete |
|
default |
|
private |
Definition at line 119 of file response_encode_job.h.
Referenced by get_context(), get_context(), get_name(), and response_encode_job().
|
private |
Definition at line 121 of file response_encode_job.h.
|
private |
Definition at line 122 of file response_encode_job.h.
|
private |
Definition at line 123 of file response_encode_job.h.
|
private |
Definition at line 120 of file response_encode_job.h.
Referenced by get_name(), get_result(), and response_encode_job().