pynetdicom.pdu_primitives.A_ASSOCIATE¶
-
class
pynetdicom.pdu_primitives.
A_ASSOCIATE
¶ An A-ASSOCIATE primitive.
The establishment of an association between two AEs shall be performed through ACSE A-ASSOCIATE request, indication, response and confirmation primitives.
The initiator of the service is called the Requestor and the user that receives the request is the Acceptor.
The A-ASSOCIATE primitive is used by the DUL provider to send/receive information about the association. It gets converted to A-ASSOCIATE-RQ, -AC, -RJ PDUs that are sent to the peer DUL provider and gets deconverted from -RQ, -AC, -RJ PDUs received from the peer.
It may be better to simply extend this with methods for containing the -rq, -ac, -rj possibilities rather than creating a new AssociationInformation class, but it would require maintaining the instance across the request-accept/reject path
-rq = no Result value
-ac = Result of 0x00
-rj = Result != 0x00
Parameter
Request
Indication
Response
Confirmation
app context name
M
M(=)
M
M(=)
calling ae title
M
M(=)
M
M(=)
called ae title
M
M(=)
M
M(=)
user info
M
M(=)
M
M(=)
result
M
M(=)
source
M
diagnostic
U
C(=)
calling pres add
M
M(=)
called pres add
M
M(=)
pres contxt list
M
M(=)
pres list result
M
M(=)
mode
UF
MF(=)
resp ae title
MF
MF(=)
resp pres add
MF
MF(=)
pres/sess req
UF
UF(=)
UF
UF(=)
U - User optionUF - User option, fixed valueC - Conditional (on user option)M - MandatoryMF - Mandatory, fixed valueNU - Not used(=) - shall have same value as request or responseThe Requestor sends a request primitive to the local DICOM UL provider => peer UL => indication primitive to Acceptor.
Acceptor sends response primitive to peer UL => local UL => confirmation primitive to Requestor
The DICOM UL providers communicate with UL users using service primitives The DICOM UL providers communicate with each other using PDUs over TCP/IP
Service Procedure
An AE (DICOM UL service user) that desires the establish an association issues an A-ASSOCIATE request primitive to the DICOM UL service provider. The Requestor shall not issue any primitives except the A-ABORT request primitive until it receives an A-ASSOCIATE confirmation primitive.
The DICOM UL service provider issues an A-ASSOCIATE indication primitive to the called AE
The called AE shall accept or reject the association by sending an A-ASSOCIATE response primitive with an appropriate Result parameter. The DICOM UL service provider shall issue an A-ASSOCIATE confirmation primitive having the same Result parameter. The Result Source parameter shall be assigned “UL service-user”
If the Acceptor accepts the association, it is established and is available for use. DIMSE messages can now be exchanged.
If the Acceptor rejects the association, it shall not be established and is not available for use
If the DICOM UL service provider is not capable of supporting the requested association it shall return an A-ASSOCIATE confirmation primitive to the Requestor with an appropriate Result parameter (rejected). The Result Source parameter shall be assigned either UL service provider (ACSE) or UL service provider (Presentation). The indication primitive shall not be issued. The association shall not be established.
Either Requestor or Acceptor may disrupt the Service Procedure by issuing an A-ABORT request primitive. The remote AE receives an A-ABORT indication primitive. The association shall not be established
-
mode
¶ Fixed value of “normal”
- Type
str
-
application_context_name
¶ The application context name proposed by the requestor. Acceptor returns either the same or a different name. Returned name specifies the application context used for the Association. See PS3.8 Annex A. The application context name shall be a valid UID or UID string and for version 3 of the DICOM Standard should be ‘1.2.840.10008.3.1.1.1’
- Type
pydicom.uid.UID, bytes or str
-
calling_ae_title
¶ Identifies the Requestor of the A-ASSOCIATE service. Must be a valid AE
- Type
str or bytes
-
called_ae_title
¶ Identifies the intended Acceptor of the A-ASSOCIATE service. Must be a valid AE
- Type
str or bytes
-
responding_ae_title
¶ Identifies the AE that contains the actual acceptor of the A-ASSOCIATE service. Shall always contain the same value as the Called AE Title of the A-ASSOCIATE indication
- Type
str or bytes
-
user_information
¶ Used by Requestor and Acceptor to include AE user information. See PS3.8 Annex D and PS3.7 Annex D.3
- Type
list
-
result
¶ Provided either by the Acceptor of the A-ASSOCIATE request, the UL service provider (ACSE related) or the UL service provider (Presentation related). Indicates the result of the A-ASSOCIATE service. Allowed values are:
0: accepted
1: rejected (permanent)
2: rejected (transient)
- Type
int
-
result_source
¶ Identifies the creating source of the Result and Diagnostic parameters Allowed values are:
0: UL service-user
1: UL service-provider (ACSE related function)
2: UL service-provider (presentation related function)
- Type
int
-
diagnostic
¶ If the result parameter is 0 “rejected (permanent)” or 1 “rejected (transient)” then this supplies diagnostic information about the result. If result_source is 0 “UL service-user” then allowed values are:
0: no reason given
1: application context name not supported
2: calling AE title not recognised
3: called AE title not recognised
If result_source is 1 “UL service-provider (ACSE related function)” then allowed values are:
0: no reason given
1: no common UL version
If result_source is 2 “UL service-provider (presentation related function)” then allowed values are:
0: no reason given
1: temporary congestion
2: local limit exceeded
3: called presentation address unknown
4: presentation protocol version not supported
5: no presentation service access point available
- Type
int
-
calling_presentation_address
¶ TCP/IP address of the Requestor
- Type
str
-
called_presentation_address
¶ TCP/IP address of the intended Acceptor
- Type
str
-
responding_presentation_address
¶ Shall always contain the same value as the Called Presentation Address
- Type
str
-
presentation_context_definition_list
¶ List of one or more presentation contexts, with each item containing a presentation context ID, an Abstract Syntax and a list of one or more Transfer Syntax Names. Sent by the Requestor during request/indication
- Type
list
-
presentation_context_definition_results_list
¶ Used in response/confirmation to indicate acceptance or rejection of each presentation context definition. List of result values, with a one-to-one correspondence between each of the presentation contexts proposed in the Presentation Context Definition List parameter. The result values may be sent in any order and may be different than the order proposed. Only one Transfer Syntax per presentation context shall be agreed to
- Type
list
-
presentation_requirements
¶ Fixed value of “Presentation Kernel”
- Type
str
-
session_requirements
¶ Fixed value of “” (empty string)
- Type
str
References
DICOM Standard, Part 8, Section 7.1.1
-
__init__
()¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
()Initialize self.
Attributes
Return the Application Context Name parameter.
Return the Called AE Title parameter.
Return the Called Presentation Address parameter.
Return the Calling AE Title parameter.
Return the Calling Presentation Address parameter.
Return the Diagnostic parameter.
Return the Implementation Class UID.
Get the Maximum Length Received.
Return the Mode parameter.
Get the Presentation Context Definition List.
Get the Presentation Context Definition Results List.
Get the Presentation Kernel.
Return the rejection reason as str.
Return the Responding AE Title parameter.
Get the Responding Presentation Address parameter.
Return te Result parameter.
Return the Result Source parameter.
Return the result as str.
Get the Session Requirements.
Return the reject source as str.
Return the User Information parameter.
-
property
application_context_name
Return the Application Context Name parameter.
-
property
called_ae_title
Return the Called AE Title parameter.
-
property
called_presentation_address
Return the Called Presentation Address parameter.
-
property
calling_ae_title
Return the Calling AE Title parameter.
-
property
calling_presentation_address
Return the Calling Presentation Address parameter.
-
property
diagnostic
Return the Diagnostic parameter.
-
property
implementation_class_uid
¶ Return the Implementation Class UID.
-
property
maximum_length_received
¶ Get the Maximum Length Received.
-
property
mode
Return the Mode parameter.
-
property
presentation_context_definition_list
Get the Presentation Context Definition List.
-
property
presentation_context_definition_results_list
Get the Presentation Context Definition Results List.
-
property
presentation_requirements
Get the Presentation Kernel.
-
property
reason_str
¶ Return the rejection reason as str.
-
property
responding_ae_title
Return the Responding AE Title parameter.
-
property
responding_presentation_address
Get the Responding Presentation Address parameter.
-
property
result
Return te Result parameter.
-
property
result_source
Return the Result Source parameter.
-
property
result_str
¶ Return the result as str.
-
property
session_requirements
Get the Session Requirements.
-
property
source_str
¶ Return the reject source as str.
-
property
user_information
Return the User Information parameter.