linUpdateResponse vs Output - how are they different for LIN simulated nodes?

让人想犯罪 __ 提交于 2020-05-17 06:24:25

问题


In a LIN simulated slave node, what is the difference between output and linUpdateResponse?

From output docs:

To reconfigure response data of LIN frame. In that case RTR selector has to be set to 0. The LIN hardware responds to the next request of the specified frame with the newly configured data.

So, I can reconfigure the output and next time (real?) hardware should talk I've successfully override it, right?

From linUpdateResponse docs:

Updates the response data of a specific LIN frame.

letting me set data length (dlc) and data content for a specific frame ID.

How are they different and are there examples available? I can't quite understand how to use the latter with the example provided.


回答1:


For LIN slave nodes, there is not really a difference between output and linUpdateResponse.

Both modify the internal state of the (simulated) slave and change the frame that will be sent the next time the master asks for the frame.

As you have posted, when using output you have the set the RTR selector.

But apart from that, there is no difference.

I, personally, think that linUpdateResponse is more convenient to use.



来源:https://stackoverflow.com/questions/61389656/linupdateresponse-vs-output-how-are-they-different-for-lin-simulated-nodes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!