Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

what does Read Queue Length refer to?

what does Read Queue Length refer to, is it the size of the read buffer in bytes or does it represent the buffer size in terms of number of frames.

I have following clarifications :
1. what is the data buffer size of can ?
2. My can card interacts with a device which keeps on sending the information. I feel that even when is read the data continuously with a read queue length of 100, few of the data frames are missing. This is found out by connecting the can in parallel to a can spy in another system.
3. When data is flowing continously, does the can data buffer gets over written with the new data?
4. Does increasing the queue length help in reading all the data frames wihtout any loss?
5. What is the maximum read queue l
ength that can be specified?
0 Kudos
Message 1 of 2
(3,894 Views)
The read Queue allows your application to poll the CAN device for all messages, then go off and execute other code while the queue fills up. The data buffer size refers to the number of frames. (each message could be considered a frame)
1. The data buffer size is configurable, you can use a queue length of 200 or 300, but the bigger the queue, the more time it takes to read or empty.
2. If your queue is set to 100 and you are missing messages, you can increase the queue size, or you can poll the queue faster. I would recommend polling faster, the CAN interface can usually be polled as fast as once per 1mSec. or 2 mSec.
3. Depending on how you setup the CAN queue, you can overwrite the CAN data, but most of the time, you will not overwite the messages in the q
ueue, instead you will get a warning or an error.
4. See answer to question #2
5. I have seen the queue as large as 500, but usually I try to set it to 200 or less, simply because a larger queue takes more time to read. It really depends on your CAN speed and communication type.
Message 2 of 2
(3,894 Views)