In IBM® Rational® Rhapsody® Developer for C, events are implemented as objects (structures). The abstract data type and event structure are defined in the package specification file as follows:
typedef struct evStart evStart;
struct evStart {
RiCEvent ric_event;
};
An instance of an RiCEvent object is embedded in the structure of the event as a data member.
Although events are implemented as objects, they are modeled as operations. Therefore, an event does not have attributes and only has initialization and cleanup operations.
Each event is assigned a dynamic ID by default:
/*## package Default */
#define evStart_Default_id 1
The event ID can change if the same event is reused in multiple components, for example, if the same event is used in client and server components. To avoid this situation, which can cause problems in distributed systems, you can assign a permanent ID to an event by setting the CG::Event::Id property.