examples/SillySlave/README
author Robert Lehmann <robert.lehmann@sitec-systems.de>
Tue, 28 Jul 2015 16:36:55 +0200
changeset 793 72e9e1064432
parent 400 7d845f5d730c
permissions -rw-r--r--
timers_unix: Fix termination problem of WaitReceiveTaskEnd

The function pthread_kill sends the Signal thread and to the own process.
If you use this construct than the application which calls uses the
canfestival api will terminate at the call of canClose. To avoid that
use pthread_cancel instead of pthread_kill. To use the pthread_cancel call
you need to set the cancel ability in the thread function. That means
you need to call pthread_setcancelstate and pthread_setcanceltype.
For the termination of the thread at any time it is important to set the
cancel type to PTHREAD_CANCEL_ASYNCHRONOUS.
SillySlave example for CANfestival

Its purpose is only to check if the selected
driver works at least a minimum. The PC running this demo
must be connected through CAN bus to a working master that 
recognizes the slave nodeId. The slave should be configured
by the master, then switched to operative. After that, when
the master sends a SYNC, the slave answers with PDO1, 
containing an integer that increments each time it is sent.

Please have a look to main.h to tune the master and slave node IDs

It's all. Enjoy it.
GMB
jan 17,2008