AUTOSAR ARXML处理 - C#的解析代码(二)

4.2.4 配置模版:参数类

参数容器(ECUCPARAMCONFCONTAINERDEF)的PARAMETERS集合类由以下参数类实例构成。

4.2.4.1 配置模版:枚举参数(ECUCENUMERATIONPARAMDEF )

配置一个下拉选项,如PORT中一个pin可以配置SPI, CAN, PWM

cs 复制代码
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(TypeName="ECUC-ENUMERATION-PARAM-DEF", Namespace="http://autosar.org/schema/r4.0")]
    public partial class ECUCENUMERATIONPARAMDEF {      
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("DEFAULT-VALUE")]
        public IDENTIFIER DEFAULTVALUE {
            get {
                return this.dEFAULTVALUEField;
            }
            set {
                this.dEFAULTVALUEField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable=false)]
        public ECUCENUMERATIONLITERALDEF[] LITERALS {
            get {
                return this.lITERALSField;
            }
            set {
                this.lITERALSField = value;
            }
        }

    }

DEFAULTVALUE :默认值,其他参数类也有该属性

LITERALS : 枚举列表

4.2.4.2 配置模版:整型参数 (ECUCINTEGERPARAMDEF)

整数参数,如CanIfRxPduId可以配成3。

cs 复制代码
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(TypeName="ECUC-INTEGER-PARAM-DEF", Namespace="http://autosar.org/schema/r4.0")]
    public partial class ECUCINTEGERPARAMDEF {
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("WITH-AUTO")]
        public BOOLEAN WITHAUTO {
            get {
                return this.wITHAUTOField;
            }
            set {
                this.wITHAUTOField = value;
            }
        }

        /// <remarks/>
        public UNLIMITEDINTEGERVALUEVARIATIONPOINT MAX {
            get {
                return this.mAXField;
            }
            set {
                this.mAXField = value;
            }
        }
        
        /// <remarks/>
        public UNLIMITEDINTEGERVALUEVARIATIONPOINT MIN {
            get {
                return this.mINField;
            }
            set {
                this.mINField = value;
            }
        }

    }

MAX: 整型的可配置最大值

MIN: 整型的可配置最小值

WITHAUTO :参数类基本都有,在整型里可以设置为TRUE,这样可以让配置工具自动对一些属性编号,如非常常见的 HandleId

4.2.4.3 配置模版:浮点参数(ECUCFLOATPARAMDEF)

cs 复制代码
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(TypeName="ECUC-FLOAT-PARAM-DEF", Namespace="http://autosar.org/schema/r4.0")]
    public partial class ECUCFLOATPARAMDEF {
        /// <remarks/>
        public FLOATVALUEVARIATIONPOINT MAX {
            get {
                return this.mAXField;
            }
            set {
                this.mAXField = value;
            }
        }
        
        /// <remarks/>
        public FLOATVALUEVARIATIONPOINT MIN {
            get {
                return this.mINField;
            }
            set {
                this.mINField = value;
            }
        }
    }

MAX: 浮点的可配置最大值

MIN: 浮点的可配置最小值

4.2.4.4 配置模版:布尔参数(ECUCBOOLEANPARAMDEF)

如CanIfVersionInfoApi,可以设置TRUE为使能

cs 复制代码
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(TypeName="ECUC-BOOLEAN-PARAM-DEF", Namespace="http://autosar.org/schema/r4.0")]
    public partial class ECUCBOOLEANPARAMDEF {


    }

4.2.4.5 配置模版:函数参数(ECUCFUNCTIONNAMEDEF)

常用来自定义回调函数名,字符串类型;ECUCSTRINGPARAMDEF, ECUCLINKERSYMBOLDEF用法类似

cs 复制代码
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(TypeName="ECUC-FUNCTION-NAME-DEF", Namespace="http://autosar.org/schema/r4.0")]
    public partial class ECUCFUNCTIONNAMEDEF {

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("SHORT-NAME")]
        public IDENTIFIER SHORTNAME {
            get {
                return this.sHORTNAMEField;
            }
            set {
                this.sHORTNAMEField = value;
            }
    }

SHORTNAME : 这个属性基本很多类里面都有,后续会经常使用到这个信息。

相关推荐
Trump. yang1 天前
AutoSar 通信服务架构,CAN通信诊断详解
架构·autosar·汽车电子·can总线·通信原理
赞哥哥s7 天前
Autosar EcuM学习笔记-上电初始化执行函数及下电前执行函数
autosar·etas·ecum
车载诊断技术19 天前
电子电气架构 --- 基于ISO 26262的车载电子软件开发流程
网络·架构·汽车·autosar·电子电器架构
天马行空工作坊19 天前
Autosar学习----AUTOSAR_SWS_BSWGeneral(四)
学习·autosar
车载诊断技术20 天前
电子电气架构---智能汽车应该是怎么样的架构?
架构·汽车·autosar·e/e·电子电气架构
Nice__J1 个月前
AutosarMCAL开发——基于EB Gpt驱动
autosar
车载诊断技术1 个月前
电子电气架构 --- 车身电子的未来发展
网络·数据库·架构·汽车·autosar
MasterTomato1 个月前
AUTOSAR开源OS——Trampoline的编译与使用(一)
开源·操作系统·autosar·trampoline
美好生活丶1 个月前
HexView 刷写文件脚本处理工具-命令行介绍(八)-文件合并(/MO /MT)
单片机·autosar·汽车电子·hexview·刷写文件
大叔带刺1 个月前
打渔的寓言--汽车软件开发技术进化史
信息安全·以太网·autosar