This shows you the differences between two versions of the page.
software:gui-designer:system-manager:feedback-parsing:regex-examples [2012/09/05 11:01] jarrod [Feedback Properties] |
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 data is captured 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 |}} | ||
Line 34: | 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. | + | |
+ | 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. | 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. | ||
Line 41: | Line 43: | ||
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|}} |