About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Troubleshooting
Problem
Data exchanged between a Rose RealTime application and an external application can be encoded and decoded to facilitate the exchange of data. This technote provides an example.
Resolving The Problem
Please find the attached example which includes a Rose RealTime socket application and an external VC++7.0 client application. The example demonstrates the encoding and decoding of exchanged data. This technote depends on the information available in technote 1135770.
External Client Application
Note: the example could have used the class generated in the RoseRT application as was done with the Data class. The AsciiEncoderDecoder class was used within the project for clarity.
RoseRT Application
AcsiiEncoderDecoder
Overview
The communication between the two processes is as follows:
The External Client application encodes an instance of Data and sends it to the RoseRT application. The RoseRT application capsule TCPServer decodes the ASCII string and sends the Data object to another capsule. The receiving capsule increments the values in the data object and then sends it to the capsule TCPServer. The capsule TCPServer then encodes the object and sends it back to the External Client application. The External Client receives the ASCII string and decodes it.
Instructions
To run the applications this technote assumes you have RoseRT installed in C:\Program Files\Rational\Rose RealTime and you have VC++7.x installed. Follow the steps below:
1) Unzip the attached file to some location
2) Open the model under RoseRTSocketInterface and change the constant Logical View::Application::CONSTANTS::MASTER_HOST to your IP address.
3) Build the component Server_x86VCpp70. You must do this first, since the VC++ project uses the Data class generated from RoseRT.
4) Run the RoseRT application. You should see output that it is listening at IP:port
5) Open the VC++ project ExtClient\Client\Client.vcproj. In Client.h change SERVER to the IP address where your RoseRT application is running.
6) Build and run the Client Application. It should connect to the RoseRT application and exchange data 5 times.
Note: This model was created purely for the purpose of demonstrating how to encode/decode data outside of a Rose RealTime model.
Related Information
[{"Product":{"code":"SSSHKL","label":"Rational Rose RealTime"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF033","label":"Windows"}],"Version":"2003","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}}]
Was this topic helpful?
Document Information
More support for:
Rational Rose RealTime
Software version:
2003
Operating system(s):
Windows
Document number:
80545
Modified date:
16 June 2018
UID
swg21190952