当前位置: 首页 > news >正文

北京做网站公司东莞cms建站模板

北京做网站公司,东莞cms建站模板,自己搞网站做外贸,手机电影网站建设目的 本文介绍通过AUTOSAR组织提供的xsd文件#xff0c;自动生成对应的C#解析代码的框架。 自动生成方法#xff1a;Microsoft SDKs\Windows\v7.0A\bin\xsd.exe 命令#xff1a;xsd.exe AUTOSAR_4-0-3.xsd /c /l:CS /n:AUTOSAR4 AUTOSAR_4-0-3.xsd 是需要生成代码的xsd文…目的 本文介绍通过AUTOSAR组织提供的xsd文件自动生成对应的C#解析代码的框架。 自动生成方法Microsoft SDKs\Windows\v7.0A\bin\xsd.exe 命令xsd.exe AUTOSAR_4-0-3.xsd /c /l:CS /n:AUTOSAR4 AUTOSAR_4-0-3.xsd 是需要生成代码的xsd文件。 在C#环境下固定几个版本没有问题其他AUTOSAR版本的xsd会在生成过程中产生循环组引用错误不能生成代码。 适用版本 AUTOSAR版本XSD生成的C#库文件4.0.3 【免费】AUTOSAR4.0.3的ARXML文件解析资源-CSDN文库 4.2.2【免费】AUTOSAR4.2.2的ARXML文件解析资源-CSDN文库4.4.0 解析库的使用方法 // XmlFilePath: ARXML 文件路径 public static AUTOSAR ReadXmlToClass(string XmlFilePath) {XmlSerializer xs new XmlSerializer(typeof(AUTOSAR));using (FileStream fs new FileStream(XmlFilePath, FileMode.Open)){return (AUTOSAR)xs.Deserialize(fs);} } 生成的代码 代码头 以下是生成的代码头部部分我们后续需要用到这个命名空间和类。当然直接生成的代码还是需要做补充修改等操作。后续篇章会陆续进行介绍。 //------------------------------------------------------------------------------ // auto-generated // 此代码由工具生成。 // 运行库版本:2.0.50727.3082 // // 对此文件的更改可能会导致不正确的行为并且如果 // 重新生成代码这些更改将会丢失。 // /auto-generated //------------------------------------------------------------------------------// // This source code was auto-generated by xsd, Version2.0.50727.3038. // namespace AUTOSAR4 {using System.Xml.Serialization;using System.Collections.ObjectModel;using System;/// remarks/[System.CodeDom.Compiler.GeneratedCodeAttribute(xsd, 2.0.50727.3038)][System.SerializableAttribute()][System.Diagnostics.DebuggerStepThroughAttribute()][System.ComponentModel.DesignerCategoryAttribute(code)][System.Xml.Serialization.XmlTypeAttribute(Namespacehttp://autosar.org/schema/r4.0)][System.Xml.Serialization.XmlRootAttribute(Namespacehttp://autosar.org/schema/r4.0,IsNullablefalse)][System.Xml.Serialization.XmlSchemaProvider(http://autosar.org/schema/r4.0 AUTOSAR_4-0-3.xsd)]public partial class AUTOSAR {# 代码较大此处省略.....} } 配置模版关键类 AUTOSAR的ECU配置分成两个模型即用来定义配置模版M1和配置数据M0。每个应用代码都是用配置数据来表示配置数据里会引用到配置模版中。配置数据的解析在后续章节说明。 如下图所示这个配置数据是参考标准库的配置模版进行使用的。 ECUC-MODULE-CONFIGURATION-VALUES UUID5327e39a-f8d9-423c-ba83-53c8806e66f9SHORT-NAMECanIf/SHORT-NAMEDEFINITION-REF DESTECUC-MODULE-DEF/AUTOSAR/EcucDefs/CanIf/DEFINITION-REF 模块 MODULE ECUCMODULEDEF 该类用于处理模块如CanIf, Com等。 /// remarks/[System.CodeDom.Compiler.GeneratedCodeAttribute(xsd, 2.0.50727.3038)][System.SerializableAttribute()][System.Diagnostics.DebuggerStepThroughAttribute()][System.ComponentModel.DesignerCategoryAttribute(code)][System.Xml.Serialization.XmlTypeAttribute(TypeNameECUC-MODULE-DEF, Namespacehttp://autosar.org/schema/r4.0)]public partial class ECUCMODULEDEF {/// remarks/[System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCCHOICECONTAINERDEF), IsNullablefalse)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCPARAMCONFCONTAINERDEF), IsNullablefalse)]# 容器集合保护多个配置集可以是参数容器也可以是选择容器public object[] CONTAINERS {get {return this.cONTAINERSField;}set {this.cONTAINERSField value;}}} 参数容器ECUCPARAMCONFCONTAINERDEF 相当于配置的文件夹 /// remarks/[System.CodeDom.Compiler.GeneratedCodeAttribute(xsd, 2.0.50727.3038)][System.SerializableAttribute()][System.Diagnostics.DebuggerStepThroughAttribute()][System.ComponentModel.DesignerCategoryAttribute(code)][System.Xml.Serialization.XmlTypeAttribute(TypeNameECUC-PARAM-CONF-CONTAINER-DEF, Namespacehttp://autosar.org/schema/r4.0)]public partial class ECUCPARAMCONFCONTAINERDEF {/// remarks/[System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCADDINFOPARAMDEF), IsNullablefalse)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCBOOLEANPARAMDEF), IsNullablefalse)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCENUMERATIONPARAMDEF), IsNullablefalse)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCFLOATPARAMDEF), IsNullablefalse)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCFUNCTIONNAMEDEF), IsNullablefalse)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCINTEGERPARAMDEF), IsNullablefalse)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCLINKERSYMBOLDEF), IsNullablefalse)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCMULTILINESTRINGPARAMDEF), IsNullablefalse)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCSTRINGPARAMDEF), IsNullablefalse)]# 配置参数集合public object[] PARAMETERS {get {return this.pARAMETERSField;}set {this.pARAMETERSField value;}}/// remarks/[System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCCHOICEREFERENCEDEF), IsNullablefalse)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCFOREIGNREFERENCEDEF), IsNullablefalse)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCINSTANCEREFERENCEDEF), IsNullablefalse)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCREFERENCEDEF), IsNullablefalse)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCSYMBOLICNAMEREFERENCEDEF), IsNullablefalse)]# 参考参数集合public object[] REFERENCES {get {return this.rEFERENCESField;}set {this.rEFERENCESField value;}}/// remarks/[System.Xml.Serialization.XmlArrayAttribute(SUB-CONTAINERS)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCCHOICECONTAINERDEF), IsNullablefalse)][System.Xml.Serialization.XmlArrayItemAttribute(typeof(ECUCPARAMCONFCONTAINERDEF), IsNullablefalse)]# 子容器集合可以是参数容器也可以是选择容器public object[] SUBCONTAINERS {get {return this.sUBCONTAINERSField;}set {this.sUBCONTAINERSField value;}}} 选择容器ECUCCHOICECONTAINERDEF 可以选择不同类型的参数容器 /// remarks/[System.CodeDom.Compiler.GeneratedCodeAttribute(xsd, 2.0.50727.3038)][System.SerializableAttribute()][System.Diagnostics.DebuggerStepThroughAttribute()][System.ComponentModel.DesignerCategoryAttribute(code)][System.Xml.Serialization.XmlTypeAttribute(TypeNameECUC-CHOICE-CONTAINER-DEF, Namespacehttp://autosar.org/schema/r4.0)]public partial class ECUCCHOICECONTAINERDEF {/// remarks/[System.Xml.Serialization.XmlArrayItemAttribute(IsNullablefalse)]# 可选的参数容器集合AUTOSAR配置过程中只能在这个集合中选择一个public ECUCPARAMCONFCONTAINERDEF[] CHOICES {get {return this.cHOICESField;}set {this.cHOICESField value;}} }
http://www.hkea.cn/news/14317048/

相关文章:

  • 图片拼接做网站背景重庆好的网站制作公司哪家好
  • 万网空间上传网站兰州网站维护
  • 全国二级建造师注册信息查询网站简述网络营销的主要方法
  • 安卓app做网站外壳网站备案服务商查询
  • 非物质文化遗产网站怎么做做网站需要几个人分工
  • 网站制作新手教程视频seo优化网站推广
  • 做静态网站有什么建议更新带动器
  • 自己做网站价格亚马逊跨境电商简介
  • asp网站模板源码营销网站的渠道构成基本包括
  • 建湖做网站找哪家好机器人网站建设规划书
  • 凡客诚品网站推广WordPress文章生成图片
  • 常州建设银行网站首页清明节网页设计素材
  • ps怎样做网站首页图如何自己开发手机app
  • 互动营销成功案例自己的网站怎么做关键词优化
  • 齐齐哈尔哪里做网站手机网站对企业用户的好处
  • 陕西省建设厅三类人员报名网站哪些软件可以做网页
  • vue做的小网站网络推广培训吧
  • 网站建设验收汇报wordpress+手机应用
  • app界面素材宁波网络seo哪家有名
  • 网站地址地图怎么做手机端网站的区别
  • 白云手机网站建设网络运维工程师求职信
  • 莱阳网站建设安卓程序开发
  • 网站开发与维护视频教程谁有永久免费的服务器
  • 学校建设网站的作用云seo关键词排名优化软件
  • 展示型的网站开发价格苏州网站建设自助建站模板
  • 建个企业网站一年需要多少钱怎么推广平台
  • wordpress做的视听网站discuz网站伪静态设置
  • 做气球装饰可以上哪些网站中小企业建网站多少钱
  • 公司设计品牌公司专业seo培训
  • 专业网站建设企业最好的微网站建设价格