enums
Classes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Enum representing the state of the village system. |
|
Base Enum class with extended functionality. |
|
- class SuperEnum(value)[source]
Bases:
EnumBase Enum class with extended functionality.
- classmethod keys() list[str][source]
Returns a list of all enum names.
- Returns:
usage: [e.name for e in cls]
- Return type:
list[str]
- classmethod values() list[Any][source]
Returns a list of all enum values.
- Returns:
usage: [e.value for e in cls]
- Return type:
list[Any]
- classmethod get_index_from_value(value: Enum) int[source]
Gets the index of an enum member by its value.
- Parameters:
value (Enum) – The enum member or value.
- Returns:
The index.
- Return type:
int
- classmethod get_index_from_string(string: str) int[source]
Gets the index of an enum member by its string value.
- Parameters:
string (str) – The string string.
- Returns:
The index.
- Return type:
int
- class Controller(value)[source]
Bases:
SuperEnum- BPOD = 'BPOD'
- ARDUINO = 'ARDUINO'
- RASPBERRY = 'RASPBERRY'
- class ScreenActive(value)[source]
Bases:
SuperEnum- SCREEN = 'SCREEN'
- TOUCHSCREEN = 'TOUCHSCREEN'
- OFF = 'OFF'
- class AreaActive(value)[source]
Bases:
SuperEnum- ALLOWED = 'ALLOWED'
- NOT_ALLOWED = 'NOT_ALLOWED'
- TRIGGER = 'TRIGGER'
- OFF = 'OFF'
- class State(value)[source]
Bases:
SuperEnumEnum representing the state of the village system.
- 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
- can_stop_task() bool[source]
Checks if the running task can be stopped.
- Returns:
True if task can be stopped.
- 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
- class Actions(value)[source]
Bases:
SuperEnum- CORRIDOR = 'CORRIDOR'
- PORTS = 'PORTS'
- FUNCTIONS = 'FUNCTIONS'
- VIRTUAL_MOUSE = 'VIRTUAL_MOUSE'
- class Info(value)[source]
Bases:
SuperEnum- SYSTEM_INFO = 'SYSTEM_INFO'
- DETECTION_SETTINGS = 'DETECTION_SETTINGS'
- DETECTION_PLOT = 'DETECTION_PLOT'
- class DataTable(value)[source]
Bases:
SuperEnum- EVENTS = 'EVENTS'
- SESSIONS_SUMMARY = 'SESSIONS_SUMMARY'
- SUBJECTS = 'SUBJECTS'
- WATER_CALIBRATION = 'WATER_CALIBRATION'
- SOUND_CALIBRATION = 'SOUND_CALIBRATION'
- TEMPERATURES = 'TEMPERATURES'
- SESSION = 'SESSION'
- SESSION_RAW = 'SESSION_RAW'
- OLD_SESSION = 'OLD_SESSION'
- OLD_SESSION_RAW = 'OLD_SESSION_RAW'