Пример #1
0
        public object GetPluginConfig(AgAttrBuilder aab)
        {
            try
            {
                bool bUseArray = true;
                Debug.WriteLine("--> Entered", this.m_Name + ".GetPluginConfig()");

                if (this.m_Scope == null)
                {
                    this.m_Scope = aab.NewScope();

                    //===========================
                    // General Plugin attributes
                    //===========================
                    aab.AddStringDispatchProperty(this.m_Scope, "PluginName", "Human readable plugin name or alias", "Name", (int)AgEAttrAddFlags.eAddFlagNone);
                    aab.AddBoolDispatchProperty(this.m_Scope, "PluginEnabled", "If the plugin is enabled or has experience an error", "Enabled", (int)AgEAttrAddFlags.eAddFlagNone);
                    aab.AddStringDispatchProperty(this.m_Scope, "VectorName", "Vector Name that affects the srp area", "VectorName", (int)AgEAttrAddFlags.eAddFlagNone);

                    //===========================
                    // Propagation related
                    //===========================
                    if (bUseArray)
                    {
                        aab.AddChoicesDispatchProperty(this.m_Scope, "AccelRefFrame", "Acceleration Reference Frame", "AccelRefFrame", this.AccelRefFrameChoices);
                    }
                    else
                    {
                        aab.AddChoicesFuncDispatchProperty(this.m_Scope, "AccelRefFrame", "Acceleration Reference Frame", "AccelRefFrame", "AccelRefFrameChoices");
                    }
                    aab.AddDoubleDispatchProperty(this.m_Scope, "AccelX", "Acceleration in the X direction", "AccelX", (int)AgEAttrAddFlags.eAddFlagNone);
                    aab.AddDoubleDispatchProperty(this.m_Scope, "AccelY", "Acceleration in the Y direction", "AccelY", (int)AgEAttrAddFlags.eAddFlagNone);
                    aab.AddDoubleDispatchProperty(this.m_Scope, "AccelZ", "Acceleration in the Z direction", "AccelZ", (int)AgEAttrAddFlags.eAddFlagNone);

                    //===========================
                    // Messaging related attributes
                    //===========================
                    aab.AddBoolDispatchProperty(this.m_Scope, "UsePropagationMessages", "Send messages to the message window during propagation", "MsgStatus", (int)AgEAttrAddFlags.eAddFlagNone);
                    aab.AddIntDispatchProperty(this.m_Scope, "EvaluateMessageInterval", "The interval at which to send messages from the Evaluate method during propagation", "EvalMsgInterval", (int)AgEAttrAddFlags.eAddFlagNone);
                    aab.AddIntDispatchProperty(this.m_Scope, "PostEvaluateMessageInterval", "The interval at which to send messages from the PostEvaluate method during propagation", "PostEvalMsgInterval", (int)AgEAttrAddFlags.eAddFlagNone);
                    aab.AddIntDispatchProperty(this.m_Scope, "PreNextStepMessageInterval", "The interval at which to send messages from the PreNextStep method during propagation", "PreNextMsgInterval", (int)AgEAttrAddFlags.eAddFlagNone);
                }
                string config;
                config = aab.ToString(this, this.m_Scope);
                Debug.WriteLine(this.m_Name + ".GetPluginConfig():");
                Debug.WriteLine("============Attr Scope==============");
                Debug.WriteLine(config);
                Debug.WriteLine("====================================");
            }
            finally
            {
                Debug.WriteLine("<-- Exited", this.m_Name + ".GetPluginConfig()");
            }

            return(this.m_Scope);
        }
Пример #2
0
        public object GetPluginConfig(AgAttrBuilder builder)
        {
            try
            {
                Debug.WriteLine("--> Entered", "GetPluginConfig()");

                if (builder != null)
                {
                    if (this.m_AttrScope == null)
                    {
                        this.m_AttrScope = builder.NewScope();

                        //====================
                        // General Attributes
                        //====================
                        builder.AddStringDispatchProperty(this.m_AttrScope, "PluginName", "Human readable plugin name or alias", "Name", (int)AgEAttrAddFlags.eAddFlagReadOnly);

                        //================
                        // Thrust Attributes
                        //================
                        builder.AddDoubleDispatchProperty(this.m_AttrScope, "Isp", "Specific Impulse", "Isp", (int)AgEAttrAddFlags.eAddFlagNone);
                    }

                    string config;
                    config = builder.ToString(this, this.m_AttrScope);
                    Debug.WriteLine("\n" + config, "GetPluginConfig()");
                }
            }
            finally
            {
                Debug.WriteLine("<-- Exited", "GetPluginConfig()");
            }

            return(this.m_AttrScope);
        }
Пример #3
0
        public object GetPluginConfig(AgAttrBuilder aab)
        {
            try
            {
                if (this.m_Scope == null)
                {
                    this.m_Scope = aab.NewScope();


                    aab.AddStringDispatchProperty(this.m_Scope, "ExternalFilePath",
                                                  "ExternalFilePath",
                                                  "ExternalFilePath",
                                                  (int)AgEAttrAddFlags.eAddFlagNone);

                    //===========================
                    // Debug attributes
                    //===========================
                    aab.AddBoolDispatchProperty(this.m_Scope, "DebugMode",
                                                "Turn debug messages on or off",
                                                "DebugMode",
                                                (int)AgEAttrAddFlags.eAddFlagNone);

                    aab.AddIntDispatchProperty(this.m_Scope, "MessageInterval",
                                               "The interval at which to send messages during propagation in Debug mode",
                                               "MsgInterval",
                                               (int)AgEAttrAddFlags.eAddFlagNone);
                }
            }
            finally
            {
            }

            return(this.m_Scope);
        }
Пример #4
0
        /// <summary>
        /// Gets the configuration options for this plug-in.
        /// </summary>
        /// <param name="AttrBuilder">The helper classes used to build the options.</param>
        /// <returns>An instance of the object returned by AttrBuilder.NewScope() populated with options.</returns>
        public object GetConfig(AgAttrBuilder AttrBuilder)
        {
            //If this is the first time, we need to create the options
            //which we will then cache for future use.
            if (m_options == null)
            {
                m_options = AttrBuilder.NewScope();

                //Expose a string option for the filename
                AttrBuilder.AddStringDispatchProperty(m_options,
                                                      "Filename",
                                                      "Filename",
                                                      "Filename",
                                                      (int)AgEAttrAddFlags.eAddFlagNone);

                //Serialized version of m_settings
                AttrBuilder.AddMultiLineStringDispatchProperty(m_options,
                                                               "Settings",
                                                               "Settings",
                                                               "Settings",
                                                               (int)AgEAttrAddFlags.eAddFlagNone);
            }

            return(m_options);
        }
Пример #5
0
        /// <summary>
        /// Gets the configuration options for this plug-in.
        /// </summary>
        /// <param name="AttrBuilder">The helper classes used to build the options.</param>
        /// <returns>An instance of the object returned by AttrBuilder.NewScope() populated with options.</returns>
        public object GetConfig(AgAttrBuilder AttrBuilder)
        {
            //If this is the first time, we need to create the options
            //which we will then cache for future use.
            if (m_options == null)
            {
                m_options = AttrBuilder.NewScope();

                //Expose a string option for the FromAddress property
                AttrBuilder.AddStringDispatchProperty(m_options,
                                                      "FromAddress",
                                                      "FromAddress",
                                                      "FromAddress",
                                                      (int)AGI.Attr.AgEAttrAddFlags.eAddFlagNone);

                //Expose a string option for the ToAddress property
                AttrBuilder.AddStringDispatchProperty(m_options,
                                                      "ToAddress",
                                                      "ToAddress",
                                                      "ToAddress",
                                                      (int)AGI.Attr.AgEAttrAddFlags.eAddFlagNone);

                //Expose a string option for the SmtpServer property
                AttrBuilder.AddStringDispatchProperty(m_options,
                                                      "SMTPServer",
                                                      "SmtpServer",
                                                      "SmtpServer",
                                                      (int)AGI.Attr.AgEAttrAddFlags.eAddFlagNone);

                //Expose a boolean option for the OnlyFireOnce property
                AttrBuilder.AddBoolDispatchProperty(m_options,
                                                    "OnlyFireOnce",
                                                    "OnlyFireOnce",
                                                    "OnlyFireOnce",
                                                    (int)AGI.Attr.AgEAttrAddFlags.eAddFlagNone);
            }

            return(m_options);
        }
        public object GetPluginConfig(AgAttrBuilder aab)
        {
            try
            {
                Debug.WriteLine("--> Entered", m_Name + ".GetPluginConfig()");

                if (m_Scope == null)
                {
                    m_Scope = aab.NewScope();

                    // ==============================
                    //  Model specific attributes
                    // ==============================

                    aab.AddQuantityDispatchProperty2(m_Scope, "SRPArea", "SRP Area", "SRPArea", "Area", "m^2", "m^2", (int)AgEAttrAddFlags.eAddFlagNone);
                    aab.AddChoicesDispatchProperty(m_Scope, "RefFrame", "Reference Frame", "RefFrame", m_refFrameNames.ToArray());

                    //===========================
                    // General Plugin attributes
                    //===========================

                    aab.AddStringDispatchProperty(m_Scope, "PluginName", "Human readable plugin name or alias", "Name", (int)AgEAttrAddFlags.eAddFlagNone);
                    aab.AddBoolDispatchProperty(m_Scope, "PluginEnabled", "If the plugin is enabled or has experienced an error", "Enabled", (int)AgEAttrAddFlags.eAddFlagNone);
                    aab.AddBoolDispatchProperty(m_Scope, "DebugMode", "Turn debug messages on or off", "DebugMode", (int)AgEAttrAddFlags.eAddFlagNone);

                    //===========================
                    // Messaging related attributes
                    //===========================
                    aab.AddIntDispatchProperty(m_Scope, "MessageInterval", "The interval at which to send messages during propagation in Debug mode", "MsgInterval", (int)AgEAttrAddFlags.eAddFlagNone);
                }
                string config;
                config = aab.ToString(this, m_Scope);
                Debug.WriteLine(m_Name + ".GetPluginConfig():");
                Debug.WriteLine("============Attr Scope==============");
                Debug.WriteLine(config);
                Debug.WriteLine("====================================");
            }
            finally
            {
                Debug.WriteLine("<-- Exited", m_Name + ".GetPluginConfig()");
            }

            return(m_Scope);
        }
Пример #7
0
        public object GetPluginConfig(AgAttrBuilder aab)
        {
            try
            {
                Debug.WriteLine("--> Entered", this.m_Name + ".GetPluginConfig()");

                if (this.m_Scope == null)
                {
                    this.m_Scope = aab.NewScope();

                    //===========================
                    // General Plugin attributes
                    //===========================
                    aab.AddStringDispatchProperty(this.m_Scope, "PluginName", "Human readable plugin name or alias", "Name", (int)AgEAttrAddFlags.eAddFlagNone);
                    aab.AddBoolDispatchProperty(this.m_Scope, "PluginEnabled", "If the plugin is enabled or has experience an error", "Enabled", (int)AgEAttrAddFlags.eAddFlagNone);
                    aab.AddBoolDispatchProperty(this.m_Scope, "DebugMode", "Turn debug messages on or off", "DebugMode", (int)AgEAttrAddFlags.eAddFlagNone);

                    // ==============================
                    //  Reflectivity related attributes
                    // ==============================
                    aab.AddDoubleDispatchProperty(this.m_Scope, "Reflectivity_Specular", "Specular reflectivity coefficient", "SpecularReflectivity", (int)AgEAttrAddFlags.eAddFlagNone);
                    aab.AddDoubleDispatchProperty(this.m_Scope, "Reflectivity_Diffuse", "Diffuse reflectivity coefficient", "DiffuseReflectivity", (int)AgEAttrAddFlags.eAddFlagNone);

                    //===========================
                    // Messaging related attributes
                    //===========================
                    aab.AddIntDispatchProperty(this.m_Scope, "MessageInterval", "The interval at which to send messages during propagation in Debug mode", "MsgInterval", (int)AgEAttrAddFlags.eAddFlagNone);
                }
                string config;
                config = aab.ToString(this, this.m_Scope);
                Debug.WriteLine(this.m_Name + ".GetPluginConfig():");
                Debug.WriteLine("============Attr Scope==============");
                Debug.WriteLine(config);
                Debug.WriteLine("====================================");
            }
            finally
            {
                Debug.WriteLine("<-- Exited", this.m_Name + ".GetPluginConfig()");
            }

            return(this.m_Scope);
        }