IBD with Keypad, two specific Receiver sub-types, and a Display

Gallery
Tutorial
The top-level Internal Block Diagram (IBD) from which the simulation can be executed:
Click on the image to view it full size
The :Keypad is going to send a Signal with a digit out the Port o:~I_Keypad. It does NOT know who the recipient is going to be!

Only the connection context TestContext - the owner of the Connectors - knows where the Signals sent out via Ports will arrive. This decoupling is a very important aspect of port-based engineering, and it's worth reflecting on it for a moment.

Blocks R1 and R2 are special cases of the block Receiver. The context IBD has corresponding part properties :R1 and :R2.

When we run the simulation, we are going to play a game with the Connector from Port o:~I_Keypad. We are going to switch one of its ends between the input Port iKeypad:I_Keypad on :R1 and the equivalent on :R2. Whichever one receives the Signal will identify itself. This will prove that only the connection context knows the ultimate recipient.

Finally, whichever receiver is involved will send a Signal containing a String to the :Display, once again via Ports.

Up next
Notes
Snippets (quotes/extracts)
Visit also
Visit also (backlinks)
Related slides (includes other tutorials)
Related slides (backlinks, includes other tutorials)