IBM Support

Suppress printing of the "unexpected message received" error on command prompt?

Question & Answer


Question

How can you suppress printing of the "unexpected message received" error from the command prompt when running the code generated from IBM® Rational® Rose RealTime model?

Cause

If there is no transition corresponding to the received message in the current state of the capsule in RoseRT model, then it will go to the TargetRTS which will print that unexpected message.

Answer

The "unexpected message received" error on command prompt is printed by the unexpectedMessage() method in the rtsBehavior member function of the capsule, so this message can be suppressed by opening the source code generated for the capsule and commenting the line where this unexpectedMessage() is called.

After that, build the component again by right clicking on the component and selecting "build" instead of "rebuild".

[{"Product":{"code":"SSSHKL","label":"Rational Rose RealTime"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"General information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"2003.06.00;2003.06.01;2003.06.12;2003.06.13;2003.06.14;2003.06.15;2003.06.15b;2003.06.16;7.0;7.0.0.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21281123