5.3. Binding¶
This link button is not selected, which means that the property
value is taken from the values entered in manually into the property’s
value field
This link button is selected, which means that the property
value is bound to the value of another component or transport/protocols
data source property. The drop-down list to the left of the property’s
value field allows you to select which component this is bound to.
5.3.1. Usage¶
Select a property and click to initiate the binding.
There will be a dropdown list on the left and a text box on the right.
Select the desired data source (if not selected by default) from the drop-down list. The dropdown list consists a list of bindable components defined in your project. By default,
ti_model_iot_ibm
is selected; this refers to the data model you created.Enter the name of the target-side property you wish to bind to in the input box to the right of this.
You may press CTRL + space bar to trigger auto completion pop up dialog. Auto completion for your target objects is available if GUI Composer parsed JSON formatted data.
For more information on how to bind widgets to display target state or to control the target, please see Target Communication.
5.3.2. Expressions in Bindings¶
GUI Composer has a number of simple type conversions builtin that may be used to adjust display formatting of data received from target system. These conversions include Q math, hex, dec, exp and binary. These conversions may be added anywhere a binding is specified by appending “.$conversion” e.g. In binding edit box:
Replace
"targetVariable"
with"targetVariable.$q##"
, where##
is any digit to specify precision point. e.g.q7
will perform Q7 math.Replace
"targetVariable"
with"targetVariable.$hex#"
, this will displaytargetVariable
in hex format. # specifies number of digits to use for display e.g..$hex4
will display0x0000
Replace
"targetVariable"
with"targetVariable.$dec"
, this will displaytargetVariable
in decimal format. # specifies number of digits to use for display e.g..$dec4
will display0099
Replace
"targetVariable"
with"targetVariable.$exp#"
, this will displaytargetVariable
in scientific format. # specifies number of digits to use for display e.g..$exp7
will display1.1234567 -e10
Replace
"targetVariable"
with"targetVariable.$bin#"
, this will displaytargetVariable
in binary format. # specifies number of digits to use for display e.g..$bin4
will display1010