[英]How to send cyclic can message using capl in Capl test module
Hi can any one help me how to send the below mentioned airbag_01 message should be sent cyclically in main test.嗨,任何人都可以帮助我如何发送下面提到的airbag_01消息应该在主测试中循环发送。 which test is done capl test module in void maintest()
在 void maintest() 中完成了哪些测试 capl 测试模块
message Airbag_01 Airbag; message Airbag_01 安全气囊;
you should create an on timer function to set the scheduling.您应该创建一个 on timer 函数来设置调度。 Build up your message and output it whenever the timer reaches the limit.
建立您的消息并在计时器达到限制时输出它。 Capl has a really powerful help section.
Capl 有一个非常强大的帮助部分。 If more help is needed feel free to ask.
如果需要更多帮助,请随时询问。
Hard to understand your question.很难理解你的问题。 The following code sends a message periodically each 5 sg:
以下代码每 5 sg 定期发送一条消息:
variables
{
message Airbag_01 Airbag;
}
on timer send_Airbag
{
// Set values:
// Airbag.byte(0) = 0;
// ...
// Send
output(Airbag);
// Cycle each 5 sg
settimer(send_Airbag, 5000);
}
on start
{
// 5 sg
settimer(send_Airbag, 5000);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.