Message Merge — Control Systems/Messages And Events
Control_Systems/Messages_And_Events/Message_Merge · 2 input / 1 output port(s) at insert · exports to Python, MATLAB, Java, Rust, C, C++
Description#
The block's own DESCRIPTION_HTML, rendered verbatim — the same text the config dialog's info panel and the library navigator show. Fix a wrong sentence in the block's .cpp (R-D9), never here.
Message Merge
Control Systems / Messages And Events
Joins message lines: every message that arrives on any input is passed on, on the one output, and none is dropped here. Messages sent in the same step leave in the order their senders ran, which is the order Simulink’s sorted execution gives – not the order of the input ports; one sent in an earlier step leaves first. What the reader keeps is the reader’s: a Receive without its internal queue keeps only the last message of a step, a Queue or a Receive’s internal queue keeps them all.
Ports
- Input u1 … uN – message lines, two by default; add or remove inputs to change N. Their messages are all the same size [m,n].
- Output msg – the message line with every message that arrived.
Parameters
- None of its own: the number of inputs is the number of input ports.
- Sampling Time (s) – zero or less (default) inherits its senders’ rate, so it passes each message on as it is sent; a positive value runs it at that period, and messages wait on its inputs between its hits.
Code export
Python, MATLAB, Java, Rust, C and C++: each message line is one fixed-capacity queue in the generated core, held beside the signals; each input’s queue keeps every message, and each call moves them all to the output’s, those of senders that run after this block (sent in the step before) first, then the rest, each in its senders’ order, as live.
VHDL, Verilog, SystemVerilog and PLC Structured Text refuse a message line by name: a hardware queue is left until a hardware design asks for one. A message line that crosses the boundary of the subsystem being exported is refused by every target.
Simulink bridge
Import and export, mapped to simulink/Messages & Events/Message Merge; the
number of input ports ↔ NumberInputPorts. "Sampling Time (s)" does
not cross: Simulink’s Message Merge has no SampleTime parameter; a rate
set here stays on the ICore side and is reported.
Notes
- The messages may be a bus (a Hit Crossing Probe’s); every input’s messages must then be the same bus, and a bus beside a matrix is refused with the block’s name.
- Stateless: it keeps no message from one step to the next.
- Measured on R2026a: two Sends of 100+t and 200+t through a Message Merge into a FIFO
Queue are read 100, 200, 101, 201, …, the first sender first whatever port it takes;
straight into a Receive with no queue, only the last of each step reaches it (200, 201,
202). Simulink’s block
Prioritycan reorder the senders; ICore has no block priority.
Code facts#
| Fact | Value |
|---|---|
| registered type | Control_Systems/Messages_And_Events/Message_Merge |
| family | Control_Systems/Messages_And_Events |
| solver environment class | ICoreBlock_0_Control_Systems_1_Messages_And_Events_2_Message_Merge |
| source | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Control_Systems/Messages_And_Events/Message_Merge/ICoreBlock_0_Control_Systems_1_Messages_And_Events_2_Message_Merge.cpp |
| header | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Control_Systems/Messages_And_Events/Message_Merge/ICoreBlock_0_Control_Systems_1_Messages_And_Events_2_Message_Merge.h |
| default size on canvas | 60 × 80 px |
| ports at insert | 2 in, 1 out |
| code generators implemented | Python, MATLAB, Java, Rust, C, C++ |
Ports#
| # | Direction | Signal type | Description label |
|---|---|---|---|
| 1 | in | ICoreMessage | u1 |
| 2 | in | ICoreMessage | u2 |
| 3 | out | ICoreMessage | msg |
Ports the constructor creates. A block whose port list changes with its configuration adds or removes ports at load time; the count above is the one a freshly inserted block has.
Configuration variables#
No config variable beyond the Sampling Time (s) every block carries.
Every block also carries Sampling Time (s) from ICoreBlockSolverEnvironment: zero or less inherits the solver's rate, a positive value runs the block at that period.
Simulink bridge#
| support | Support::Both |
| Simulink path | simulink/Messages\n& Events/Message Merge |
| port-count rule | PortsParam::MessageMergeInputs |
SampleTime parameter | no — the counterpart defines none; the rate stays on the ICore side |
Caveat (shown to the user): Simulink's Message Merge has no SampleTime: it passes on messages when they arrive.
Catalog contract: src/ICoreBlocks/ICoreCoder/ICoreCommandSystem/SimulinkBridge/ICoreSimulinkBlockCatalog.h
Description vs code#
The checker has a blind spot here — it could not resolve something (a grouped port bullet, a computed config name), which is reported and never counted as a pass. A reader has to settle it:
B0no sample under docs/generated/samples/ — nothing to cross-check (P8.1)
The verdict above is
tools/docs/check_block_descriptions.py(P7.1), which compares LISTS. It cannot read a sentence: "stateless" on a block with a state, an initial-value semantic the recursion does not implement, a "not synthesizable" caveat the HDL banner contradicts. That is the agent audit (P7.3) on BLOCK_DESCRIPTION_AUDIT.md, and this tool's green is not a substitute for one.
Sample results#
No sample run is committed for this block. Samples come from the headless harness (DOCS_PLAN.md P8.1) into docs/generated/samples/; until one exists this block's behaviour is witnessed by the parity and export-verification suites, not by a plot here.