CANopen Slave Documentation
Version 6.16.04
Loading...
Searching...
No Matches
canopen.h File Reference

Detailed Description

The file canopen.h holds all definitions and structures that are necessary for the CANopen protocol stack.

+ Include dependency graph for canopen.h:

Macros

#define ID_MASK_VALUE   ((uint32_t) 0x1FFFFFFF)
 
#define ID_MASK_IS_EXTENDED   ((uint32_t) 0x20000000)
 
#define ID_MASK_IS_DISABLED   ((uint32_t) 0x80000000)
 
#define SDO_ERR_TOGGLE_BIT   ((uint32_t)(0x05030000))
 
#define SDO_ERR_TIMEOUT   ((uint32_t)(0x05040000))
 
#define SDO_ERR_COMMAND   ((uint32_t)(0x05040001))
 
#define SDO_ERR_BLOCK_SIZE   ((uint32_t)(0x05040002))
 
#define SDO_ERR_BLOCK_SEQUENCE   ((uint32_t)(0x05040003))
 
#define SDO_ERR_BLOCK_CRC   ((uint32_t)(0x05040004))
 
#define SDO_ERR_MEMORY   ((uint32_t)(0x05040005))
 
#define SDO_ERR_ACCESS_UNSUPPORTED   ((uint32_t)(0x06010000))
 
#define SDO_ERR_ACCESS_WO   ((uint32_t)(0x06010001))
 
#define SDO_ERR_ACCESS_RO   ((uint32_t)(0x06010002))
 
#define SDO_ERR_NO_OBJECT   ((uint32_t)(0x06020000))
 
#define SDO_ERR_MAPPING_OBJECT   ((uint32_t)(0x06040041))
 
#define SDO_ERR_MAPPING_LENGTH   ((uint32_t)(0x06040042))
 
#define SDO_ERR_GENERAL_PARAMETER   ((uint32_t)(0x06040043))
 
#define SDO_ERR_GENERAL_DEVICE   ((uint32_t)(0x06040047))
 
#define SDO_ERR_HARDWARE   ((uint32_t)(0x06060000))
 
#define SDO_ERR_DATATYPE   ((uint32_t)(0x06070010))
 
#define SDO_ERR_DATATYPE_HIGH   ((uint32_t)(0x06070012))
 
#define SDO_ERR_DATATYPE_LOW   ((uint32_t)(0x06070013))
 
#define SDO_ERR_NO_SUB_INDEX   ((uint32_t)(0x06090011))
 
#define SDO_ERR_VALUE_RANGE   ((uint32_t)(0x06090030))
 
#define SDO_ERR_VALUE_HIGH   ((uint32_t)(0x06090031))
 
#define SDO_ERR_VALUE_LOW   ((uint32_t)(0x06090032))
 
#define SDO_ERR_VALUE_MIN_MAX   ((uint32_t)(0x06090036))
 
#define SDO_ERR_SDO_CONNECTION   ((uint32_t)(0x060A0023))
 
#define SDO_ERR_GENERAL   ((uint32_t)(0x08000000))
 
#define SDO_ERR_DATA_STORE   ((uint32_t)(0x08000020))
 
#define SDO_ERR_DATA_STORE_LOCAL   ((uint32_t)(0x08000021))
 
#define SDO_ERR_DATA_STORE_STATE   ((uint32_t)(0x08000022))
 
#define SDO_ERR_OBJECT_DICTIONARY   ((uint32_t)(0x08000023))
 
#define SDO_ERR_NO_DATA   ((uint32_t)(0x08000024))
 

Enumerations

enum  CoATTR {
}
 
enum  CoDT {
  CoDT_BOOLEAN = 1 ,
  CoDT_INTEGER8 ,
  CoDT_INTEGER16 ,
  CoDT_INTEGER32 ,
  CoDT_UNSIGNED8 ,
  CoDT_UNSIGNED16 ,
  CoDT_UNSIGNED32 ,
  CoDT_REAL32 ,
  CoDT_VISIBLE_STRING ,
  CoDT_OCTET_STRING ,
  CoDT_UNICODE_STRING ,
  CoDT_TIME_OF_DAY ,
  CoDT_TIME_DIFFERENCE ,
  CoDT_reserved01 ,
  CoDT_DOMAIN ,
  CoDT_INTEGER24 ,
  CoDT_REAL64 ,
  CoDT_INTEGER40 ,
  CoDT_INTEGER48 ,
  CoDT_INTEGER56 ,
  CoDT_INTEGER64 ,
  CoDT_UNSIGNED24 ,
  CoDT_reserved02 ,
  CoDT_UNSIGNED40 ,
  CoDT_UNSIGNED48 ,
  CoDT_UNSIGNED56 ,
  CoDT_UNSIGNED64
}
 

Enumeration Type Documentation

◆ CoATTR

enum CoATTR

Access Attributes for objects in dictionary.

Each object within the object dictionary can have the following access attributes:

  • Read/Write
  • Write Only
  • Read Only
  • Constant (value is Read Only)

The member ubAttribute of the structure CosDicEntry_s is used for that purpose. By this enumeration the possible attributes are defined.

Enumerator
CoATTR_ACC_WO 

object is read-only

CoATTR_ACC_RW 

object is write-only

CoATTR_ACC_CONST 

object supports read-write access

CoATTR_PDO_MAP 

object is constant

◆ CoDT

enum CoDT

Data Type definitions for objects in dictionary.

Each object within the object dictionary has a specific data type. The member ubDataType of the structure CoStruct_DicEntry is used for that purpose. By this enumeration the possible data types are defined.

Enumerator
CoDT_BOOLEAN 

data type: boolean value

CoDT_INTEGER8 

data type: Signed Integer, 1 byte

CoDT_INTEGER16 

data type: Signed Integer, 2 bytes

CoDT_INTEGER32 

data type: Signed Integer, 4 bytes

CoDT_UNSIGNED8 

data type: Unsigned Integer, 1 byte

CoDT_UNSIGNED16 

data type: Unsigned Integer, 2 bytes

CoDT_UNSIGNED32 

data type: Unsigned Integer, 4 bytes

CoDT_REAL32 

data type: Float, 32 bit according to IEEE

CoDT_VISIBLE_STRING 

data type: character string

CoDT_OCTET_STRING 

data type: octet string

CoDT_UNICODE_STRING 

data type: unicode string

CoDT_TIME_OF_DAY 

data type: time of day value

CoDT_TIME_DIFFERENCE 

data type: time difference value

CoDT_INTEGER64 

data type: Signed Integer, 8 bytes

CoDT_UNSIGNED64 

data type: Unsigned Integer, 8 bytes

◆ CoErrReg_e

enum CoErrReg_e

Error Register values.

Enumerator
eCoErrReg_GENERIC 

generic error

eCoErrReg_CURRENT 

current error

eCoErrReg_VOLTAGE 

voltage error

eCoErrReg_TEMPERATURE 

temperature error

eCoErrReg_COMMUNICATION 

communication error

eCoErrReg_PROFILE 

device profile specific error

eCoErrReg_MANUFACTURER 

manufacturer specific error

◆ LssCmd_e

enum LssCmd_e

LSS command specifiers.

Enumerator
eLSS_CMD_MODE_GLOBAL 

Switch mode global command ( 04h - 4dec)

eLSS_CMD_CONFIG_NODE_ID 

Configure node-ID command (11h - 17dec)

eLSS_CMD_CONFIG_BIT_TIMING 

Configure bit-timing command (13h - 19dec)

eLSS_CMD_ACTIVE_BIT_TIMING 

Activate bit-timing command (15h - 21dec)

eLSS_CMD_CONFIG_STORE 

Store configuration command (17h - 23dec)

eLSS_CMD_MODE_SEL_VENDOR_ID 

Switch mode selective - vendor ID (40h - 64dec)

eLSS_CMD_MODE_SEL_PRODUCT_CODE 

Switch mode selective - product code (41h - 65dec)

eLSS_CMD_MODE_SEL_REVISION_NUM 

Switch mode selective - revision number (42h - 66dec)

eLSS_CMD_MODE_SEL_SERIAL_NUM 

Switch mode selective - serial number (43h - 67dec)

eLSS_CMD_MODE_SEL_RESPONSE 

Switch mode selective - LSS slave response (44h - 68dec)

eLSS_CMD_IDENT_RMT_SLAVE_VENDOR_ID 

Identify remote slave, vendor-id command (46h - 70dec)

eLSS_CMD_IDENT_RMT_SLAVE_PRODUCT_CODE 

Identify remote slave, product-code command (47h - 71dec)

eLSS_CMD_IDENT_RMT_SLAVE_REVISION_LOW 

Identify remote slave, revision-number low command (48h - 72dec)

eLSS_CMD_IDENT_RMT_SLAVE_REVISION_HIGH 

Identify remote slave, revision-number high command (49h - 73dec)

eLSS_CMD_IDENT_RMT_SLAVE_SERIAL_LOW 

Identify remote slave, serial-number low command (4Ah - 74dec)

eLSS_CMD_IDENT_RMT_SLAVE_SERIAL_HIGH 

Identify remote slave, serial-number high command (4Bh - 75dec)

eLSS_CMD_IDENT_SLAVE_NCFG_REQ 

Identify non-configured slave request (4Ch - 76dec)

eLSS_CMD_IDENT_SLAVE_RESP 

Identify slave response (4Fh - 79dec)

eLSS_CMD_IDENT_SLAVE_NCFG_RES 

Identify non-configured slave response (50h - 80dec)

eLSS_CMD_FASTSCAN 

Fastscan command (51h - 81dec)

eLSS_CMD_INQUIRE_VENDOR_ID 

Inquire identity, vendor ID command (5Ah - 90dec)

eLSS_CMD_INQUIRE_PRODUCT_CODE 

Inquire identity, product code command (5Bh - 91dec)

eLSS_CMD_INQUIRE_REVISION_NUM 

Inquire identity, revision number command (5Ch - 92dec)

eLSS_CMD_INQUIRE_SERIAL_NUM 

Inquire identity, serial number command (5Dh - 93dec)

eLSS_CMD_INQUIRE_NODE_ID 

Inquire identity, node ID command (5Eh - 94dec)

◆ SdoCmd_e

enum SdoCmd_e

Command values for SDO transfer.

Enumerator
eSDO_WRITE_REQ_SEG 

response to segmented write request

eSDO_WRITE_REQ_0 

segmented write request

eSDO_WRITE_REQ_4 

write request, unspecified length

eSDO_WRITE_REQ_3 

write request, 4 bytes data

eSDO_WRITE_REQ_2 

write request, 3 bytes data

eSDO_WRITE_REQ_1 

write request, 2 bytes data

eSDO_WRITE_RESP 

write request, 1 byte data

eSDO_READ_REQ 

response to write request

eSDO_READ_RESP_SEG 

read request

eSDO_READ_RESP_0 

read response, segmented data

eSDO_READ_RESP_4 

read response, unspecified length

eSDO_READ_RESP_3 

read response, 4 bytes data

eSDO_READ_RESP_2 

read response, 3 bytes data

eSDO_READ_RESP_1 

read response, 2 bytes data

eSDO_READ_REQ_SEG_0 

read response, 1 byte data

eSDO_READ_REQ_SEG_1 

read request, segmented data

eSDO_BLK_UP_REQ_0 

read request, segmented data

eSDO_BLK_END_RESP 

Init Block upload

eSDO_BLK_UP_REQ_1 

Block Upload / Download end response

eSDO_BLK_UP_REQ_DAT 

Init Block upload, size info

eSDO_BLK_UP_REQ_2 

Start Block data transfer

eSDO_BLK_DOWN_REQ_0 

Init Block upload, CRC info

eSDO_BLK_END_REQ 

Initiate Block download

eSDO_BLK_DOWN_REQ_1 

Block Upload / Download end request

eSDO_BLK_DOWN_REQ_2 

Initiate Block download, size info

eSDO_BLK_DOWN_REQ_3 

Initiate Block download, CRC info

eSDO_ABORT 

Initiate Block download, CRC & size