attpcdaq.daq.models.ECCServer._get_transition¶
-
classmethod
ECCServer._get_transition(client, current_state, target_state)[source]¶ Look up the appropriate SOAP request to change the ECC server from one state to another.
Given the
current_stateand thetarget_state, this will either return the correct callable to make the transition, or it will raise an exception.Parameters: - client (EccClient) – The SOAP client. One of its methods will be returned.
- current_state (int) – The current state of the ECC state machine.
- target_state (int) – The desired final state of the ECC state machine.
Returns: The function corresponding to the requested transition. This can then be called with the appropriate arguments to change the ECC server’s state.
Return type: function
Raises: ValueError– If the requested states differ by more than one transition, or if no transition is needed.