• skip to content

CommandFusion Wiki

Documentation Resources

User Tools

  • Login

Site Tools

  • Recent changes
  • Media Manager
  • Sitemap
Trace:

math-expressions

Search

You can find the results of your search below. If you didn't find what you were looking for, you can create or edit the page named after your query with the appropriate tool.

Results

Matching pagenames:

  • Math Expressions
Math Expressions: 48 Hits
====== Math Expressions ====== iViewer embeds a powerful and versatile math expression engine. Math expressions can be inserted in commands and feedback items. The Math expression parser features: * Standard math operators * Parenthesis grouping * Logical (boole... else statements) * Local variables * Multiple math expressions in the same command * Flexible result output ==== Usage ==== Basic math expressions can be written in a standard way using numbers and operators.
Feedback Properties: 22 Hits
pe is set to 'Analog'. This allows you to perform math expressions on the captured value before assigning it to the ... join or token.\\ See the [[software:gui-designer:math-expressions|Math Expressions]] entry for more details on how to use this field... be assigned to. This is a [[software:gui-designer:math-expressions|Math Expressions]], where the 'value' variable is set to the captu... tems can dynamically assign the join number using math expressions and referencing other capture group names (by wra
iViewer for iOS Release Notes: 13 Hits
e where bytes were generated in reverse order for math expressions. * Fix when calculating list index via feedback... Bug Fixes ==== * Fixes for printf statements in math expressions * Fixes for hex byte capture and decimal conver... g startup command). * Generating hex bytes from math expressions. * Ability to stop all macros running, or a spe... images in active state only now supported * Use Math|Expressions in option command target value assignments * Dr
Tokens: 5 Hits
====== Tokens ====== A token is basically a variable that you can store data in or retrieve data from at runtime in your guiDesigner projects. A token has a name and a value. ===== Token Naming ===== Suggested Syntax: ''[name]'' A token can be named anything you like, but we suggest you follow the syntax above, including the square brackets in your token names. By doing this, it makes it easier to see where your token is actually being used within command values, etc. ===== Types of Tokens ===== There are three types of tokens: - Global Tokens - Predefined Tokens - Object Tokens ==== Global Tokens ==== As the name suggests, a global token is available to be used globally throughout your guiDesigner project.\\ Global tokens are defined in Project Properties > Global Token Manager.\\ A global token is the only type of token that can be set to persist its data across launches of iViewer, so you can store state data and retrieve it again the next time iViewer is opened. Using our [[software:iviewer:iviewer-javascript-api|JavaScript API]], you could persist a JSON string across sessions and restore the JSON object on each launch, allowing you to theoretically store any dynamic data across launches. <WRAP center round important 80%> NOTE: Data is not persisted across GUI reloads. Each time the GUI is reloaded (when Reload GUI Layout is enabled in [[software:iviewer:settings|iViewer Settings]]), global token values will be reset to their default value (or blank if no value is defined in the Global Token Manager). </WRAP> ==== Predefined Tokens ==== There are a number of tokens that are predefined for you in certain cases, depending where the token is being used. === Globally defined === * ''[ipv4address]'' - The IP Address of the device. * ''[ipv4netmask]'' - The subnet mask of the device. * ''[ipv4addresshex]'' - The IP Address of the device, in hex bytes. * ''[ipv6address]'' - The IPv6 Address of the device. * ''[ipv6netmask]'' - The IPv6 subnet mask of the device. * ''[networkSSID]'' - The SSID of the Wi-Fi network currently connected. * ''[networkType]'' - The network type currently being used for communications. Eg. None, WiFi, WAN, Other, VPN. * ''[uuid]'' - The device ID of the mobile device running iViewer that is used for licensing purposes. * ''[MACAddress]'' - The MAC Address of the device. Note this will return '02:00:00:00:00:00', since Apple denies any app from accessing the MAC Address since iOS7 onwards. === Attached to every GUI object === * ''[join]'' - The join number and join type of the object, e.g. 'd10' for a [[software:gui-designer:joins|digital join]] of a [[software:gui-designer:buttons|button]], 's4' for the [[software:gui-designer:joins|serial join]] of an [[software:gui-designer:images|image object]], 'a12' for the [[software:gui-designer:joins|analog join]] of a [[software:gui-designer:sliders|slider object.]] * ''[@<join>]'' - Get the 'value' of a specific join. eg: ''[@s10]'' would return the value of serial join 10. ''[@d5]'' would return the value (0 or 1) of digital join 5. * ''[@<join>:<token>]'' - Same as above, but returning the value of a specific token assigned to a specific join. eg. ''[@l5:[count]]'' would return the number of list items in the list assigned join 5. === Attached to all Objects within Lists === Any object within a list ([[software:gui-designer:buttons|button]], [[software:gui-designer:sliders|slider]], [[software:gui-designer:images|image]], etc) will automatically have the following tokens attached to it: * ''[list_join]'' - The join number of the list that the object resides in * ''[item_index]'' - The list index (zero based) of the list item that the object resides in. * ''[count]'' - The total number of items the list contains. * ''[visible]'' - The total number of items that are currently visible within the list. * ''[top]'' - The index of the first visible item within the list. * ''[scrolloffset]'' - The scroll position of the list in pixels. === Attached to gesture actions === See the [[software:gui-designer:gestures#pinch-zoom|gesture wiki entry]] for details on the predefined tokens available for gesture actions. === Attached to sliders === * ''[sliderval]'' - The numerical value of the current slider position, based on the [[software:gui-designer:sliders|slider's]] min and max settings. === Attached to input fields === * ''[inputval]'' - The string value of the input field's current text. ==== Object Tokens ==== Tokens can be assigned to any object via its join number at runtime. These tokens can be set and retrieved at runtime only. For example, you can store the state state of something in a token applied to a button. Then when that button is pressed, use the token value as part of the command that the button sends, or even use the token within a math expression or JavaScript function that the button calls. ===== Using Tokens ===== Tokens can be used throughout your guiDesigner project in a number of ways: * Via our JavaScript API * [[http://www.commandfusion.com/docs/scripting/gui.html#cF.setToken|Setting token values]] * [[http://www.commandfusion.com/docs/scripting/gui.html#cF.getJoin|Getting token values]] * Within command values - simply use the token name within a command value and it will automatically be replaced with the token value when the command is sent. * In [[software:gui-designer:system-manager:feedback-parsing:feedback-properties|feedback processing]] * Within [[software:gui-designer:math-expressions|math expressions]]
Commands: 4 Hits
|token replacements]] and [[software:gui-designer:math-expressions|math expressions]]. ==== Optionally Stop Macro when Command Fires
Sliders: 4 Hits
y using ''Dec'' mode, and [[software:gui-designer:math-expressions|math expressions]] within the command value. For example ''%%{{[sl
Gesture Manager: 2 Hits
ant to assign to the join. This value can include Math Expressions and Tokens. * Assign Token Value = Set this to

Page Tools

  • Show pagesource
  • Old revisions
  • Backlinks
  • Back to top
  • Export PDF
Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki