MAK RTIspy API Documentation for HLA 1516
3 - Initializing a Plug-in

All MAK RTI plug-in libraries must export one or more of the following three "C" style functions.

The LRC or the rtiexec looks for these functions when a plug-in is loaded, and executes them at the appropriate times.

Note
For MAK RTI 1516, use SetPluginCreators1516(), InitLRCPlugin1516(), and InitRtiexecPlugin1516(). For HLA Evolved, use SetPluginCreators1516e(), InitLRCPlugin1516e(), and InitRtiexecPlugin1516e().

You can use a single plug-in library for both the LRCs and the rtiexec. Each ignores the Init*() function that does not apply to it. Alternatively, you could create separate plug-ins for the rtiexec and for the LRCs. In this case, there is no reason to include InitRtiexecPlugin() in the LRC's plug-in, or InitLRCPlugin() in the rtiexec's plug-in. The following example shows the expected function prototype for each of the three functions, and the mechanics of exporting your functions:

#if WIN32
#define EXPORT __declspec(dllexport)
#else
#define EXPORT
#endif
extern "C"
{
void EXPORT SetPluginCreators()
{
// Register your derived class creator functions here
}
void EXPORT InitLRCPlugin(DtRtiAmbassadorImplementor* imp)
{
// Use imp to get pointers to managers, register observers, and so on
}
void EXPORT InitRtiexecPlugin(DtRtiExec* exec)
{
// Use exec to register callbacks on new federates, and so on.
}
}

[<< The RTI Managers] [Home] [Top of Page] [Monitoring RTI Service Invocations >>]


Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)