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:
Name | Type | Description |
---|---|---|
channels | Array.<InkInput.SensorChannel> | Channels that provides data |
Properties:
Name | Type | Description |
---|---|---|
ink | boolean | true when channels X and Y are part of this group |
data | Array.<(long|int|float)> | Sequence of samples provided by ink device channels |
Methods
add(input, ignoredopt)
Adds input sample to underlying stream
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
input | PathBuilding.PointerData|InkInput.SensorPoint|InputData | Where InputData is object with properties related with SensorChannel different than ink group | ||
ignored | boolean | <optional> | false | Pipeline will ignore this input sample |
get(index) → {InkInput.SensorPoint|InputData}
Get sensor input from current group data
Parameters:
Name | Type | Description |
---|---|---|
index | int | Index of sensor input |
Returns:
data for given index
Type
InkInput.SensorPoint|InputData
getChannelData(type) → {Float32Array|Uint32Array}
Extracts data for particular channel
Parameters:
Name | Type | Description |
---|---|---|
type | InkInput.SensorChannel.Type | Sensor 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>