String Interrogator State Transmission
Description
This transmission carries all necessary parameter to define the state of a StringInterrogator Property.
The StringInterrogator-data is transmitted in a data string, the syntax for this string is described below.
Layout
Byte-Index | Description | Type |
---|---|---|
8 | Field Visibilities | Single Char |
9 | Field One Input Type | Single Char |
10 | Field Two Input Type | Single Char |
11 | Navigate back on button press | Single Char |
12 | Accept non-ASCII Character | Single Char |
13 .. | StringInterrogator Data | String |
.. End | Delimiter <CR> | Char |
Field Visibilities (8)
This parameter controls the visibility of the input fields.
Value | Description |
---|---|
0 | Both fields are visible |
1 | Only field One is visible |
2 | Only field Two is visible |
Field One Input Type (9) and Field Two Input Type (10)
These paramter control the displayed soft-keyPad and the accepted input in the appropriate fields.
Value | Description |
---|---|
0 | Input-Type Text (default) |
1 | Input-Type Text Password |
2 | Input-Type Number |
2 | Input-Type Number Password |
Navigate back on button press (11)
If this value is set, the app navigates automatically back to the DeviceMainPage when the user has pressed the button. Note that this does not work in StandAloneMode.
Value | Description |
---|---|
0 | Stay on page when button is clicked |
1 | Navigate back when button is clicked |
Accept non-ASCII characters (12)
If this value is set, the app accepts non-ASCII character input in the fields. Normally an 'invalid input' warning will be displayed and button press is not possible as long as the input is invalid. Note that if non-ASCII characters are accepted, they will be transmitted with unicode escape literals since non-ASCII characters are not supported in a transmission string.
Value | Description |
---|---|
0 | Do not accept non-ASCII input |
1 | Accept non-ASCII |
String Interrogator Data String (13..End)
With the data string configurations for the fields an they're descriptors can be done in a propery state transmission from remote device to the app. If the user pressed the confirm button, the entered data will be sent back to the remote device. All data must be transmitted with an accessor to identify the element to which it should be applied:
Accessor | Description |
---|---|
F1 | Descriptor for field One |
F2 | Descriptor for field Two |
H1 | Hint in field One |
H2 | Hint in field Two |
C1 | Content in field One |
C2 | Content in field Two |
B | Button Text |
The accessor and the data must be separated with a double colon '::' and if more than on definition is included in the string they must be separated with a double semicolon ';;'.
// Here the descriptor for field 1+2 is set and the button text is set
char tData[] = "F1::Username;;F2::Password;;B::Submit;;";
// To reset some fields the empty placeholder can be used
// Here the content of both input fields are cleared
char tData[] = "C1::_;;C2::_;;";
Note that on the other way around, if the user clicks the confirm button and the data in the fields is transmitted from app to remote device, only the 'C1' and 'C2' accessors are included. These accessors carry the data entered in the content fields when the user has clicked the button. If a field is emplty, the empty placeholder is transmitted:
// The user has entered 'MyName' in field one and '12345' in field two
char tData[] = "C1::MyName;;C2::12345;;";
// Here the user entered nothing in field two
char tData[] = "C1::MyName;;C2::_;;";