CommandFusion Wiki

Documentation Resources

User Tools

Site Tools


software:gui-designer:system-manager:feedback-parsing:feedback-properties

Differences

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

Link to this comparison view

software:gui-designer:system-manager:feedback-parsing:feedback-properties [2012/08/16 03:22]
aaron [OnMatch Items]
software:gui-designer:system-manager:feedback-parsing:feedback-properties [2014/06/30 03:42] (current)
jarrod [OnMatch Items]
Line 1: Line 1:
 ====== Feedback Properties ====== ====== Feedback Properties ======
-The Feedback Properties dialog is opened when you are adding a new feedback item via the [[software:​gui-designer:​system-manager:​new-feedback-wizard|New Feedback Wizard]] and you skip the wizard, or when you double click on an existing feedback item within the System Manager tree view to edit its properties.+The Feedback Properties dialog is opened when you are adding a new feedback item when you double click on an existing feedback item within the System Manager tree view to edit its properties.
  
 {{:​software:​gui-designer:​system-manager:​feedback-parsing:​feedback_dialog.png?​nolink|}} {{:​software:​gui-designer:​system-manager:​feedback-parsing:​feedback_dialog.png?​nolink|}}
Line 6: Line 6:
 ==== System ==== ==== System ====
  
-Select the existing [[software:​gui-designer:​system-manager:​external-systems|External System]] to assign the feedback item to. You must have at least one system defined in your project to add a feedback item.+Select the existing [[software:​gui-designer:​system-manager:​system-properties|External System]] to assign the feedback item to. You must have at least one system defined in your project to add a feedback item.
  
 ==== Feedback Name ==== ==== Feedback Name ====
Line 33: Line 33:
 === Name === === Name ===
  
-The name of the capture group is for identification purposes, as well as defining the token name if you are assigning a token. You can enter any name you like, but the idea is to use a descriptive name so when come back to edit the feedback properties again lager, you can easily remember what data the capture group is meant to be capturing. If assigning a token, we recommend wrapping the name in square brackets so you can easily identify the token name when using it in dynamic commands, etc, later on.+The name of the capture group is for identification purposes, as well as defining the token name if you are assigning a token. You can enter any name you like, but the idea is to use a descriptive name so when come back to edit the feedback properties again later, you can easily remember what data the capture group is meant to be capturing. If assigning a token, we recommend wrapping the name in square brackets so you can easily identify the token name when using it in dynamic commands, etc, later on
 + 
 +This name can be referenced in other feedback properties by wrapping the name in dollar signs. So for example, if the capture group was given a name ''​myData''​ then we could reference it within other capture groups or onmatch items within the same feedback item by using ''​$myData$''​.
  
 === Capture Index === === Capture Index ===
Line 61: Line 63:
 === Join === === Join ===
  
-The join number of the target type to assign the captured data to. This join number should match a GUI object within pages and subpages.+The join number of the target type to assign the captured data to. This join number should match a GUI object within ​your project ​pages and subpages.
  
 === Token Type === === Token Type ===
  
-This option ​allows you to set the value of a join, the value of a token on a specific object, or both at the same time.\\+This property ​allows you to set the value of a join, the value of a [[software:​gui-designer:​tokens|token]] on a specific object, or both at the same time.\\
 For example, if you want to set a join value of an object, you would leave this set to '​value'​. If you wanted to set a token on an object (or a global token), this should be set to '​token'​.\\ For example, if you want to set a join value of an object, you would leave this set to '​value'​. If you wanted to set a token on an object (or a global token), this should be set to '​token'​.\\
 Otherwise, if you wanted to both set the join value of an object, and set a token on the object, you would set this option to '​both'​.\\ Otherwise, if you wanted to both set the join value of an object, and set a token on the object, you would set this option to '​both'​.\\
-If you select to set a token (or both), then the token name is taken from the [[software:​gui-designer:​system-manager:​feedback-parsing:​feedback-properties#​feedback-name|#Name]] property of the Capture Group.+If you select to set a token (or both), then the token name is taken from the [[#Name]] property of the Capture Group (described above). 
 + 
 +Read more about tokens in our [[software:​gui-designer:​tokens|Tokens wiki page]].
  
 ==== Min Val & Max Val ==== ==== Min Val & Max Val ====
  
-The minimum and maximum value options are only relevant if the #Data Type is set to '​Analog'​. They allow for the value to be scaled to the 0 to 65535 range that sliders and gauges use.\\+The minimum and maximum value options are only relevant if the Data Type is set to '​Analog'​. They allow for the value to be scaled to the 0 to 65535 range that sliders and gauges use.\\
 For example, if your TV set reports a volume range from 0 to 100, and you want to display this data in a gauge, you would want the gauge to be full at 100 and empty at 0. So set the min val to 0 and the max val to 100, then any values between that range that parse through the feedback system will be scaled to the 0 to 65535 range before being assigned to the analog join. For example, if your TV set reports a volume range from 0 to 100, and you want to display this data in a gauge, you would want the gauge to be full at 100 and empty at 0. So set the min val to 0 and the max val to 100, then any values between that range that parse through the feedback system will be scaled to the 0 to 65535 range before being assigned to the analog join.
  
 ==== Off Value & On Value ==== ==== Off Value & On Value ====
  
-The off and on value options are only relevant if the #Data Type is set to '​Digital'​. They allow for the value to be set to a boolean value (0 or 1) no matter what the captured value i+The off and on value options are only relevant if the Data Type is set to '​Digital'​. They allow for the value to be set to a boolean value (0 or 1) no matter what the captured value i
 For example, if your TV set reports the power status with the text '​POFF'​ and '​PON',​ and you want to display the power status on a button state, you would need the digital join value to be set to 0 or 1 depending on the captured value of '​POFF'​ or '​PON'​. So set the 'Off Value' to the string '​POFF'​ and the 'On Value' to the string '​PON'​ and when the feedback system parses the capture group, it will set the digital join value to 0 if the string matches '​POFF'​ and set the digital join value to 1 if the string matches '​PON'​. For example, if your TV set reports the power status with the text '​POFF'​ and '​PON',​ and you want to display the power status on a button state, you would need the digital join value to be set to 0 or 1 depending on the captured value of '​POFF'​ or '​PON'​. So set the 'Off Value' to the string '​POFF'​ and the 'On Value' to the string '​PON'​ and when the feedback system parses the capture group, it will set the digital join value to 0 if the string matches '​POFF'​ and set the digital join value to 1 if the string matches '​PON'​.
 +
 +If only the off value or only the on value is assigned a value (and one of them is left blank) then the join will change state to the defined value only on an exact match, and all other times would change to the undefined value. For example, if the 'on value' was assigned a value of "​PON"​ then the digital join would only be set high/active when the exact text "​PON"​ is received. Any other data captured would result in the join being set low/​inactive.
  
 ==== Transform ==== ==== Transform ====
  
-This option is only relevant if the #Data Type is set to '​Analog'​. This allows you to perform math expressions on the captured value before assigning it to the chosen join or token.\\ +This option is only relevant if the Data Type is set to '​Analog'​. This allows you to perform math expressions on the captured value before assigning it to the chosen join or token.\\ 
-See the [[software:​gui-designer:​system-manager:​math-expressions|Math Expressions]] entry for more details on how to use this field.+See the [[software:​gui-designer:​math-expressions|Math Expressions]] entry for more details on how to use this field.\\ 
 +You can enter the value captured by the capture group simply as ''​value''​.\\ 
 +You can use data captured by other capture groups into the transform field by referencing their name wrapped in dollar signs, eg. ''​$captureGroupName$''​.
  
 +For example, you could dynamically set the join value using some math and using data from another capture group like so: ''​(value/​100)*$myData$''​ where ''​myData''​ is the name of another capture group in your feedback item.
 ==== Hex Data ==== ==== Hex Data ====
  
-This option is only relevant if the #Data Type is set to '​Analog'​. This allows you to convert a hex value to a decimal value using the following options:+This option is only relevant if the Data Type is set to '​Analog'​. This allows you to convert a hex value to a decimal value using the following options:
   * Non-hex - In this mode, the Hex Data option has no effect on the captured data. Use this mode (default) if you are not capturing hex data.   * Non-hex - In this mode, the Hex Data option has no effect on the captured data. Use this mode (default) if you are not capturing hex data.
   * Hex Byte mode - In this mode, the parser will convert the captured bytes into a decimal value. Up to 4 bytes (Long) can be converted to a decimal value.   * Hex Byte mode - In this mode, the parser will convert the captured bytes into a decimal value. Up to 4 bytes (Long) can be converted to a decimal value.
Line 94: Line 103:
 ==== List Index ==== ==== List Index ====
  
-This option is only relevant if the #List Join is a number above zero. This allows you to calculate which item in a list that captured values in this feedback item will be assigned to. This is a math expression field, where the '​value'​ variable is set to the captured value of the capture index.\\+This option is only relevant if the List Join is a number above zero. This allows you to calculate which item in a list that captured values in this feedback item will be assigned to. This is a [[software:​gui-designer:​math-expressions|Math Expressions]], where the '​value'​ variable is set to the captured value of the capture index.\\
 For example, if part of the incoming message specified a list index, you can capture it and use the value to tell the feedback item which index it is assigning other capture group join values to. Remember that the list index is zero-based, so a common use of this property is to set it to '​value-1'​ if the incoming data is 1-based. For example, if part of the incoming message specified a list index, you can capture it and use the value to tell the feedback item which index it is assigning other capture group join values to. Remember that the list index is zero-based, so a common use of this property is to set it to '​value-1'​ if the incoming data is 1-based.
- 
 ==== OnMatch Items ==== ==== OnMatch Items ====
  
-Along with capture groups, the feedback processing order can include onmatch items. These are used to set the value of a join or token when a match is found. Unlike capture groups, these allow you to set a join or token to any value, rather than a captured value.+Along with capture groups, the feedback processing order can include onmatch items. These are used to set the value of a join or token when a match is found. Unlike capture groups, these allow you to set a join or token to any value, rather than a captured value. Even a dynamically calculated join number can be used, by referencing capture group names within the join property of the onmatch item. [[https://​github.com/​CommandFusion/​DemoUserInterfaces/​tree/​master/​DynamicJoinAssignment|See a demo of dynamic join value assignment on GitHub]].
  
 === OnMatch Target Type === === OnMatch Target Type ===
  
-Refer to #Target Type in #Capture Group description above. This property works exactly the same for both #Capture Groups and #OnMatch Items.+Refer to Target Type in Capture Group description above. This property works exactly the same for both Capture Groups and OnMatch Items.
  
 === OnMatch Join === === OnMatch Join ===
  
-Again, refer to #Join properties in the #Capture Group description above.+Again, refer to Join properties in the Capture Group description above. The only difference here is that onmatch items can dynamically assign the join number using math expressions and referencing other capture group names (by wrapping them in dollar signs). [[https://​github.com/​CommandFusion/​DemoUserInterfaces/​tree/​master/​DynamicJoinAssignment|See a demo of dynamic join value assignment on GitHub]].
  
 === Assign Token === === Assign Token ===
Line 115: Line 123:
 === Token Name === === Token Name ===
  
-This option is only relevant if the #Assign Token option is set to True. When assigning a token, this is the name of the token to be assigned. This name is how you reference a token in other aspects of guiDesigner,​ such as in dynamic Commands.+This option is only relevant if the Assign Token option is set to True. When assigning a token, this is the name of the token to be assigned. This name is how you reference a token in other aspects of guiDesigner,​ such as in dynamic Commands.
  
 === Value === === Value ===
Line 121: Line 129:
 The value property is where you enter the value you want to assign to the join or token. This property allows you to embed math expressions by wrapping the math in double curly braces. You can also reference other capture indexes by name in the value field, by wrapping the capture group name in dollar signs.\\ The value property is where you enter the value you want to assign to the join or token. This property allows you to embed math expressions by wrapping the math in double curly braces. You can also reference other capture indexes by name in the value field, by wrapping the capture group name in dollar signs.\\
  
-See the [[software:​gui-designer:​system-manager:​math-expressions|Math Expressions]] entry for more details on how to use this field.+See the [[software:​gui-designer:​math-expressions|Math Expressions]] entry for more details on how to use this field.
 As an example, you could set the value property to any of the following: As an example, you could set the value property to any of the following:
-  ​10 +  ​* ''​10''​ 
-  ​this is a text value +  ​* ''​this is a text value''​ 
-  ​%%{{10*[sometoken]}}%% +  ​* ''​%%{{10*[sometoken]}}%%''​ 
-  ​this is mixing text with [sometoken] and math %%{{10*[sometoken]}}%% +  ​* ''​this is mixing text with [sometoken] and math %%{{10*[sometoken]}}%%''​ 
-  ​this is referencing another $captureGroupName$+  ​* ''​this is referencing another $captureGroupName$''​
software/gui-designer/system-manager/feedback-parsing/feedback-properties.1345087337.txt.gz · Last modified: 2012/08/16 03:22 by aaron