Boolean
Booleans are two state (digital) values. In Rubix Wires Boolean values are passed as ‘true’ or ‘false’. These could be equivalent to ON/OFF, START/STOP, RUNNING/STOPPED, YES/NO, ….
Numeric
Numerics are number values. They can be integers, or have decimal values.
String
Strings are text values made of characters. Strings can contain numbers but those numbers will be interpreted as text characters.
JSON
JSON is an open standard file format and data interchange format
that uses human-readable text to store and transmit data objects
consisting of attribute–value pairs and arrays. It is a common data
format with diverse uses in electronic data interchange.
Null
Null is a valid value within Rubix Wires. Null can be used when passing a message where no Boolean, Numeric, or String value is appropriate. For most nodes, when Null is passed into it that input will be ignored, or Null will be passed on. However, if an input value is required for the node to operate, the node will not function. Null values can be generated by any ‘constant’ type node in the ‘Points’ category; It can also be entered directly into many node settings fields.
For Boolean settings fields, null will be selectable from a drop-down option when applicable:
For Numeric and String settings fields null will be passed when the settings field is left blank:
Boolean to Numeric
If a Boolean value is passed to a Numeric input:
- Boolean `true` will be interpreted as Numeric 1.
- Boolean `false` will be interpreted as Numeric 0.
Boolean to String
If a Boolean value is passed to a String input:
- Boolean `true` will be interpreted as String `true`.
- Boolean `false` will be interpreted as String `false`.
Numeric to Boolean
If a Numeric value is passed to a Boolean input:
- Numeric 0 will be interpreted as Boolean `false`.
- Numeric 1 will be interpreted Boolean `true`.
- All other Numeric values will be interpreted as Boolean `false`.
Numeric to String
If a Numeric value is passed to a String input it will be interpreted as the String value of the Numeric. For example Numeric 1234 passed to a String input will be interpreted as String `1234` (a string of text.)
String to Boolean
If a String value is passed to a Boolean input:
- String `true` or String 1 will be interpreted as Boolean `true`.
- All other String values will be interpreted as Boolean `false`.
String to Numeric
If a String value is passed to a Numeric input:
- If the leading portion of the String value is a number (eg. ‘123hello’), then it will be interpreted as a Numeric with the value of the leading numeric portion (eg. String ‘123hello’ will be interpreted as Numeric 123). This can include decimal values (eg. String ‘123.45hello’ will be interpreted as Numeric 123.45).
- Numeric portions of String values that come after a text (non-numbers) will be ignored (eg. String’ 123hello789’ will be interpreted as Numeric 123).
- String values that do not have a leading numeric portion will be interpreted as Null.