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
xandycoordinates 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 thexcoordinate outputs the data only once every three cycles. Checkout howccat.din1is acknowledged only whenccat.din0also 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)])