VisionManager
public final class VisionManager : BaseVisionManager
The main object for registering for events from the SDK, starting and stopping their delivery. It also provides some useful functions for performance configuration and data conversion.
Lifecycle of VisionManager :
create
start
startRecording
(optional)stopRecording
(optional)stop
, then lifecycle may proceed withdestroy
orstart
destroy
-
Delegate for
VisionManager
. Delegate is held as a weak reference.Declaration
Swift
public weak var delegate: VisionManagerDelegate? { get set }
-
Fabric method for creating a
VisionManager
instance.It’s only allowed to have one living instance of
VisionManager
orVisionReplayManager
. To createVisionManager
with different configuration calldestroy
on existing instance or release all references to it.Declaration
Swift
public static func create(videoSource: VideoSource) -> VisionManager
Parameters
videoSource
Video source which will be utilized by created instance of
VisionManager
.Return Value
Instance of
VisionManager
configured with video source. -
Start delivering events from
VisionManager
.Important
Do NOT call this method more than once or afterdestroy
is called.Declaration
Swift
public func start()
-
Stop delivering events from
VisionManager
.To resume call
start
again. Call this method afterstart
and beforedestroy
. This method also stops recording session if it was started.Important
Do NOT call this method more than once or beforestart
or afterdestroy
is called.Declaration
Swift
public func stop()
-
Start recording a session.
During the session full telemetry and video are recorded to specified path. You may use resulted folder to replay the recorded session with
VisionReplayManager
.Important
Method serves debugging purposes. Do NOT call this method more than once or before
start
or afterstop
is called. Do NOT use session recording in production applications.Throws
VisionManagerError.startRecordingBeforeStart
if method is called whenVisionManager
hasn’t been started.Declaration
Swift
public func startRecording(to path: String) throws
Parameters
path
Path to directory where you’d like session to be recorded.
-
Stop recording a session.
Important
Method serves debugging purposes. Do NOT use session recording in production applications. Do NOT call this method more than once or beforestartRecording
or afterstop
is called.Declaration
Swift
public func stopRecording()
-
Set the camera height above the road surface.
Declaration
Swift
public func set(cameraHeight: Float)
Parameters
cameraHeight
Camera height in meters.
-
Clean up the state and resources of
VisionManger
.Important
Do NOT call this method more than once.Declaration
Swift
public func destroy()