TestMasterSlave

**************************************************************

*




















*

*




























&sstarf#star;

* simple example for PC. It does implement 2 CanOpen

&sstarf#star;

* in the same process. A master and a slave. Both

*

* together, exchanging periodically NMT, SYNC, &sstarf#star;

* and PDO. Master configure heartbeat producer time

*

* @1000 ms for slave node-id 0x02 by concise DCF.



*

*




























&sstarf#star;

*
Usage:
























*

*
./TestMasterSlave OPTIONS]













*

*




























&sstarf#star;

*
OPTIONS:























*

*

-l : Can library [libcanfestival_can_virtual.so]

*

*




























&sstarf#star;

*
:























&sstarf#star;

*

-s : bus name [0]
















&sstarf#star;

*

-S : 1M,500K,250K,125K,100K,50K,20K,10K,none(disable) &sstarf#star;

*




























&sstarf#star;

*
:























*

*

-m : bus name [1]
















&sstarf#star;

*

-M : 1M,500K,250K,125K,100K,50K,20K,10K,none(disable) &sstarf#star;

*




























&sstarf#star;

**************************************************************


Notes for Concise DCF :


In this example, Master configure producer time at 1000 ms for slave node-id 0x02 by concise DCF according DS-302 profile.

Index 0x1F22 , sub-index 0x00 of the master OD, correspond to the number of entries. This equal to the maximum possible nodeId (127). Each sub-index points to the Node-ID of the device, to which the configuration belongs.


To add more parameters configurations to the slave, the value at sub-index 0x02 must be a binary stream (little-endian) following this structure :

[ nb of entries / index parameter 1 / sub-index parameter 1 size data parameter 1 data parameter 1 / index parameter n / ...]




(UNS32)





(UNS16) (UNS8)




UNS32)
DOMAIN)

So the binary value stream to configure heartbeat producer time must be :


0100000017100002000000e803


The slave node is configured just before the Master entering in Pre_operational state.

epimerde 2007-06-05