Class: InputDevice
InkInput.InputDevice()
new InputDevice()
Properties:
Name | Type | Description |
---|---|---|
environment | Environment |
Extends
Methods
add(input, ignoredopt)
Adds sensor data input
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
input | PathBuilding.PointerData | Ink input | ||
ignored | boolean | <optional> | false | Pipeline will ignore this input sample |
closeStream(abortedopt) → InkInput.SensorData
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
aborted | boolean | <optional> | false | Is stream is aborted or closed normally |
Returns:
collected sesnor data
Type
getInkInputProvider(type) → InkInput.InkInputProvider
Provides default InkInputProvider instance. For user defined instance should be overridden.
Parameters:
Name | Type | Description |
---|---|---|
type | InkInput.InkInputProvider.Type | Pointer type |
Returns:
Default instance based on type
Type
getInkSensorContext(inkProviderType) → InkInput.SensorContext
Provides default SensorContext instance. For user defined instance should be overridden.
Parameters:
Name | Type | Description |
---|---|---|
inkProviderType | InkInput.InkInputProvider.Type | Pointer type |
Returns:
Default instance based on type
Type
link(device)
When external device provides collecatable data, InputDevice class should be extended.openStream, add and closeStream metods should be overridden.openStream and closeStream are called for every device when ink stream is opened and closed.openStream recieves as argument an instance of SensorData with ink sensor stream.
Parameters:
Name | Type | Description |
---|---|---|
device | InkInput.InputDevice |
openStream(sample)
Resets collector state. Reset state should happens when BEGIN phase is detected.InkBuilder implementation automates this processing when instance is configured to collect sensor data..
Parameters:
Name | Type | Description |
---|---|---|
sample | InkInput.SensorPoint | Sample input |
(async, static) createInstance(envProps) → InkInput.InputDevice
Creates default input device instance, based on system information
Parameters:
Name | Type | Description |
---|---|---|
envProps | Properties | User defined env properties, like app.id for example |
Returns:
default instance
Type
(static) hasUsage(name, e) → {boolean}
Validate input value
Parameters:
Name | Type | Description |
---|---|---|
name | string | Property name |
e | PointerEvent | Input event |
Returns:
Is property usable
Type
boolean
(static) isValidInput(name, point) → {boolean}
Validate input value
Parameters:
Name | Type | Description |
---|---|---|
name | string | Property name |
point | InkInput.SensorPoint | Pointer data |
Returns:
Is valid property value
Type
boolean