pynetdicom.dul.DULServiceProvider¶
- class pynetdicom.dul.DULServiceProvider(socket=None, port=None, dul_timeout=None, assoc=None)[source][source]¶
The DICOM Upper Layer Service Provider.
Three ways to call DULServiceProvider:
If a port number is given, the DUL will wait for incoming connections on this port.
If a socket is given, the DUL will use this socket as the client socket.
If neither is given, the DUL will not be able to accept connections (but will be able to initiate them.)
- artim_timer¶
The ARTIM timer
- Type
- association¶
The DUL’s current Association
- dul_from_user_queue¶
Queue of PDUs from the DUL service user to be processed by the DUL provider
- Type
- dul_to_user_queue¶
Queue of primitives from the DUL service to be processed by the DUL user
- Type
- event_queue¶
List of queued events to be processed by the state machine
- Type
- scp_socket¶
If the local AE is acting as an SCP, this is the connection from the peer AE to the SCP
- Type
- scu_socket¶
If the local AE is acting as an SCU, this is the connection from the local AE to the peer AE SCP
- Type
- state_machine¶
The DICOM Upper Layer’s State Machine
- Type
- __init__(socket=None, port=None, dul_timeout=None, assoc=None)[source][source]¶
- Parameters
socket (socket.socket, optional) – The local AE’s listen socket
port (int, optional) – The port number on which to wait for incoming connections
dul_timeout (float, optional) – The maximum amount of time to wait for connection responses (in seconds)
assoc (association.Association) – The DUL’s current Association
Methods
__init__([socket, port, dul_timeout, assoc])- param socket
The local AE's listen socket
getName()idle_timer_expired()Checks if the idle timer has expired
isAlive()Return whether the thread is alive.
isDaemon()is_alive()Return whether the thread is alive.
join([timeout])Wait until the thread terminates.
kill_dul()Immediately interrupts the thread
peek_next_pdu()Check the next PDU to be processed.
receive_pdu([wait, timeout])Get the next item to be processed out of the queue of items sent from the DUL service provider to the service user
run()The main threading.Thread run loop.
send_pdu(params)- param params -
The parameters to put on FromServiceUser [FIXME]
setDaemon(daemonic)setName(name)start()Start the thread's activity.
stop_dul()Interrupts the thread if state is "Sta1"
Attributes
daemonA boolean value indicating whether this thread is a daemon thread.
identThread identifier of this thread or None if it has not been started.
nameA string used for identification purposes only.