pynetdicom.acse.ACSE#
- class pynetdicom.acse.ACSE(assoc: Association)[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: Association) None[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 - Trueif an A-ABORT and/or A-P-ABORT request has been received.- Return - Trueif 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.- Return the - AssociationSocket.- property acceptor: ServiceUser#
- Return the acceptor - ServiceUser.
 - property assoc: Association#
- Return the parent - Association.
 - property dul: DULServiceProvider#
- Return the - DULServiceProvider.
 - is_aborted(abort_type: str = 'both') bool[source]#
- Return - Trueif an A-ABORT and/or A-P-ABORT request has been received.- Parameters:
- abort_type (str, optional) – The type of abort to check for. If - 'both'then will return- Trueif an A-ABORT or A-P-ABORT is received (default). If- 'a-abort'then will return- Trueif an A-ABORT is received, if- 'a-p-abort'then will return- Trueif an A-P-ABORT is received.
- Returns:
- Trueif an abort is received,- Falseotherwise.
- Return type:
 
 - negotiate_association() None[source]#
- Perform an association negotiation as either the requestor or acceptor. 
 - negotiate_release() None[source]#
- Negotiate association release. - Once an A-RELEASE request has been sent any received P-DATA PDUs will be ignored. 
 - property requestor: ServiceUser#
- Return the requestor - ServiceUser.
 - send_abort(source: int) None[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_ap_abort(reason: int) None[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 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: int, source: int, diagnostic: int) None[source]#
- 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
 
 
 
 - send_release(is_response: bool = False) None[source]#
- Send an A-RELEASE (request or response) to the peer. - Parameters:
- is_response (bool, optional) – - Trueto send an A-RELEASE (response) to the peer,- Falseto send an A-RELEASE (request) to the peer (default).
 
 - property socket: AssociationSocket | None#
- Return the - AssociationSocket.
 
