示例#1
0
        public object GetPluginConfig(AgAttrBuilder aab)
        {
            try
            {
                if (m_Scope == null)
                {
                    m_Scope = aab.NewScope();

                    //===========================
                    // General Plugin attributes
                    //===========================
                    aab.AddBoolDispatchProperty(
                        m_Scope,
                        "PluginEnabled",
                        "If the plugin is enabled or has experience an error",
                        "Enabled",
                        (int)AgEAttrAddFlags.eAddFlagNone);

                    //===========================
                    // Messaging related attributes
                    //===========================
                    aab.AddBoolDispatchProperty(
                        m_Scope,
                        "UsePropagationMessages",
                        "Send messages to the message window during propagation",
                        "DebugMode",
                        (int)AgEAttrAddFlags.eAddFlagNone);

                    aab.AddIntDispatchProperty(
                        m_Scope,
                        "EvaluateMessageInterval",
                        "The interval at which to send messages from the Evaluate method during propagation",
                        "EvalMsgInterval",
                        (int)AgEAttrAddFlags.eAddFlagNone);

                    aab.AddIntDispatchProperty(
                        m_Scope,
                        "PostEvaluateMessageInterval",
                        "The interval at which to send messages from the PostEvaluate method during propagation",
                        "PostEvalMsgInterval",
                        (int)AgEAttrAddFlags.eAddFlagNone);

                    aab.AddIntDispatchProperty(
                        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, m_Scope);
            }
            finally
            {
            }

            return(m_Scope);
        }
示例#2
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);
        }
示例#3
0
        public object GetPluginConfig(AgAttrBuilder aab)
        {
            try
            {
                if (this.m_Scope == null)
                {
                    this.m_Scope = aab.NewScope();

                    //===========================
                    // 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);

                    aab.AddDoubleDispatchProperty(this.m_Scope, "TargetCrossSectionSqMeters",
                                                  "The rough target cross section in m^2",
                                                  "TargetCrossSectionSqMeters",
                                                  (int)AgEAttrAddFlags.eAddFlagNone);
                }
            }
            finally
            {
            }

            return(this.m_Scope);
        }
示例#4
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);
        }
        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);
        }
示例#6
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);
        }
示例#7
0
 public object GetPluginConfig(AgAttrBuilder builder)
 {
     if (m_agAttrBuilder == null)
     {
         m_agAttrBuilder = builder.NewScope();
         builder.AddBoolDispatchProperty(m_agAttrBuilder, "UseEquatorialAngle",
                                         "Compute solar phase angle in equatorial plane", "UseEquatorialAngle",
                                         (int)AgEAttrAddFlags.eAddFlagNone);
     }
     return(m_agAttrBuilder);
 }
示例#8
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
            {
                if (this.m_Scope == null)
                {
                    this.m_Scope = aab.NewScope();

                    //aab.AddQuantityDispatchProperty ( this.m_Scope, "Diameter",
                    //    "Optical diameter",
                    //    "Diameter",
                    //    "Meters",
                    //    "Meters",
                    //    (int)AgEAttrAddFlags.eAddFlagNone );

                    //aab.AddQuantityDispatchProperty ( this.m_Scope, "Wavelength",
                    //    "Wavelength of the sensor you are observing with",
                    //    "Wavelength",
                    //    "Meters",
                    //    "Meters",
                    //    (int)AgEAttrAddFlags.eAddFlagNone );

                    //aab.AddDoubleDispatchProperty ( this.m_Scope, "OpticalRatio",
                    //    "Optical ratio (Q)",
                    //    "OpticalRatio",
                    //    (int)AgEAttrAddFlags.eAddFlagNone );

                    //aab.AddDoubleDispatchProperty ( this.m_Scope, "NIIRS_a",
                    //    "The a coefficient for the NIIRS equation",
                    //    "NIIRS_a",
                    //    (int)AgEAttrAddFlags.eAddFlagNone );

                    //aab.AddDoubleDispatchProperty ( this.m_Scope, "NIIRS_b",
                    //    "The b coefficient for the NIIRS equation",
                    //    "NIIRS_b",
                    //    (int)AgEAttrAddFlags.eAddFlagNone );

                    //aab.AddDoubleDispatchProperty ( this.m_Scope, "NIIRS_RER",
                    //    "The RER coefficient for the NIIRS equation",
                    //    "NIIRS_RER",
                    //    (int)AgEAttrAddFlags.eAddFlagNone );

                    aab.AddDoubleDispatchProperty(this.m_Scope, "TargetSize",
                                                  "The rough diameter of the target cross section",
                                                  "TargetSize",
                                                  (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);
        }