ccat

Short for concatenate, the ccat() gear combines data from its inputs and outputs them in form of a Tuple. The ccat() gear waits for all of its inputs to have available data before combining and outputtting them.

ccat(*din) → Tuple[din]:

Let’s combine x and y coordinates to form a point:

x = drv(t=Uint[5], seq=[10, 11, 12])
y = drv(t=Uint[5], seq=[20, 21, 22])

ccat(x, y) | check(ref=[(10, 20), (11, 21), (12, 22)])

Next example demonstrates how ccat() waits for its inputs. The producer of the x coordinate outputs the data only once every three cycles. Checkout how ccat.din1 is acknowledged only when ccat.din0 also becomes available:

x = drv(t=Uint[5], seq=[10, 11, 12]) | delay(2)
y = drv(t=Uint[5], seq=[20, 21, 22])

ccat(x, y) | check(ref=[(10, 20), (11, 21), (12, 22)])