CommandFusion Wiki

Documentation Resources

User Tools

Site Tools


software:iviewer:iviewer-protocol

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

software:iviewer:iviewer-protocol [2015/03/03 01:12]
jarrod
software:iviewer:iviewer-protocol [2015/03/04 22:56] (current)
jarrod [Digital Joins]
Line 1: Line 1:
 ====== iViewer Protocol ====== ====== iViewer Protocol ======
-iViewer (our mobile control app) has a built in protocol for expressing UI events such as button presses and slider drags. We call this the '​iViewer Protocol'​.+[[software:​start|iViewer]] (our mobile control app) has a built in protocol for expressing UI events such as button presses and slider drags. We call this the '​iViewer Protocol'​.
  
 The protocol can also handle updating the UI from external control. The protocol can also handle updating the UI from external control.
Line 7: Line 7:
 All messages in the iViewer Protocol take the form of: All messages in the iViewer Protocol take the form of:
  
-''​[identifier]=[value][h03]''​+''​[identifier]=[value]\x03''​
  
-Each message is delimited with the End Of Message (EOM) hex value of 03. This delimeter ​will appear as h03 in all message examples throughout this document.+Each message is delimited with the End Of Message (EOM) hex value of 03. This delimiter ​will appear as ''​\x03'' ​in all message examples throughout this document.
  
 ===== Indentifiers ===== ===== Indentifiers =====
Line 16: Line 16:
   * Digital Joins - ''​d#''​   * Digital Joins - ''​d#''​
   * Analog Joins - ''​a#''​   * Analog Joins - ''​a#''​
-  * Serial Joins - s# +  * Serial Joins - ''​s#''​ 
-  * Password Validation - p +  * Password Validation - ''​p''​ 
-  * Initialize - i +  * Initialize - ''​i''​ 
-  * Orientation Mode Change – m +  * Orientation Mode Change – ''​m''​ 
-  * Heartbeat Message – h +  * Heartbeat Message – ''​h''​ 
-  * Lists – l# (lowercase L)+  * Lists – ''​l#'' ​(lowercase L)
  
-Digital, Analog and Serial join identifiers must be combined with a join number (starting at 1). For example ''​d12=0h03'',​ where the join number is 12.+Digital, Analog and Serial join identifiers must be combined with a join number (starting at 1). For example ''​d12=0\x03'',​ where the join number is 12.
  
 ===== Digital Joins ===== ===== Digital Joins =====
Line 29: Line 29:
 Digital joins can have a value of either 0 or 1 (low or high, off or on). A typical Digital join message looks like this: Digital joins can have a value of either 0 or 1 (low or high, off or on). A typical Digital join message looks like this:
  
-''​d1=1h03''​+''​d1=1\x03''​
  
 The above message sets digital join 1 to a value o f 1 (high). The above message sets digital join 1 to a value o f 1 (high).
Line 35: Line 35:
 The following GUI elements make use of Digital joins: The following GUI elements make use of Digital joins:
  
-  - Buttons+  - Buttons ​- **Note: Simulation mode does NOT affect the communications. Messages are always sent for press/​release events, regardless of the button state.**
     - Changes button state depending on value (0 = inactive state, 1 = active state).     - Changes button state depending on value (0 = inactive state, 1 = active state).
     - On Press, sets the join value to 1 (high).     - On Press, sets the join value to 1 (high).
Line 58: Line 58:
 Analog joins can have a value of between 0 and 65535 inclusive. A typical Analog join message looks like this: Analog joins can have a value of between 0 and 65535 inclusive. A typical Analog join message looks like this:
  
-''​a23=54677h03''​+''​a23=54677\x03''​
  
 The above message sets Analog join 23 to a value of 54677. The above message sets Analog join 23 to a value of 54677.
Line 75: Line 75:
 Serial joins can have any string value. A typical Serial join message looks like this: Serial joins can have any string value. A typical Serial join message looks like this:
  
-''​s12=Hello World!h03''​+''​s12=Hello World!\x03''​
  
 The above message sets Serial join 12 to a value of ‘Hello World!’ (without quotes). The above message sets Serial join 12 to a value of ‘Hello World!’ (without quotes).
Line 98: Line 98:
 ===== Password Validation ===== ===== Password Validation =====
  
-Connections between ​the Viewer ​and Server can be password protected to prevent someone connecting to your Server without authorization. The password is set on the Server side, and in the system settings in your guiDesigner projects.+Connections between ​iViewer ​and Server can be password protected to prevent someone connecting to your Server without authorization. The password is set on the Server side, and in the system settings in your guiDesigner projects.
  
 At the initialization of a communication session between iViewer and the Server, iViewer will send a message containing the connection password. At the initialization of a communication session between iViewer and the Server, iViewer will send a message containing the connection password.
Line 106: Line 106:
 The message sequence goes like this: The message sequence goes like this:
  
-Connect  ​ion made +  ​Connection ​made 
-  - Viewer ​sends password +  - iViewer ​sends password 
-    - ''​p=<​PasswordValueEnteredInSettings>​h03''​+    - ''​p=<​PasswordValueEnteredInSettings>​\x03''​
   - If the password matches what’s in the Server settings, the Server will reply with:   - If the password matches what’s in the Server settings, the Server will reply with:
-    - ''​p=okh03''​+    - ''​p=ok\x03''​
   - If the password doesn’t match, the Server will reply with:   - If the password doesn’t match, the Server will reply with:
-    - ''​p=badh03''​+    - ''​p=bad\x03''​
  
 If the password doesn’t match, iViewer will not load the GUI and will show an error message to the user informing them of the password error. If the password doesn’t match, iViewer will not load the GUI and will show an error message to the user informing them of the password error.
Line 119: Line 119:
 Once the password has been authenticated,​ iViewer will send the following initialization message: Once the password has been authenticated,​ iViewer will send the following initialization message:
  
-''​i=1h03''​+''​i=1\x03''​
  
 The Server will then reply with a group of messages informing the Viewer of any join state values. Only joins with values other than 0 (for Digital and Analog joins) or blank (for Serial joins) will be included in this group of messages. The Server will then reply with a group of messages informing the Viewer of any join state values. Only joins with values other than 0 (for Digital and Analog joins) or blank (for Serial joins) will be included in this group of messages.
Line 127: Line 127:
 A typical group of initialization messages will look like this: A typical group of initialization messages will look like this:
  
-''​d12=1h03a1=4555h03s43=Hello World!h03''​+''​d12=1\x03a1=4555\x03s43=Hello World!\x03''​
  
 As you can see, this is just a group of standard join messages (as described earlier in this document) concatenated,​ each message ending with the delimiter value of hex 03. As you can see, this is just a group of standard join messages (as described earlier in this document) concatenated,​ each message ending with the delimiter value of hex 03.
Line 138: Line 138:
 When the orientation mode of iViewer changes, it sends the following command, depending on the mode being changed to: When the orientation mode of iViewer changes, it sends the following command, depending on the mode being changed to:
  
-''​m=portraith03''​+''​m=portrait\x03''​
  
 or or
  
-''​m=landscapeh03''​+''​m=landscape\x03''​
  
 Again, the value is the orientation mode being change to. Again, the value is the orientation mode being change to.
Line 154: Line 154:
 iViewer sends the following heartbeat command: iViewer sends the following heartbeat command:
  
-''​h=0h03''​+''​h=0\x03''​
  
 and expects the heartbeat reply message of: and expects the heartbeat reply message of:
  
-''​h=1h03''​+''​h=1\x03''​
  
 ===== Dynamic, scrolling Lists ===== ===== Dynamic, scrolling Lists =====
Line 207: Line 207:
 Fields definition: Fields definition:
  <​join in subpage>​=<​join value><​FIELD_SEP>​  <​join in subpage>​=<​join value><​FIELD_SEP>​
 +
 +List Scrolling:
 + ​s<​FIELD_SEP>​index<​FIELD_SEP>​type<​FIELD_SEP>​animated
 +
 +where
 +  * index: the index of the row we want to scroll to
 +  * type: desired position on screen:
 +    * 0: position row '​index'​ at top of display
 +    * 1: position row '​index'​ at middle of display
 +    * 2: position row '​index'​ at bottom of display
 +    * 3: scroll by '​index'​ rows (can be negative)
 +    * 4: scroll at absolute pixel value '​index'​ (for pixel-perfect positioning)
 +    * 5: position row '​index'​ anywhere in display
 +  * animated: whether the scroll operation should be animated (1 or 0)
 </​sxh>​ </​sxh>​
  
software/iviewer/iviewer-protocol.1425345156.txt.gz · Last modified: 2015/03/03 01:12 by jarrod