I am trying to implement on iQAN a "TSC handler" and a "TSC1 CAN message queue". Both items are defined in the J1939 standard. This question is open-ended and might not have a simple answer.
Essentially, it is assumed TSC1 CAN messages will sometimes be read by our MD4 at a faster rate than we can process them in our 10 ms cycle time. When this happens (if it does happen), a queue is needed to ensure TSC1 CAN messages that could not be processed during a cycle time are stored and accessible by our TSC handler for processing during the subsequent cycle time. Our queue is expected not to overflow since TSC1 messages have a timeout value within the queue.
Here are my questions:
1. Does iQAN design already have the tool needed to queue CAN message at the software level
2. If not, I am thinking of using the following method:
A. read every input CAN frame and identify new messages (i.e. those that were updated since the last cycle time)
B. copy every new message's data-frame content into an array that is large enough to prevent overflow
C. process as many TSC1 message on the array during the remaining time of the current cycle time period.
then go back to step A when a new cycle time begins.
Customer support service by UserEcho