Skip to main content

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:
NameTypeDescription
deviceInkInput.InputDevice
inkProviderInkInput.InkInputProviderRequired for ink group only - the one with X and Y channels
Properties:
NameTypeDescription
samplingRateintSampling rate of the channel group
latencylongInput latency, measured in milliseconds

Extends

Methods

add(channel)

Parameters:
NameTypeDescription
channelInkInput.SensorChannel

get(id) → InkInput.SensorChannel

Get channel by it's id

Parameters:
NameTypeDescription
idstringSensor channel id
Returns:

Sensor channel corresponding with this id

Type

InkInput.SensorChannel

(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:
NameTypeDescription
deviceInkInput.InputDevice
inkProviderInkInput.InkInputProvider
Returns:

default instance

Type

InkInput.SensorChannelsContext

Home