wire

Description

A wire connects an output to an input. The connected output is usually of another element than the connected input, but they may also belong to the same element. The effect of the wire is that the value of the connected output is transferred to the connected input.

Element outputs can be connected to as many wires as you like, but inputs can be connected to just one wire. Elements like logOr have multiple inputs in_0 ... in_999, but each input must be connected to its own wire.

If the types of the connected output and inputs differ, a type translation occures. The string translations can be preset ..... machine element.

Input Output
  boolean numeric string (uses preset formatting)
boolean - false >> 0
true >> 1
false >> "false" or "0"
true >> "true" or "1"
numeric 0 >> false
not 0 >> true
- string representation of number
string "false" or "0" >> false
"true" or "1" >> true
string is parsed for number -
Type translation table

Examples

<!--
    Self-oscillating circuit. 
    As example for connection an output to an input of the same element.
    Note how the component Id can be omitted in the 'from' attribute
    if it connects to an output from the same component.
-->
<logOr id="oscillator">
    <wire from=".invOut" to="in_0"/>
</logOr>