Knowledge Base - Nodes, Ports, and Bindings

A good understanding of the fundamental building blocks of a visual script is necessary to effectively use iCanScript.

A visual script includes three (3) types of component being:

  • Nodes;
  • Ports; and …
  • Bindings.
Figure 1. Visual Script Building Blocks.
Figure 1. Visual Script Building Blocks.

The node is the primary ingredient of visual scripts. Its main purpose is to encapsulate various type of behaviours such as:

  • variables & functions;
  • algorithms;
  • states and state charts; and
  • nested visual scripts (i.e. packages or submodules).

The ports are the public interfaces to nodes. Multiple ports may exist on the same node each representing a distinct interface. A single port is directional and is either an input port or an output port both never both. The ports are further classified as:

  • data flow: feeding or extracting data to/from the node behaviour;
  • control flow: controlling the execution state of the node (boolean value);
  • state transition: controlling the state transition triggers (state charts only).

The bindings define relationships between ports. Bindings can only be created between compatible ports. Furthermore, bindings are directional and can only exist between an output port and one or more inputs port(s). That is, connecting input ports together or output ports together is not permitted. The following summarizes the permissible bindings:

  • from an output data port to one or more input data or control port(s) if the data type is compatible;
  • from an output control port to one or more input data or control port(s) if the data type is compatible with a boolean value;
  • from an output state port to one input state port using a transition trigger module.

Exception: iCanScript includes a special port, named the Multiplexer Port, that bridges multiple output ports into a single output port. This port is especially useful when multiple exclusive execution paths of a visual script must combine into a single set of data values. (see [Data Flow Diagram][] for additional details).


iCanScript Advanced Topic

iCanScript internally implements the Multiplexer Port using a specialized data multiplexer node. For convenience to the user, this multiplexer node is always iconized and positioned on the edge of the parent node giving the illusion of being a multiplexer port.

Details

Created : 2015-03-16 19:56:58, Last Modified : 2015-03-16 19:58:27

User Comments

Add a Comment

Search Articles

Member Login