OpenTTD Source: AirportFTAClass Struct Reference

OpenTTD Source 15.0-RC2

Public Types | Public Member Functions | Data Fields
AirportFTAClass Struct Reference

Finite sTate mAchine (FTA) of an airport. More...

`#include <airport.h>`

## Public Types
enum class | Flag : uint8_t { Airplanes = 0 , Helicopters = 1 , ShortStrip = 2 }
| Bitmask of airport flags. More...
using | Flags = EnumBitSet< Flag, uint8_t >

## Public Member Functions
| AirportFTAClass (const AirportMovingData *moving_data, const uint8_t *terminals, const uint8_t num_helipads, const uint8_t *entry_points, Flags flags, const AirportFTAbuildup *apFA, uint8_t delta_z)
const AirportMovingData * | MovingData (uint8_t position) const
| Get movement data at a position.

## Data Fields
const AirportMovingData * | moving_data
| Movement data.
std::vector< AirportFTA > | layout
| state machine for airport
const uint8_t * | terminals
| Array with the number of terminal groups, followed by the number of terminals in each group.
const uint8_t | num_helipads
| Number of helipads on this airport. When 0 helicopters will go to normal terminals.
Flags | flags
| Flags for this airport type.
uint8_t | nofelements
| number of positions the airport consists of
const uint8_t * | entry_points
| when an airplane arrives at this airport, enter it at position entry_point, index depends on direction
uint8_t | delta_z
| Z adjustment for helicopter pads.

## Detailed Description

Finite sTate mAchine (FTA) of an airport.

Definition at line 159 of file airport.h.

## Member Typedef Documentation

## ◆ Flags

using AirportFTAClass::Flags = EnumBitSet<Flag, uint8_t>

Definition at line 167 of file airport.h.

## Member Enumeration Documentation

## ◆ Flag

enum class AirportFTAClass::Flag : uint8_t
| strong

Bitmask of airport flags.

Enumerator
Airplanes | Can planes land on this airport type?
Helicopters | Can helicopters land on this airport type?
ShortStrip | This airport has a short landing strip, dangerous for fast aircraft.

Definition at line 162 of file airport.h.

## Constructor & Destructor Documentation

## ◆ AirportFTAClass()

AirportFTAClass::AirportFTAClass | ( | const AirportMovingData * | moving_data,
|  | const uint8_t * | terminals,
|  | const uint8_t | num_helipads,
|  | const uint8_t * | entry_points,
|  | Flags | flags,
|  | const AirportFTAbuildup * | apFA,
|  | uint8_t | delta_z
| ) |  |

Definition at line 112 of file airport.cpp.

## Member Function Documentation

## ◆ MovingData()

const AirportMovingData * AirportFTAClass::MovingData | ( | uint8_t | position | ) | const
| inline

Get movement data at a position.

Parameters

  position | Element number to get movement data about.

Returns
  Pointer to the movement data.

Definition at line 184 of file airport.h.

References moving_data, and nofelements.

Referenced by AircraftController(), and MapAircraftMovementState().

## Field Documentation

## ◆ delta_z

uint8_t AirportFTAClass::delta_z

Z adjustment for helicopter pads.

Definition at line 197 of file airport.h.

Referenced by AircraftController(), FloodVehicleProc(), and MapAircraftMovementState().

## ◆ entry_points

const uint8_t* AirportFTAClass::entry_points

when an airplane arrives at this airport, enter it at position entry_point, index depends on direction

Definition at line 196 of file airport.h.

Referenced by AircraftGetEntryPoint().

## ◆ flags

Flags AirportFTAClass::flags

Flags for this airport type.

Definition at line 194 of file airport.h.

Referenced by CanVehicleUseStation(), CheckOrders(), FindNearestHangar(), and MaybeCrashAirplane().

## ◆ layout

std::vector<AirportFTA> AirportFTAClass::layout

state machine for airport

Definition at line 191 of file airport.h.

Referenced by AircraftEventHandler_AtTerminal(), AircraftEventHandler_EnterHangar(), AircraftEventHandler_InHangar(), AirportFindFreeTerminal(), AirportHasBlock(), AirportSetBlocks(), GetVehiclePosOnBuild(), and Vehicle::PreDestructor().

## ◆ moving_data

const AirportMovingData* AirportFTAClass::moving_data

Movement data.

Definition at line 190 of file airport.h.

Referenced by MovingData().

## ◆ nofelements

uint8_t AirportFTAClass::nofelements

number of positions the airport consists of

Definition at line 195 of file airport.h.

Referenced by AircraftController(), and MovingData().

## ◆ num_helipads

const uint8_t AirportFTAClass::num_helipads

Number of helipads on this airport. When 0 helicopters will go to normal terminals.

Definition at line 193 of file airport.h.

Referenced by AircraftEventHandler_AtTerminal(), and AirportFindFreeHelipad().

## ◆ terminals

const uint8_t* AirportFTAClass::terminals

Array with the number of terminal groups, followed by the number of terminals in each group.

Definition at line 192 of file airport.h.

Referenced by AirportFindFreeTerminal(), and GetNumTerminals().

The documentation for this struct was generated from the following files:

- src/airport.h
- src/airport.cpp