src/pdo.c File Reference

#include "pdo.h"
#include "objacces.h"
#include "canfestival.h"
#include "sysdep.h"

Include dependency graph for pdo.c:

Go to the source code of this file.

Functions

UNS8 buildPDO (CO_Data *d, UNS8 numPdo, Message *pdo)
 Copy all the data to transmit in process_var Prepare the PDO defined at index to be sent *pwCobId : returns the value of the cobid. (subindex 1).
UNS8 sendPDOrequest (CO_Data *d, UNS16 RPDOIndex)
 Transmit a PDO request frame on the network to the slave.
UNS8 proceedPDO (CO_Data *d, Message *m)
 Compute a PDO frame reception bus_id is hardware dependant.
void CopyBits (UNS8 NbBits, UNS8 *SrcByteIndex, UNS8 SrcBitIndex, UNS8 SrcBigEndian, UNS8 *DestByteIndex, UNS8 DestBitIndex, UNS8 DestBigEndian)
UNS8 sendPDOevent (CO_Data *d)
 Used by the application to signal changes in process data that could be mapped to some TPDO. This do not necessarily imply PDO emission. Function iterates on all TPDO and look TPDO transmit type and content change before sending it.
void PDOEventTimerAlarm (CO_Data *d, UNS32 pdoNum)
 Set timer for PDO event.
void PDOInhibitTimerAlarm (CO_Data *d, UNS32 pdoNum)
 Inhibit timer for PDO event.
UNS8 _sendPDOevent (CO_Data *d, UNS8 isSyncEvent)
 Function iterates on all TPDO and look TPDO transmit type and content change before sending it.
UNS32 TPDO_Communication_Parameter_Callback (CO_Data *d, const indextable *OD_entry, UNS8 bSubindex)
void PDOInit (CO_Data *d)
 Initialize PDO feature.
void PDOStop (CO_Data *d)
 Stop PDO feature.


Detailed Description

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

Definition in file pdo.c.


Function Documentation

UNS8 buildPDO ( CO_Data d,
UNS8  numPdo,
Message pdo 
)

Copy all the data to transmit in process_var Prepare the PDO defined at index to be sent *pwCobId : returns the value of the cobid. (subindex 1).

Parameters:
d 
TPDO_com TPDO communication parameters OD entry
TPDO_map TPDO mapping parameters OD entry
Returns:

Definition at line 49 of file pdo.c.

References Message::cob_id, CopyBits(), Message::data, struct_CO_Data::firstIndex, getODentry, Message::len, struct_CO_Data::objdict, and Message::rtr.

Referenced by _sendPDOevent(), and proceedPDO().

Here is the call graph for this function:

void CopyBits ( UNS8  NbBits,
UNS8 *  SrcByteIndex,
UNS8  SrcBitIndex,
UNS8  SrcBigEndian,
UNS8 *  DestByteIndex,
UNS8  DestBitIndex,
UNS8  DestBigEndian 
)

Parameters:
NbBits 
SrcByteIndex 
SrcBitIndex 
SrcBigEndian 
DestByteIndex 
DestBitIndex 
DestBigEndian 

Definition at line 426 of file pdo.c.

Referenced by buildPDO(), and proceedPDO().

void PDOInit ( CO_Data d  ) 

Initialize PDO feature.

Parameters:
*d Pointer on a CAN object data structure

Definition at line 760 of file pdo.c.

References _sendPDOevent(), struct_CO_Data::firstIndex, struct_CO_Data::lastIndex, scanIndexOD(), and TPDO_Communication_Parameter_Callback().

Here is the call graph for this function:

void PDOStop ( CO_Data d  ) 

Stop PDO feature.

Parameters:
*d Pointer on a CAN object data structure

Definition at line 794 of file pdo.c.

References Message::cob_id, DelAlarm(), struct_s_PDO_status::event_timer, struct_CO_Data::firstIndex, struct_s_PDO_status::inhibit_timer, struct_s_PDO_status::last_message, struct_CO_Data::lastIndex, struct_CO_Data::PDO_status, and struct_s_PDO_status::transmit_type_parameter.

Here is the call graph for this function:

UNS8 proceedPDO ( CO_Data d,
Message m 
)

UNS8 sendPDOevent ( CO_Data d  ) 

Used by the application to signal changes in process data that could be mapped to some TPDO. This do not necessarily imply PDO emission. Function iterates on all TPDO and look TPDO transmit type and content change before sending it.

Parameters:
d 
Returns:

Definition at line 490 of file pdo.c.

References _sendPDOevent().

Here is the call graph for this function:

UNS32 TPDO_Communication_Parameter_Callback ( CO_Data d,
const indextable *  OD_entry,
UNS8  bSubindex 
)


Generated on Wed Feb 4 12:17:18 2009 for CanFestival by  doxygen 1.5.6