![]() |
MAK RTIspy API Documentation for HLA 1516
|
The RTIspy API is an interface to the internals of the MAK RTI.
Using the API, you can develop plug-ins - dynamically linked libraries that can monitor, extend, or alter the functionality of the MAK RTI. You can develop custom RTIs using the MAK RTI as a starting point. For example, within your plug-ins you can monitor the RTI service calls, change the "wire format" used by the RTI on the network, implement communication mechanisms other than the default UDP and TCP networking schemes, or make performance optimizations based on the specific needs of your federation. Plug-ins are loaded by the rtiexec, by each LRC, or by both, when instructed to do so by the RID file. The LRC web client, printer example, and implicit DDM feature are plug-ins.
The RTIspy API does not replace or change the external RTI API, which is based on the HLA Standard Interface. Federates still interact with the RTI through the RTI::RTIambassador and RTI::FederateAmbassador classes, with their familiar functions like sendInteraction() and updateAttributeValues(). The plug-in API just allows you to change the implementation of these standard RTI functions. Federate code does not need to change to use an RTI that has been extended with a plug-in, since federates typically do not need to be modified even when switching to an entirely different RTI implementation.
Generally speaking, the job of an RTI is to implement the RTI::RTIambassador portion of the RTI interface specification. The implementation of a particular RTI::RTIambassador function might change the state of the LRC, cause data to be sent to remote LRCs, or - as in the case of tick() - cause RTI::FederateAmbassador functions to be invoked. In the MAK RTI, implementation of RTI::RTIambassador function calls is managed by an object called a DtRtiAmbassadorImplementor (ambImp.h). The DtRtiAmbassadorImplementor has an API that mirrors the external RTI::RTIambassador API. When an RTI::RTIambassador service is called by the federate, the ambassador calls down to the corresponding function in the DtRtiAmbassadorImplementor to execute the function. The DtRtiAmbassadorImplementor in turn, delegates most function calls to various manager objects within the RTI.
When a federate instantiates RTI::RTIambassador, it creates an instance of DtRtiAmbassadorImplementor, which is passed to your plug-in. Through this DtRtiAmbassadorImplementor object, your plug-in can register service call observers and get to all of the RTI's managers.
[Home] [The RTI Managers >>]