Troubleshooting
Problem
The IBM Rational Rose RealTime C++ online help seems to indicate in several places that RTOutSignal::reply() is only used in synchronous communication. It can however be used in asynchronous communication also.
Resolving The Problem
A defect has been created to have the documentation updated to show that RTOutSignal::reply() can be used for asynchronous communication and to add some examples.
1) C++ Reference --> Services Library Class Reference --> RTOutSignal
The online help says that RTOutSignal::reply() is used to respond to a synchronous message. There is no mention of using reply() with asynchronous communication.
2) C++ Reference --> Services Library Class Reference --> RTOutSignal --> RTOutSignal::reply
The online help states that the receiver of the invoke must use RTOutSignal::reply() to respond to the invoke. Data can be optionally sent back with the reply. This is true, however nothing is stated about asynchronous communication and the only example is synchronous. Below is a simple asynchronous example.
// Sender
aPort.hello().send();
// Receiver
rtport->ackNoData().reply(); // no data
3) RTOutSignal::reply() can be used with replicated ports for intra-thread and inter-thread asynchronous messaging.
// Sender
aPort.hello().sendAt(anIndex);
//Receiver
// Below assumes two signals ackWithData, ackNoData and some data
// rtport is used with reply to get the port the message came in on
rtport->ackWithData(data).reply(); // data example
rtport->ackNoData().reply(); // no data
Note: Below is an alternative to using reply() for asynchronous communication.
// Sender
aPort.hello().sendAt(anIndex);
// Receiver
// assumes commPort is a port on Receiver
int idx = msg->sapIndex0();
commPort.ackNodata().sendAt( idx );
Related Information
[{"Product":{"code":"SSSHKL","label":"Rational Rose RealTime"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"2002;2003","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}}]
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21176976