]> rtime.felk.cvut.cz Git - CanFestival-3.git/blobdiff - include/data.h
Re-write doxygen tags in headers files to generate User API documentation
[CanFestival-3.git] / include / data.h
index 1540c0d181ae28abfc395553df76e1d5235247fa..080ceecfc0b624b71d172da3359dc1e35a1bb94a 100644 (file)
@@ -42,21 +42,25 @@ typedef struct struct_CO_Data CO_Data;
 #include "states.h"
 #include "lifegrd.h"
 #include "sync.h"
+#include "nmtSlave.h"
 #include "nmtMaster.h"
 #include "emcy.h"
 #ifdef CO_ENABLE_LSS
 #include "lss.h"
 #endif
 
-/* This structurs contains all necessary information for a CanOpen node */
+/**
+ * @ingroup od
+ * @brief This structure contains all necessary information for a CanOpen node 
+ */
 struct struct_CO_Data {
        /* Object dictionary */
        UNS8 *bDeviceNodeId;
        const indextable *objdict;
        s_PDO_status *PDO_status;
-       quick_index *firstIndex;
-       quick_index *lastIndex;
-       UNS16 *ObjdictSize;
+       const quick_index *firstIndex;
+       const quick_index *lastIndex;
+       const UNS16 *ObjdictSize;
        const UNS8 *iam_a_slave;
        valueRangeTest_t valueRangeTest;
        
@@ -71,7 +75,9 @@ struct struct_CO_Data {
        preOperational_t preOperational;
        operational_t operational;
        stopped_t stopped;
-
+     void (*NMT_Slave_Node_Reset_Callback)(CO_Data*);
+     void (*NMT_Slave_Communications_Reset_Callback)(CO_Data*);
+     
        /* NMT-heartbeat */
        UNS8 *ConsumerHeartbeatCount;
        UNS32 *ConsumerHeartbeatEntries;
@@ -92,7 +98,7 @@ struct struct_CO_Data {
        
        /* General */
        UNS8 toggle;
-       CAN_HANDLE canHandle;   
+       CAN_PORT canHandle;     
        scanIndexOD_t scanIndexOD;
        storeODSubIndex_t storeODSubIndex; 
        
@@ -100,6 +106,7 @@ struct struct_CO_Data {
     const indextable* dcf_odentry;
        UNS8* dcf_cursor;
        UNS32 dcf_entries_count;
+       UNS8 dcf_request;
        
        /* EMCY */
        e_errorState error_state;
@@ -115,7 +122,6 @@ struct struct_CO_Data {
        /* LSS */
        lss_transfer_t lss_transfer;
        lss_StoreConfiguration_t lss_StoreConfiguration;
-       lss_ChangeBaudRate_t lss_ChangeBaudRate;
 #endif 
 };
 
@@ -145,30 +151,41 @@ struct struct_CO_Data {
        },
        
 #ifdef CO_ENABLE_LSS
+
+#ifdef CO_ENABLE_LSS_FS        
+#define lss_fs_Initializer \
+               ,0,                                             /* IDNumber */\
+               128,                                    /* BitChecked */\
+               0,                                              /* LSSSub */\
+               0,                                              /* LSSNext */\
+               0,                                              /* LSSPos */\
+               LSS_FS_RESET,                   /* FastScan_SM */\
+               -1,                                             /* timerFS */\
+               {{0,0,0,0},{0,0,0,0}}   /* lss_fs_transfer */
+#else
+#define lss_fs_Initializer
+#endif         
+
 #define lss_Initializer {\
                LSS_RESET,                      /* state */\
                0,                                              /* command */\
                LSS_WAITING_MODE,               /* mode */\
                0,                                              /* dat1 */\
                0,                                              /* dat2 */\
-               Unknown_state,                  /* currentState */\
                0,                              /* NodeID */\
                0,                              /* addr_sel_match */\
                0,                              /* addr_ident_match */\
                "none",                         /* BaudRate */\
                0,                              /* SwitchDelay */\
                SDELAY_OFF,                     /* SwitchDelayState */\
-               {-1,-1},                        /* Timers[2] */\
+               NULL,                                   /* canHandle_t */\
+               -1,                                             /* TimerMSG */\
+               -1,                             /* TimerSDELAY */\
                NULL,                           /* Callback */\
-               0,                                              /* IDNumber */\
-               128,                                    /* BitChecked */\
-               0,                                              /* LSSSub */\
-               0,                                              /* LSSNext */\
-               0,                                              /* LSSPos */\
-               LSS_FS_RESET                    /* FastScan_SM */\
+               0                                               /* LSSanswer */\
+               lss_fs_Initializer              /*FastScan service initialization */\
          },\
-         NULL,         /* _lss_StoreConfiguration*/\
-         NULL    /* _lss_ChangeBaudRate */
+         NULL  /* _lss_StoreConfiguration*/
 #else
 #define lss_Initializer
 #endif
@@ -201,12 +218,15 @@ struct struct_CO_Data {
                0,          /* csEmergency */\
                0,          /* csSYNC */\
                0,          /* csHeartbeat */\
-               0           /* csPDO */\
+               0,           /* csPDO */\
+               0           /* csLSS */\
        },\
        _initialisation,     /* initialisation */\
        _preOperational,     /* preOperational */\
        _operational,        /* operational */\
        _stopped,            /* stopped */\
+       NULL,                /* NMT node reset callback */\
+       NULL,                /* NMT communications reset callback */\
        \
        /* NMT-heartbeat */\
        & NODE_PREFIX ## _highestSubIndex_obj1016, /* ConsumerHeartbeatCount */\
@@ -237,6 +257,7 @@ struct struct_CO_Data {
     NULL,       /*dcf_odentry*/\
        NULL,           /*dcf_cursor*/\
        1,              /*dcf_entries_count*/\
+       0,              /* dcf_request*/\
        \
        /* EMCY */\
        Error_free,                      /* error_state */\