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.
- ae¶
The local AE.
- Type
- dimse¶
The DICOM Message Service Element provider.
- dul¶
The DICOM Upper Layer service provider.
- mode¶
The mode of the local AE, either the association ‘requestor’ or association ‘acceptor’.
- Type
- requestor¶
Representation of the association’s requestor AE.
- __init__(ae, mode)[source][source]¶
Create a new
Associationinstance.The association starts in State 1 (idle). Association negotiation won’t begin until an
AssociationSocketis assigned usingset_socket()andAssociation.start_server()is called.- Parameters
ae (ae.ApplicationEntity) – The local AE.
mode (str) – Must be
"requestor"or"acceptor".
Methods
__init__(ae, mode)Create a new
Associationinstance.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
Associationthread.release()Send an A-RELEASE request and initiate association release.
request()Request an association with a peer.
run()The main
Associationreactor.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_contextsReturn a list of accepted
PresentationContexts.acse_timeoutReturn the ACSE timeout in seconds.
Return the Association's parent
ApplicationEntity.daemonA boolean value indicating whether this thread is a daemon thread.
dimse_timeoutReturn the DIMSE timeout in seconds.
identThread identifier of this thread or None if it has not been started.
is_acceptorReturn
Trueif the local AE is the association Acceptor.is_requestorReturn
Trueif the local AE is the association Requestor.localReturn a dict with information about the local AE.
Return the Association's mode as a str.
nameA string used for identification purposes only.
network_timeoutReturn the network timeout in seconds.
rejected_contextsReturn a list of rejected
PresentationContext.remoteReturn a dict with information about the peer AE.