Home > @magiclane/maps-sdk > DataSource

DataSource class

SensorDataSource Through this interface data can be obtained from sensors, log files or any other means

Signature:

export declare class DataSource extends GemAutoreleaseObject 

Extends: GemAutoreleaseObject

Properties

Property

Modifiers

Type

Description

availableDataTypes

readonly

DataType[]

The available data types.

dataSourceType

readonly

DataSourceType

The data source type

isSDKInstance

readonly

boolean

Test if this is an SDK instance

isStopped

readonly

boolean

Check if source is paused

origin

readonly

Origin

The origin of the data source

playback

readonly

Playback | null

Get the playback interface

pointerId

readonly

number | bigint

Methods

Method

Modifiers

Description

addListener(listener, dataType, parameters)

Register a listener for the data source

createExternalDataSource(dataTypes)

static

Create a new external data source

createLiveDataSource()

static

Create a new live data source

createLogDataSource(logPath)

static

Create a new log data source based on a log file

createSimulationDataSource(route)

static

Create a data source based on a route (a route simulation data source).

dispose()

getConfiguration(type)

Get the current configuration for a data type

getDataTypeDescription(type)

The data type description

getLatestData(type)

Get the latest produced data for a data type

getPreferences(type)

Get the preferences for a data type

init(id)

static

isDataTypeAvailable(dataType)

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

isMockData(type)

Check if mock data is enabled for the given type

pushData(senseData)

Push the data to the data source

removeListener(listener, dataType)

Unregister a listener for the data source for a specific data type

removeListenerAllDataTypes(listener)

Unregister all listeners for the data source for all data types

setConfiguration(config, type)

Update the configuration for the specified type.

setMockData(type, senseData)

Set mock position data

start()

Start the source

stop()

Stop the source