pynetdicom.acse.ACSE¶
-
class
pynetdicom.acse.ACSE(assoc)¶ The Association Control Service Element (ACSE) service provider.
The ACSE protocol handles association establishment, normal release of an association and the abnormal release of an association.
-
__init__(assoc)¶ Create the ACSE service provider.
Parameters: assoc (association.Association) – The Association to provide ACSE services for.
Methods
__init__(assoc)Create the ACSE service provider. is_aborted()Return True if an A-ABORT or A-P-ABORT request has been received. is_release_requested()Return True if an A-RELEASE request has been received. negotiate_association()Perform an association negotiation as either the requestor or acceptor. negotiate_release()Negotiate association release. send_abort(source)Send an A-ABORT request to the peer. send_accept()Send an A-ASSOCIATE (accept) to the peer. send_ap_abort(reason)Send an A-P-ABORT to the peer. send_reject(result, source, diagnostic)Send an A-ASSOCIATE (reject) to the peer. send_release([is_response])Send an A-RELEASE (request or response) to the peer. send_request()Send an A-ASSOCIATE (request) to the peer. Attributes
acceptorReturn the Association’s Acceptor ServiceUser. acse_timeoutReturn the ACSE timeout. assocReturn the Association to provide ACSE services for. dulReturn the Association’s DUL instance. requestorReturn the Association’s Requestor ServiceUser. -
acceptor¶ Return the Association’s Acceptor ServiceUser.
-
acse_timeout¶ Return the ACSE timeout.
-
assoc¶ Return the Association to provide ACSE services for.
-
dul¶ Return the Association’s DUL instance.
-
is_aborted()¶ Return True if an A-ABORT or A-P-ABORT request has been received.
-
is_release_requested()¶ Return True if an A-RELEASE request has been received.
Parameters: assoc (association.Association) – The Association instance that wants to know if an A-RELEASE request has been received.
-
negotiate_association()¶ Perform an association negotiation as either the requestor or acceptor.
Parameters: assoc (association.Association) – The Association instance to perform the negotiation for.
-
negotiate_release()¶ Negotiate association release.
Once an A-RELEASE request has been sent any received P-DATA PDUs will be ignored.
-
requestor¶ Return the Association’s Requestor ServiceUser.
-
send_abort(source)¶ Send an A-ABORT request to the peer.
Parameters: source (int) – The source of the abort request
- 0x00 - the DUL service user
- 0x02 - the DUL service provider
Raises: ValueError– If the source value is invalid.
-
send_accept()¶ Send an A-ASSOCIATE (accept) to the peer.
-
send_ap_abort(reason)¶ Send an A-P-ABORT to the peer.
Parameters: reason (int) – The reason for aborting the association, one of the following:
- 0x00 - reason not specified
- 0x01 - unrecognised PDU
- 0x02 - unexpected PDU
- 0x04 - unrecognised PDU parameter
- 0x05 - unexpected PDU parameter
- 0x06 - invalid PDU parameter value
Raises: ValueError– If the reason value is invalid.
-
send_reject(result, source, diagnostic)¶ Send an A-ASSOCIATE (reject) to the peer.
Parameters: - result (int) –
The association rejection:
- 0x01 - rejected permanent
- 0x02 - rejected transient
- source (int) –
The source of the rejection:
- 0x01 - DUL service user
- 0x02 - DUL service provider (ACSE related)
- 0x03 - DUL service provider (presentation related)
- diagnostic (int) –
The reason for the rejection, if the source is 0x01:
- 0x01 - no reason given
- 0x02 - application context name not supported
- 0x03 - calling AE title not recognised
- 0x07 - called AE title not recognised
If the source is 0x02:
- 0x01 - no reason given
- 0x02 - protocol version not supported
If the source is 0x03:
- 0x01 - temporary congestion
- 0x02 - local limit exceeded
- result (int) –
-
send_release(is_response=False)¶ Send an A-RELEASE (request or response) to the peer.
Parameters: is_response (bool, optional) – True to send an A-RELEASE (response) to the peer, False to send an A-RELEASE (request) to the peer (default).
-
send_request()¶ Send an A-ASSOCIATE (request) to the peer.
-