Firebird/Concepts: Difference between revisions

From stonehomewiki
Jump to navigationJump to search
Line 104: Line 104:
<div class="mw-collapsible-preview">Port</div>
<div class="mw-collapsible-preview">Port</div>
<div class="mw-collapsible-content">
<div class="mw-collapsible-content">
Represent a input port or output port
Represent an input port or output port of a node.


Properties:
<b>Properties</b>
* type: either PortType.INPUT or PortType.OUTPUT, represent it is a input port or output port
<pre><nowiki>
* name: name of the port, it is unique within the node
* type: Either PortType.INPUT or PortType.OUTPUT, represent it is a input port or output port
* owner: the node which this port belongs to
* id:   ID of the port, it is unique within the node
* connected_ports: other ports connected to this port
* owner: The node which this port belongs to
</nowiki></pre>


Methods:
<b>method: <nowiki>>> and <<</nowiki></b>
<pre><nowiki>
<pre><nowiki>
def connect(self, *ports: Union["Port", Node])
# connect this port to other port
# connect this port to other port
# see Node document.
</nowiki></pre>
</nowiki></pre>


Line 122: Line 122:
def emit(self, json_data:Any)
def emit(self, json_data:Any)


# emit data to this port
# emit JSON data to this port
</nowiki></pre>
</nowiki></pre>



Revision as of 04:41, 13 May 2023

Firebird

Overview

Models

Port