VehicleProfile
public struct VehicleProfile : Hashable
A vehicle profile describes the vehicle being used with the HSDK.
The profile is planned to be used as single source of information describing the vehicle.
Current modules that use this profile:
- Navigation: Tracking mode for truck related vehicle restrictions.
Note: This is a beta release of this vehicle profile, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases or even become unsupported, without a deprecation process.
-
Defines the vehicle type.
Declaration
Swift
public var vehicleType: VehicleType -
Defines the truck category. Only used when the
VehicleProfile.vehicleTypeisVehicleType.truckBy default, it is not set.Declaration
Swift
public var truckCategory: TruckCategory? -
Defines number of trailers attached to the vehicle. The provided value must be in the range [0, 255]. When not set, possible trailer count restrictions will not be taken into consideration for route calculation. By default, it is 0.
Declaration
Swift
public var trailerCount: Int32 -
Specifies a list of hazardous materials shipped in the vehicle. Refer to
HazardousMaterialfor the available options.Declaration
Swift
public var hazardousMaterials: [HazardousMaterial] -
Specifies the tunnel categories to restrict certain route links. The route will pass only through tunnels of a less strict category. Refer to
TunnelCategoryfor the available options.Declaration
Swift
public var tunnelCategory: TunnelCategory? -
Defines total number of axles in the vehicle. The provided value must be greater than or equal to 2. When not set, possible axle count restrictions will not be taken into consideration for route calculation. By default, it is not set.
Declaration
Swift
public var axleCount: Int32? -
Vehicle weight including trailers and shipped goods in kilograms. By default, it is not set.
Declaration
Swift
public var grossWeightInKilograms: Int32? -
Vehicle height in centimeters. The provided value must be in the range [0, 5000]. By default, it is not set.
Declaration
Swift
public var heightInCentimeters: Int32? -
Vehicle length in centimeters. The provided value must be in the range [0, 30000]. By default, it is not set.
Declaration
Swift
public var lengthInCentimeters: Int32? -
Vehicle width in centimeters. The provided value must be in the range [0, 5000]. By default, it is not set.
Declaration
Swift
public var widthInCentimeters: Int32? -
Vehicle weight per axle in kilograms. The provided value must be greater or equal to 0. When not set, possible weight per axle restrictions will not be taken into consideration for route calculation. By default, it is not set.
Declaration
Swift
public var weightPerAxleInKilograms: Int32? -
init(vehicleType:truckCategory: trailerCount: hazardousMaterials: tunnelCategory: axleCount: grossWeightInKilograms: heightInCentimeters: lengthInCentimeters: widthInCentimeters: weightPerAxleInKilograms: ) Creates a new instance.
Declaration
Swift
public init(vehicleType: VehicleType = VehicleType.car, truckCategory: TruckCategory? = nil, trailerCount: Int32 = 0, hazardousMaterials: [HazardousMaterial] = [], tunnelCategory: TunnelCategory? = nil, axleCount: Int32? = nil, grossWeightInKilograms: Int32? = nil, heightInCentimeters: Int32? = nil, lengthInCentimeters: Int32? = nil, widthInCentimeters: Int32? = nil, weightPerAxleInKilograms: Int32? = nil)