简体   繁体   中英

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.

I'm able to pass it through CAN signals untouched if I want to using the following:

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. 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

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

There is no need for adding the condition if(this.dir == rx) . Because there is a possibility that the frame is a tx if you are simulating it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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