diff -r 2cb34a4ac65a -r 6b5a4c21e061 doc/manual/en/html/node53.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/manual/en/html/node53.html Tue Jun 05 18:43:21 2007 +0200 @@ -0,0 +1,642 @@ + + + + + +TestMasterSlave + + + + + + + + + + + + + + + + + + + + + +

+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 +
+ +