examples/gene_SYNC_HCS12/appli.c
changeset 61 813ffdfbffb2
parent 56 904abfb26abf
child 80 37354e408645
--- a/examples/gene_SYNC_HCS12/appli.c	Tue Dec 19 16:30:57 2006 +0100
+++ b/examples/gene_SYNC_HCS12/appli.c	Tue Dec 19 16:45:39 2006 +0100
@@ -49,18 +49,10 @@
 #include "../include/sync.h"
 
 #include "../include/nmtSlave.h"
+
+// File created by the GUI 
 #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;
 
 
 
@@ -151,15 +143,6 @@
 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.
@@ -288,7 +271,17 @@
 //------------------------------------------------------------------------------
 void gene_SYNC_SDOtimeoutError (UNS8 line)
 {
+	// This function was implemented for the Client's use (client = the one which initiate the dialog),
+	// but we can use it also for the server.
+	// Note : if for an other reason than a timeout, a SDO to read or write 
+	// faile, we do not have implemented a warning function at the server side.
+	// Of course, there is one on the client side.
+  
   MSG_ERR(0x1F01, "SDO timeout for line : ", line);
+  // See the transfer structure in sdo.h to know what informations
+  // you can retreive.
+  MSG_ERR(0x1F02, "  to access index ", gene_SYNC_Data.transfers[line].index);
+  MSG_ERR(0x1F03, "         subIndex ", gene_SYNC_Data.transfers[line].subIndex);
 }
 
 //------------------------------------------------------------------------------