Class: SensorChannelsContext
InkInput.SensorChannelsContext(device, inkProvider)
Represents data channel group.It combines channels defined in SensorContext, provided from ink input device and defines time alligned values.Properties samplingRate and latency are optional and could be set when knowledge is available.
Constructor
new SensorChannelsContext(device, inkProvider)
Parameters:
Name | Type | Description |
---|---|---|
device | InkInput.InputDevice | |
inkProvider | InkInput.InkInputProvider | Required for ink group only - the one with X and Y channels |
Properties:
Name | Type | Description |
---|---|---|
samplingRate | int | Sampling rate of the channel group |
latency | long | Input latency, measured in milliseconds |
Extends
Methods
add(channel)
Parameters:
Name | Type | Description |
---|---|---|
channel | InkInput.SensorChannel |
get(id) → InkInput.SensorChannel
Get channel by it's id
Parameters:
Name | Type | Description |
---|---|---|
id | string | Sensor channel id |
Returns:
Sensor channel corresponding with this id
Type
(static) createDefaultInstance(device, inkProvider) → InkInput.SensorChannelsContext
Creates default (ink) sensor channels context (group with aligned channels in time)Group channels are based on ink provider and they defaults to:
- PEN - X, Y, TIMESTAMP, PRESSURE, ALTITUDE, AZIMUTH, ROTATION
- TOUCH - X, Y, TIMESTAMP, PRESSURE, RADIUS_X, RADIUS_Y, ROTATION
- MOUSE - X, Y, TIMESTAMP
Parameters:
Name | Type | Description |
---|---|---|
device | InkInput.InputDevice | |
inkProvider | InkInput.InkInputProvider |
Returns:
default instance
Type
InkInput.SensorChannelsContext