v1.2.0.1-beta1
|
The global TP
namespace is used as a container for all Touch Portal API methods, which are invoked with TP.
qualifier, eg. TP.stateUpdate("Hello!");
.
Static Public Member Functions | |
Sending Data | |
These functions all send information or commands to Touch Portal. | |
void | stateUpdate (String value) |
void | stateUpdate (String name, String value) |
void | stateUpdateById (String id, String value) |
void | stateCreate (String id, String parentGroup, String desc="", String defaultValue="") |
void | stateRemove (String id) |
void | choiceUpdate (String id, Array< String > values) |
void | choiceUpdateInstance (String id, String instanceId, Array< String > values) |
void | connectorUpdate (String shortId, int value) |
void | connectorUpdateByLongId (String connectorId, int value) |
void | showNotification (String notificationId, String title, String message, Array< Object > options=[],< Function|String|Array > callback=null) |
void | settingUpdate (String name, String value) |
void | stateUpdate (String value) |
void | stateUpdate (String name, String value) |
Events | |
These are events which are raised whenever some kind of data update is received from Touch Portal. Events may pass one or more parameters to callback handlers (check documentation for specific events). There are two syntactical ways to connect a callback function to an event. First is by using the usual 'on*' style syntax: TP.oneventName( (parameters) => { .... } );
The global TP namespace is used as a container for all Touch Portal API methods, which are invoked wi... Definition: touchportal.dox:7 The other way is with the TP.eventName.connect( (parameters) => { .... } );
Both forms have a 2-parameter version which allows a context object to be given, which then becomes the "this" object when the event handler callback is executed. | |
void | messageEvent (Object message) |
void | broadcastEvent (String event, Object data) |
void | connectorIdsChanged (String instanceName, String shortId) |
Connector Data | |
Touch Portal reports connector instances to the plugin via These messages are parsed and logged into a database. The functions in this group can be used to query the data based on various criteria about logged connectors. The connector short IDs can then be used to send updates back to Touch Portal, which will move the corresponding slider(s) into a particular position. | |
Array< String > | getConnectorShortIds (Object criteria={}) |
Array< ConnectorRecord > | getConnectorRecords (Object criteria={}) |
ConnectorRecord | getConnectorByShortId (String shortId) |
Other Data | |
Miscellaneous other data/information access functions. | |
String | currentPageName () |