Advanced Features - dialogos-project/dialogos GitHub Wiki
This chapter covers all details about how to create and manage global input handlers, device connections and user-defined functions.
Devices
Devices are external modules that communicate with the dialog system in addition to built-in plugins. The flexibility of the module interface allows you to decide whether the dialog uses spoken input, written input or haptic devices (e.g. touch screen or a special controller). Devices also offer the possibility of communicating with external data sources, such as an SQL database). The communication takes place in the form of a TCP/IP stream which can be distributed over several systems.
You can add and edit devices by selecting Graph -> Devices in the menu bar. By clicking on the button New, you can define devices and edit them by double-clicking on the device name.
Every device needs a name and a connector. Depending on the connector, you will need to specify different parameters. All modules from CLT support the connector "CLT Connector (Rendezvous)". It uses an extra technology to search the network for available modules. This means that you don't have to specify on which computer a certain module is running. The only requirement is that the name of the module match the value of the service name parameter.
The name of the device is arbitrary and only used within the dialog model.
Global Input Handlers
In DialogOS, it is possible to define patterns that occur in every input node of a (sub)graph as a so-called Global Input Handler. A global input handler consists of an input pattern and a subgraph that is executed when user input matches the pattern. This has the advantage that often-used patterns and respective nodes have only to be defined/created once, rather than at every input node.
To create and edit global input handlers, select the command Graph -> Global Input Handlers from the menu. A window will appear containing a list of all input handlers, their names, and associated patterns. The type of an input handler defines at which point in an input node the global handler will be. There are four types which can be selected from a list: "Before local patterns", "After local patterns", "Before all others", and "After all others". The three buttons Add, Delete and Edit can be used to edit this list.
When you click on the button Edit, you will get view of the subgraph which will be executed when an input matches the associated pattern. This subdialog is analogous to a subgraph, the difference being the set of available end nodes.
Custom Functions
Besides the built-in functions in DialogOS, you can also write custom functions, which can in turn make use of other functions. To create your own functions, select Graph -> Functions from the menu. You can add new modules in which to store your functions with the New button. Modules exist only to group like functions, thus they can be named arbitrarily.
When double-clicking on a module, a new text box will appear in which functions can be defined using the DialogOS scripting language. Custom functions can be used on the dialog level where they were defined and in every subgraph of that level. Examples for useful functions are type converters and recurrent complex calculations.