Tested. OK on Canfestival 3 rc2
authorfrdupin
Wed, 13 Dec 2006 14:44:27 +0100
changeset 54 a2ca09ac1523
parent 53 73bc47a0db55
child 55 96173dd44f2c
Tested. OK on Canfestival 3 rc2
examples/gene_SYNC_HCS12/appli.c
examples/gene_SYNC_HCS12/objdict.c
examples/gene_SYNC_HCS12/objdict.h
examples/gene_SYNC_HCS12/objdict.od
examples/gene_SYNC_HCS12/readme.txt
--- a/examples/gene_SYNC_HCS12/appli.c	Wed Dec 13 14:14:18 2006 +0100
+++ b/examples/gene_SYNC_HCS12/appli.c	Wed Dec 13 14:44:27 2006 +0100
@@ -20,7 +20,7 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
-
+// Uncomment if you don't need console informations.
 #define DEBUG_WAR_CONSOLE_ON
 #define DEBUG_ERR_CONSOLE_ON
 
@@ -31,12 +31,13 @@
 #include <asm-m68hc12/ports.h>
 #include  <interrupt.h>
 
+#include "../include/data.h"
 #include <applicfg.h>
 
 
 
-#include <../include/hcs12/candriver.h>
-
+#include "../include/hcs12/candriver.h"
+#include "../include/hcs12/canOpenDriver.h"
 #include "../include/def.h"
 #include "../include/can.h"
 #include "../include/objdictdef.h"
@@ -47,10 +48,22 @@
 #include "../include/lifegrd.h"
 #include "../include/sync.h"
 
-
 #include "../include/nmtSlave.h"
 #include "objdict.h"
 
+// Variables defined in the object dictionary (See objdict.c)
+extern UNS16 acceptanceFilter1;		// Mapped at index 0x2015, subindex 0x00
+extern UNS16 acceptanceFilter2;		// Mapped at index 0x2016, subindex 0x00
+extern UNS16 acceptanceFilter3;		// Mapped at index 0x2017, subindex 0x00
+extern UNS16 acceptanceFilter4;		// Mapped at index 0x2018, subindex 0x00
+extern UNS16 mask1;		// Mapped at index 0x2019, subindex 0x00
+extern UNS16 mask2;		// Mapped at index 0x2020, subindex 0x00
+extern UNS16 mask3;		// Mapped at index 0x2021, subindex 0x00
+extern UNS16 mask4;		// Mapped at index 0x2022, subindex 0x00
+extern UNS8 applyDownloadedFilters;
+
+
+
 
 // HCS12 configuration
 // -----------------------------------------------------
@@ -131,11 +144,22 @@
 
 /**************************prototypes*****************************************/
 
-//fonction d'initialisation du bus can et la couche CANOPEN pour le capteur
+//Init can bus and Canopen
 void initCanopencapteur (void);
-// les fonctions d'initialisation du capteur: timer, compteurs logiciel
+// Init the sensor
 void initSensor(void);
 void initPortB(void);
+void initPortH(void);
+
+// Functions needed by Canfestival
+// Notice that gene_SYNC is the name of the sensor defined in python GUI.
+// Do not change it !.
+void gene_SYNC_initialisation(void);
+void gene_SYNC_preOperational(void);
+void gene_SYNC_operational(void);
+void gene_SYNC_stopped(void);
+void gene_SYNC_post_sync(void);
+
 
 //------------------------------------------------------------------------------
 //Initialisation of the port B for the leds.
@@ -147,18 +171,41 @@
   IO_PORTS_8(PORTB) = 0xFF;
 }
 
-
+//------------------------------------------------------------------------------
+// Init of port H to choose the CAN rate by switch, and the nodeId
+void initPortH(void)
+{
+  // Port H is input
+  IO_PORTS_8(DDRH)= 0X00;
+  // Enable pull device
+  IO_PORTS_8(PERH) = 0XFF;
+  // Choose the pull-up device
+  IO_PORTS_8(PPSH) = 0X00;
+}
 
 //------------------------------------------------------------------------------
 void initSensor(void)
 { 
-  UNS8 baudrate = 0;
-  MSG_WAR(0x3F33, "I am the node :  ", getNodeId(&gene_SYNC_Data));  
+  UNS8 baudrate = 0; 
+  UNS8 nodeId = 0; 
   // Init led control
   initPortB(); 
   IO_PORTS_8(PORTB) &= ~ 0x01; //One led ON
-  // Init port to choose se CAN baudrate by switch
-  IO_PORTS_8(ATD0DIEN) = 0x03;
+  initPortH();
+  
+    /* Defining the node Id */
+  // Uncomment to have a fixed nodeId
+  //setNodeId(&gene_SYNC_Data, 0x03);
+  
+  // Comment below to have a fixed nodeId
+  nodeId = ~(IO_PORTS_8(PTH)) & 0x3F;
+  if (nodeId == 0) {
+  	MSG_WAR(0x3F33, "Using default nodeId :  ", getNodeId(&gene_SYNC_Data));
+  }
+  else	
+    setNodeId(&gene_SYNC_Data, nodeId);
+  
+  MSG_WAR(0x3F33, "My nodeId is :  ", getNodeId(&gene_SYNC_Data));
   
   canBusInit bi0 = {
     0,    /* no low power                 */ 
@@ -185,26 +232,38 @@
   //Init the HCS12 microcontroler for CanOpen 
   initHCS12();
    
-  // Chose the CAN rate
-  baudrate = IO_PORTS_8(PORTAD0) & 0x03;
+  // Chose the CAN rate (On our board, whe have switch for all purpose)
+  //  7    8
+  //  ON   ON   => 1000 kpbs
+  //  OFF  ON   =>  500 kpbs
+  //  ON   OFF  =>  250 kpbs
+  
+  baudrate = ~(IO_PORTS_8(PTH)) & 0xC0;
+  
+  // Uncomment to have a fixed baudrate of 250 kbps
+  //baudrate = 1;
+  
   switch (baudrate) {
-  case 1:
+  case 0x40:
     bi0.clk = CAN_Baudrates[CAN_BAUDRATE_250K];
     MSG_WAR(0x3F30, "CAN 250 kbps ", 0);
     break;
-  case 2:
+  case 0x80:
     bi0.clk = CAN_Baudrates[CAN_BAUDRATE_500K];
     MSG_WAR(0x3F31, "CAN 500 kbps ", 0);
     break;
-  case 3:
+  case 0xC0:
     bi0.clk = CAN_Baudrates[CAN_BAUDRATE_1M];
     MSG_WAR(0x3F31, "CAN 1000 kbps ", 0);
     break;   
   default:
-    MSG_WAR(0x2F32, "CAN BAUD RATE NOT DEFINED ", 0);
+    bi0.clk = CAN_Baudrates[CAN_BAUDRATE_1M];
+    MSG_WAR(0x2F32, "CAN BAUD RATE NOT DEFINED => 250 kbps ", 0);
   }
 
-  MSG_WAR(0x3F33, "SYNC signal generator", 0);
+   
+
+  MSG_WAR(0x3F33, "SYNC signal generator ", 0);
 
   canInit(CANOPEN_LINE_NUMBER_USED, bi0);  //initialize filters...
   initTimer(); // Init hcs12 timer used by CanFestival. (see timerhw.c)
@@ -244,9 +303,11 @@
 void gene_SYNC_initialisation()
 {  
   MSG_WAR (0x3F00, "Entering in INIT ", 0); 
-  initSensor();
+  initSensor();  
+
   IO_PORTS_8(PORTB) &= ~ 0x01; // led  0         : ON
   IO_PORTS_8(PORTB) |=   0x0E; // leds 1, 2, 3   : OFF
+  
 }
 
 
@@ -256,6 +317,27 @@
   MSG_WAR (0x3F01, "Entering in PRE-OPERATIONAL ", 0); 
   IO_PORTS_8(PORTB) &= ~ 0x03; // leds 0, 1      : ON
   IO_PORTS_8(PORTB) |=   0x0C; // leds 2, 3      : OFF
+    /* default values for the msg CAN filters */
+  /* Accept all */
+    {
+   	  canBusFilterInit filterConfiguration = 
+   	  {
+   	  0x01,  /* Filter on 16 bits. See Motorola Block Guide V02.14 */
+      /*canidarx, canidmrx */                        
+      0x00, 0xFF,          /* filter 0 */
+      0x00, 0xFF, 		   /* filter 0 */
+      0x00, 0xFF,          /* filter 1 */
+      0x00, 0xFF, 		   /* filter 1 */
+      0x00, 0xFF,          /* filter 2 */
+      0x00, 0xFF, 		   /* filter 2 */
+      0x00, 0xFF,          /* filter 3 */
+      0x00, 0xFF, 	       /* filter 3 */
+   	 };
+   	 canChangeFilter(CANOPEN_LINE_NUMBER_USED, filterConfiguration);
+   } 
+   // Reset the automatic change by SDO
+   applyDownloadedFilters = 0;
+   
 }
 
 
@@ -265,12 +347,59 @@
    MSG_WAR (0x3F02, "Entering in OPERATIONAL ", 0); 
    IO_PORTS_8(PORTB) &= ~ 0x07; // leds 0, 1, 2   : ON
    IO_PORTS_8(PORTB) |=   0x08; // leds 3         : OFF
+   
+   // Filtering the CAN received msgs.
+   // 2 ways
+   // First :applying an automatic filter
+   // Second : The values of the filtering registers are mapped in the object dictionary,
+   // So that a filtering configuration can be downloaded by SDO in pre-operational mode
+   	
+   	if (applyDownloadedFilters == 0) {// No downloaded configuration to apply
+  		UNS16 accept1 = 0x0000; // Accept NMT
+   		UNS16 mask1 = 0x0FFF;   // Mask NMT
+   		UNS16 accept2 = 0xE000; // Accept NMT error control (heartbeat, nodeguard)
+   		UNS16 mask2 = 0x0FFF;   // Mask NMT error control (heartbeat, nodeguard)
+   		
+   		canBusFilterInit filterConfiguration = 
+				{// filters 3 and 4 not used, so configured like filter 1.
+   		  	0x01,  /* Filter on 16 bits. See Motorola Block Guide V02.14 */
+     	    /*canidarx, canidmrx */                        
+      		(UNS8)(accept1 >> 8), (UNS8)(mask1 >> 8),    /* filter 1 id10...3*/
+      		(UNS8)accept1       , (UNS8)mask1, 		       /* filter 1 id2 ... */
+      		(UNS8)(accept2 >> 8), (UNS8)(mask2 >> 8),    /* filter 2 id10...3*/
+      		(UNS8)accept2       , (UNS8)mask2, 		       /* filter 2 id2 ... */
+       		(UNS8)(accept1 >> 8), (UNS8)(mask1 >> 8),    /* filter 3 id10...3*/
+      		(UNS8)accept1       , (UNS8)mask1, 		       /* filter 3 id2 ... */
+      		(UNS8)(accept1 >> 8), (UNS8)(mask1 >> 8),    /* filter 4 id10...3*/
+      		(UNS8)accept1       , (UNS8)mask1 		       /* filter 4 id2 ... */     	
+   	 	 	};
+   	 		canChangeFilter(CANOPEN_LINE_NUMBER_USED, filterConfiguration);
+   	 		MSG_WAR (0x3F03, "Internal CAN Rcv filter applied ", 0); 
+    	} 
+   	  else { // Apply filters downnloaded
+   			canBusFilterInit filterConfiguration = 
+				{// filters 3 and 4 not used, so configured like filter 1.
+   		  	0x01,  /* Filter on 16 bits. See Motorola Block Guide V02.14 */
+     	    /*canidarx, canidmrx */                        
+      		(UNS8)( acceptanceFilter1>> 8), (UNS8)(mask1 >> 8),    /* filter 1 id10...3*/
+      		(UNS8)acceptanceFilter1       , (UNS8)mask1, 		       /* filter 1 id2 ... */
+      		(UNS8)(acceptanceFilter2 >> 8), (UNS8)(mask2 >> 8),     /* filter 2 id10...3*/
+      		(UNS8)acceptanceFilter2       , (UNS8)mask2, 		       /* filter 2 id2 ... */
+       		(UNS8)(acceptanceFilter3 >> 8), (UNS8)(mask3 >> 8),    /* filter 3 id10...3*/
+      		(UNS8)acceptanceFilter3       , (UNS8)mask3, 		       /* filter 3 id2 ... */
+      		(UNS8)(acceptanceFilter4 >> 8), (UNS8)(mask4 >> 8),    /* filter 4 id10...3*/
+      		(UNS8)acceptanceFilter4       , (UNS8)mask4 		       /* filter 4 id2 ... */     	
+   	 	 	};
+   	 		canChangeFilter(CANOPEN_LINE_NUMBER_USED, filterConfiguration);  		
+   	 		MSG_WAR (0x3F04, "Downloaded CAN Rcv filter applied ", 0); 
+   	}
 }
 
 //------------------------------------------------------------------------------
 void gene_SYNC_stopped()
 {
   MSG_WAR (0x3F02, "Entering in STOPPED ", 0); 
+  IO_PORTS_8(PORTB) |=   0x0E; // leds 1, 2, 3, 4   : OFF
 }
 
 //------------------------------------------------------------------------------
@@ -295,13 +424,11 @@
 UNS8 main (void)
 {
 
-  MSG_WAR(0x3F34, "Entering in the main", 0);
+  MSG_WAR(0x3F34, "Entering in the main ", 0);
   //----------------------------- INITIALISATION --------------------------------
-  /* Defining the node Id */
-  setNodeId(&gene_SYNC_Data, 0x03);
-
+  
   /* Put the node in Initialisation mode */
-  MSG_WAR(0x3F35, "va passer en init", 0);
+  MSG_WAR(0x3F35, "Will entering in INIT ", 0);
   setState(&gene_SYNC_Data, Initialisation);
 
   //----------------------------- START -----------------------------------------
@@ -309,18 +436,14 @@
   //MSG_WAR(0x3F36, "va passer en pre-op", 0);
   //setState(&gene_SYNC_Data, Pre_operational);
 
-    while (1) {
-      {
+	// Loop of receiving messages
+  while (1) {
 	Message m;
 	if (f_can_receive(0, &m)) {
-	  MSG_WAR(0x3F36, "Msg received", m.cob_id.w);
+	  //MSG_WAR(0x3F36, "Msg received", m.cob_id.w);
 	  canDispatch(&gene_SYNC_Data, &m);
-	}
-	  
-	
-      }
-      
-    }
+	}  
+    	}
 
   return (0); 
 }
--- a/examples/gene_SYNC_HCS12/objdict.c	Wed Dec 13 14:14:18 2006 +0100
+++ b/examples/gene_SYNC_HCS12/objdict.c	Wed Dec 13 14:44:27 2006 +0100
@@ -20,211 +20,254 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+/* File generated by gen_cfile.py. Should not be modified. */
+
 #include "objdict.h"
 
 /**************************************************************************/
 /* Declaration of the mapped variables                                    */
 /**************************************************************************/
+UNS16 acceptanceFilter1 = 0x0;		// Mapped at index 0x2015, subindex 0x00
+UNS16 acceptanceFilter2 = 0x0;		// Mapped at index 0x2016, subindex 0x00
+UNS16 acceptanceFilter3 = 0x0;		// Mapped at index 0x2017, subindex 0x00
+UNS16 acceptanceFilter4 = 0x0;		// Mapped at index 0x2018, subindex 0x00
+UNS16 mask1 = 0x0;		// Mapped at index 0x2019, subindex 0x00
+UNS16 mask2 = 0x0;		// Mapped at index 0x2020, subindex 0x00
+UNS16 mask3 = 0x0;		// Mapped at index 0x2021, subindex 0x00
+UNS16 mask4 = 0x0;		// Mapped at index 0x2022, subindex 0x00
+UNS8 applyDownloadedFilters = 0x0;		// Mapped at index 0x2023, subindex 0x00
 
 /**************************************************************************/
 /* Declaration of the value range types                                   */
 /**************************************************************************/
 
-
-
-UNS32 gene_SYNC_valueRangeTest (UNS8 typeValue, UNS32 unsValue, REAL32 realValue)
+UNS32 gene_SYNC_valueRangeTest (UNS8 typeValue, void * value)
 {
   switch (typeValue) {
   }
   return 0;
 }
 
-
 /**************************************************************************/
 /* The node id                                                            */
 /**************************************************************************/
-/* node_id default value. 
-   This default value is deprecated.
-   You should always overwrite this by using the function setNodeId(UNS8 nodeId) in your C code.
-*/
-#define NODE_ID 0x03
-UNS8 gene_SYNC_bDeviceNodeId = NODE_ID;
-
+/* node_id default value.*/
+UNS8 gene_SYNC_bDeviceNodeId = 0x03;
 
 //*****************************************************************************/
 /* Array of message processing information */
-/* Should not be modified */
 
 const UNS8 gene_SYNC_iam_a_slave = 1;
 
-  // Macros definition
-
-/* Beware : 
-index                 *must* be writen 4 numbers in hexa
-sub_index             *must* be writen 2 numbers in hexa
-size_variable_in_UNS8 *must* be writen 2 numbers in hexa
-*/
-#define PDO_MAP(index, sub_index, size_variable_in_bits)\
-0x ## index ## sub_index ## size_variable_in_bits
-
-/** This macro helps creating the object dictionary entries.
- *  by calling this macro
- *  it creates an entry in form of: 7 of entries, pointer to the entry. 
- */
-#define DeclareIndexTableEntry(entryname, index)    { (subindex*)entryname,sizeof(entryname)/sizeof(entryname[0]), index}
+TIMER_HANDLE gene_SYNC_heartBeatTimers[0];
 
 //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
 //
 //                       OBJECT DICTIONARY
 //                   
 //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
-// Make your change, depending of your application
- 
-
-/* index 0x1000 :   Device type. 
-                    You have to change the value below, so
-                    it fits your canopen-slave-module */
- 
-                    /* Not used, so, should not be modified */
-                    
-                    UNS32 gene_SYNC_obj1000 = 0;
-                    subindex gene_SYNC_Index1000[] =
-                    {
-                      { RO, uint32, sizeof(UNS32), (void*)&gene_SYNC_obj1000 }
-                    };
-
-/* index 0x1001 :   Error register. 
-                    Change the entries to fit your application 
-                    Not used, so, should not be modified */
-                    UNS8 gene_SYNC_obj1001 = 0x00000000;
-                    subindex gene_SYNC_Index1001[] =
-                    {
-                      { RO, uint8, sizeof(UNS8), (void*)&gene_SYNC_obj1001 }
-                    };
-
-/* index 0x1005 :   COB_ID SYNC */
-                    /* Should not be modified */
-                    UNS32 gene_SYNC_obj1005 = 0x40000080; // bit 30 = 1 : device can generate a SYNC message
-                                                // Beware, it is over written when the node 
-                                                // enters in reset mode
-                                                // See initResetMode() in init.c
-                    subindex gene_SYNC_Index1005[] =
-                    {
-                      { RW, uint32, sizeof(UNS32), (void*)&gene_SYNC_obj1005 }
-                    };
-
-/* index 0x1006 :   SYNC period */
-                    // For producing the SYNC signal every n micro-seconds.
-                    // Put 0 to not producing SYNC
-                    UNS32 gene_SYNC_obj1006 = 0x000186A0; 
-                                         // Default 0 to not produce SYNC //
-                                         // Beware, it is over written when the 
-                                         // node enters in reset mode.
-                                         // See initResetMode() in init.c
-                    subindex gene_SYNC_Index1006[] =
-                    {
-                      { RW, uint32, sizeof(UNS32), (void*)&gene_SYNC_obj1006 }
-                    };
-
-
-                    TIMER_HANDLE gene_SYNC_heartBeatTimers[0];
-                    UNS32 gene_SYNC_obj1016[0]; 
-                    UNS8 gene_SYNC_obj1016_cnt = 0;
+
+/* index 0x1000 :   Device Type. */
+                    UNS32 gene_SYNC_obj1000 = 0x0;	// 0
+                    subindex gene_SYNC_Index1000[] = 
+                     {
+                       { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1000 }
+                     };
+
+/* index 0x1001 :   Error Register. */
+                    UNS8 gene_SYNC_obj1001 = 0x0;	// 0
+                    subindex gene_SYNC_Index1001[] = 
+                     {
+                       { RO, uint8, sizeof (UNS8), (void*)&gene_SYNC_obj1001 }
+                     };
+
+/* index 0x1005 :   SYNC COB ID. */
+                    UNS32 gene_SYNC_obj1005 = 0x40000080;	// 1073741952
+                    ODCallback_t gene_SYNC_Index1005_callbacks[] = 
+                     {
+                       NULL,
+                     };
+                    subindex gene_SYNC_Index1005[] = 
+                     {
+                       { RW, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1005 }
+                     };
+
+/* index 0x1006 :   Communication / Cycle Period. */
+                    UNS32 gene_SYNC_obj1006 = 0x2710;	// 10000
+                    ODCallback_t gene_SYNC_Index1006_callbacks[] = 
+                     {
+                       NULL,
+                     };
+                    subindex gene_SYNC_Index1006[] = 
+                     {
+                       { RW, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1006 }
+                     };
+
+/* index 0x1008 :   Manufacturer Device Name. */
+                    UNS8 gene_SYNC_obj1008[10] = "GENE_SYNC";
+                    subindex gene_SYNC_Index1008[] = 
+                     {
+                       { RO, visible_string, sizeof (gene_SYNC_obj1008), (void*)&gene_SYNC_obj1008 }
+                     };
+
+/* index 0x1016 :   Consumer Heartbeat Time */
+                    UNS8 gene_SYNC_highestSubIndex_obj1016 = 0;
+                    UNS32 gene_SYNC_obj1016[0];
                     subindex gene_SYNC_Index1016[0];
 
-                    UNS16 gene_SYNC_obj1017 = 0x0000;
-/* index 0x1018 :   Identity object */
-                    /** index 1018: identify object. Adjust the entries for your node/company
-                    */
-                    /* Values can be modified */
-
-                    s_identity gene_SYNC_obj1018 =
-                    {
-                      4,       // number of supported entries
-                      0,  // Vendor-ID (given by the can-cia)
-                      0,  // Product Code
-                      0,  // Revision number
-                      0  // serial number
-                    };
-
-                    subindex gene_SYNC_Index1018[] =
-                    {
-                      { RO, uint8,  sizeof(UNS8),  (void*)&gene_SYNC_obj1018.count },
-                      { RO, uint32, sizeof(UNS32), (void*)&gene_SYNC_obj1018.vendor_id},
-                      { RO, uint32, sizeof(UNS32), (void*)&gene_SYNC_obj1018.product_code},
-                      { RO, uint32, sizeof(UNS32), (void*)&gene_SYNC_obj1018.revision_number},
-                      { RO, uint32, sizeof(UNS32), (void*)&gene_SYNC_obj1018.serial_number}
-                    };
-
-/* index 0x1200 :   The SDO Server parameters */
-                    /* BEWARE You cannot define more than one SDO server */
-                    /* The values should not be modified here, 
-                    but can be changed at runtime */
-                    // Beware that the default values that you could put here
-                    // will be over written at the initialisation of the node. 
-                    // See setNodeId() in init.c
-                    s_sdo_parameter gene_SYNC_obj1200  = 
-                      { 3,                   // Number of entries. Always 3 for the SDO           
-                        0x000,     // The cob_id transmited in CAN msg to the server     
-                        0x000,     // The cob_id received in CAN msg from the server  
-                        0x03      // The node id of the client. Should not be modified
-                      };
-                    subindex gene_SYNC_Index1200[] =
-                    {
-                      { RO, uint8,  sizeof( UNS8 ), (void*)&gene_SYNC_obj1200.count },
-                      { RO, uint32, sizeof( UNS32), (void*)&gene_SYNC_obj1200.cob_id_client },
-                      { RO, uint32, sizeof( UNS32), (void*)&gene_SYNC_obj1200.cob_id_server },
-                      { RW, uint8,  sizeof( UNS8),  (void*)&gene_SYNC_obj1200.node_id }
-                    };
-
-/* index 0x1280 :   SDO client parameter */
-                    s_sdo_parameter gene_SYNC_obj1280 = 
-                      { 3,     // Nb of entries 
-                        0x000, // cobid transmited to the server. The good value should be 0x600 + server nodeId
-                        0x000, // cobid received from the server. The good value should be 0x580 + server nodeId
-                        0x00  // server NodeId
-                      };
-                    subindex gene_SYNC_Index1280[] = 
-                      { 
-                        { RO, uint8, sizeof( UNS8  ), (void*)&gene_SYNC_obj1280.count },
-                        { RW, uint8, sizeof( UNS32 ), (void*)&gene_SYNC_obj1280.cob_id_client },
-                        { RW, uint8, sizeof( UNS32 ), (void*)&gene_SYNC_obj1280.cob_id_server },
-                        { RW, uint8, sizeof( UNS8  ), (void*)&gene_SYNC_obj1280.node_id }
-                      }; 
-
+/* index 0x1017 :   Producer Heartbeat Time */ 
+                    UNS16 gene_SYNC_obj1017 = 0x0;   // 0
+
+/* index 0x1018 :   Identity. */
+                    UNS8 gene_SYNC_highestSubIndex_obj1018 = 4; // number of subindex - 1
+                    UNS32 gene_SYNC_obj1018_Vendor_ID = 0x0;	// 0
+                    UNS32 gene_SYNC_obj1018_Product_Code = 0x0;	// 0
+                    UNS32 gene_SYNC_obj1018_Revision_Number = 0x0;	// 0
+                    UNS32 gene_SYNC_obj1018_Serial_Number = 0x0;	// 0
+                    subindex gene_SYNC_Index1018[] = 
+                     {
+                       { RO, uint8, sizeof (UNS8), (void*)&gene_SYNC_highestSubIndex_obj1018 },
+                       { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1018_Vendor_ID },
+                       { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1018_Product_Code },
+                       { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1018_Revision_Number },
+                       { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1018_Serial_Number }
+                     };
+
+/* index 0x1200 :   Server SDO Parameter. */
+                    UNS8 gene_SYNC_highestSubIndex_obj1200 = 2; // number of subindex - 1
+                    UNS32 gene_SYNC_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x0;	// 0
+                    UNS32 gene_SYNC_obj1200_COB_ID_Server_to_Client_Transmit_SDO = 0x0;	// 0
+                    subindex gene_SYNC_Index1200[] = 
+                     {
+                       { RO, uint8, sizeof (UNS8), (void*)&gene_SYNC_highestSubIndex_obj1200 },
+                       { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1200_COB_ID_Client_to_Server_Receive_SDO },
+                       { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1200_COB_ID_Server_to_Client_Transmit_SDO }
+                     };
+
+/* index 0x2015 :   Mapped variable acceptanceFilter1 */
+                    subindex gene_SYNC_Index2015[] = 
+                     {
+                       { RW, uint16, sizeof (UNS16), (void*)&acceptanceFilter1 }
+                     };
+
+/* index 0x2016 :   Mapped variable acceptanceFilter2 */
+                    subindex gene_SYNC_Index2016[] = 
+                     {
+                       { RW, uint16, sizeof (UNS16), (void*)&acceptanceFilter2 }
+                     };
+
+/* index 0x2017 :   Mapped variable acceptanceFilter3 */
+                    subindex gene_SYNC_Index2017[] = 
+                     {
+                       { RW, uint16, sizeof (UNS16), (void*)&acceptanceFilter3 }
+                     };
+
+/* index 0x2018 :   Mapped variable acceptanceFilter4 */
+                    subindex gene_SYNC_Index2018[] = 
+                     {
+                       { RW, uint16, sizeof (UNS16), (void*)&acceptanceFilter4 }
+                     };
+
+/* index 0x2019 :   Mapped variable mask1 */
+                    subindex gene_SYNC_Index2019[] = 
+                     {
+                       { RW, uint16, sizeof (UNS16), (void*)&mask1 }
+                     };
+
+/* index 0x2020 :   Mapped variable mask2 */
+                    subindex gene_SYNC_Index2020[] = 
+                     {
+                       { RW, uint16, sizeof (UNS16), (void*)&mask2 }
+                     };
+
+/* index 0x2021 :   Mapped variable mask3 */
+                    subindex gene_SYNC_Index2021[] = 
+                     {
+                       { RW, uint16, sizeof (UNS16), (void*)&mask3 }
+                     };
+
+/* index 0x2022 :   Mapped variable mask4 */
+                    subindex gene_SYNC_Index2022[] = 
+                     {
+                       { RW, uint16, sizeof (UNS16), (void*)&mask4 }
+                     };
+
+/* index 0x2023 :   Mapped variable applyDownloadedFilters */
+                    subindex gene_SYNC_Index2023[] = 
+                     {
+                       { RW, uint8, sizeof (UNS8), (void*)&applyDownloadedFilters }
+                     };
 
 const indextable gene_SYNC_objdict[] = 
 {
-  DeclareIndexTableEntry(gene_SYNC_Index1000, 0x1000),
-  DeclareIndexTableEntry(gene_SYNC_Index1001, 0x1001),
-  DeclareIndexTableEntry(gene_SYNC_Index1005, 0x1005),
-  DeclareIndexTableEntry(gene_SYNC_Index1006, 0x1006),
-  DeclareIndexTableEntry(gene_SYNC_Index1018, 0x1018),
-  DeclareIndexTableEntry(gene_SYNC_Index1200, 0x1200),
-  DeclareIndexTableEntry(gene_SYNC_Index1280, 0x1280),
+  { (subindex*)gene_SYNC_Index1000,sizeof(gene_SYNC_Index1000)/sizeof(gene_SYNC_Index1000[0]), 0x1000},
+  { (subindex*)gene_SYNC_Index1001,sizeof(gene_SYNC_Index1001)/sizeof(gene_SYNC_Index1001[0]), 0x1001},
+  { (subindex*)gene_SYNC_Index1005,sizeof(gene_SYNC_Index1005)/sizeof(gene_SYNC_Index1005[0]), 0x1005},
+  { (subindex*)gene_SYNC_Index1006,sizeof(gene_SYNC_Index1006)/sizeof(gene_SYNC_Index1006[0]), 0x1006},
+  { (subindex*)gene_SYNC_Index1008,sizeof(gene_SYNC_Index1008)/sizeof(gene_SYNC_Index1008[0]), 0x1008},
+  { (subindex*)gene_SYNC_Index1018,sizeof(gene_SYNC_Index1018)/sizeof(gene_SYNC_Index1018[0]), 0x1018},
+  { (subindex*)gene_SYNC_Index1200,sizeof(gene_SYNC_Index1200)/sizeof(gene_SYNC_Index1200[0]), 0x1200},
+  { (subindex*)gene_SYNC_Index2015,sizeof(gene_SYNC_Index2015)/sizeof(gene_SYNC_Index2015[0]), 0x2015},
+  { (subindex*)gene_SYNC_Index2016,sizeof(gene_SYNC_Index2016)/sizeof(gene_SYNC_Index2016[0]), 0x2016},
+  { (subindex*)gene_SYNC_Index2017,sizeof(gene_SYNC_Index2017)/sizeof(gene_SYNC_Index2017[0]), 0x2017},
+  { (subindex*)gene_SYNC_Index2018,sizeof(gene_SYNC_Index2018)/sizeof(gene_SYNC_Index2018[0]), 0x2018},
+  { (subindex*)gene_SYNC_Index2019,sizeof(gene_SYNC_Index2019)/sizeof(gene_SYNC_Index2019[0]), 0x2019},
+  { (subindex*)gene_SYNC_Index2020,sizeof(gene_SYNC_Index2020)/sizeof(gene_SYNC_Index2020[0]), 0x2020},
+  { (subindex*)gene_SYNC_Index2021,sizeof(gene_SYNC_Index2021)/sizeof(gene_SYNC_Index2021[0]), 0x2021},
+  { (subindex*)gene_SYNC_Index2022,sizeof(gene_SYNC_Index2022)/sizeof(gene_SYNC_Index2022[0]), 0x2022},
+  { (subindex*)gene_SYNC_Index2023,sizeof(gene_SYNC_Index2023)/sizeof(gene_SYNC_Index2023[0]), 0x2023},
 };
 
+const indextable * gene_SYNC_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks)
+{
+	int i;
+	*callbacks = NULL;
+	switch(wIndex){
+		case 0x1000: i = 0;break;
+		case 0x1001: i = 1;break;
+		case 0x1005: i = 2;*callbacks = gene_SYNC_Index1005_callbacks; break;
+		case 0x1006: i = 3;*callbacks = gene_SYNC_Index1006_callbacks; break;
+		case 0x1008: i = 4;break;
+		case 0x1018: i = 5;break;
+		case 0x1200: i = 6;break;
+		case 0x2015: i = 7;break;
+		case 0x2016: i = 8;break;
+		case 0x2017: i = 9;break;
+		case 0x2018: i = 10;break;
+		case 0x2019: i = 11;break;
+		case 0x2020: i = 12;break;
+		case 0x2021: i = 13;break;
+		case 0x2022: i = 14;break;
+		case 0x2023: i = 15;break;
+		default:
+			*errorCode = OD_NO_SUCH_OBJECT;
+			return NULL;
+	}
+	*errorCode = OD_SUCCESSFUL;
+	return &gene_SYNC_objdict[i];
+}
+
 // To count at which received SYNC a PDO must be sent.
 // Even if no pdoTransmit are defined, at least one entry is computed
 // for compilations issues.
-UNS8 gene_SYNC_count_sync[1] = {0, };
+UNS8 gene_SYNC_count_sync[1] = {0,};
 
 quick_index gene_SYNC_firstIndex = {
-    SDO_SVR : 5,
-    SDO_CLT : 6,
-    PDO_RCV : 0,
-    PDO_RCV_MAP : 0,
-    PDO_TRS : 0,
-    PDO_TRS_MAP : 0
+  SDO_SVR : 6,
+  SDO_CLT : 0,
+  PDO_RCV : 0,
+  PDO_RCV_MAP : 0,
+  PDO_TRS : 0,
+  PDO_TRS_MAP : 0
 };
 
 quick_index gene_SYNC_lastIndex = {
-    SDO_SVR : 5,
-    SDO_CLT : 6,
-    PDO_RCV : 0,
-    PDO_RCV_MAP : 0,
-    PDO_TRS : 0,
-    PDO_TRS_MAP : 0
+  SDO_SVR : 6,
+  SDO_CLT : 0,
+  PDO_RCV : 0,
+  PDO_RCV_MAP : 0,
+  PDO_TRS : 0,
+  PDO_TRS_MAP : 0
 };
 
 UNS16 gene_SYNC_ObjdictSize = sizeof(gene_SYNC_objdict)/sizeof(gene_SYNC_objdict[0]); 
--- a/examples/gene_SYNC_HCS12/objdict.h	Wed Dec 13 14:14:18 2006 +0100
+++ b/examples/gene_SYNC_HCS12/objdict.h	Wed Dec 13 14:44:27 2006 +0100
@@ -20,6 +20,8 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+/* File generated by gen_cfile.py. Should not be modified. */
+
 #include "data.h"
 
 // prototypes of function to be filled by app
@@ -39,3 +41,12 @@
 // Master node data struct
 extern CO_Data gene_SYNC_Data;
 
+extern UNS16 acceptanceFilter1;		// Mapped at index 0x2015, subindex 0x00
+extern UNS16 acceptanceFilter2;		// Mapped at index 0x2016, subindex 0x00
+extern UNS16 acceptanceFilter3;		// Mapped at index 0x2017, subindex 0x00
+extern UNS16 acceptanceFilter4;		// Mapped at index 0x2018, subindex 0x00
+extern UNS16 mask1;		// Mapped at index 0x2019, subindex 0x00
+extern UNS16 mask2;		// Mapped at index 0x2020, subindex 0x00
+extern UNS16 mask3;		// Mapped at index 0x2021, subindex 0x00
+extern UNS16 mask4;		// Mapped at index 0x2022, subindex 0x00
+extern UNS8 applyDownloadedFilters;		// Mapped at index 0x2023, subindex 0x00
--- a/examples/gene_SYNC_HCS12/objdict.od	Wed Dec 13 14:14:18 2006 +0100
+++ b/examples/gene_SYNC_HCS12/objdict.od	Wed Dec 13 14:44:27 2006 +0100
@@ -1,58 +1,461 @@
-(inode
-Node
-p1
-(dp2
-S'Profile'
-p3
-(dp4
-sS'Name'
-p5
-Vgene_SYNC
-p6
-sS'Dictionary'
-p7
-(dp8
-I4096
-I0
-sI4097
-I0
-sI4101
-I1073741952
-sI4102
-I100000
-sI4608
-(lp9
-I0
-aI0
-asI4120
-(lp10
-I0
-aI0
-aI0
-aI0
-asI4736
-(lp11
-I0
-aI0
-aI0
-assS'SpecificMenu'
-p12
-(lp13
-sS'UserMapping'
-p14
-(dp15
-sS'DS302'
-p16
-(dp17
-sS'ProfileName'
-p18
-S'None'
-p19
-sS'Type'
-p20
-Vslave
-p21
-sS'ID'
-p22
-I3
-sb.
\ No newline at end of file
+<?xml version="1.0"?>
+<!DOCTYPE PyObject SYSTEM "PyObjects.dtd">
+<PyObject module="node" class="Node" id="-1242840084">
+<attr name="Profile" type="dict" id="-1242835316" >
+</attr>
+<attr name="Name" type="string">gene_SYNC</attr>
+<attr name="Dictionary" type="dict" id="-1242727188" >
+  <entry>
+    <key type="numeric" value="4096" />
+    <val type="numeric" value="0" />
+  </entry>
+  <entry>
+    <key type="numeric" value="4097" />
+    <val type="numeric" value="0" />
+  </entry>
+  <entry>
+    <key type="numeric" value="8225" />
+    <val type="numeric" value="0" />
+  </entry>
+  <entry>
+    <key type="numeric" value="8227" />
+    <val type="numeric" value="0" />
+  </entry>
+  <entry>
+    <key type="numeric" value="4101" />
+    <val type="numeric" value="1073741952" />
+  </entry>
+  <entry>
+    <key type="numeric" value="4102" />
+    <val type="numeric" value="10000" />
+  </entry>
+  <entry>
+    <key type="numeric" value="8224" />
+    <val type="numeric" value="0" />
+  </entry>
+  <entry>
+    <key type="numeric" value="4104" />
+    <val type="string" value="GENE_SYNC" />
+  </entry>
+  <entry>
+    <key type="numeric" value="8226" />
+    <val type="numeric" value="0" />
+  </entry>
+  <entry>
+    <key type="numeric" value="8216" />
+    <val type="numeric" value="0" />
+  </entry>
+  <entry>
+    <key type="numeric" value="4608" />
+    <val type="list" id="-1242782644" >
+      <item type="numeric" value="0" />
+      <item type="numeric" value="0" />
+    </val>
+  </entry>
+  <entry>
+    <key type="numeric" value="8213" />
+    <val type="numeric" value="0" />
+  </entry>
+  <entry>
+    <key type="numeric" value="8214" />
+    <val type="numeric" value="0" />
+  </entry>
+  <entry>
+    <key type="numeric" value="8215" />
+    <val type="numeric" value="0" />
+  </entry>
+  <entry>
+    <key type="numeric" value="4120" />
+    <val type="list" id="-1242788212" >
+      <item type="numeric" value="0" />
+      <item type="numeric" value="0" />
+      <item type="numeric" value="0" />
+      <item type="numeric" value="0" />
+    </val>
+  </entry>
+  <entry>
+    <key type="numeric" value="8217" />
+    <val type="numeric" value="0" />
+  </entry>
+</attr>
+<attr name="SpecificMenu" type="list" id="-1242788340" >
+</attr>
+<attr name="ParamsDictionary" type="dict" id="-1242836132" >
+  <entry>
+    <key type="numeric" value="8213" />
+    <val type="dict" id="-1242835724" >
+      <entry>
+        <key type="string" value="comment" />
+        <val type="string" value="HCS12 can receiving msg filter" />
+      </entry>
+    </val>
+  </entry>
+</attr>
+<attr name="UserMapping" type="dict" id="-1242834772" >
+  <entry>
+    <key type="numeric" value="8224" />
+    <val type="dict" id="-1242835180" >
+      <entry>
+        <key type="string" value="need" />
+        <val type="False" value="" />
+      </entry>
+      <entry>
+        <key type="string" value="values" />
+        <val type="list" id="-1242788276" >
+          <item type="dict" id="-1242834364" >
+            <entry>
+              <key type="string" value="access" />
+              <val type="string" value="rw" />
+            </entry>
+            <entry>
+              <key type="string" value="pdo" />
+              <val type="True" value="" />
+            </entry>
+            <entry>
+              <key type="string" value="type" />
+              <val type="numeric" value="6" />
+            </entry>
+            <entry>
+              <key type="string" value="name" />
+              <val type="string">mask2</val>
+            </entry>
+          </item>
+        </val>
+      </entry>
+      <entry>
+        <key type="string" value="name" />
+        <val type="string">mask2</val>
+      </entry>
+      <entry>
+        <key type="string" value="struct" />
+        <val type="numeric" value="1" />
+      </entry>
+    </val>
+  </entry>
+  <entry>
+    <key type="numeric" value="8225" />
+    <val type="dict" id="-1242835996" >
+      <entry>
+        <key type="string" value="need" />
+        <val type="False" value="" />
+      </entry>
+      <entry>
+        <key type="string" value="values" />
+        <val type="list" id="-1242783348" >
+          <item type="dict" id="-1242835588" >
+            <entry>
+              <key type="string" value="access" />
+              <val type="string" value="rw" />
+            </entry>
+            <entry>
+              <key type="string" value="pdo" />
+              <val type="True" value="" />
+            </entry>
+            <entry>
+              <key type="string" value="type" />
+              <val type="numeric" value="6" />
+            </entry>
+            <entry>
+              <key type="string" value="name" />
+              <val type="string">mask3</val>
+            </entry>
+          </item>
+        </val>
+      </entry>
+      <entry>
+        <key type="string" value="name" />
+        <val type="string">mask3</val>
+      </entry>
+      <entry>
+        <key type="string" value="struct" />
+        <val type="numeric" value="1" />
+      </entry>
+    </val>
+  </entry>
+  <entry>
+    <key type="numeric" value="8226" />
+    <val type="dict" id="-1242835860" >
+      <entry>
+        <key type="string" value="need" />
+        <val type="False" value="" />
+      </entry>
+      <entry>
+        <key type="string" value="values" />
+        <val type="list" id="-1242788532" >
+          <item type="dict" id="-1242727868" >
+            <entry>
+              <key type="string" value="access" />
+              <val type="string" value="rw" />
+            </entry>
+            <entry>
+              <key type="string" value="pdo" />
+              <val type="True" value="" />
+            </entry>
+            <entry>
+              <key type="string" value="type" />
+              <val type="numeric" value="6" />
+            </entry>
+            <entry>
+              <key type="string" value="name" />
+              <val type="string">mask4</val>
+            </entry>
+          </item>
+        </val>
+      </entry>
+      <entry>
+        <key type="string" value="name" />
+        <val type="string">mask4</val>
+      </entry>
+      <entry>
+        <key type="string" value="struct" />
+        <val type="numeric" value="1" />
+      </entry>
+    </val>
+  </entry>
+  <entry>
+    <key type="numeric" value="8227" />
+    <val type="dict" id="-1242821532" >
+      <entry>
+        <key type="string" value="need" />
+        <val type="False" value="" />
+      </entry>
+      <entry>
+        <key type="string" value="values" />
+        <val type="list" id="-1242782356" >
+          <item type="dict" id="-1242819204" >
+            <entry>
+              <key type="string" value="access" />
+              <val type="string" value="rw" />
+            </entry>
+            <entry>
+              <key type="string" value="pdo" />
+              <val type="True" value="" />
+            </entry>
+            <entry>
+              <key type="string" value="type" />
+              <val type="numeric" value="5" />
+            </entry>
+            <entry>
+              <key type="string" value="name" />
+              <val type="string">applyDownloadedFilters</val>
+            </entry>
+          </item>
+        </val>
+      </entry>
+      <entry>
+        <key type="string" value="name" />
+        <val type="string">applyDownloadedFilters</val>
+      </entry>
+      <entry>
+        <key type="string" value="struct" />
+        <val type="numeric" value="1" />
+      </entry>
+    </val>
+  </entry>
+  <entry>
+    <key type="numeric" value="8213" />
+    <val type="dict" id="-1242834092" >
+      <entry>
+        <key type="string" value="need" />
+        <val type="False" value="" />
+      </entry>
+      <entry>
+        <key type="string" value="values" />
+        <val type="list" id="-1242788756" >
+          <item type="dict" id="-1242834228" >
+            <entry>
+              <key type="string" value="access" />
+              <val type="string" value="rw" />
+            </entry>
+            <entry>
+              <key type="string" value="pdo" />
+              <val type="True" value="" />
+            </entry>
+            <entry>
+              <key type="string" value="type" />
+              <val type="numeric" value="6" />
+            </entry>
+            <entry>
+              <key type="string" value="name" />
+              <val type="string">acceptanceFilter1</val>
+            </entry>
+          </item>
+        </val>
+      </entry>
+      <entry>
+        <key type="string" value="name" />
+        <val type="string">acceptanceFilter1</val>
+      </entry>
+      <entry>
+        <key type="string" value="struct" />
+        <val type="numeric" value="1" />
+      </entry>
+    </val>
+  </entry>
+  <entry>
+    <key type="numeric" value="8214" />
+    <val type="dict" id="-1242833820" >
+      <entry>
+        <key type="string" value="need" />
+        <val type="False" value="" />
+      </entry>
+      <entry>
+        <key type="string" value="values" />
+        <val type="list" id="-1242788308" >
+          <item type="dict" id="-1242833956" >
+            <entry>
+              <key type="string" value="access" />
+              <val type="string" value="rw" />
+            </entry>
+            <entry>
+              <key type="string" value="pdo" />
+              <val type="True" value="" />
+            </entry>
+            <entry>
+              <key type="string" value="type" />
+              <val type="numeric" value="6" />
+            </entry>
+            <entry>
+              <key type="string" value="name" />
+              <val type="string">acceptanceFilter2</val>
+            </entry>
+          </item>
+        </val>
+      </entry>
+      <entry>
+        <key type="string" value="name" />
+        <val type="string">acceptanceFilter2</val>
+      </entry>
+      <entry>
+        <key type="string" value="struct" />
+        <val type="numeric" value="1" />
+      </entry>
+    </val>
+  </entry>
+  <entry>
+    <key type="numeric" value="8215" />
+    <val type="dict" id="-1242833548" >
+      <entry>
+        <key type="string" value="need" />
+        <val type="False" value="" />
+      </entry>
+      <entry>
+        <key type="string" value="values" />
+        <val type="list" id="-1242782932" >
+          <item type="dict" id="-1242833684" >
+            <entry>
+              <key type="string" value="access" />
+              <val type="string" value="rw" />
+            </entry>
+            <entry>
+              <key type="string" value="pdo" />
+              <val type="True" value="" />
+            </entry>
+            <entry>
+              <key type="string" value="type" />
+              <val type="numeric" value="6" />
+            </entry>
+            <entry>
+              <key type="string" value="name" />
+              <val type="string">acceptanceFilter3</val>
+            </entry>
+          </item>
+        </val>
+      </entry>
+      <entry>
+        <key type="string" value="name" />
+        <val type="string">acceptanceFilter3</val>
+      </entry>
+      <entry>
+        <key type="string" value="struct" />
+        <val type="numeric" value="1" />
+      </entry>
+    </val>
+  </entry>
+  <entry>
+    <key type="numeric" value="8216" />
+    <val type="dict" id="-1242833276" >
+      <entry>
+        <key type="string" value="need" />
+        <val type="False" value="" />
+      </entry>
+      <entry>
+        <key type="string" value="values" />
+        <val type="list" id="-1242783380" >
+          <item type="dict" id="-1242833412" >
+            <entry>
+              <key type="string" value="access" />
+              <val type="string" value="rw" />
+            </entry>
+            <entry>
+              <key type="string" value="pdo" />
+              <val type="True" value="" />
+            </entry>
+            <entry>
+              <key type="string" value="type" />
+              <val type="numeric" value="6" />
+            </entry>
+            <entry>
+              <key type="string" value="name" />
+              <val type="string">acceptanceFilter4</val>
+            </entry>
+          </item>
+        </val>
+      </entry>
+      <entry>
+        <key type="string" value="name" />
+        <val type="string">acceptanceFilter4</val>
+      </entry>
+      <entry>
+        <key type="string" value="struct" />
+        <val type="numeric" value="1" />
+      </entry>
+    </val>
+  </entry>
+  <entry>
+    <key type="numeric" value="8217" />
+    <val type="dict" id="-1242832852" >
+      <entry>
+        <key type="string" value="need" />
+        <val type="False" value="" />
+      </entry>
+      <entry>
+        <key type="string" value="values" />
+        <val type="list" id="-1242783444" >
+          <item type="dict" id="-1242833140" >
+            <entry>
+              <key type="string" value="access" />
+              <val type="string" value="rw" />
+            </entry>
+            <entry>
+              <key type="string" value="pdo" />
+              <val type="True" value="" />
+            </entry>
+            <entry>
+              <key type="string" value="type" />
+              <val type="numeric" value="6" />
+            </entry>
+            <entry>
+              <key type="string" value="name" />
+              <val type="string">mask1</val>
+            </entry>
+          </item>
+        </val>
+      </entry>
+      <entry>
+        <key type="string" value="name" />
+        <val type="string">mask1</val>
+      </entry>
+      <entry>
+        <key type="string" value="struct" />
+        <val type="numeric" value="1" />
+      </entry>
+    </val>
+  </entry>
+</attr>
+<attr name="DS302" type="dict" id="-1242832580" >
+</attr>
+<attr name="ProfileName" type="string" value="None" />
+<attr name="Type" type="string">slave</attr>
+<attr name="ID" type="numeric" value="3" />
+</PyObject>
--- a/examples/gene_SYNC_HCS12/readme.txt	Wed Dec 13 14:14:18 2006 +0100
+++ b/examples/gene_SYNC_HCS12/readme.txt	Wed Dec 13 14:44:27 2006 +0100
@@ -1,68 +1,59 @@
 Generator of Canopen SYNC message (cobid = 0x80)
 ---------------------------------------------
 francis.dupin@inrets.fr
-27 Janv 2005
-
-Node for Microcontroler MC9S12DP256 
-on board  T-board (http://www.elektronikladen.de
-
-=============
-Node N° 0x03
-=============
-
-This node generate only the SYNC signal.
-(cob-id : 0x80)
-
-To test this node
------------------
-Reset it :
-It is sending :
-cobid : 0x703
-data : 00
-
- 1 - Wants to generate SYNC every 10 milliseconds
-
-1a - put the value (4 bytes) : 0x00002710 in its dictionary 
-index 0x1006, subindex 0x00 :
-
-CAN message (SDO) : 
-cobid : 0x603
-data : 23 06 10 00 10 27 00 00
-(put 23 to transmit a data of 4 bytes
-     27                       3 bytes
-     2B                       2 bytes
-     2F                       1 byte
-)
-
-The node is responding :
-cobid : 0x583
-data : 60 06 10 00 00 00 00 00
-
-1b - put the value (4 bytes) : 0x40000080 at index 0x1005, subindex 0x00
-to start the SYNC : 
-cobid : 0x603
-data : 23 05 10 00 80 00 00 40
-
-The node is responding :
-cobid : 0x583
-data : 60 05 10 00 00 00 00 00
-
- 2 - Put the node in operational mode
-CAN message (NMT) :
-cobid : 0x00
-data : 01 03
-
-The node is sending the SYNC every 10 ms
+27 Janv 2005. 
+Revised 13 Dec 2006
 
 
-Nota
------
-To stop the SYNC : 2 methods
+Status of the code :
+====================
+Tested with 
+- CanFestival 3 rc2 (cvs version)
+- gcc port for HC12 release 3.1
+- Microcontroler MC9S12DP256 
+on board  T-board (http://www.elektronikladen.de)
 
-1 - put 0x00000000 at index 1006 subindex 0
-2 - put 0x00000080 at index 1005 subindex 0 
+
+
+To build the example
+--------------------
+a) Compile CanFestival for hcs12 :
+  Go to the root of CanFestival and enter
+  ./configure --target=hcs12
+  make clean all
+
+b) Build the example
+--------------------
+ cd examples/gene_SYNC_HCS12
+
+ make clean all
+
+
+What does the node ?
+====================
+Just reset it, it should send the SYNC (cobId 0x80) every 10 ms
+Informations availables if you connect the serial port 0 to a terminal configured at 38400 8N1
+				   
+
+
+
+
+The default values :
+nodeId = 0x03
+CAN rate = 250 kbps
+Please read appli.c, these values can be modified by switch.
+
+
+If you put the node in operational state, the CAN messages received are filtered : Only the NMT and Nodeguard can be received.
+The parameters of the filter are mapped in the object dictionary, so that the filter can be configured by SDO before entering in operational state. See the object dictionary index 2015 to 2023. To have the values applied, always download at 0x2023 index 0 the value 1 before entering in operational.
+
+Read the file objdict.c to see the capabilities of the node. 
 
 
 
 
 
+
+
+
+