Site interfaces represent the services made available to the plugin by the application. Each application implements and extends the IAgUtPluginSite interface. IAgUtPluginSite is a base interface that provides the capability for the plugin to write messages to the message viewer and to obtain the name of the site interface itself. Different sites provide additional providers of input data. Three sites have been implemented:
Note: Currently, the Site interface passed to the plugin is valid only during the computation process. Once the computation has completed (i.e., the plugin component's Free() method is called), the Site interface is no longer valid and should be released by the plugin as well.
IAgStkPluginSite and IAgGatorPluginSite have a property called VectorToolProvider. The vector tool provider allows a plugin to request objects from the STK Vector Tool. Angles, Axes, Planes, Points, Systems, and Vectors may be requested. During a plugin function call, the vector tool object can be evaluated at the current time and/or a requested time. This provides a mechanism to obtain the ephemeris and attitude of every object within the scenario.
IAgStkPluginSite and IAgGatorPluginSite have a property called CalcToolProvider. The calculation tool provider allows a plugin to request objects from the STK Calculation Tool. Parameter Sets, Parameter Sets with Rates, Scalars, and Scalars with Rates may be requested. During a plugin function call, the calculation tool object can be evaluated at the current time and/or a requested time. This provides a mechanism to obtain the ephemeris and attitude of every object within the scenario.
IAgGatorPluginSite has a property AgGatorPluginProvider. The Astrogator plugin provider allows a plugin to request a calc object from the Component Browser. The calc object can then be evaluated at the current time.
IAgStkPluginSite and IAgGatorPluginSite also provide the StkRootObject property, which enables a plugin to access the STK Object Model. The root of the Object Model is returned as an object. You can cast (in .Net) or QueryInterface (COM) this to IAgStkObjectRoot.
From the root of the object model, you can access the properties for the STK objects in the scenario. However, you can only use the STK Object Model to read the current settings, not write them (i.e., the use of certain methods is restricted). This has been done to avoid situations where an action taken through the object model adversely affects the computation involving the plugin (e.g., you cannot close the current scenario). There are a few exceptions to this rule:
The STK Object Model, in turn, allows you to isolate the effects of these changes to a particular instance of the root.
STK Programming Interface 11.0.1