On Wed, Jan 26, 2011 at 07:38:24PM +0100, Oliver Hartkopp wrote: > Hello Daniele, > > can you tell me, why you are setting the sockets to not loop sent CAN frames > to the local host?
I was porting an application that used a char-device CAN driver to check if some IDs are present on the CAN. If those IDs are not on the bus, it decides to be the master and sends the messages. With loopback the application was looping between the following statuses: - wonderful, no one is sending, I'm the master, I start sending - oh no! someone else is the master, I stop sending The application uses several sockets because it makes different reads in different threads. Unfortunately the goal was to do the smallest change, not the more elegant one. BCM could do the receiving side with the RX_FILTER option very efficently, simplyfing a lot of code at the same time, but I could not use that without some major overhaul. The bigger picture is a big crane with two cabins, each with an HMI that the operator can use. The HMIs can be in a "passive" or "active" status, according to the master mechanism explained above and the status of ignition keys. The CAN architecture is far from optimal, but it works and the software on the controllers is, after 7-8 years, very stable. A search for "reggiane mhc" on Google images will give you an idea of the machine. Thanks, Daniele -- Daniele Venzano http://www.brownhat.org _______________________________________________ Socketcan-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-users
