servo_state
Utility functions for servo states.
Functions:
-
diagnose_servo_state–Diagnose a given servo state enum value.
-
servo_state_name–Return the canonical name for the given servo state enum value.
-
servo_state_value–Return the enum value for the given canonical servo state name.
diagnose_servo_state
diagnose_servo_state(state: ValueType) -> DiagTree
Diagnose a given servo state enum value.
For valid operational states, the diagnostic tree is of type Ok. For transient states
and invalid states, the diagnostic tree is of type Error.
Specifically, the state is only Ok if the servo state is SERVO_LOCKED or
SERVO_LOCKED_STABLE.
Parameters:
-
state(ValueType) –The servo state enum value to diagnose
Returns:
servo_state_name
servo_state_name(state: ValueType) -> str
Return the canonical name for the given servo state enum value.
servo_state_value
servo_state_value(name: str) -> ValueType
Return the enum value for the given canonical servo state name.