CANopen Slave Documentation
Version 6.16.04
Loading...
Searching...
No Matches
CosPdoMap_s Struct Reference

Detailed Description

The structure CosPdoMap_s describes the mapping parameters of a PDO with static mapping. For static PDO mapping the symbol COS_PDO_MAPPING is set to 0.

The following code snippet is taken from the cos_user.c file. In this static mapping table, the first PDO has four entries (objects 7130h:01h to 7130h:04h). Each entry has a size of 2 byte (10h = 16 bit). The second PDO has two entries (objects 6000h:01h to 6000h:02h). Each entry has a size of 1 byte (8 bit).

CosPdoMap_ts atsTrmPdoMapG[] =
{
//--- Index 1A00 -----------------------------
{ 0x7130, 0x01, 0x10 },
{ 0x7130, 0x02, 0x10 },
{ 0x7130, 0x03, 0x10 },
{ 0x7130, 0x04, 0x10 },
{ 0x0000, 0x00, 0x00 },
{ 0x0000, 0x00, 0x00 },
{ 0x0000, 0x00, 0x00 },
{ 0x0000, 0x00, 0x00 },
//--- Index 1A01 -----------------------------
{ 0x6000, 0x01, 0x08 },
{ 0x6000, 0x02, 0x08 },
PDO mapping parameter (static mapping)
Definition cos_pdo.h:301

Please note that the protocol stack does not copy any data to (or from) a PDO automatically. Instead, the user has to adopt the functions CosPdoRcvDataUpdate() and CosPdoTrmDataUpdate() for that purpose.

+ Collaboration diagram for CosPdoMap_s:

Data Fields

uint16_t uwIndex
 
uint8_t ubSubIndex
 
uint8_t ubLength
 

Field Documentation

◆ ubLength

uint8_t CosPdoMap_s::ubLength

Length

◆ ubSubIndex

uint8_t CosPdoMap_s::ubSubIndex

Sub-Index

◆ uwIndex

uint16_t CosPdoMap_s::uwIndex

Index