当前位置:   article > 正文

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

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

4.3 配置参数关键类

4.3.1 配置数据:模块 MODULE (ECUCMODULECONFIGURATIONVALUES,<ECUC-MODULE-CONFIGURATION-VALUES>)

与ECUCMODULEDEF,<ECUC-MODULE-DEF> 关联

  1. /// <remarks/>
  2. [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
  3. [System.SerializableAttribute()]
  4. [System.Diagnostics.DebuggerStepThroughAttribute()]
  5. [System.ComponentModel.DesignerCategoryAttribute("code")]
  6. [System.Xml.Serialization.XmlTypeAttribute(TypeName="ECUC-MODULE-CONFIGURATION-VALUES", Namespace="http://autosar.org/schema/r4.0")]
  7. public partial class ECUCMODULECONFIGURATIONVALUES {
  8. /// <remarks/>
  9. [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable=false)]
  10. public ECUCCONTAINERVALUE[] CONTAINERS {
  11. get {
  12. return this.cONTAINERSField;
  13. }
  14. set {
  15. this.cONTAINERSField = value;
  16. }
  17. }
  18. }

属性CONTAINERS :配置数据参数容器的集合,见下一节。

4.3.2 配置数据:参数容器 (ECUCCONTAINERVALUE,<ECUC-CONTAINER-VALUE>)

  1. /// <remarks/>
  2. [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
  3. [System.SerializableAttribute()]
  4. [System.Diagnostics.DebuggerStepThroughAttribute()]
  5. [System.ComponentModel.DesignerCategoryAttribute("code")]
  6. [System.Xml.Serialization.XmlTypeAttribute(TypeName="ECUC-CONTAINER-VALUE", Namespace="http://autosar.org/schema/r4.0")]
  7. public partial class ECUCCONTAINERVALUE {
  8. /// <remarks/>
  9. [System.Xml.Serialization.XmlArrayAttribute("PARAMETER-VALUES")]
  10. [System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCADDINFOPARAMVALUE), IsNullable=false)]
  11. [System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCNUMERICALPARAMVALUE), IsNullable=false)]
  12. [System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCTEXTUALPARAMVALUE), IsNullable=false)]
  13. public object[] PARAMETERVALUES {
  14. get {
  15. return this.pARAMETERVALUESField;
  16. }
  17. set {
  18. this.pARAMETERVALUESField = value;
  19. }
  20. }
  21. /// <remarks/>
  22. [System.Xml.Serialization.XmlArrayAttribute("REFERENCE-VALUES")]
  23. [System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCINSTANCEREFERENCEVALUE), IsNullable=false)]
  24. [System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCREFERENCEVALUE), IsNullable=false)]
  25. public object[] REFERENCEVALUES {
  26. get {
  27. return this.rEFERENCEVALUESField;
  28. }
  29. set {
  30. this.rEFERENCEVALUESField = value;
  31. }
  32. }
  33. /// <remarks/>
  34. [System.Xml.Serialization.XmlArrayAttribute("SUB-CONTAINERS")]
  35. [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable=false)]
  36. public ECUCCONTAINERVALUE[] SUBCONTAINERS {
  37. get {
  38. return this.sUBCONTAINERSField;
  39. }
  40. set {
  41. this.sUBCONTAINERSField = value;
  42. }
  43. }
  44. }

PARAMETERVALUES:配置参数集合

REFERENCEVALUES: 引用对象集合

SUBCONTAINERS:参数容器(自己类)集合

4.3.3 配置数据:参数

4.3.3.1 ECUCADDINFOPARAMVALUE,<ECUC-ADD-INFO-PARAM-VALUE>

本教程未涉及其使用。

  1. /// <remarks/>
  2. [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
  3. [System.SerializableAttribute()]
  4. [System.Diagnostics.DebuggerStepThroughAttribute()]
  5. [System.ComponentModel.DesignerCategoryAttribute("code")]
  6. [System.Xml.Serialization.XmlTypeAttribute(TypeName="ECUC-ADD-INFO-PARAM-VALUE", Namespace="http://autosar.org/schema/r4.0")]
  7. public partial class ECUCADDINFOPARAMVALUE {
  8. /// <remarks/>
  9. public DOCUMENTATIONBLOCK VALUE {
  10. get {
  11. return this.vALUEField;
  12. }
  13. set {
  14. this.vALUEField = value;
  15. }
  16. }
  17. }
4.3.3.2 ECUCNUMERICALPARAMVALUE,<ECUC-NUMERICAL-PARAM-VALUE>

保存配置模版参数类ECUCFLOATPARAMDEF, ECUCINTEGERPARAMDEF, ECUCBOOLEANPARAMDEF的数据,

4.0.3 参数保存在:ECUCADDINFOPARAMVALUEDEFINITIONREF实例中

4.2.2/4.4.0 参数保存在:ECUCNUMERICALPARAMVALUEDEFINITIONREF实例中

  1. /// <remarks/>
  2. [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
  3. [System.SerializableAttribute()]
  4. [System.Diagnostics.DebuggerStepThroughAttribute()]
  5. [System.ComponentModel.DesignerCategoryAttribute("code")]
  6. [System.Xml.Serialization.XmlTypeAttribute(TypeName="ECUC-NUMERICAL-PARAM-VALUE", Namespace="http://autosar.org/schema/r4.0")]
  7. public partial class ECUCNUMERICALPARAMVALUE {
  8. /// <remarks/>
  9. [System.Xml.Serialization.XmlElementAttribute("DEFINITION-REF")]
  10. public ECUCADDINFOPARAMVALUEDEFINITIONREF DEFINITIONREF {
  11. get {
  12. return this.dEFINITIONREFField;
  13. }
  14. set {
  15. this.dEFINITIONREFField = value;
  16. }
  17. }
  18. /// <remarks/>
  19. public NUMERICALVALUEVARIATIONPOINT VALUE {
  20. get {
  21. return this.vALUEField;
  22. }
  23. set {
  24. this.vALUEField = value;
  25. }
  26. }
  27. }

DEFINITIONREF 属性定义关联的配置模版参数类型和路径

VALUE 属性保存相关配置值。

  1. <ECUC-NUMERICAL-PARAM-VALUE>
  2. <DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduCanId</DEFINITION-REF>
  3. <VALUE>0</VALUE>
  4. </ECUC-NUMERICAL-PARAM-VALUE>
4.3.3.3 ECUCTEXTUALPARAMVALUE, <ECUC-TEXTUAL-PARAM-VALUE>

保存配置模版参数类 ECUCFUNCTIONNAMEDEF, ECUCLINKERSYMBOLDEF, ECUCMULTILINESTRINGPARAMDEF,ECUCSTRINGPARAMDEF,ECUCENUMERATIONPARAMDEF

  1. /// <remarks/>
  2. [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
  3. [System.SerializableAttribute()]
  4. [System.Diagnostics.DebuggerStepThroughAttribute()]
  5. [System.ComponentModel.DesignerCategoryAttribute("code")]
  6. [System.Xml.Serialization.XmlTypeAttribute(TypeName="ECUC-TEXTUAL-PARAM-VALUE", Namespace="http://autosar.org/schema/r4.0")]
  7. public partial class ECUCTEXTUALPARAMVALUE {
  8. /// <remarks/>
  9. [System.Xml.Serialization.XmlElementAttribute("DEFINITION-REF")]
  10. public ECUCADDINFOPARAMVALUEDEFINITIONREF DEFINITIONREF {
  11. get {
  12. return this.dEFINITIONREFField;
  13. }
  14. set {
  15. this.dEFINITIONREFField = value;
  16. }
  17. }
  18. /// <remarks/>
  19. public VERBATIMSTRING VALUE {
  20. get {
  21. return this.vALUEField;
  22. }
  23. set {
  24. this.vALUEField = value;
  25. }
  26. }
  27. }

DEFINITIONREF :属性定义关联的配置模版参数类型和路径

VALUE : 属性保存相关配置值
        

  1. <ECUC-TEXTUAL-PARAM-VALUE>
  2. <DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/CanIf/CanIfInitCfg/CanIfRxPduCfg/CanIfRxPduCanIdType</DEFINITION-REF>
  3. <VALUE>EXTENDED_CAN</VALUE>
  4. </ECUC-TEXTUAL-PARAM-VALUE>
本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号