问题
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