本文主要是介绍AUTOSAR ARXML处理 - C#的解析代码(四),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
4.3 配置参数关键类
4.3.1 配置数据:模块 MODULE (ECUCMODULECONFIGURATIONVALUES,<ECUC-MODULE-CONFIGURATION-VALUES>)
与ECUCMODULEDEF,<ECUC-MODULE-DEF> 关联
/// <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-MODULE-CONFIGURATION-VALUES", Namespace="http://autosar.org/schema/r4.0")]public partial class ECUCMODULECONFIGURATIONVALUES {/// <remarks/>[System.Xml.Serialization.XmlArrayItemAttribute(IsNullable=false)]public ECUCCONTAINERVALUE[] CONTAINERS {get {return this.cONTAINERSField;}set {this.cONTAINERSField = value;}}}
属性CONTAINERS :配置数据参数容器的集合,见下一节。
4.3.2 配置数据:参数容器 (ECUCCONTAINERVALUE,<ECUC-CONTAINER-VALUE>)
/// <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-CONTAINER-VALUE", Namespace="http://autosar.org/schema/r4.0")]public partial class ECUCCONTAINERVALUE {/// <remarks/>[System.Xml.Serialization.XmlArrayAttribute("PARAMETER-VALUES")][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCADDINFOPARAMVALUE), IsNullable=false)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCNUMERICALPARAMVALUE), IsNullable=false)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCTEXTUALPARAMVALUE), IsNullable=false)]public object[] PARAMETERVALUES {get {return this.pARAMETERVALUESField;}set {this.pARAMETERVALUESField = value;}}/// <remarks/>[System.Xml.Serialization.XmlArrayAttribute("REFERENCE-VALUES")][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCINSTANCEREFERENCEVALUE), IsNullable=false)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCREFERENCEVALUE), IsNullable=false)]public object[] REFERENCEVALUES {get {return this.rEFERENCEVALUESField;}set {this.rEFERENCEVALUESField = value;}}/// <remarks/>[System.Xml.Serialization.XmlArrayAttribute("SUB-CONTAINERS")][System.Xml.Serialization.XmlArrayItemAttribute(IsNullable=false)]public ECUCCONTAINERVALUE[] SUBCONTAINERS {get {return this.sUBCONTAINERSField;}set {this.sUBCONTAINERSField = value;}}}
PARAMETERVALUES:配置参数集合
REFERENCEVALUES: 引用对象集合
SUBCONTAINERS:参数容器(自己类)集合
4.3.3 配置数据:参数
4.3.3.1 ECUCADDINFOPARAMVALUE,<ECUC-ADD-INFO-PARAM-VALUE>
本教程未涉及其使用。
/// <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-ADD-INFO-PARAM-VALUE", Namespace="http://autosar.org/schema/r4.0")]public partial class ECUCADDINFOPARAMVALUE {/// <remarks/>public DOCUMENTATIONBLOCK VALUE {get {return this.vALUEField;}set {this.vALUEField = value;}}}
4.3.3.2 ECUCNUMERICALPARAMVALUE,<ECUC-NUMERICAL-PARAM-VALUE>
保存配置模版参数类ECUCFLOATPARAMDEF, ECUCINTEGERPARAMDEF, ECUCBOOLEANPARAMDEF的数据,
4.0.3 参数保存在:ECUCADDINFOPARAMVALUEDEFINITIONREF实例中
4.2.2/4.4.0 参数保存在:ECUCNUMERICALPARAMVALUEDEFINITIONREF实例中
/// <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-NUMERICAL-PARAM-VALUE", Namespace="http://autosar.org/schema/r4.0")]public partial class ECUCNUMERICALPARAMVALUE {/// <remarks/>[System.Xml.Serialization.XmlElementAttribute("DEFINITION-REF")]public ECUCADDINFOPARAMVALUEDEFINITIONREF DEFINITIONREF {get {return this.dEFINITIONREFField;}set {this.dEFINITIONREFField = value;}}/// <remarks/>public NUMERICALVALUEVARIATIONPOINT VALUE {get {return this.vALUEField;}set {this.vALUEField = value;}}}
DEFINITIONREF 属性定义关联的配置模版参数类型和路径
VALUE 属性保存相关配置值。
<ECUC-NUMERICAL-PARAM-VALUE><DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduCanId</DEFINITION-REF><VALUE>0</VALUE>
</ECUC-NUMERICAL-PARAM-VALUE>
4.3.3.3 ECUCTEXTUALPARAMVALUE, <ECUC-TEXTUAL-PARAM-VALUE>
保存配置模版参数类 ECUCFUNCTIONNAMEDEF, ECUCLINKERSYMBOLDEF, ECUCMULTILINESTRINGPARAMDEF,ECUCSTRINGPARAMDEF,ECUCENUMERATIONPARAMDEF
/// <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-TEXTUAL-PARAM-VALUE", Namespace="http://autosar.org/schema/r4.0")]public partial class ECUCTEXTUALPARAMVALUE {/// <remarks/>[System.Xml.Serialization.XmlElementAttribute("DEFINITION-REF")]public ECUCADDINFOPARAMVALUEDEFINITIONREF DEFINITIONREF {get {return this.dEFINITIONREFField;}set {this.dEFINITIONREFField = value;}}/// <remarks/>public VERBATIMSTRING VALUE {get {return this.vALUEField;}set {this.vALUEField = value;}}}
DEFINITIONREF :属性定义关联的配置模版参数类型和路径
VALUE : 属性保存相关配置值
<ECUC-TEXTUAL-PARAM-VALUE><DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduCanIdType</DEFINITION-REF><VALUE>EXTENDED_CAN</VALUE>
</ECUC-TEXTUAL-PARAM-VALUE>
这篇关于AUTOSAR ARXML处理 - C#的解析代码(四)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!