Wire: Difference between revisions
Added detail. Removed stub. |
No edit summary |
||
| Line 10: | Line 10: | ||
[[Category:Block Diagram]] | [[Category:Block Diagram]] | ||
[[Category:Data Communication]] | |||
Latest revision as of 16:05, 26 May 2020
The Wire is the simplest form of data communication in G. In dataflow programming the data literally flows from sources to sinks. A source can be a Control Terminal, Constant, or the output from a Node. The wire connects from a source to a sink which can be an input terminal of another node or the terminal of an Indicator. The wire has a defined data type determined by the source and appears as a "broken wire" if connected to an incompatible data type at the sink. The value on the wire is the data being communicated and can be a value or a reference to an object or memory space depending on the source.
A wire can be forked to input the same data into two or more different sinks. Even when forked the branches could maintain the same memory space if the data is only being read. If the value on the wire is being modified by one of the branches, this will cause a new location in memory for each branch.