主要内容

Communication in MATLAB

Use an A2L file to allow communication between XCP client and server modules via XCP

A2L文件是定义ECU实现的特殊说明文件。A2L文件中的信息允许XCP客户端通过XCP连接与服务器模块通信。格式化的文本文件包含事件和测量定义以及其他配置信息,用于获取和刺激数据并执行其他功能。

要与XCP服务器进行通信,A2L文件(ECU描述文件)必须至少包含以下属性信息:

  • ProtocolLayerInfo

  • TransportLayerCANInfo

  • Measurements

  • DAQInfo事件

    • MATLAB®:DAQInfo事件content is required if using dynamic DAQ list functionality.

    • 万博1manbetx®:因为XCP CAN Data Acquisitionblock uses dynamic DAQ list functionality,DAQInfo事件content is required.

您可以使用CAN协议将XCP客户端连接到服务器模块。这使您可以在服务器模块上使用事件和访问测量。跟着XCP Database and Communication Workflow要学习如何使用XCP连接到设备。

您可以执行直接读取或写入服务器模块上的内存。或者,创建动态数据刺激列表并将测量结果分配给列表,然后读取获得的DAQ数据并写入刺激数据。

Functions

expand all

xcpA2L 访问A2L文件
GetCharacteristicinfo 从A2L文件中获取有关特定特征的信息
GetMeasurementInfo 从A2L文件中获取有关特定测量的信息
getEventInfo Get event information about specific event from A2L file
xcpChannel 创建XCP频道
connect Connect XCP channel to server module
disconnect Disconnect from server module
已连接 Connection status
readCharacteristic Read and scale specified characteristic value from direct memory
撰写的 Scale and write specified characteristic value to direct memory
readMeasurement Read and scale specified measurement value from direct memory
writeMeasurement Scale and write specified measurement value to direct memory
readAxis Read and scale specified axis value from direct memory
writeAxis Scale and write specified axis value to direct memory
readSingleValue 从内存中阅读指定测量的单个样本
writeSingleValue Write single sample to specified measurement
createMeasurementList Create measurement list for XCP channel
viewMeasurementLists 查看XCP频道上配置的测量列表
合并清单 Remove all measurement lists from XCP channel
startMeasurement Start configured DAQ and STIM lists
iSmoesurementrunn 指出测量是否活跃
readDAQ 从DAQ列表中读取指定测量的缩放样本
readdaqlistdata 从DAQ列表中读取指定测量的样本
写作 Write scaled value of specified measurement to STIM list
写入imlistdata 写入指定的测量
停止措施 Stop configured DAQ and STIM lists

Properties

expand all

XCP.A2L属性 Properties of thexcp.A2L文件对象
XCP.CHANNEL属性 Properties of theXCP.CHANNELobject

Topics

Hardware Connection

Read and Write Data to Memory

Acquire and Stimulate Measurements