pynetdicom.association.Association

class pynetdicom.association.Association(ae, mode, local_socket=None)[source][source]

Manage an Association with a peer AE.

acceptor

Representation of the association’s acceptor AE.

Type

association.ServiceUser

acse

The Association Control Service Element provider.

Type

acse.ACSE

ae

The local AE.

Type

ae.ApplicationEntity

dimse

The DICOM Message Service Element provider.

Type

dimse.DIMSEServiceProvider

dul

The DICOM Upper Layer service provider.

Type

dul.DULServiceProvider

is_aborted

True if the association has been aborted, False otherwise.

Type

bool

is_established

True if the association has been established, False otherwise.

Type

bool

is_rejected

True if the association was rejected, False otherwise.

Type

bool

is_released

True if the association has been released, False otherwise.

Type

bool

mode

The mode of the local AE, either the association ‘requestor’ or association ‘acceptor’.

Type

str

requestor

Representation of the association’s requestor AE.

Type

association.ServiceUser

__init__(ae, mode, local_socket=None)[source][source]

Create a new Association instance.

Association negotiation won’t begin until Association.start() is called.

Parameters
  • ae (ae.ApplicationEntity) – The local AE.

  • mode (str) – Must be “requestor” or “acceptor”.

  • local_socket (socket.socket or None) – If mode is ‘acceptor’ then this is the connection to the peer, otherwise will be None.

Methods

__init__(ae, mode[, local_socket])

Create a new Association instance.

abort()

Sends an A-ABORT to the remote AE and kills the Association.

debug_association_aborted([primitive])

Debugging information when an A-ABORT request received.

debug_association_accepted(primitive)

Debugging information when an A-ASSOCIATE accept is received.

debug_association_rejected(primitive)

Debugging information when an A-ASSOCIATE rejection received.

debug_association_released([primitive])

Debugging information when an A-RELEASE request received.

debug_association_requested(primitive)

Debugging information when an A-ASSOCIATE request received.

getName()

isAlive()

Return whether the thread is alive.

isDaemon()

is_alive()

Return whether the thread is alive.

join([timeout])

Wait until the thread terminates.

kill()

Kill the main association thread loop.

release()

Send an A-RELEASE request and initiate association release.

run()

The main Association control.

send_c_echo([msg_id])

Send a C-ECHO request to the peer AE.

send_c_find(dataset[, msg_id, priority, ...])

Send a C-FIND request to the peer AE.

send_c_get(dataset[, msg_id, priority, ...])

Send a C-GET request to the peer AE.

send_c_move(dataset, move_aet[, msg_id, ...])

Send a C-MOVE request to the peer AE.

send_c_store(dataset[, msg_id, priority, ...])

Send a C-STORE request to the peer AE.

send_n_action(dataset, action_type, ...[, ...])

Send an N-ACTION request message to the peer AE.

send_n_create(dataset, class_uid, instance_uid)

Send an N-CREATE request message to the peer AE.

send_n_delete(class_uid, instance_uid[, msg_id])

Send an N-DELETE request message to the peer AE.

send_n_event_report(dataset, event_type, ...)

Send an N-EVENT-REPORT request message to the peer AE.

send_n_get(identifier_list, class_uid, ...)

Send an N-GET request message to the peer AE.

send_n_set(dataset, class_uid, instance_uid)

Send an N-SET request message to the peer AE.

setDaemon(daemonic)

setName(name)

start()

Start the thread's activity.

Attributes

accepted_contexts

Return a list of accepted Presentation Contexts.

ae

Return the Association's parent ApplicationEntity.

daemon

A boolean value indicating whether this thread is a daemon thread.

ident

Thread identifier of this thread or None if it has not been started.

is_acceptor

Return True if the local AE is the association acceptor.

is_requestor

Return True if the local AE is the association requestor.

local

Return a dict with information about the local AE.

mode

Return the Association's mode as a str.

name

A string used for identification purposes only.

rejected_contexts

Return a list of rejected Presentation Contexts.

remote

Return a dict with information about the peer AE.