CommandFusion Wiki

Documentation Resources

User Tools

Site Tools


software:gui-designer:system-manager:feedback-parsing:regex-examples

Differences

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

Link to this comparison view

software:gui-designer:system-manager:feedback-parsing:regex-examples [2012/09/05 10:56]
jarrod [Source Selection Feedback]
software:gui-designer:system-manager:feedback-parsing:regex-examples [2013/07/01 12:39] (current)
terrylau [Regex Tester]
Line 23: Line 23:
 ===== Regex Tester ===== ===== Regex Tester =====
  
-You can use the Regex Tester in guiDesigner to test your regex pattern and ensure the correct ​capture groups are set when any of the 8 different messages from Opus come through the feedback system.+You can use the [[software:​gui-designer:​regex-tester|Regex Tester]] in guiDesigner to test your regex pattern and ensure the correct ​data is captured ​when any of the 8 different messages from Opus come through the feedback system.
  
-{{:​software:​gui-designer:​system-manager:​feedback-parsing:​01_regex_example_tester.png?​nolink|}} +{{ :​software:​gui-designer:​system-manager:​feedback-parsing:​01_regex_example_tester.png?​nolink |}}
- +
-Note the 8 capture groups found, and only one is reporting a value.+
  
 ===== Feedback Properties ===== ===== Feedback Properties =====
Line 36: Line 34:
 {{:​software:​gui-designer:​system-manager:​feedback-parsing:​01_regex_example_feedback_properties.png?​nolink|}} {{:​software:​gui-designer:​system-manager:​feedback-parsing:​01_regex_example_feedback_properties.png?​nolink|}}
  
-Notice the 'Off Value' is always left empty - this ensures when there is an empty capture for that group that the assigned digital join will go low.\\ +Add a capture group for each expected source selection value that could be returned by the device. In this example there are 8 possible sources, so we have created 8 capture groups, all referencing '​capture index' 1. This means '​reference the data captured by the first set of round brackets in the regex'​. 
-Also notice the 'On Value' is assigned the actual value that will be captured by the regex when we want to set the assigned digital join high. If this was left empty as well, then the assigned digital join is set to either low or high depending if the captured value results in a 0 or 1 by forcing the captured value to return a boolean (0 or 1) value. So in this example leaving the 'On Value' empty would also work, as the numbers 1 through 8 all result in a boolean value of 1 (basically any number above 0 will result in a boolean 1), yet the empty capture values would result in a boolean 0.+ 
 +Notice the 'Off Value' is always left empty - this ensures when there is any value other than the 'On Value' captured, ​the assigned digital join will go low (inactive button state).\\ 
 +Also notice the 'On Value' is assigned the actual value that will be captured by the regex when we want to set the assigned digital join high (active button state). 
 +If this was left empty as well, then the assigned digital join is set to either low or high depending if the captured value results in a 0 or 1 by forcing the captured value to return a boolean (0 or 1) value.
  
 ===== Assigning Join Numbers ===== ===== Assigning Join Numbers =====
  
 In the above Feedback Properties example, notice the join numbers 1 through 8 are assigned, and they are set to '​Digital'​ type. These join numbers can then be assigned to a button in your GUI to change the state of the button when the feedback is processed from the system.\\ In the above Feedback Properties example, notice the join numbers 1 through 8 are assigned, and they are set to '​Digital'​ type. These join numbers can then be assigned to a button in your GUI to change the state of the button when the feedback is processed from the system.\\
-Simply create 8 buttons on a page and assign then join numbers 1 through 8 using the 'Click assign digital join' tool in the main toolbar (much quicker than editing ​each buttons ​properties manually).+Simply create 8 buttons on a page and assign then join numbers 1 through 8 using the 'Click assign digital join' tool in the main toolbar (much quicker than editing ​all button ​properties manually).
  
 {{:​software:​gui-designer:​system-manager:​feedback-parsing:​01_regex_example_page.png?​nolink|}} {{:​software:​gui-designer:​system-manager:​feedback-parsing:​01_regex_example_page.png?​nolink|}}
software/gui-designer/system-manager/feedback-parsing/regex-examples.1346842616.txt.gz · Last modified: 2012/09/05 10:56 by jarrod