NNP STM Generic Remote Module git-main
Loading...
Searching...
No Matches
pdo.h File Reference
#include "applicfg.h"
#include "def.h"
#include "can.h"

Go to the source code of this file.

Classes

struct  struct_s_PDO_status
 

Macros

#define PDO_INHIBITED   0x01
 
#define PDO_RTR_SYNC_READY   0x01
 
#define s_PDO_status_Initializer   {0, TIMER_NONE, TIMER_NONE, Message_Initializer}
 
#define TRANS_EVERY_N_SYNC(n)
 
#define TRANS_SYNC_ACYCLIC   0 /* Trans after reception of n SYNC. n = 1 to 240 */
 
#define TRANS_SYNC_MIN   1 /* Trans after reception of n SYNC. n = 1 to 240 */
 
#define TRANS_SYNC_MAX   240 /* Trans after reception of n SYNC. n = 1 to 240 */
 
#define TRANS_RTR_SYNC   252 /* Transmission on request */
 
#define TRANS_RTR   253 /* Transmission on request */
 
#define TRANS_EVENT_SPECIFIC   254 /* Transmission on event */
 
#define TRANS_EVENT_PROFILE   255 /* Transmission on event */
 

Typedefs

typedef struct struct_s_PDO_status s_PDO_status
 

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 processPDO (CO_Data *d, Message *m)
 Compute a PDO frame reception bus_id is hardware dependant.
 
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.
 
UNS8 _sendPDOevent (CO_Data *d, UNS8 isSyncEvent)
 Function iterates on all TPDO and look TPDO transmit type and content change before sending it.
 
void PDOInit (CO_Data *d)
 Initialize PDO feature.
 
void PDOStop (CO_Data *d)
 Stop PDO feature.
 
void PDOEventTimerAlarm (CO_Data *d, UNS32 pdoNum)
 Set timer for PDO event.
 
void PDOInhibitTimerAlarm (CO_Data *d, UNS32 pdoNum)
 Inhibit timer for PDO event.
 
void CopyBits (UNS8 NbBits, UNS8 *SrcByteIndex, UNS8 SrcBitIndex, UNS8 SrcBigEndian, UNS8 *DestByteIndex, UNS8 DestBitIndex, UNS8 DestBigEndian)
 copy bit per bit in little endian
 
void sendPdo (CO_Data *d, UNS32 pdoNum, Message *pdo)
 <BRIEF> sendPDO
 

Detailed Description

Created on: Oct 9, 2024 Author: jenej

Definition in file pdo.h.

Macro Definition Documentation

◆ PDO_INHIBITED

#define PDO_INHIBITED   0x01

Definition at line 21 of file pdo.h.

◆ PDO_RTR_SYNC_READY

#define PDO_RTR_SYNC_READY   0x01

Definition at line 22 of file pdo.h.

◆ s_PDO_status_Initializer

#define s_PDO_status_Initializer   {0, TIMER_NONE, TIMER_NONE, Message_Initializer}

Definition at line 32 of file pdo.h.

◆ TRANS_EVENT_PROFILE

#define TRANS_EVENT_PROFILE   255 /* Transmission on event */

Definition at line 45 of file pdo.h.

◆ TRANS_EVENT_SPECIFIC

#define TRANS_EVENT_SPECIFIC   254 /* Transmission on event */

Definition at line 44 of file pdo.h.

◆ TRANS_EVERY_N_SYNC

#define TRANS_EVERY_N_SYNC ( n)
Value:
(n) /*n = 1 to 240 */

definitions of the different types of PDOs' transmission

SYNCHRO(n) means that the PDO will be transmited every n SYNC signal.

Definition at line 38 of file pdo.h.

◆ TRANS_RTR

#define TRANS_RTR   253 /* Transmission on request */

Definition at line 43 of file pdo.h.

◆ TRANS_RTR_SYNC

#define TRANS_RTR_SYNC   252 /* Transmission on request */

Definition at line 42 of file pdo.h.

◆ TRANS_SYNC_ACYCLIC

#define TRANS_SYNC_ACYCLIC   0 /* Trans after reception of n SYNC. n = 1 to 240 */

Definition at line 39 of file pdo.h.

◆ TRANS_SYNC_MAX

#define TRANS_SYNC_MAX   240 /* Trans after reception of n SYNC. n = 1 to 240 */

Definition at line 41 of file pdo.h.

◆ TRANS_SYNC_MIN

#define TRANS_SYNC_MIN   1 /* Trans after reception of n SYNC. n = 1 to 240 */

Definition at line 40 of file pdo.h.

Typedef Documentation

◆ s_PDO_status

Definition at line 17 of file pdo.h.