pynetdicom.association.Association

class pynetdicom.association.Association(ae, mode)[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)[source][source]

Create a new Association instance.

The association starts in State 1 (idle). Association negotiation won’t begin until an AssociationSocket is assigned using set_socket() and Association.start_server() is called.

Parameters

Methods

__init__(ae, mode)

Create a new Association instance.

abort()

Send an A-ABORT to the remote AE and kill the Association.

bind(event, handler)

Bind a callable handler to an event.

getName()

get_events()

Return a list of currently bound events.

get_handlers(event)

Return handlers bound to a specific event.

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 Association thread.

release()

Send an A-RELEASE request and initiate association release.

request()

Request an association with a peer.

run()

The main Association reactor.

send_c_cancel(msg_id, context_id)

Send a C-CANCEL request to the peer AE.

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[, ...])

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)

set_socket(socket)

Set the socket to use for communicating with the peer.

start()

Start the thread's activity.

unbind(event, handler)

Unbind a callable func from an event.

Attributes

accepted_contexts

Return a list of accepted PresentationContexts.

acse_timeout

Return the ACSE timeout in seconds.

ae

Return the Association's parent ApplicationEntity.

daemon

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

dimse_timeout

Return the DIMSE timeout in seconds.

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.

network_timeout

Return the network timeout in seconds.

rejected_contexts

Return a list of rejected PresentationContext.

remote

Return a dict with information about the peer AE.