Skip to main content

Class: SensorStream

InkInput.SensorStream(channels)

Data collecation, provided from input device.It corresponds to sensor group channels.Ink stream is required and is minimal data that should exist.

Constructor

new SensorStream(channels)

Parameters:
NameTypeDescription
channelsArray.<InkInput.SensorChannel>Channels that provides data
Properties:
NameTypeDescription
inkbooleantrue when channels X and Y are part of this group
dataArray.<(long|int|float)>Sequence of samples provided by ink device channels

Methods

add(input, ignoredopt)

Adds input sample to underlying stream

Parameters:
NameTypeAttributesDefaultDescription
inputPathBuilding.PointerData|InkInput.SensorPoint|InputDataWhere InputData is object with properties related with SensorChannel different than ink group
ignoredboolean<optional>falsePipeline will ignore this input sample

get(index) → {InkInput.SensorPoint|InputData}

Get sensor input from current group data

Parameters:
NameTypeDescription
indexintIndex of sensor input
Returns:

data for given index

Type

InkInput.SensorPoint|InputData

getChannelData(type) → {Float32Array|Uint32Array}

Extracts data for particular channel

Parameters:
NameTypeDescription
typeInkInput.SensorChannel.TypeSensor channel type
Returns:

Sensor channel values

Type

Float32Array|Uint32Array

getPipelineMapping() → {Array.<int>}

This method is relevant when mapping between sensor input and processed points is not 1:1

Returns:

Index mapping between sensor point index and processed point index

Type

Array.<int>

Home