Ejemplo n.º 1
0
        public object GetPluginConfig(AGI.Attr.AgAttrBuilder pAttrBuilder)
        {
            DebugMessage(AgEUtLogMsgType.eUtLogMsgDebug, "DragLiftExample:GetPluginConfig()");

            if (_oPluginConfig == null)
            {
                _oPluginConfig = pAttrBuilder.NewScope();
                pAttrBuilder.AddQuantityDispatchProperty2(_oPluginConfig,
                                                          "DragArea",
                                                          "Drag Area",
                                                          "DragArea",
                                                          "Area",
                                                          "m^2",
                                                          "m^2",
                                                          (int)AgEAttrAddFlags.eAddFlagNone);

                pAttrBuilder.AddQuantityDispatchProperty2(_oPluginConfig,
                                                          "LiftArea",
                                                          "Lift Area",
                                                          "LiftArea",
                                                          "Area",
                                                          "m^2",
                                                          "m^2",
                                                          (int)AgEAttrAddFlags.eAddFlagNone);

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

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

                //pAttrBuilder.AddFileDispatchProperty(_oPluginConfig,
                //    "DebugFile",
                //    "Debug output file",
                //    "DebugFile", "", "*.txt",
                //    (int)AgEAttrAddFlags.eAddFlagNone);

                /*
                 * Messaging related attributes
                 */

                //pAttrBuilder.AddIntDispatchProperty(_oPluginConfig,
                //    "MessageInterval",
                //    "The interval at which to send messages during propagation in Debug mode",
                //    "MsgInterval",
                //    (int)AgEAttrAddFlags.eAddFlagNone);
            }

            return(_oPluginConfig);
        }
Ejemplo n.º 2
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);
        }