/home/epimerde/documents/tc11/CanFestival-3/src/sync.c File Reference

#include "data.h"
#include "sync.h"
#include "canfestival.h"

Include dependency graph for sync.c:

Go to the source code of this file.

Functions

void SyncAlarm (CO_Data *d, UNS32 id)
UNS32 OnCOB_ID_SyncUpdate (CO_Data *d, const indextable *unsused_indextable, UNS8 unsused_bSubindex)
void startSYNC (CO_Data *d)
void stopSYNC (CO_Data *d)
UNS8 sendSYNC (CO_Data *d, UNS32 cob_id)
UNS8 proceedSYNC (CO_Data *d, Message *m)
void _post_sync ()
void _post_TPDO ()


Detailed Description

Author:
Edouard TISSERANT and Francis DUPIN
Date:
Tue Jun 5 09:32:32 2007

Definition in file sync.c.


Function Documentation

void _post_sync (  ) 

Definition at line 293 of file sync.c.

void _post_TPDO (  ) 

Definition at line 294 of file sync.c.

UNS32 OnCOB_ID_SyncUpdate ( CO_Data *  d,
const indextable *  unsused_indextable,
UNS8  unsused_bSubindex 
)

This is called when Index 0x1005 is updated.

Parameters:
d 
unsused_indextable 
unsused_bSubindex 
Returns:

Definition at line 69 of file sync.c.

References startSYNC().

Referenced by startSYNC().

Here is the call graph for this function:

UNS8 proceedSYNC ( CO_Data *  d,
Message *  m 
)

Parameters:
d 
m 
Returns:

pointer to the var which is mapped to a pdo

pointer fo the var which holds the mapping parameter of an mapping entry

pointer to the transmissiontype...

only operational state allows PDO transmission

So, the node is in operational state

study all PDO stored in the objects dictionary

get the PDO transmission type

check if transmission type is after (this) SYNC

The message may not be transmited every SYNC but every n SYNC

get PDO CobId

get mapped objects number to transmit with this PDO

get mapping parameters

get data to transmit

copy bit per bit in little endian

loop to get all the data to transmit

Definition at line 141 of file sync.c.

References CopyBits(), getODentry(), and PDOmGR().

Referenced by canDispatch(), and sendSYNC().

Here is the call graph for this function:

UNS8 sendSYNC ( CO_Data *  d,
UNS32  cob_id 
)

Parameters:
d 
cob_id 
Returns:

Definition at line 118 of file sync.c.

References proceedSYNC().

Referenced by SyncAlarm().

Here is the call graph for this function:

void startSYNC ( CO_Data *  d  ) 

Parameters:
d 

Definition at line 80 of file sync.c.

References OnCOB_ID_SyncUpdate(), RegisterSetODentryCallBack(), SetAlarm(), stopSYNC(), and SyncAlarm().

Referenced by OnCOB_ID_SyncUpdate(), and switchCommunicationState().

Here is the call graph for this function:

void stopSYNC ( CO_Data *  d  ) 

Parameters:
d 

Definition at line 105 of file sync.c.

References DelAlarm().

Referenced by startSYNC(), and switchCommunicationState().

Here is the call graph for this function:

void SyncAlarm ( CO_Data *  d,
UNS32  id 
)

Parameters:
d 
id 

Definition at line 55 of file sync.c.

References sendSYNC().

Referenced by startSYNC().

Here is the call graph for this function:


Generated on Tue Jun 5 18:32:11 2007 for CanFestival by  doxygen 1.5.1