include/data.h
changeset 149 fe50ada8020b
parent 145 e747d2e26af0
child 161 c4908cc776a9
equal deleted inserted replaced
148:ad3de8730172 149:fe50ada8020b
    86 	/* PDO */
    86 	/* PDO */
    87 	s_process_var process_var;
    87 	s_process_var process_var;
    88 	
    88 	
    89 	/* General */
    89 	/* General */
    90 	UNS8 toggle;
    90 	UNS8 toggle;
    91 	canSend_t canSend;	
    91 	CAN_HANDLE canHandle;	
    92 	scanIndexOD_t scanIndexOD;
    92 	scanIndexOD_t scanIndexOD;
    93 };
    93 };
    94 
    94 
    95 #define NMTable_Initializer Unknown_state,
    95 #define NMTable_Initializer Unknown_state,
    96 
    96 
   125 	\
   125 	\
   126 	/* SDO, structure s_transfer */\
   126 	/* SDO, structure s_transfer */\
   127 	{\
   127 	{\
   128           REPEAT_SDO_MAX_SIMULTANEOUS_TRANSFERTS_TIMES(s_transfer_Initializer)\
   128           REPEAT_SDO_MAX_SIMULTANEOUS_TRANSFERTS_TIMES(s_transfer_Initializer)\
   129 	},\
   129 	},\
   130 	&NODE_PREFIX ## _SDOtimeoutError,    /* SDOtimeoutError */\
   130 	_SDOtimeoutError,/*&NODE_PREFIX ## _SDOtimeoutError,    /* SDOtimeoutError */\
   131 	\
   131 	\
   132 	/* State machine*/\
   132 	/* State machine*/\
   133 	Unknown_state,      /* nodeState */\
   133 	Unknown_state,      /* nodeState */\
   134 	/* structure s_state_communication */\
   134 	/* structure s_state_communication */\
   135 	{\
   135 	{\
   138 		0,          /* csEmergency */\
   138 		0,          /* csEmergency */\
   139 		0,          /* csSYNC */\
   139 		0,          /* csSYNC */\
   140 		0,          /* csHeartbeat */\
   140 		0,          /* csHeartbeat */\
   141 		0           /* csPDO */\
   141 		0           /* csPDO */\
   142 	},\
   142 	},\
   143 	&NODE_PREFIX ## _initialisation,     /* initialisation */\
   143 	_initialisation,/*&NODE_PREFIX ## _initialisation,     /* initialisation */\
   144 	&NODE_PREFIX ## _preOperational,     /* preOperational */\
   144 	_preOperational,/*&NODE_PREFIX ## _preOperational,     /* preOperational */\
   145 	&NODE_PREFIX ## _operational,        /* operational */\
   145 	_operational,/*&NODE_PREFIX ## _operational,        /* operational */\
   146 	&NODE_PREFIX ## _stopped,            /* stopped */\
   146 	_stopped,/*&NODE_PREFIX ## _stopped,            /* stopped */\
   147 	\
   147 	\
   148 	/* NMT-heartbeat */\
   148 	/* NMT-heartbeat */\
   149 	& NODE_PREFIX ## _highestSubIndex_obj1016, /* ConsumerHeartbeatCount */\
   149 	& NODE_PREFIX ## _highestSubIndex_obj1016, /* ConsumerHeartbeatCount */\
   150 	NODE_PREFIX ## _obj1016,                   /* ConsumerHeartbeatEntries */\
   150 	NODE_PREFIX ## _obj1016,                   /* ConsumerHeartbeatEntries */\
   151 	NODE_PREFIX ## _heartBeatTimers,           /* ConsumerHeartBeatTimers  */\
   151 	NODE_PREFIX ## _heartBeatTimers,           /* ConsumerHeartBeatTimers  */\
   152 	& NODE_PREFIX ## _obj1017,                 /* ProducerHeartBeatTime */\
   152 	& NODE_PREFIX ## _obj1017,                 /* ProducerHeartBeatTime */\
   153 	TIMER_NONE,                                /* ProducerHeartBeatTimer */\
   153 	TIMER_NONE,                                /* ProducerHeartBeatTimer */\
   154 	NODE_PREFIX ## _heartbeatError,            /* heartbeatError */\
   154 	_heartbeatError,/*NODE_PREFIX ## _heartbeatError,            /* heartbeatError */\
   155 	\
   155 	\
   156 	{REPEAT_NMT_MAX_NODE_ID_TIMES(NMTable_Initializer)},\
   156 	{REPEAT_NMT_MAX_NODE_ID_TIMES(NMTable_Initializer)},\
   157                                                    /* is  well initialized at "Unknown_state". Is it ok ? (FD)*/\
   157                                                    /* is  well initialized at "Unknown_state". Is it ok ? (FD)*/\
   158 	\
   158 	\
   159 	/* SYNC */\
   159 	/* SYNC */\
   160 	TIMER_NONE,                                /* syncTimer */\
   160 	TIMER_NONE,                                /* syncTimer */\
   161 	& NODE_PREFIX ## _obj1005,                 /* COB_ID_Sync */\
   161 	& NODE_PREFIX ## _obj1005,                 /* COB_ID_Sync */\
   162 	& NODE_PREFIX ## _obj1006,                 /* Sync_Cycle_Period */\
   162 	& NODE_PREFIX ## _obj1006,                 /* Sync_Cycle_Period */\
   163 	/*& NODE_PREFIX ## _obj1007, */            /* Sync_window_length */\
   163 	/*& NODE_PREFIX ## _obj1007, */            /* Sync_window_length */\
   164 	NODE_PREFIX ## _post_sync,                 /* post_sync */\
   164 	_post_sync,/*NODE_PREFIX ## _post_sync,                 /* post_sync */\
   165 	NODE_PREFIX ## _post_TPDO,                 /* post_TPDO */\
   165 	_post_TPDO,/*NODE_PREFIX ## _post_TPDO,                 /* post_TPDO */\
   166 	\
   166 	\
   167 	/* PDO, structure s_process_var */\
   167 	/* PDO, structure s_process_var */\
   168         {\
   168         {\
   169 		0,          /* count */\
   169 		0,          /* count */\
   170 		{0}         /* data (static use, so that all the table is initialize at 0)*/\
   170 		{0}         /* data (static use, so that all the table is initialize at 0)*/\
   171         },\
   171         },\
   172         \
   172         \
   173 	/* General */\
   173 	/* General */\
   174 	0,                                         /* toggle */\
   174 	0,                                         /* toggle */\
   175 	NODE_PREFIX ## _canSend,                   /* canSend */\
   175 	NULL,/*NODE_PREFIX ## _canSend,                   /* canSend */\
   176 	NODE_PREFIX ## _scanIndexOD                /* scanIndexOD */\
   176 	NODE_PREFIX ## _scanIndexOD                /* scanIndexOD */\
   177 }
   177 }
   178 
   178 
   179 #endif /* __data_h__ */
   179 #endif /* __data_h__ */
   180 
   180