The
TouchGloveInterpreterService receives raw data from the
TouchGloveService and tries to recognize high-level events like button clicks or slider moves. The user can provide specific profiles which contain information about the arrangement of different buttons and sliders on the TouchGlove input device.
Needs & Abilities
As stated in the
TouchGloveInterpreterService.xml file, the service has the following Needs and Abilities.
- Need: TGloveDataRaw?
- Need: Configuration
- Ability: InputDataAnalogLimited?
- Ability: InputDataBool?
Interaction with other Services
The
TouchGloveInterpreterService is a template service, which starts automatically, if an ability of
InputDataAnalogLimited? or
InputDataBool? is requested and the Configuration service is running. The profiles are received from the Configuration service.
Each profile consists of several input elements like buttons and sliders with unique ids. Unfortunately, the service manager of DWARF does not allow multivalue attributes. This causes a somehow dirty hack in the consumer XML description for selecting a profile. All ids of the required profile have to be concatenated to a string like the following way:
"-accept--create--delete--select-"
Accept, create, delete and select are the ids of the input elements. The ids have to be sorted lexically.
In the consumer XML, a need for
InputDataBool? and
InputDataAnalogLimited? has to be created. These needs require a predicate called configurationKey, which asks for the string described above. If only a subset of a profile is needed, wildcards can be used in this predicate as well. Here is an example:
"*-create-*-select-*"
This predicate would ask for all profiles, which contain at least two input elements called create and select.
In the events itself, the id of the input element is sent in the field event.header.fixed_header.event_name .
An example consumer XML is the
ListMenuDisplay.xml.
More Documentation
How-To
Usage
Start the
TouchGloveService, the Configuration and your consumer. The
TouchGloveInterpreterService is started automatically.
Testing
Start the
TouchGloveService and the Configuration. Afterwards, start DIVE and disable the filter. Choose a TouchGloveInterpreter template and debug the ability events.
Configuration
You can change the time limit and the button time limit in the TouchGloveInterpreterService.xml, which is handles the distinction between button and slider events. Please refer to the documentation for details.