IBM Support

How to relay an event to multiple ports inside a composite class in Rhapsody C++ and C

Question & Answer


Question

How do you relay an event generated by MULTICAS_GEN macro to more than one port located inside an composite class?

Cause

This is a known limitation.
Multicasting through regular ports are supported only in direct 1 hop.
In case of the image at right, multicasted events originated from portA can only be received by 1 port (either portC or portD).


Answer

WORKAROUND:

You can implement a delegator class that forwards any incoming events to inner ports. See the image below.




For details, refer the attached model built using v8.1. In this model, please notice below points.

  1. Property '<Lang>::Port::SupportMulticast' of 'portE2' is set to 'Always'.

  2. In statechart of delegator class (itsE), MULTICAST_GEN (for C++) and RiC_MULTICAST_GEN_PORT (for C) macro is used to multicast events, instead of having them called from itsA.




 
Disclaimer

All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.0;8.0.1;8.0.2;8.0.3;8.0.4;8.0.5;8.0.6;8.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21676891