VisionSafetyManager

public final class VisionSafetyManager

VisionSafetyManager is an entry point to the high-level framework MapboxVisionSafety focused on safety related tasks like collision and over speeding detection. Depends on VisionManager.

  • Delegate for VisionSafetyManager. Delegate is held as a weak reference.

    Declaration

    Swift

    public weak var delegate: VisionSafetyManagerDelegate?
  • Fabric method for creating a VisionSafetyManager instance.

    Declaration

    Swift

    public static func create(visionManager: VisionManagerProtocol) -> VisionSafetyManager

    Parameters

    visionManager

    Instance of VisionManager.

    Return Value

    Instance of VisionSafetyManager configured with VisionManager instance and delegate.

  • Cleanup the state and resources of VisionSafetyManger.

    Declaration

    Swift

    public func destroy()
  • Set sensitivity thresholds in seconds for collision with vehicles.

    Declaration

    Swift

    public func setTimeToCollisionWithVehicle(warningTime: Float, criticalTime: Float)

    Parameters

    warningTime

    Threshold in seconds for CollisionDangerLevel.Warning

    criticalTime

    Threshold in seconds for CollisionDangerLevel.Critical

  • Set minimal speed when collision system activates. Expressed in meters per second.

    Declaration

    Swift

    public func setCollisionWithVehicleMinSpeed(minSpeed: Float)