pynetdicom.fsm.StateMachine

class pynetdicom.fsm.StateMachine(dul: DULServiceProvider)[source]

Implementation of the DICOM Upper Layer State Machine.

current_state

The current state of the state machine, 'Sta1' to 'Sta13'.

Type:

str

dul

The DICOM Upper Layer service instance for the local AE

Type:

dul.DULServiceProvider

References

__init__(dul: DULServiceProvider)[source]

Create a new StateMachine.

Parameters:

dul (dul.DULServiceProvider) – The DICOM Upper Layer Service instance for the association.

Methods

__init__(dul)

Create a new StateMachine.

do_action(event)

Execute the action triggered by event.

transition(state)

Transition the state machine to the next state.

do_action(event: str) None[source]

Execute the action triggered by event.

Parameters:

event (str) – The event to be processed, 'Evt1' to 'Evt19'

transition(state: str) None[source]

Transition the state machine to the next state.

Parameters:

state (str) – The state to transition to, 'Sta1' to 'Sta13'.

Raises:

ValueError – If state is not a valid state.