pynetdicom.pdu_primitives.A_ASSOCIATE

class pynetdicom.pdu_primitives.A_ASSOCIATE[source]

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.

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 option
UF - User option, fixed value
C - Conditional (on user option)
M - Mandatory
MF - Mandatory, fixed value
NU - Not used
(=) - shall have same value as request or response

References

__init__() None[source]

Methods

__init__()

Attributes

application_context_name

Get or set the Application Context Name parameter.

called_ae_title

Get or set the Called AE Title parameter.

called_presentation_address

Get or set the Called Presentation Address parameter.

calling_ae_title

Get or set the Calling AE Title parameter.

calling_presentation_address

Get or set the Calling Presentation Address parameter.

diagnostic

Get or set the Diagnostic parameter.

implementation_class_uid

Get or set the Implementation Class UID as UID.

maximum_length_received

Get or set the Maximum Length Received as int.

mode

Return the Mode parameter as str.

presentation_context_definition_list

Get or set the Presentation Context Definition List.

presentation_context_definition_results_list

Get or set the Presentation Context Definition Results List.

presentation_requirements

Return the Presentation Kernel as str.

reason_str

Return the rejection reason as str.

responding_ae_title

Return the Responding AE Title parameter.

responding_presentation_address

Get the Responding Presentation Address parameter.

result

Get or set the Result parameter.

result_source

Get or set the Result Source parameter.

result_str

Return the result as str.

session_requirements

Return the Session Requirements as str.

source_str

Return the reject source as str.

user_information

Get or set the User Information parameter.

property application_context_name: UID | None

Get or set the Application Context Name parameter.

Parameters:

value (pydicom.uid.UID, bytes or str) – 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 the DICOM Standard, Part 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'

Return type:

pydicom.uid.UID

property called_ae_title: str

Get or set the Called AE Title parameter.

Parameters:

value (str or bytes) – The Called AE Title as a string or bytes object. Cannot be an empty string and will be truncated to 16 characters long

Return type:

bytes

property called_presentation_address: Tuple[str, int] | None

Get or set the Called Presentation Address parameter.

Parameters:

value ((str, int) tuple) – A tuple containing a valid TCP/IP address string and the port number as an int

property calling_ae_title: str

Get or set the Calling AE Title parameter.

Parameters:

value (str or bytes) – The Calling AE Title as a string or bytes object. Cannot be an empty string and will be truncated to 16 characters long.

Return type:

bytes

property calling_presentation_address: Tuple[str, int] | None

Get or set the Calling Presentation Address parameter.

Parameters:

value ((str, int) tuple) – A tuple containing a valid TCP/IP address string and the port number as an int

property diagnostic: int | None

Get or set the Diagnostic parameter.

Parameters:

value (int) –

If result_source is “UL service-user” then allowed values are:

  • 1: no reason given

  • 2: application context name not supported

  • 3: calling AE title not recognised

  • 7: called AE title not recognised

If result_source is “UL service-provider (ACSE related function)” then allowed values are:

  • 1: no reason given

  • 2: protocol version not supported”

If result_source is “UL service-provider (Presentation related function)” then allowed values are:

  • 1: temporary congestion

  • 2: local limit exceeded

property implementation_class_uid: UID | None

Get or set the Implementation Class UID as UID.

If the A_ASSOCIATE.user_information list contains an ImplementationClassUIDNotification item then set its implementation_class_uid value. If not then add a ImplementationClassUIDNotification item and set its implementation_class_uid value.

Parameters:

value (pydicom.uid.UID, bytes or str) – The value for the Implementation Class UID

property maximum_length_received: int | None

Get or set the Maximum Length Received as int.

If the A_ASSOCIATE.user_information list contains a MaximumLengthNotification item then set its maximum_length_received value. If not then add a MaximumLengthNotification item and set its maximum_length_received value.

Parameters:

value (int) – The maximum length of each P-DATA in bytes

property mode: str

Return the Mode parameter as str.

property presentation_context_definition_list: List[PresentationContext]

Get or set the Presentation Context Definition List.

Parameters:

value_list (list of presentation.PresentationContext) – The Presentation Contexts proposed by the Association Requestor

property presentation_context_definition_results_list: List[PresentationContext]

Get or set the Presentation Context Definition Results List.

Parameters:

value_list (list of presentation.PresentationContext) – The results of the Presentation Contexts proposal by the Association Requestor

property presentation_requirements: str

Return the Presentation Kernel as str.

property reason_str: str

Return the rejection reason as str.

property responding_ae_title: str | None

Return the Responding AE Title parameter.

property responding_presentation_address: Tuple[str, int] | None

Get the Responding Presentation Address parameter.

property result: int | None

Get or set the Result parameter.

Parameters:

value (int) –

One of the following:

  • 0: accepted

  • 1: rejected (permanent)

  • 2: rejected (transient)

Return type:

int

property result_source: int | None

Get or set the Result Source parameter.

Parameters:

value (int) –

One of the following:

  • 1: UL service-user

  • 2: UL service-provider (ACSE related function)

  • 3: UL service-provider (presentation related function)

Return type:

int

property result_str: str

Return the result as str.

property session_requirements: str

Return the Session Requirements as str.

property source_str: str

Return the reject source as str.

property user_information: List[MaximumLengthNotification | ImplementationClassUIDNotification | ImplementationVersionNameNotification | AsynchronousOperationsWindowNegotiation | SCP_SCU_RoleSelectionNegotiation | SOPClassExtendedNegotiation | UserIdentityNegotiation | SOPClassCommonExtendedNegotiation]

Get or set the User Information parameter.

Parameters:

value_list (list of user information class objects) – A list of user information objects, must contain at least MaximumLengthNotification and ImplementationClassUIDNotification