ibm Rational Rhapsody 7.5 — Unserialization function

Statecharts using the format addressSpaceName::publishedNameOfReactiveObject. This allows you to have objects with the same name in multiple address spaces and still have the event sent to the appropriate object. When using this option, the name you use for the address space is the value of the property C_CG::Configuration::AddressSpaceName , described in Properties for sending events across address spaces . For convenience, Rational Rhapsody includes a macro named RiCGENREMOTE , which calls the function RidSendRemoteEvent : RiCGENREMOTE ([string - the published name of the destination reactive object], [type of event with parameters in parentheses]) For example:

RiCGENREMOTE(“destinationObject”, Fstarted()); Functions for serialization/unserialization If the events to be sent across address spaces have no arguments or only primitive types as arguments, such as integers or chars, you just have to call the function RiDSendRemoteEvent . However, if the events to be sent include objects as arguments, you must also provide two functions - one for serializing and one for unserializing the event arguments:

Serialization function RhpAddress evStartSerialize(struct RiCEvent_t* const ev, const RhpAddress buffer, RhpPositive bufferSize, RhpPositive* resultBufferSize); return value - pointer to the serialized event ev - pointer of the event to be serialized buffer - a local buffer that can be used for storing the serialized event (the user can allocate their own buffer instead) bufferSize - the size in bytes of the parameter buffer resultBufferSize - pointer for storing the size of the returned serialized event Unserialization function RiCEvent_t* evStartUnserialize(RhpAddress const serializedBuffer, RhpPositive serializedBufferSize); return value - pointer to the unserialized event serializedBuffer - pointer to the serialized buffer 754 User Guide