pynetdicom.acse.ACSE¶
-
class
pynetdicom.acse.
ACSE
(assoc)[source]¶ The Association Control Service Element (ACSE) service provider.
The ACSE protocol handles association negotiation and establishment, and normal and abnormal release of an association.
-
__init__
(assoc)[source]¶ 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
([abort_type])Return
True
if an A-ABORT and/or A-P-ABORT request has been received.Return
True
if an A-RELEASE request has been received.Perform an association negotiation as either the requestor or acceptor.
Negotiate association release.
send_abort
(source)Send an A-ABORT request to the peer.
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 an A-ASSOCIATE (request) to the peer.
Attributes
Return the acceptor
ServiceUser
.Return the ACSE timeout (in seconds).
Return the parent
Association
.Return the
DULServiceProvider
.Return the requestor
ServiceUser
.-
property
acceptor
¶ Return the acceptor
ServiceUser
.
-
property
acse_timeout
¶ Return the ACSE timeout (in seconds).
-
property
assoc
¶ Return the parent
Association
.New in version 1.3.
-
property
dul
¶ Return the
DULServiceProvider
.
-
is_aborted
(abort_type='both')[source]¶ Return
True
if an A-ABORT and/or A-P-ABORT request has been received.Changed in version 1.5: Added abort_type keyword parameter.
- Parameters
abort_type (str, optional) – The type of abort to check for. If
'both'
then will returnTrue
if an A-ABORT or A-P-ABORT is received (default). If'a-abort'
then will returnTrue
if an A-ABORT is received, if'a-p-abort'
then will returnTrue
if an A-P-ABORT is received.- Returns
True
if an abort is received,False
otherwise.- Return type
-
is_release_requested
()[source]¶ Return
True
if an A-RELEASE request has been received.New in version 1.1.
-
negotiate_association
()[source]¶ Perform an association negotiation as either the requestor or acceptor.
-
negotiate_release
()[source]¶ Negotiate association release.
New in version 1.1.
Once an A-RELEASE request has been sent any received P-DATA PDUs will be ignored.
-
property
requestor
¶ Return the requestor
ServiceUser
.
-
send_abort
(source)[source]¶ Send an A-ABORT request to the peer.
- Parameters
source (int) –
The source of the abort request
0x00
- the DUL service user0x02
- the DUL service provider
- Raises
ValueError – If the source value is invalid.
-
send_ap_abort
(reason)[source]¶ Send an A-P-ABORT to the peer.
- Parameters
reason (int) –
The reason for aborting the association, one of the following:
0x00
- reason not specified0x01
- unrecognised PDU0x02
- unexpected PDU0x04
- unrecognised PDU parameter0x05
- unexpected PDU parameter0x06
- invalid PDU parameter value
- Raises
ValueError – If the reason value is invalid.
-
send_reject
(result, source, diagnostic)[source]¶ Send an A-ASSOCIATE (reject) to the peer.
- Parameters
result (int) –
The association rejection:
0x01
- rejected permanent0x02
- rejected transient
source (int) –
The source of the rejection:
0x01
- DUL service user0x02
- 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 given0x02
- application context name not supported0x03
- calling AE title not recognised0x07
- called AE title not recognised
If the source is
0x02
:0x01
- no reason given0x02
- protocol version not supported
If the source is
0x03
:0x01
- temporary congestion0x02
- local limit exceeded
-