简体   繁体   English

如果那里有 CAPL 节点,如何在 Graphics/Trace window 之前网关 FlexRay 帧?

[英]How do you gateway FlexRay frames before a Graphics/Trace window if you have a CAPL node there?

This is more for practice than anything else.这比其他任何事情都更适合练习。 I've added a CAPL node before the graphics window ( Location of CAPL node ) and I'm just trying to get familiar with doing some simple things like adding offsets to signals and things.我在图形 window (CAPL 节点的位置)之前添加了一个 CAPL 节点,我只是想熟悉一些简单的事情,比如向信号和事物添加偏移量。

I'm able to pass it through CAN signals untouched if I want to using the following:如果我想使用以下内容,我可以通过 CAN 信号原封不动地传递它:

on message CAN1.*
{
   message CAN1.* msg;
   if(this.dir == rx) {
       msg = this;
       output(msg);
   }
}

The problem is that I can't work out how to do this for FlexRay.问题是我不知道如何为 FlexRay 执行此操作。 I've tried a few combinations based on the following but always end up with an error;我根据以下内容尝试了一些组合,但总是以错误告终;

on frFrame * {
   frFrame * myFrame;

   if(this.dir == rx) {
       myFrame= this;
       output(myFrame);
   }
}

Any pointers would be greatly appreciated.任何指针将不胜感激。

If you want to pass the FR Frames from the program node to the Graphics window or Trace window, you just have to write the following如果您想将程序节点中的 FR 帧传递给 Graphics window 或 Trace window,您只需编写以下内容

on frFrame *
{  
  if(this.dir == rx)
    output(this);
}

There is no need for adding the condition if(this.dir == rx) .不需要添加条件if(this.dir == rx) Because there is a possibility that the frame is a tx if you are simulating it.因为如果您正在模拟它,则该帧有可能是一个 tx。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM