通过总线硬件接入的 CANway FIU¶
CANway FIU 使用说明:
引脚分配通过如下结构的 XML mapping file(XML 映射文件) 完成。
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.example.org/NewXMLSchema" elementFormDefault="qualified" version="1.0">
<xs:element name="CANWAYFIUCONFIG">
<xs:complexType>
<xs:sequence>
<xs:element name="MODULE" type="FiuModuleType" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="version" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>
<xs:complexType name="FiuModuleType">
<xs:sequence>
<xs:element name="CANID" type="CanIdType" minOccurs="1" maxOccurs="1"/>
<xs:element name="PINS" type="PinListType" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
<xs:simpleType name="CanIdType">
<xs:restriction base="xs:string">
<xs:pattern value="0x[0-9A-Fa-f]+"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="PinListType">
<xs:sequence>
<xs:element name="PIN" type="PinType" minOccurs="1" maxOccurs="20"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PinType">
<xs:simpleContent>
<xs:extension base="PinNameType">
<xs:attribute name="id" type="PinIdType" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="PinNameType">
<xs:restriction base="xs:string">
<xs:pattern value=".+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="PinIdType">
<xs:restriction base="xs:integer">
<xs:minInclusive value="1"/>
<xs:maxInclusive value="20"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
例如,配置文件可以写成如下形式:
<?xml version="1.0" encoding="UTF-8"?>
<CANWAYFIUCONFIG xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CanwayFIU.xsd">
<MODULE name="Module1">
<CANID>0x123</CANID>
<PINS>
<PIN id="1">Pin One</PIN>
<PIN id="2">Pin Two</PIN>
<PIN id="3">Pin Three</PIN>
</PINS>
</MODULE>
</CANWAYFIUCONFIG>
使用注意事项:
该 XML 文件必须符合上方给出的 XML schema(此处通过名称 CanwayFIU.xsd 引用)。
配置文件后缀为 .cxfiucfg(即 “CANway FIU configuration file”)。
该配置文件必须在测试配置中的 Platform tab(Platform 标签页) 中指定。
标签 CANID 表示模块的 CAN id。理论上可同时使用 2047 个 FIU 模块。
标签 PIN 表示引脚的符号名称(信号名)。
这些引脚会显示在 Electrical Error Simulation tab(Electrical Error Simulation 标签页) 的数据查看器中。
这些故障可以通过拖放添加到 test case 中。支持单点故障,例如中断、对地短路、对电池电压短路以及 pin-to-pin 故障。此外,还可以在 EES ErrorSet(EES 错误集) 中同时施加不同故障。CANway FIU 不支持多引脚故障。无负载的 pin-to-pin 故障按 “先中断,再短路” 的顺序施加。不支持通过广播报文重新配置。