<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="../../../design/description.xslt" type="text/xsl"?>
<node lang="en" type="DynamicNode.Lib.Basic.NSwitch" assembly="NLibDefault" xmlns="http://dynamicnodes.mastersign.de/description">
  <caption>Switch</caption>
  <group>Basics</group>
  <description>Switches the flow between two directions depending on a conditional value.</description>
  <inPorts>
    <port name="in">
      <type>&lt;TElement&gt;</type>
      <description>Takes arbitrary tokens.</description>
    </port>
    <port name="cond">
      <type>bool</type>
      <type>byte</type>
      <type>short</type>
      <type>int</type>
      <type>long</type>
      <type>float</type>
      <type>double</type>
      <type>System.Decimal</type>
      <type>string</type>
      <type>System.Object</type>
      <description>
        Takes a conditional value. If the currently present value is evaluated to &quot;true&quot;
        incoming tokens from <c>in</c> are passed on to <c>outTrue</c>. If the currently
        present value is evaluated to &quot;false&quot; incoming tokens from <c>in</c>
        are passed to  <c>outFalse</c>.
      </description>
    </port>
    <port name="sendNS">
      <type>bool</type>
        <description>
          Takes a boolean value, specifying if a token with state &quot;not set&quot; is placed
          on the out port currently not choosed for passing tokens.
        </description>
    </port>
  </inPorts>
  <outPorts>
    <port name="outTrue">
      <type>TElement</type>
      <description>
        Passes on tokens from <c>in</c> if the currently present value 
        in the in port <c>cond</c> is evaluated to &quot;true&quot;.
      </description>
    </port>
    <port name="outFalse">
      <type>TElement</type>
      <description>
        Passes on tokens from <c>in</c> if the currently present value
        in the in port <c>cond</c> is evaluated to &quot;false&quot;.
      </description>
    </port>
  </outPorts>
  <helpText>
    <p>
      This node selects an out port for passing values from the in port <c>in</c>
      depending on the conditional value present on the in port <c>cond</c>.
    </p>
    <info>
      The functionality of this node is inverse to the functionality
      of the node type <a href="DynamicNode.Lib.Basic.NSelection.xml">Selection</a>.
    </info>
  </helpText>
  <customArea>
    A schematic visualization of the current switch state.
  </customArea>
</node>