simulation.src.simulation_evaluation.src.state_machine.states.overtaking module

States used in the OvertakingStateMachine.

Summary

Classes:

Left

This state occurs when the car is in the overtaking zone and in the left line.

Off

This state is the default state.

OvertakingState

Right

This state occurs when the car drives into the overtaking zone and is on the right line.

Reference

class OvertakingState(description: str, value: int)[source]

Bases: simulation.src.simulation_evaluation.src.state_machine.states.state.State

next(state_machine, input_msg: int)[source]

Return updated state.

class Off[source]

Bases: simulation.src.simulation_evaluation.src.state_machine.states.overtaking.OvertakingState

This 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 Right[source]

Bases: simulation.src.simulation_evaluation.src.state_machine.states.overtaking.OvertakingState

This state occurs when the car drives into the overtaking zone and is on the right line.

Once the state machine receives this state, the next state will we chage accordingly to its next method.

next(state_machine, 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 Left[source]

Bases: simulation.src.simulation_evaluation.src.state_machine.states.overtaking.OvertakingState

This state occurs when the car is in the overtaking zone and in the left line.

Once the state machine receives this state, the next state will we chage accordingly to its next method.

next(state_machine, 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.