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.
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);
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:
Simulated time is useful for debugging and algorithm validation.