我是CAPL的新手,我想知道在我的例子中这个单词是如何工作的?
on errorFrame
{
int ReportFirstDetecetdError_Ch1 = 0;
if ( this.msgChannel == 1 )
{
AmountOfDetected_CAN_Error_Ch1++;
if ( ReportFirstDetecetdError_Ch1 == 0 )
{
AST_SetReportStep( AST_STEP_WARNING, "CAN 1: First CAN error detected! Only the first will be in the test report." );
ReportFirstDetecetdError_Ch1 = 1;
}
}
}
发布于 2022-06-01 05:10:37
这里的“此”表示为哪个事件触发的消息。
CAPL是基于事件的。只有在收到errorFrame时,才会执行此代码。当接收到错误帧时,您可以检查它是从CAN1、CAN2还是CANn收到的。
您可以使用"this“、read (this.id)、Data (this.byte(x))读取消息的其他参数。
https://stackoverflow.com/questions/72431154
复制相似问题