Beispiel #1
0
        public object GetPluginConfig(AGI.Attr.AgAttrBuilder pAttrBuilder)
        {
            Debug.WriteLine(m_DisplayName + ".GetPluginConfig()", "Entered:");

            if (m_AgAttrScope == null)
            {
                m_AgAttrScope = pAttrBuilder.NewScope();

                pAttrBuilder.AddStringDispatchProperty(m_AgAttrScope, "MyString", "A string", "MyString", (int)AgEAttrAddFlags.eAddFlagReadOnly);
                pAttrBuilder.AddDoubleDispatchProperty(m_AgAttrScope, "MyDouble", "A double", "MyDouble", (int)AgEAttrAddFlags.eAddFlagNone);
            }

            Debug.WriteLine(m_DisplayName + ".GetPluginConfig()", "Exited:");

            return(m_AgAttrScope);
        }
        public object GetPluginConfig(AGI.Attr.AgAttrBuilder pAttrBuilder)
        {
            Message(AgEUtLogMsgType.eUtLogMsgDebug, "DensityExponentialExample:GetPluginConfig()");

            if (_oPluginConfig == null)
            {
                int eFlagNone = (int)AgEAttrAddFlags.eAddFlagNone;

                _oPluginConfig = pAttrBuilder.NewScope();

                pAttrBuilder.AddStringDispatchProperty(_oPluginConfig,
                                                       "CentralBodyName",
                                                       "CentralBody Name",
                                                       "CentralBodyName", eFlagNone);

                pAttrBuilder.AddDoubleDispatchProperty(_oPluginConfig,
                                                       "RefDensity",
                                                       "Reference Density",
                                                       "RefDensity", eFlagNone);

                pAttrBuilder.AddQuantityMinDispatchProperty2(_oPluginConfig,
                                                             "RefAltitude",
                                                             "Reference Altitude",
                                                             "RefAltitude",
                                                             "DistanceUnit", "Kilometers", "Meters", 0.0, eFlagNone);

                pAttrBuilder.AddQuantityMinDispatchProperty2(_oPluginConfig,
                                                             "ScaleAltitude",
                                                             "Scale Altitude",
                                                             "ScaleAltitude",
                                                             "DistanceUnit", "Kilometers", "Meters", 0.0, eFlagNone);

                pAttrBuilder.AddQuantityMinDispatchProperty2(_oPluginConfig,
                                                             "LowestValidAlt",
                                                             "Lowest Valid Altitude",
                                                             "LowestValidAlt",
                                                             "DistanceUnit", "Kilometers", "Meters", 0.0, eFlagNone);

                pAttrBuilder.AddIntDispatchProperty(_oPluginConfig,
                                                    "MaxScaleHeights",
                                                    "Max number of scale heights to allow",
                                                    "MaxScaleHeights", eFlagNone);

                /*
                 * General Plugin attributes
                 */
                pAttrBuilder.AddBoolDispatchProperty(_oPluginConfig,
                                                     "PluginEnabled",
                                                     "If the plugin is enabled or has experienced an error",
                                                     "PluginEnabled", eFlagNone);

                pAttrBuilder.AddBoolDispatchProperty(_oPluginConfig,
                                                     "DebugMode",
                                                     "Turn debug messages on or off",
                                                     "DebugMode", eFlagNone);

                pAttrBuilder.AddIntDispatchProperty(_oPluginConfig,
                                                    "MessageInterval",
                                                    "The interval at which to send messages during propagation in Debug mode",
                                                    "MessageInterval", eFlagNone);
            }

            return(_oPluginConfig);
        }