Changing the maximum SimulationRTS message size |
Category: |
C++
Purpose: |
In the ObjecTime4.x SimulationRTS the size limit for sending a message from/to a C++ Actor is 10KBytes. In some applications this value is too small. All messages from/to a C++ actor, including logging and variable inspection, are first ASCII encoded, and then sent through the toolset.
Here are the instructions for changing the message size. You will need to change your simulationRTS source code and then recompile it. You may need to experiment to determine the appropriate size for your application.
Intended Audience: |
C++ Developers using SimulationRTS
Applicable to: |
ObjecTime 4.4
Description: |
To increase the limit on the size of messages exchanged between the toolset and the run-time system, the following changes are required. The pathnames given are relative to
$OBJECTIME_HOME/C++/SimulationRTS.
The argument to the RTPacket constructor on line 449 of src/ObjecTimeRTS.cc
RTPacket packet_buffer( 10*1024 );
defines the size of the largest message that the run-time system can successfully receive from the toolset. The largest such message is likely to be the one that sets 'msg' of the actor which is to receive the next message.
The macro definition on line 38 of src/saps/RTSap.cc
#define SEND_PACKET_SIZE (4096*3)
is used as the argument to the RTPacket constructor on line 89 of src/saps/RTSap.cc:
RTPacket serv_req_packet( SEND_PACKET_SIZE );
This defines the size of the largest message that the run-time system can successfully send to the toolset. The largest such messages are likely to be those service requests involving user data:
RTCommSAP::invoke RTCommSAP::send RTExceptionSAP::raise RTFrameSAP::incarnate RTLogSAP::log RTLogSAP::show RTSap::reply RTTimerSAP::informAt RTTimerSAP::informIn
In $OBJECTIME_HOME/C++/SimulationRTS/src/ObjecTimeRTS.cc line 44, change:
RTPacket packet_buffer( 10*1024 );
to:
RTPacket packet_buffer();
and in $OBJECTIME_HOME/C++/SimulationRTS/src/saps/RTSap.cc change the macro definition on line 38 from:
#define SEND_PACKET_SIZE (4096*3)
to:
#define SEND_PACKET_SIZE ()
It is reasonable to use the same size for both definitions.
Recompile the SimulationRTS by:
cd $OBJECTIME_HOME/SimulationRTS/src
make . (e.g. make gnu2.sun5)
Limitations: |
None
See also: |
None
Copyright © 1999, ObjecTime Limited. |