Truck

class Truck(val maxSpeed: Speed? = null, val isCommercial: Boolean = true, val electricEngine: ElectricEngine? = null, val combustionEngine: CombustionEngine? = null, val dimensions: VehicleDimensions? = null, val hazmatClasses: Set<HazmatClass> = emptySet(), val adrTunnelRestrictionCode: AdrTunnelRestrictionCode? = null, val modelId: String? = null) : Vehicle, Motorized, CargoCapable

A vehicle of type truck.

Note: This option is not supported with the Orbis map. Note: This option is not supported when chargingOptions are set in com.tomtom.sdk.routing.options.RoutePlanningOptions.. Note: Note: The parameters maxSpeed and dimensions are ignored if both parameters modelId and electricEngine are set. Note: If the parameter modelId is set, vehicle consumption, efficiency and charging parameters are ignored. Note: If the parameter combustionEngine is set, the parameter modelId will not be used and will be disregarded.

Constructors

Link copied to clipboard
constructor(maxSpeed: Speed? = null, isCommercial: Boolean = true, electricEngine: ElectricEngine? = null, combustionEngine: CombustionEngine? = null, dimensions: VehicleDimensions? = null, hazmatClasses: Set<HazmatClass> = emptySet(), adrTunnelRestrictionCode: AdrTunnelRestrictionCode? = null, modelId: String? = null)

Properties

Link copied to clipboard

The ADR tunnel restrictions of the vehicle.

Link copied to clipboard
open override val combustionEngine: CombustionEngine? = null

The vehicle's combustion engine for route and consumption calculation.

Link copied to clipboard
open override val dimensions: VehicleDimensions? = null

The truck's dimensions.

Link copied to clipboard
open override val electricEngine: ElectricEngine? = null

The vehicle's electric engine for route and consumption calculation.

Link copied to clipboard
open override val hazmatClasses: Set<HazmatClass>

The hazardous materials classes of the vehicle's load.

Link copied to clipboard
open override val isCommercial: Boolean = true

If true, the vehicle is used for commercial purposes and thus may not be allowed to drive on some roads.

Link copied to clipboard
open override val maxSpeed: Speed? = null

The truck's maximum speed.

Link copied to clipboard
open override val modelId: String? = null

Specifies the Model ID of the vehicle as obtained from the TomTom Vehicle Database. It allows calculating an EV route without specifying the vehicle's consumption and charging parameters.

Inherited properties

Link copied to clipboard

Functions

Link copied to clipboard
operator fun component1(): Speed?
Link copied to clipboard
operator fun component2(): Boolean
Link copied to clipboard
operator fun component3(): ElectricEngine?
Link copied to clipboard
operator fun component4(): CombustionEngine?
Link copied to clipboard
operator fun component5(): VehicleDimensions?
Link copied to clipboard
operator fun component6(): Set<HazmatClass>
Link copied to clipboard
Link copied to clipboard
operator fun component8(): String?
Link copied to clipboard
fun copy(maxSpeed: Speed? = this.maxSpeed, isCommercial: Boolean = this.isCommercial, electricEngine: ElectricEngine? = this.electricEngine, combustionEngine: CombustionEngine? = this.combustionEngine, dimensions: VehicleDimensions? = this.dimensions, modelId: String? = this.modelId, hazmatClasses: Set<HazmatClass> = this.hazmatClasses, adrTunnelRestrictionCode: AdrTunnelRestrictionCode? = this.adrTunnelRestrictionCode): Vehicle.Truck

Creates a copy of this Truck object.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String