pynetdicom.dimse.DIMSEServiceProvider¶
- class pynetdicom.dimse.DIMSEServiceProvider(dul, dimse_timeout=None, maximum_pdu_size=16382)[source][source]¶
The DIMSE service provider.
A DICOM AE uses the services provided by the DICOM Message Service Element (DIMSE). DIMSE specifies two sets of services.
DIMSE-C supports operations associated with composite SOP Classes and provides effective compatibility with the previous versions of the DICOM standards.
DIMSE-N supports operations associated with normalised SOP Classes and provides an extended set of object-orientated operations and notifications
Service Overview
The DIMSE service provider supports communication between peer DIMSE service users. A service user acts in one of two roles:
invoking DIMSE user
performing DIMSE user
Service users make use of service primitives provided by the DIMSE service provider. A service primitive shall be one of the following types:
request primitive
indication primitive
response primitive
confirmation primitive
These primitives are used as follows:
The invoking service user issues a request primitive to the DIMSE provider
The DIMSE provider receives the request primitive and issues an indication primitive to the performing service user
The performing service user receives the indication primitive and performs the requested service
The performing service user issues a response primitive to the DIMSE provider
The DIMSE provider receives the response primitive and issues a confirmation primitive to the invoking service user
The invoking service user receives the confirmation primitive, completing the DIMSE service.
Service Primitive Classes
DIMSE-C: C_ECHO, C_STORE, C_GET, C_FIND, C_MOVE
DIMSE-N: N_EVENT_REPORT, N_GET, N_GET, N_ACTION, N_CREATE, N_DELETE
Protocol Machine
PS3.7 8.1 The DIMSE protocol machine defines the procedures and the encoding rules necessary to construct Messages used to exchange command requests and responses between peer DIMSE service users.
The DIMSE protocol machine accepts service user requests and response service primitives and constructs Messages defined by the procedures in PS3.7 9.3 and 10.3. The DIMSE protocol machine accepts Messages and passes them to the DIMSE service user by the means of indication and confirmation service primitives.
Messages
Primitive
Type
Message Class
C-CANCEL
Request/indication
C_CANCEL_R
C-ECHO
Request/indication
C_ECHO_RQ
Response/confirmation
C_ECHO_RSP
C-FIND
Request/indication
C_FIND_RQ
Response/confirmation
C_FIND_RSP
C-GET
Request/indication
C_GET_RQ
Response/confirmation
C_GET_RSP
C-MOVE
Request/indication
C_MOVE_RQ
Response/confirmation
C_MOVE_RSP
C-STORE
Request/indication
C_STORE_RQ
Response/confirmation
C_STORE_RSP
N-ACTION
Request/indication
N_ACTION_RQ
Response/confirmation
N_ACTION_RSP
N-CREATE
Request/indication
N_CREATE_RQ
Response/confirmation
N_CREATE_RSP
N-DELETE
Request/indication
N_DELETE_RQ
Response/confirmation
N_DELETE_RSP
N-EVENT-REPORT
Request/indication
N_EVENT_REPORT_RQ
Response/confirmation
N_EVENT_REPORT_RSP
N-GET
Request/indication
N_GET_RQ
Response/confirmation
N_GET_RSP
N-SET
Request/indication
N_SET_RQ
Response/confirmation
N_SET_RSP
- dimse_timeout¶
The number of seconds before the DIMSE service timeout. A value of
Noneindicates no timeout.- Type
numeric or None
- dul¶
The DICOM Upper Layer service provider.
- message¶
The DIMSE message.
- Type
dimse_messages.DIMSEMessage
References
DICOM Standard, Part 7
- __init__(dul, dimse_timeout=None, maximum_pdu_size=16382)[source][source]¶
Start the DIMSE service provider.
- Parameters
dul (dul.DULServiceProvider) – The DICOM Upper Layer service provider.
dimse_timeout (int or float or None) – The number of seconds before the DIMSE service timeout. A value of None indicates no timeout.
maximum_pdu_size (int) – The maximum PDU size when sending DIMSE messages, default 16382.
Methods
__init__(dul[, dimse_timeout, maximum_pdu_size])Start the DIMSE service provider.
debug_receive_c_cancel_rq(msg)Debugging function when a C-CANCEL-RQ is received.
debug_receive_c_echo_rq(msg)Debugging function when a C-ECHO-RQ is received.
debug_receive_c_echo_rsp(msg)Debugging function when a C-ECHO-RSP is received.
debug_receive_c_find_rq(msg)Debugging function when a C-FIND-RQ is received.
debug_receive_c_find_rsp(msg)Debugging function when a C-FIND-RSP is received.
debug_receive_c_get_rq(msg)Debugging function when a C-GET-RQ is received.
debug_receive_c_get_rsp(msg)Debugging function when a C-GET-RSP is received.
debug_receive_c_move_rq(msg)Debugging function when a C-MOVE-RQ is received.
debug_receive_c_move_rsp(msg)Debugging function when a C-MOVE-RSP is received.
debug_receive_c_store_rq(msg)Debugging function when a C-STORE-RQ is received.
debug_receive_c_store_rsp(msg)Debugging function when a C-STORE-RSP is received.
debug_receive_n_action_rq(msg)Debugging function when an N-ACTION-RQ is received.
debug_receive_n_action_rsp(msg)Debugging function when an N-ACTION-RSP is received.
debug_receive_n_create_rq(msg)Debugging function when an N-CREATE-RQ is received.
debug_receive_n_create_rsp(msg)Debugging function when an N-CREATE-RSP is received.
debug_receive_n_delete_rq(msg)Debugging function when an N-DELETE-RQ is received.
debug_receive_n_delete_rsp(msg)Debugging function when an N-DELETE-RSP is received.
debug_receive_n_event_report_rq(msg)Debugging function when an N-EVENT-REPORT-RQ is received.
debug_receive_n_event_report_rsp(msg)Debugging function when an N-EVENT-REPORT-RSP is received.
debug_receive_n_get_rq(msg)Debugging function when an N-GET-RQ is received.
debug_receive_n_get_rsp(msg)Debugging function when an N-GET-RSP is received.
debug_receive_n_set_rq(msg)Debugging function when an N-SET-RQ is received.
debug_receive_n_set_rsp(msg)Debugging function when an N-SET-RSP is received.
debug_send_c_cancel_rq(msg)Debugging function when a C-CANCEL-RQ is sent.
debug_send_c_echo_rq(msg)Debugging function when a C-ECHO-RQ is sent.
debug_send_c_echo_rsp(msg)Debugging function when a C-ECHO-RSP is sent.
debug_send_c_find_rq(msg)Debugging function when a C-FIND-RQ is sent.
debug_send_c_find_rsp(msg)Debugging function when a C-FIND-RSP is sent.
debug_send_c_get_rq(msg)Debugging function when a C-GET-RQ is sent.
debug_send_c_get_rsp(msg)Debugging function when a C-GET-RSP is sent.
debug_send_c_move_rq(msg)Debugging function when a C-MOVE-RQ is sent.
debug_send_c_move_rsp(msg)Debugging function when a C-MOVE-RSP is sent.
debug_send_c_store_rq(msg)Debugging function when a C-STORE-RQ is sent.
debug_send_c_store_rsp(msg)Debugging function when a C-STORE-RSP is sent.
debug_send_n_action_rq(msg)Debugging function when an N-ACTION-RQ is sent.
debug_send_n_action_rsp(msg)Debugging function when an N-ACTION-RSP is sent.
debug_send_n_create_rq(msg)Debugging function when an N-CREATE-RQ is sent.
debug_send_n_create_rsp(msg)Debugging function when an N-CREATE-RSP is sent.
debug_send_n_delete_rq(msg)Debugging function when an N-DELETE-RQ is sent.
debug_send_n_delete_rsp(msg)Debugging function when an N-DELETE-RSP is sent.
debug_send_n_event_report_rq(msg)Debugging function when an N-EVENT-REPORT-RQ is sent.
debug_send_n_event_report_rsp(msg)Debugging function when an N-EVENT-REPORT-RSP is sent.
debug_send_n_get_rq(msg)Debugging function when an N-GET-RQ is sent.
debug_send_n_get_rsp(msg)Debugging function when an N-GET-RSP is sent.
debug_send_n_set_rq(msg)Debugging function when an N-SET-RQ is sent.
debug_send_n_set_rsp(msg)Debugging function when an N-SET-RSP is sent.
on_receive_dimse_message(message)Controls which debugging function is called when receiving.
on_send_dimse_message(message)Controls which debugging function is called when sending.
receive_msg([wait])Receive a DIMSE message from the peer.
send_msg(primitive, context_id)Send a DIMSE-C or DIMSE-N message to the peer AE.