ExternalDataSource

Class through which user can set its own sensors data (e.g. GPS positions)

Constructors

Link copied to clipboard
constructor(address: Long)

Properties

Link copied to clipboard

Address of native referenced object. nullptr if not referencing any native allocated object. Note native allocation will happen only once.

Link copied to clipboard

Available data types.

Link copied to clipboard

Data source type. It can be live or playback.

Link copied to clipboard

Origin of the data source

Link copied to clipboard

Playback If data source has no playback capabilities the interface return null

Functions

Link copied to clipboard
fun addListener(listener: DataSourceListener, types: ArrayList<Pair<EDataType, ParameterList?>>, critical: Boolean = true)
fun addListener(listener: DataSourceListener, type: EDataType, preferences: ParameterList? = null, critical: Boolean = true): Int

Adds a listener to a specific 'dataType'

Link copied to clipboard
external fun addSurfaceToCamera(previewSurface: Surface): Pair<Int, Int>?

Attaches the surface to be rendered into directly by the camera.

Link copied to clipboard
fun finalize()

Overrides finalize that garbage collector will call when needed.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Provides access to the current configuration specified to that data type.

Link copied to clipboard

Test if a data type is provided by the data source.

Link copied to clipboard

Check if mock data is enabled for the given type

Link copied to clipboard

True if keeps a reference to a C++ SDK object False if keeps a C++ SDK object

Link copied to clipboard
external fun isStopped(): Boolean

Checks if the source is stopped

Link copied to clipboard
operator fun not(): Boolean

Checks if this object is valid.

Link copied to clipboard
external fun pushData(data: SenseData)

Push data in external data source

Link copied to clipboard
fun release()

Releases the native referenced value of this object if:

Link copied to clipboard
external fun removeCameraSurface(surfaceID: Int): Int

Detaches the surface with provided Id from the camera.

Link copied to clipboard
external fun removeListener(listener: DataSourceListener)

Removes the listener

Link copied to clipboard
fun setMockData(type: EDataType, data: SenseData): Int

Set mock data

Link copied to clipboard

Updates the configuration for the specified dataType.

Link copied to clipboard
external fun start(): Int

Starts the source

Link copied to clipboard
external fun stop(): Int

Stops the source