RestrictionAlertItem

data class RestrictionAlertItem(val customAlert: CustomAttributeAlert, val id: Int, val status: AlertStatus, val timeToDest: Int, val distToDest: Int, val alertPos: GeoPoint, val restrictionType: Restriction, val restrictionValue: Double, val dist: Int, val time: Int) : AlertItem

Real-time information about an upcoming truck road restriction on the route.

See also

Constructors

Link copied to clipboard
constructor(customAlert: CustomAttributeAlert, id: Int, status: AlertStatus, timeToDest: Int, distToDest: Int, alertPos: GeoPoint, restrictionType: Restriction, restrictionValue: Double, dist: Int, time: Int)
constructor(startLimit: Int, validLimit: Int, startIsTime: Boolean, validIsTime: Boolean, isEnabled: Boolean, repeatAlert: Boolean, internalRef: Long, id: Int, status: Int, timeToDest: Int, distToDest: Int, alertPosX: Double, alertPosY: Double, restrictionType: Int, restrictionValue: Double, dist: Int, time: Int)

JNI constructor called by native code (CreateRestrictionAlertItem in BNavigationUtil.cpp). Maps the raw TB_ATT_ALERT_ITEM fields to the primary constructor.

Properties

Link copied to clipboard

Geographic position of the restriction on the route.

Link copied to clipboard

The associated custom attribute alert configuration (start/valid limits, repeat mode, enabled state).

Link copied to clipboard
val dist: Int

Current distance in meters from the vehicle to the restriction. Updated at each firing when repeatAlert is enabled.

Link copied to clipboard

Distance in meters from the alert position to the route destination.

Link copied to clipboard
open override val id: Int

Unique identifier for this alert instance. Stable across repeated firings of the same alert registration.

Link copied to clipboard

Type of truck restriction (height, weight, hazmat, etc.). See Restriction for the full list.

Link copied to clipboard

Numeric value of the restriction, encoded as packed by the CoreSDK:

Link copied to clipboard
open override val status: AlertStatus

Current lifecycle status of the alert (AlertStatus.ALERT_VALID when the vehicle is in the alert zone, AlertStatus.ALERT_TO_DELETE when it leaves).

Link copied to clipboard
val time: Int

Current estimated time in seconds before the vehicle reaches the restriction. Updated at each firing when repeatAlert is enabled.

Link copied to clipboard

Time in seconds from the alert position to the route destination.