simulation.src.simulation_evaluation.src.state_machine.states.parking module¶
States used in the ParkingStateMachine.
Summary¶
Classes:
This end state occurs when the car drives onto the left lane. |
|
This end state occurs when the car drives onto the right lane. |
|
This state occurs when the car drives into the parking zone. |
|
This state is the default state. |
|
This state occurs when the car drives a parking space. |
|
This state occurs when the car starts an attempt to park in. |
|
This state occurs when the car drives out of the parking space. |
|
This state occurs when the car successfully parks inside a parking space. |
Reference¶
-
class
ParkingState(description: str, value: int)[source]¶ Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.State
-
class
Off[source]¶ Bases:
simulation.src.simulation_evaluation.src.state_machine.states.parking.ParkingStateThis state is the default state.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
-
next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶ Next state.
- Parameters
state_machine – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
-
-
class
InParkingZone[source]¶ Bases:
simulation.src.simulation_evaluation.src.state_machine.states.parking.ParkingStateThis state occurs when the car drives into the parking zone.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
-
next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶ Next state.
- Parameters
state_machine (StateMachine) – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
-
-
class
ParkingAttempt[source]¶ Bases:
simulation.src.simulation_evaluation.src.state_machine.states.parking.ParkingStateThis state occurs when the car starts an attempt to park in.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
-
next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶ Next state.
- Parameters
state_machine (StateMachine) – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
-
-
class
Parking[source]¶ Bases:
simulation.src.simulation_evaluation.src.state_machine.states.parking.ParkingStateThis state occurs when the car drives a parking space.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
-
next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶ Next state.
- Parameters
state_machine (StateMachine) – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
-
-
class
SuccessfullyParked[source]¶ Bases:
simulation.src.simulation_evaluation.src.state_machine.states.parking.ParkingStateThis state occurs when the car successfully parks inside a parking space.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
-
next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶ Next state.
- Parameters
state_machine – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
-
-
class
ParkingOut[source]¶ Bases:
simulation.src.simulation_evaluation.src.state_machine.states.parking.ParkingStateThis state occurs when the car drives out of the parking space.
Once the state machine receives this state, the next state will we chage accordingly to its next method.
-
next(state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine, input_msg: int)[source]¶ Next state.
- Parameters
state_machine (StateMachine) – On which state machine the states gets executed
input_msg – Integer of message
- Returns
Class object of next state. If no state change was detected here, check for failure state before returning this state.
-
-
class
FailureInRightLane[source]¶ Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.StateThis end state occurs when the car drives onto the right lane.
Once the state machine receives this state, the state can no longer change into a new one.
-
class
FailureInLeftLane[source]¶ Bases:
simulation.src.simulation_evaluation.src.state_machine.states.state.StateThis end state occurs when the car drives onto the left lane.
Once the state machine receives this state, the state can no longer change into a new one.