State
- class State(value)[source]
Bases:
SuperEnumEnum representing the state of the village system.
- __init__(description: str) None[source]
Initializes the State enum with a description.
Methods
Attributes
- WAIT = 'All subjects are at home, waiting for RFID detection'
- DETECTION = 'Gathering subject data, checking requirements to enter'
- ACCESS = 'Closing door1, opening door2'
- LAUNCH_AUTO = 'Automatically launching the task'
- RUN_FIRST = 'Task running, waiting for the corridor to become empty'
- CLOSE_DOOR2 = 'Closing door2'
- RUN_CLOSED = 'Task running, the subject cannot leave yet'
- OPEN_DOOR2 = 'Opening door2'
- RUN_OPENED = 'Task running, the subject can leave'
- EXIT_UNSAVED = 'Closing door2, opening door1; data still not saved'
- SAVE_OUTSIDE = 'Stopping the task, saving the data; the subject is already outside'
- SAVE_INSIDE = 'Stopping the task, saving the data; the subject is still inside'
- WAIT_EXIT = 'Task finished, waiting for the subject to leave'
- EXIT_SAVED = 'Closing door2, opening door1; data already saved'
- OPEN_DOOR2_STOP = 'Opening door2, disconnecting RFID'
- MANUAL_MODE = 'Settings are being changed or task is being manually prepared'
- LAUNCH_MANUAL = 'Manually launching the task'
- RUN_MANUAL = 'Task running manually'
- SAVE_MANUAL = 'Stopping the task, saving the data; task is running manually'
- SYNC = 'Synchronizing data or doing user-defined tasks'
- EXIT_GUI = 'In the GUI window, ready to exit the app'
- can_exit() bool[source]
Checks if the system can exit in this state.
- Returns:
True if exit is allowed.
- Return type:
bool
- can_edit_data() bool[source]
Checks if data editing is allowed in this state.
- Returns:
True if editing is allowed.
- Return type:
bool
- can_calibrate_scale() bool[source]
Checks if scale calibration is allowed in this state.
- Returns:
True if calibration is allowed.
- Return type:
bool
- task_is_running() bool[source]
Checks if a task is currently running.
- Returns:
True if a task is running.
- Return type:
bool
- can_stop_syncing() bool[source]
Checks if syncing process can be stopped.
- Returns:
True if syncing can be stopped.
- Return type:
bool
- can_go_to_wait() bool[source]
Checks if the state can transition to WAIT.
- Returns:
True if transition to WAIT is allowed.
- Return type:
bool