Syncer
[flow/Syncer]
Bundles input signals that have the same tag. All inputs must receive exactly one signal for a given tag (or be a parameter) for the bundle (record or tuple, depending on the type of fields
) to be sent.
Example A (record):
fields
is set to ["a", "b"]Inputs ports
a
andb
get createda
receives "Foo"@0b
receives "Bar"@0synced
sends {"a": "Foo", "b": "Bar"}@0
Example B (tuple):
fields
is set to [0, 1]Inputs ports
0
and1
get created0
receives "Foo"@01
receives "Bar"@0synced
sends ["Foo", "Bar"]@0
More: https://github.com/Cranq-io/cranq-tutorials/blob/main/reference/1_application_flow/1_3_synchronization/README.md#example---synchronizing-node-inputs
Keywords: merge, build record, build tuple
Input ports
fields:
(string[] or number[])
Sets a list of inupt port names matching property names in the data sent via
synced
. Must be parameter. Example values:["a", "b"] will result in record output
[0, 1] will result in a tuple output
unsynced:
any
Receives individual item for syncing.
Output ports
synced:
({string: any} or any)[]
Sends synchronized inputs as a record or tuple indexed by the names of the ports they were received through. Example: {"a": "Foo", "b": "Bar"}
Last updated