Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VehicleStorage

Hierarchy

  • VehicleStorage

Index

Constructors

constructor

  • new VehicleStorage(trapezeClient: TrapezeApiClient, updateDelay?: number, ttl?: number): VehicleStorage

Properties

Private lock

lock: LockHandler = new LockHandler(false)

Private mDb

Private mStatus

mStatus: LoadStatus

Private trapezeClient

trapezeClient: TrapezeApiClient

Private updateDelay

updateDelay: number

Accessors

db

status

Methods

fetch

  • fetch(positionType?: PositionType): Promise<LoadStatus>

fetchSuccessOrThrow

getAllVehicles

  • getAllVehicles(lastUpdate?: number): Promise<IVehicleLocationList>
  • since

    1.1.0

    Parameters

    • Default value lastUpdate: number = 0

    Returns Promise<IVehicleLocationList>

getVehicle

getVehicleByTripId

getVehicles

  • getVehicles(left: number, right: number, top: number, bottom: number, lastUpdate?: number): Promise<IVehicleLocationList>
  • since

    1.0.0

    Parameters

    • left: number
    • right: number
    • top: number
    • bottom: number
    • Default value lastUpdate: number = 0

    Returns Promise<IVehicleLocationList>

updateRequired

  • updateRequired(): boolean

Generated using TypeDoc