|
OUTPUT DESCRIPTORS FOR DEVELOPERS
- VERSION 1.0
Preface
In order to handle the vast range of input types
Liquid is expected to, sensory data is constrained to a single
format per sensor class called the output format.
The output format describes what kind of data (type)
sensors from a given class should return, and how it should be
formatted (constrained).
SUPPORTED OUTPUT FORMATS (TYPES)
The following table describes the output formats
supported by the current version of Liquid (1.0). The definition
code column specifies the value the definition OUTPUT_TYPE
should be set to in the LDD source file Device Driver.cpp (see
How to build a
Liquid Device Driver).
|
Output Format
(Type)
|
Definition Code
|
Description
|
|
ARRAY*
|
NUMERIC_ARRAY
|
a collection of numeric values
|
|
BINARY
|
BINARY
|
an ON/OFF value
|
|
GRAPH
|
TIME
|
a stream of time indexed numeric values
|
|
NUMERIC
|
NUMERIC
|
a single numeric value
|
|
TEXT
|
STRING
|
a single or sentence of words
|
INFO: * Output of type ARRAY
is currently tailored for sensors that detect percentage movement
+ direction i.e. % moved in a given direction. Specifically for
videogame controllers.
CONSTRAINT PARAMETERS
Each output format provides a series of parameters
to constrain the collected sensor input. They define the shape
sensory data must take before being returned from an LDD to Liquid
or in the case of data transfers between Liquid and a Liquid Client
Application (LCA), the shape data will take. Constraint parameters
(and their respective values) are specified in the file format.ini
which can be located in the Liquid application folder.
When developing an LDD make sure the form of the
output type your sensor is to support meets the requirements of
the constraint parameters e.g. if the maximum acceptable input
value = 3, do not return any values greater than 3. It should
be noted that only some of the constraint parameters will actually
be passed to the LDD through the method openSensor(..) (these
will be highlighted in blue), its
up to the developer to find out the rest, either from the format.ini
file or Sensor Class
Output Formats.
The definition column specifies the name
of the parameter in the file format.ini.
ARRAY PARAMETERS
The below table describes the constraint parameters
for input of type array.
| Parameter |
Definition |
Description |
| Array Elements |
array_elements |
number of numeric values being
collected |
| Element Name |
elementName% |
purpose/measurement unit of numeric value |
| Orientation |
orientation% |
bar-hart orientation |
Because the array type is tailored for videogame
controllers the bar-chart used to display sensor readings (see
Output Descriptors
for Casual Users) can be orientated in 1 of 2 ways,
on either an X or Y axis plane.
Return all input as a percentage of the maximum
input value moved from the controllers central position. For motion
left/down/backward use a negative percentage, for motion right/up/forward
use a positive percentage i.e. all input will be returned in the
range -100 to 100. Consult your sensors SDK as to its maximum
input values from its central position.
INFO: % symbol will be substituted with
the index of the current array element being described e.g. elementName0=X,
orientation0=X.
BINARY PARAMETERS
There are no constraints for input of type binary.
GRAPH PARAMETERS
The below table describes the constraint
parameters for input of type graph.
| Parameter |
Definition |
Description |
| Percentage |
percentage |
input as a % of its maximum |
| Unit |
unit |
measurement unit of numeric value |
| Recommended Minimum Input
Value |
rr_min |
minimum non-erroneous input value |
Recommended Maximum Input
Value |
rr_max |
maximum non-erroneous input value |
Minimum
Acceptable Input Value* |
mr_min |
absolute minimum input value |
Maximum
Acceptable Input Value* |
mr_max |
absolute maximum input value |
The percentage flag is to be used in cases where
input needs to be modeled as a percentage of its maximum (from
0 to 100).
The recommenced input range is used to define the
limits of non-erroneous data, when the limit is exceeded the numeric
representation of the data will change to yellow.
The absolute input range is used to define the limits
of sensor input, if sensor readings fall outside this range and
no error has been detected return the exceeded limit value e.g.
if the acceptable range was 0-20 units and input was 21 return
the value 20.
INFO: * sometimes referred
to as the maximum input range in the LDD and Liquid source files.
NUMERIC CONSTRAINTS
See Graph Parameters.
TEXT CONSTRAINTS
There are no constraints for input of type text.
TRANSFERRING SENSOR INPUT
The current version of Liquid (1.0) uses a SENSOR_DATA
structure to handle the storage and transfer of input between the LDD,
Liquid and Liquid Client Applications (LCA) in the various supported
output formats. The SENSOR_DATA structure
is described in the source file Device Driver.h.
Because SENSOR_DATA is
hard-coded (prototype limitation) into the source code of the
LDD, Liquid and LCAs extending the supported output formats will
require updating the Liquid.exe. Future versions of Liquid are
planned to use a a nondescript data buffer instead.
.
. back to Manual Index
|