Just checking if my understanding of the CAN component is correct any help and advise is most welcome
The PIC18 ECAN as 2 Receive buffers and the CAN component seem to read 1 byte at a time from a buffer, The user should check which buffer has a new message and then read the message out byte by byte as specified by the DLC of the message
In my case I would expect 2 Messages for my CAN node (set-up filters and masks to accept these two messages, however these messages can randomly end up in RX buffer 0 or 1 there for I need to check both buffers and select which message was received read the 8 data bytes out in a loop into a Buffer(Array) for processing by the application code.
As you will see in my Flowchart i check both buffers and if the buffer is not empty I select the ID and then process (read the message ) out in a loop byte for byte into a String ( it seems a string variable and a Bate array is the same thing in FC is this true ?)
Basically the code consist of two exact same code pieces only the buffer from where it is read is different.

Is this correct or is there a more intelligent way to do this ?
all help is much appreciated