init

In instrumented code, init initializes the framework instances that need to be available for the application built on top of the framework.

This method must be called before any other framework-related code is executed.

Note: You must call OXF::init() in a DLL even if the application loading the DLL has called OXF::init(); otherwise, there will be a leak in the state machine thread handle.
Visibility
Public
Signature
static int init (
   int numProgArgs = 0, 
   char **progArgs = NULL, 
   unsigned int defaultPort = 0, 
   const char* defaultHost = NULL, 
   unsigned ticktime = 
      OMTimerManagerDefaults::defaultTicktime,
   unsigned maxTM =
      OMTimerManagerDefaults::defaultMaxTM,
   OMBoolean isRealTimeModel = TRUE);
Parameters
numProgArgs

Specifies the number of program arguments.

progArgs

Specifies the list of program arguments.

defaultPort

Is an animation-specific parameter that specifies the port used for communicating with the animation server.

If you are using an animation port other than 6423 (the default value), this number must match that assigned to the AnimationPortNumber variable in your rhapsody.ini file.

defaultHost

Is an animation-specific parameter that specifies the default host name of the machine on which Rational® Rhapsody® is running.

tickTime

Specifies the basic system tick in milliseconds. Every ticktime, the framework timeout manager checks for expired timeouts. The default ticktime is every 100 milliseconds.

You can override the default tick time by setting the <lang>_CG::Framework::TimerResolution property.

maxTM

Specifies the maximum number of timeouts (set or matured) that can coexist in the application. The default value is 100 timeouts.

You can override the default maximum number of timeouts by setting the <lang>_CG::Framework::TimerMaxTimeouts property.

isRealTimeModel

Specifies whether the model runs in real time (the default) or simulated time. The default value is real time.

OMTimerManager can implement two time models:


Feedback