Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Does dual port card appear as two independant CAN devices when using API?

I'm working on a program using the Frame API in C++.  Currently there is a single Series 2 PCI-CAN with 1 port on the system.  I need to program in a way that will allow a multiple port card to be added to the system with minimal to no software modification.
 
If I open two different network interface objects (CAN0 and CAN1), will the NI-CAN driver maintain those objects independantly?  For instance, will they each have their own read and write queues, and maintain a seperate set of error counters? 
 
What I am most concerned with at the moment is the bus states.  Is is possible for one of the interface objects to be in the Bus Off state, while the other is in active error?  Or is the bus state a card wide thing?
 
Thanks for any info,
Dave
 
PS - I did find a post that relates to this but it seems like the conversation died off before all of its issues were resolved.  I will post a reply on that thread to try and get it going again.
0 Kudos
Message 1 of 2
(4,949 Views)

Hi

Both ports of a two port CAN board are handled by one processor and they use the same memory for alocating the necessary queues.

But, both ports if connected to different CAN buses have their own handle, own queues and error handling. That means if one Bus enters to BUS OFF, the second bus can still communicate. And you can stop and restart communication independently on both ports. Even the ncaction reset works  on a single port at a time.

DirkW

0 Kudos
Message 2 of 2
(4,939 Views)