Periodic messages and receive normal response for defined request #31
tesla20000
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have created a send-receive function. From Asynchronous communication, it receives manually synchronized send-receive communication. The problem is that the defined filters for incoming messages do not limit the received replies to periodically repeated messages. I need to define tester present message sometimes in order to keep a previously open diagnostic session. But it happens that when sending a query - in the receiving buffer I have a reply to a repeated message. It's not convenient. Firstly, it came from a different ID (it was defined for a different system in the vehicle and I still need it), secondly - the answer to it appears in the receiving buffer, and I don't want that. How to deal with it?
Mention - sometimes the situation requires the activation of communication maintenance by sending tester present to several vehicle controllers - and the current communication itself takes place with another vehicle controller. In summary - all replies to repetitive/periodic messages fall into the receive buffer. I'd rather not have them there.
Any advice???
The only thing that comes to my mind is to check the can ID from which the message came in the receive buffer and compare it with the last one set. If the message has a different expected can address, then do not use it in the further collection of responses, continue checking the buffer until we have retrieved everything.
Beta Was this translation helpful? Give feedback.
All reactions