panoptes.pocs.state package¶
Subpackages¶
- panoptes.pocs.state.states package
- Subpackages
- panoptes.pocs.state.states.default package
- Submodules
- panoptes.pocs.state.states.default.analyzing module
- panoptes.pocs.state.states.default.housekeeping module
- panoptes.pocs.state.states.default.observing module
- panoptes.pocs.state.states.default.parked module
- panoptes.pocs.state.states.default.parking module
- panoptes.pocs.state.states.default.pointing module
- panoptes.pocs.state.states.default.ready module
- panoptes.pocs.state.states.default.scheduling module
- panoptes.pocs.state.states.default.sleeping module
- panoptes.pocs.state.states.default.slewing module
- panoptes.pocs.state.states.default.tracking module
- Module contents
- panoptes.pocs.state.states.default package
- Module contents
- Subpackages
Submodules¶
panoptes.pocs.state.machine module¶
-
class
panoptes.pocs.state.machine.
PanStateMachine
(state_machine_table, **kwargs)[source]¶ Bases:
transitions.core.Machine
A finite state machine for PANOPTES.
The state machine guides the overall action of the unit.
-
after_state
(event_data)[source]¶ Called after each state.
Parameters: event_data (transitions.EventData) – Contains information about the event
-
before_state
(event_data)[source]¶ Called before each state.
Parameters: event_data (transitions.EventData) – Contains information about the event
-
check_safety
(event_data=None)[source]¶ Checks the safety flag of the system to determine if safe.
This will check the weather station as well as various other environmental aspects of the system in order to determine if conditions are safe for operation.
Note
This condition is called by the state machine during each transition
Parameters: - event_data (transitions.EventData) – carries information about the event if
- from the state machine. (called) –
Returns: Latest safety flag
Return type:
-
goto_next_state
()[source]¶ Make a transition to the next state.
Each state is responsible for setting the next_state property based off the logic that happens inside the state. This method will look up the transition method to reach the next state and call that method.
If no transition method is defined for whatever is set as next_state then the park method will be called.
Returns: If state was successfully changed. Return type: bool
-
classmethod
load_state_table
(state_table_name='simple_state_table')[source]¶ Loads the state table
Parameters: state_table_name (str) – Name of state table. Corresponds to file name in $POCS/resources/state_table/ directory or to absolute path if starts with “/”. Default ‘simple_state_table’. Returns: Dictionary with states and transitions keys. Return type: dict
-
mount_is_initialized
(event_data)[source]¶ Transitional check for mount.
This is used as a conditional check when transitioning between certain states.
-
mount_is_tracking
(event_data)[source]¶ Transitional check for mount.
This is used as a conditional check when transitioning between certain states.
-
next_state
¶
-