15#include "canfestival.h"
24 UNS8 unsused_bSubindex);
60 if(d->syncTimer != TIMER_NONE){
67 if(*d->COB_ID_Sync & 0x00000080ul && *d->Sync_Cycle_Period)
73 MS_TO_TIMEVAL(*d->Sync_Cycle_Period),
74 MS_TO_TIMEVAL(*d->Sync_Cycle_Period));
87 d->syncTimer =
DelAlarm(d->syncTimer);
101 MSG_WAR(0x3001,
"sendSYNC ", 0);
103 m.
cob_id = UNS16_LE(*d->COB_ID_Sync);
104 m.
rtr = NOT_A_REQUEST;
107 return canSend(d->canHandle, &m);
140 MSG_WAR(0x3002,
"SYNC received. Proceed. ", 0);
145 if(! d->CurrentCommunicationState.csPDO)
This file is generated by the NNP Tool – Object Dictionary Editor, as originally developed by CAN Fes...
#define UNS8
Unsigned int8 representation in CANFest.
#define MSG_WAR(num, str, val)
Definition of MSG_WAR.
#define UNS32
Unsigned int32 representation in CANFest.
void processSYNCMessageForApp(Message *m)
Lets application process SYNC message if necessary.
UNS32 RegisterSetODentryCallBack(CO_Data *d, UNS16 wIndex, UNS8 bSubindex, ODCallback_t Callback)
<BRIEF>
UNS8 _sendPDOevent(CO_Data *d, UNS8 isSyncEvent)
Function iterates on all TPDO and look TPDO transmit type and content change before sending it.
UNS8 sendSYNCMessage(CO_Data *d)
Transmit a SYNC message on CAN bus.
void startSYNC(CO_Data *d)
<BRIEF> startSYNC
void stopSYNC(CO_Data *d)
<BRIEF> stopSYNC
void _post_sync(CO_Data *d)
<BRIEF> _post_sync
UNS8 processSYNC(CO_Data *d, Message *m)
This function is called when the node is receiving a SYNC message (cob-id = 0x80).
UNS32 OnCOB_ID_SyncUpdate(CO_Data *d, const indextable *unsused_indextable, UNS8 unsused_bSubindex)
This is called when Index 0x1005 is updated.
void SyncAlarm(CO_Data *d, UNS32 id)
<BRIEF> SyncAlarm
void _post_TPDO(CO_Data *d)
<BRIEF> _post_TPDO
UNS8 sendSYNC(CO_Data *d)
Transmit a SYNC message and trigger sync TPDOs.
TIMER_HANDLE SetAlarm(CO_Data *d, UNS32 id, TimerCallback_t callback, TIMEVAL value, TIMEVAL period)
Set an alarm to execute a callback function when expired.
TIMER_HANDLE DelAlarm(TIMER_HANDLE handle)
Delete an alarm before expiring.
This structure contains all necessary informations to define a CANOpen node.