MAK RTIspy API Documentation for HLA Evolved
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 Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)