Connectors (for Sliders and Dials)

Connectors can be connected to controls in Touch Portal such as Sliders and Dials. A connector is set up the same way as most other elements such as the action. A user will be able to add the connector to a control and from that moment the slider will send data from that connector and the control value to the plug-in. Although the connector is universal, the implementation for specific controls may differ.

Sliders - The Slider connector has some specific characteristics such as always having a value range of 0 - 100 in whole numbers.

Dials - Dial connectors can have variable value ranges depending on how the user sets up the dial itself. The precision is also directly related to how the dial itself is set up. Both should be taken into account when processing the data received. Be sure to safeguard your plug-in by checking boundaries and precision. Users can set up the dial virtually to all values and all precision.

Key Type Req. API Description
id Text yes 4.0 This is the id of the connector. It is used to identify the connectors within Touch Portal. This id needs to be unique across plugins. This means that if you give it the id "1" there is a big chance that it will be a duplicate. Touch Portal may reject it or mix it up with a different plug-in. Best practise is to create a unique prefix for all your actions like in our case; tp_yourplugin_connector_001.
name Text yes 4.0 This is the name of the connector. This will be used as the connector name in the connector category list.
supportedTypes Array No 12.0 List of types that are supported. Options are:
  • dial - Indicating the connector can be used in Dials.
  • slider - Indicating the connector can be used in Sliders.
If this key is not included, the connector will be made available to sliders only.

Please note, since this parameter is not being interpreted in versions prior to the API v12, it means that connectors set up for dials might show up as normal slider connectors on old versions of Touch Portal. This means that these connectors might send the changes as a normal slider message as well. Be sure to either implement this situation as well or alert your users to upgrade Touch Portal to match the plugins intentional functionality.
format Text yes 4.0 This will be the format of the inline connector. Use the id's of the data objects to place them within the text. Example given:

"format":"Control {$connectordata001$} which has {$connectordata002$} and number {$connectordata003$} is {$connectordata004$}",

This is a fictive form but it shows how to use this. The data object with the id 'connectordata001' will be shown at the given location. To have an data object appear on the connector line, use the format {$id$} where id is the id of the data object you want to show the control for.
data Array No 4.0 This is a collection of data which can be specified by the user. These data id's can be used to fill up the format attribute.
subCategoryId Text No 7.0 This attribute allows you to connect this connector to a specified sub category id. This action will then be shown in Touch Portals Action selection list attached to that sub category instead of the main parent category.

Connector Object JSON Structure

No JSON Preview found...

This shows a JSON of a connector.