Classes and types Rapid ports would be useful in the following situations: Љ In component-based design. For example, when you have a class to be reused in different systems and has a behavior of its own (not that of one of its parts) that provides and requires the interfaces of the contract for the port. Љ The class has a statechart in which the triggers of the transitions are based on the ports through which the events were received. In other words, because the statechart is able to distinguish between the ports through which an event was sent, it could react differently to the same events based on which port the event came from.
Note Once you specify the contract on a port, you must specify the contract on all the ports that are connected to it. Otherwise, the code generator will issue a warning that there is a mismatch in the contracts and the links will not be created. Rational Rhapsody uses the values of the following framework properties to implement the rapid ports: Љ DefaultProvidedInterfaceName specifies the interface that must be implemented by the “in” part of a rapid port. Љ DefaultReactivePortBase stores the base class for the generic rapid port (or default reactive port).
This base class relays all events Љ DefaultRequiredInterfaceName specifies the interface that must be implemented by the “out” part of a rapid port Љ DefaultReactivePortIncludeFile specifies the include files that are referenced in the generated file that implements the class with the rapid ports Consider the following figure, which shows an OMD that uses rapid ports. 98 User Guide