CANopenNode
CANopen protocol stack
Loading...
Searching...
No Matches
CO_ODinterface.h
Go to the documentation of this file.
1
21#ifndef CO_OD_INTERFACE_H
22#define CO_OD_INTERFACE_H
23
24#include "301/CO_driver.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
39#ifndef CO_OD_OWN_TYPES
42#endif
43
44#ifndef OD_FLAGS_PDO_SIZE
45#define OD_FLAGS_PDO_SIZE 4U
46#endif
47
48#ifndef CO_PROGMEM
50#define CO_PROGMEM const
51#endif
52
56typedef enum {
58 OD_H1001_ERR_REG = 0x1001U,
61 OD_H1004_RSV = 0x1004U,
68 OD_H100B_RSV = 0x100BU,
71 OD_H100E_RSV = 0x100EU,
72 OD_H100F_RSV = 0x100FU,
86 OD_H1023_OS_CMD = 0x1023U,
105
109typedef enum {
110 ODA_SDO_R = 0x01U,
111 ODA_SDO_W = 0x02U,
112 ODA_SDO_RW = 0x03U,
113 ODA_TPDO = 0x04U,
114 ODA_RPDO = 0x08U,
115 ODA_TRPDO = 0x0CU,
116 ODA_TSRDO = 0x10U,
117 ODA_RSRDO = 0x20U,
118 ODA_TRSRDO = 0x30U,
119 ODA_MB = 0x40U,
120 ODA_STR = 0x80U
123
160
176
181typedef struct {
211 ODR_t (*read)(OD_stream_t* stream, void* buf, OD_size_t count, OD_size_t* countRead);
238 ODR_t (*write)(OD_stream_t* stream, const void* buf, OD_size_t count, OD_size_t* countWritten);
239} OD_IO_t;
240
245typedef struct {
247 void* object;
250 ODR_t (*read)(OD_stream_t* stream, void* buf, OD_size_t count, OD_size_t* countRead);
253 ODR_t (*write)(OD_stream_t* stream, const void* buf, OD_size_t count, OD_size_t* countWritten);
254#if OD_FLAGS_PDO_SIZE > 0
262#endif
264
280
284typedef struct {
287} OD_t;
288
296ODR_t OD_readOriginal(OD_stream_t* stream, void* buf, OD_size_t count, OD_size_t* countRead);
297
305ODR_t OD_writeOriginal(OD_stream_t* stream, const void* buf, OD_size_t count, OD_size_t* countWritten);
306
315OD_entry_t* OD_find(OD_t* od, uint16_t index);
316
333ODR_t OD_getSub(const OD_entry_t* entry, uint8_t subIndex, OD_IO_t* io, bool_t odOrig);
334
342static inline uint16_t
343OD_getIndex(const OD_entry_t* entry) {
344 return (entry != NULL) ? entry->index : 0U;
345}
346
357static inline bool_t
359 return (stream != NULL) ? ((stream->attribute & ((OD_attr_t)ODA_TRPDO | (OD_attr_t)ODA_TRSRDO)) != 0U) : false;
360}
361
370static inline void
372 if (stream != NULL) {
373 stream->dataOffset = 0U;
374 }
375}
376
391static inline void
393#if OD_FLAGS_PDO_SIZE > 0
394 if ((entry != NULL) && (entry->extension != NULL) && (subIndex < (OD_FLAGS_PDO_SIZE * 8U))) {
395 /* clear subIndex-th bit */
396 uint8_t mask = ~(1U << (subIndex & 0x07U));
397 entry->extension->flagsPDO[subIndex >> 3] &= mask;
398 }
399#endif
400}
401
412static inline bool_t
414#if OD_FLAGS_PDO_SIZE > 0
415 if ((entry != NULL) && (entry->extension != NULL) && (subIndex < (OD_FLAGS_PDO_SIZE * 8U))) {
416 /* return true, if subIndex-th bit is set */
417 uint8_t mask = 1U << (subIndex & 0x07U);
418 if ((entry->extension->flagsPDO[subIndex >> 3] & mask) != 0U) {
419 return true;
420 }
421 }
422#endif
423 return false;
424}
425
433uint32_t OD_getSDOabCode(ODR_t returnCode);
434
462static inline ODR_t
464 if (entry == NULL) {
465 return ODR_IDX_NOT_EXIST;
466 }
467 entry->extension = extension;
468 return ODR_OK;
469}
470
490ODR_t OD_get_value(const OD_entry_t* entry, uint8_t subIndex, void* val, OD_size_t len, bool_t odOrig);
491
493static inline ODR_t
494OD_get_i8(const OD_entry_t* entry, uint8_t subIndex, int8_t* val, bool_t odOrig) {
495 return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
496}
497
499static inline ODR_t
500OD_get_i16(const OD_entry_t* entry, uint8_t subIndex, int16_t* val, bool_t odOrig) {
501 return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
502}
503
505static inline ODR_t
506OD_get_i32(const OD_entry_t* entry, uint8_t subIndex, int32_t* val, bool_t odOrig) {
507 return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
508}
509
511static inline ODR_t
512OD_get_i64(const OD_entry_t* entry, uint8_t subIndex, int64_t* val, bool_t odOrig) {
513 return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
514}
515
517static inline ODR_t
518OD_get_u8(const OD_entry_t* entry, uint8_t subIndex, uint8_t* val, bool_t odOrig) {
519 return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
520}
521
523static inline ODR_t
524OD_get_u16(const OD_entry_t* entry, uint8_t subIndex, uint16_t* val, bool_t odOrig) {
525 return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
526}
527
529static inline ODR_t
530OD_get_u32(const OD_entry_t* entry, uint8_t subIndex, uint32_t* val, bool_t odOrig) {
531 return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
532}
533
535static inline ODR_t
536OD_get_u64(const OD_entry_t* entry, uint8_t subIndex, uint64_t* val, bool_t odOrig) {
537 return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
538}
539
541static inline ODR_t
542OD_get_f32(const OD_entry_t* entry, uint8_t subIndex, float32_t* val, bool_t odOrig) {
543 return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
544}
545
547static inline ODR_t
548OD_get_f64(const OD_entry_t* entry, uint8_t subIndex, float64_t* val, bool_t odOrig) {
549 return OD_get_value(entry, subIndex, val, sizeof(*val), odOrig);
550}
551
565ODR_t OD_set_value(const OD_entry_t* entry, uint8_t subIndex, void* val, OD_size_t len, bool_t odOrig);
566
568static inline ODR_t
569OD_set_i8(const OD_entry_t* entry, uint8_t subIndex, int8_t val, bool_t odOrig) {
570 return OD_set_value(entry, subIndex, &val, sizeof(val), odOrig);
571}
572
574static inline ODR_t
575OD_set_i16(const OD_entry_t* entry, uint8_t subIndex, int16_t val, bool_t odOrig) {
576 return OD_set_value(entry, subIndex, &val, sizeof(val), odOrig);
577}
578
580static inline ODR_t
581OD_set_i32(const OD_entry_t* entry, uint8_t subIndex, int32_t val, bool_t odOrig) {
582 return OD_set_value(entry, subIndex, &val, sizeof(val), odOrig);
583}
584
586static inline ODR_t
587OD_set_i64(const OD_entry_t* entry, uint8_t subIndex, int64_t val, bool_t odOrig) {
588 return OD_set_value(entry, subIndex, &val, sizeof(val), odOrig);
589}
590
592static inline ODR_t
593OD_set_u8(const OD_entry_t* entry, uint8_t subIndex, uint8_t val, bool_t odOrig) {
594 return OD_set_value(entry, subIndex, &val, sizeof(val), odOrig);
595}
596
598static inline ODR_t
599OD_set_u16(const OD_entry_t* entry, uint8_t subIndex, uint16_t val, bool_t odOrig) {
600 return OD_set_value(entry, subIndex, &val, sizeof(val), odOrig);
601}
602
604static inline ODR_t
605OD_set_u32(const OD_entry_t* entry, uint8_t subIndex, uint32_t val, bool_t odOrig) {
606 return OD_set_value(entry, subIndex, &val, sizeof(val), odOrig);
607}
608
610static inline ODR_t
611OD_set_u64(const OD_entry_t* entry, uint8_t subIndex, uint64_t val, bool_t odOrig) {
612 return OD_set_value(entry, subIndex, &val, sizeof(val), odOrig);
613}
614
616static inline ODR_t
617OD_set_f32(const OD_entry_t* entry, uint8_t subIndex, float32_t val, bool_t odOrig) {
618 return OD_set_value(entry, subIndex, &val, sizeof(val), odOrig);
619}
620
622static inline ODR_t
623OD_set_f64(const OD_entry_t* entry, uint8_t subIndex, float64_t val, bool_t odOrig) {
624 return OD_set_value(entry, subIndex, &val, sizeof(val), odOrig);
625}
626
641void* OD_getPtr(const OD_entry_t* entry, uint8_t subIndex, OD_size_t len, ODR_t* err);
642 /* CO_ODgetSetters */
643
644#if defined OD_DEFINITION || defined CO_DOXYGEN
654typedef enum {
655 ODT_VAR = 0x01,
658 ODT_ARR = 0x02,
662 ODT_REC = 0x03,
669
678
690
700
701 /* CO_ODdefinition */
702
703#endif /* defined OD_DEFINITION */
704
705 /* CO_ODinterface */
706
707#ifdef __cplusplus
708}
709#endif /* __cplusplus */
710
711#endif /* CO_OD_INTERFACE_H */
Interface between CAN hardware and CANopenNode.
OD_objectTypes_t
Types for OD object.
Definition CO_ODinterface.h:654
@ ODT_ARR
This type corresponds to CANopen Object Dictionary object with object code equal to ARRAY.
Definition CO_ODinterface.h:658
@ ODT_VAR
This type corresponds to CANopen Object Dictionary object with object code equal to VAR.
Definition CO_ODinterface.h:655
@ ODT_REC
This type corresponds to CANopen Object Dictionary object with object code equal to RECORD.
Definition CO_ODinterface.h:662
@ ODT_TYPE_MASK
Mask for basic type.
Definition CO_ODinterface.h:667
static ODR_t OD_get_u32(const OD_entry_t *entry, uint8_t subIndex, uint32_t *val, bool_t odOrig)
Get uint32_t variable from Object Dictionary, see OD_get_value.
Definition CO_ODinterface.h:530
static ODR_t OD_get_i16(const OD_entry_t *entry, uint8_t subIndex, int16_t *val, bool_t odOrig)
Get int16_t variable from Object Dictionary, see OD_get_value.
Definition CO_ODinterface.h:500
ODR_t OD_get_value(const OD_entry_t *entry, uint8_t subIndex, void *val, OD_size_t len, bool_t odOrig)
Get variable from Object Dictionary.
Definition CO_ODinterface.c:306
static ODR_t OD_get_u8(const OD_entry_t *entry, uint8_t subIndex, uint8_t *val, bool_t odOrig)
Get uint8_t variable from Object Dictionary, see OD_get_value.
Definition CO_ODinterface.h:518
static ODR_t OD_set_i32(const OD_entry_t *entry, uint8_t subIndex, int32_t val, bool_t odOrig)
Set int32_t variable in Object Dictionary, see OD_set_value.
Definition CO_ODinterface.h:581
static ODR_t OD_get_i64(const OD_entry_t *entry, uint8_t subIndex, int64_t *val, bool_t odOrig)
Get int64_t variable from Object Dictionary, see OD_get_value.
Definition CO_ODinterface.h:512
static ODR_t OD_get_f32(const OD_entry_t *entry, uint8_t subIndex, float32_t *val, bool_t odOrig)
Get float32_t variable from Object Dictionary, see OD_get_value.
Definition CO_ODinterface.h:542
static ODR_t OD_set_u64(const OD_entry_t *entry, uint8_t subIndex, uint64_t val, bool_t odOrig)
Set uint64_t variable in Object Dictionary, see OD_set_value.
Definition CO_ODinterface.h:611
static ODR_t OD_set_u16(const OD_entry_t *entry, uint8_t subIndex, uint16_t val, bool_t odOrig)
Set uint16_t variable in Object Dictionary, see OD_set_value.
Definition CO_ODinterface.h:599
static ODR_t OD_set_f64(const OD_entry_t *entry, uint8_t subIndex, float64_t val, bool_t odOrig)
Set float64_t variable in Object Dictionary, see OD_set_value.
Definition CO_ODinterface.h:623
static ODR_t OD_get_i32(const OD_entry_t *entry, uint8_t subIndex, int32_t *val, bool_t odOrig)
Get int32_t variable from Object Dictionary, see OD_get_value.
Definition CO_ODinterface.h:506
static ODR_t OD_get_i8(const OD_entry_t *entry, uint8_t subIndex, int8_t *val, bool_t odOrig)
Get int8_t variable from Object Dictionary, see OD_get_value.
Definition CO_ODinterface.h:494
static ODR_t OD_get_f64(const OD_entry_t *entry, uint8_t subIndex, float64_t *val, bool_t odOrig)
Get float64_t variable from Object Dictionary, see OD_get_value.
Definition CO_ODinterface.h:548
static ODR_t OD_set_f32(const OD_entry_t *entry, uint8_t subIndex, float32_t val, bool_t odOrig)
Set float32_t variable in Object Dictionary, see OD_set_value.
Definition CO_ODinterface.h:617
static ODR_t OD_get_u16(const OD_entry_t *entry, uint8_t subIndex, uint16_t *val, bool_t odOrig)
Get uint16_t variable from Object Dictionary, see OD_get_value.
Definition CO_ODinterface.h:524
static ODR_t OD_set_u8(const OD_entry_t *entry, uint8_t subIndex, uint8_t val, bool_t odOrig)
Set uint8_t variable in Object Dictionary, see OD_set_value.
Definition CO_ODinterface.h:593
ODR_t OD_set_value(const OD_entry_t *entry, uint8_t subIndex, void *val, OD_size_t len, bool_t odOrig)
Set variable in Object Dictionary.
Definition CO_ODinterface.c:328
static ODR_t OD_set_i8(const OD_entry_t *entry, uint8_t subIndex, int8_t val, bool_t odOrig)
Set int8_t variable in Object Dictionary, see OD_set_value.
Definition CO_ODinterface.h:569
void * OD_getPtr(const OD_entry_t *entry, uint8_t subIndex, OD_size_t len, ODR_t *err)
Get pointer to memory which holds data variable from Object Dictionary.
Definition CO_ODinterface.c:350
static ODR_t OD_set_u32(const OD_entry_t *entry, uint8_t subIndex, uint32_t val, bool_t odOrig)
Set uint32_t variable in Object Dictionary, see OD_set_value.
Definition CO_ODinterface.h:605
static ODR_t OD_set_i64(const OD_entry_t *entry, uint8_t subIndex, int64_t val, bool_t odOrig)
Set int32_t variable in Object Dictionary, see OD_set_value.
Definition CO_ODinterface.h:587
static ODR_t OD_get_u64(const OD_entry_t *entry, uint8_t subIndex, uint64_t *val, bool_t odOrig)
Get uint64_t variable from Object Dictionary, see OD_get_value.
Definition CO_ODinterface.h:536
static ODR_t OD_set_i16(const OD_entry_t *entry, uint8_t subIndex, int16_t val, bool_t odOrig)
Set int16_t variable in Object Dictionary, see OD_set_value.
Definition CO_ODinterface.h:575
static void OD_requestTPDO(OD_entry_t *entry, uint8_t subIndex)
Request TPDO, to which OD variable is mapped.
Definition CO_ODinterface.h:392
#define CO_PROGMEM
Modifier for OD objects.
Definition CO_ODinterface.h:50
OD_entry_t * OD_find(OD_t *od, uint16_t index)
Find OD entry in Object Dictionary.
Definition CO_ODinterface.c:140
ODR_t
Return codes from OD access functions.
Definition CO_ODinterface.h:129
static void OD_rwRestart(OD_stream_t *stream)
Restart read or write operation on OD variable.
Definition CO_ODinterface.h:371
static ODR_t OD_extension_init(OD_entry_t *entry, OD_extension_t *extension)
Extend OD object with own read/write functions and/or flagsPDO.
Definition CO_ODinterface.h:463
#define OD_FLAGS_PDO_SIZE
Size of of flagsPDO variable inside OD_extension_t, from 0 to 32.
Definition CO_ODinterface.h:45
OD_attributes_t
Attributes (bit masks) for OD sub-object.
Definition CO_ODinterface.h:109
ODR_t OD_writeOriginal(OD_stream_t *stream, const void *buf, OD_size_t count, OD_size_t *countWritten)
Write value to original OD location.
Definition CO_ODinterface.c:66
static bool_t OD_TPDOtransmitted(OD_entry_t *entry, uint8_t subIndex)
Check if requested TPDO was transmitted.
Definition CO_ODinterface.h:413
uint32_t OD_getSDOabCode(ODR_t returnCode)
Get SDO abort code from returnCode.
Definition CO_ODinterface.c:272
ODR_t OD_readOriginal(OD_stream_t *stream, void *buf, OD_size_t count, OD_size_t *countRead)
Read value from original OD location.
Definition CO_ODinterface.c:25
ODR_t OD_getSub(const OD_entry_t *entry, uint8_t subIndex, OD_IO_t *io, bool_t odOrig)
Find sub-object with specified sub-index on OD entry returned by OD_find.
Definition CO_ODinterface.c:177
uint32_t OD_size_t
Variable of type OD_size_t contains data length in bytes of OD variable.
Definition CO_ODinterface.h:40
uint8_t OD_attr_t
Type (and size) of Object Dictionary attribute.
Definition CO_ODinterface.h:41
static uint16_t OD_getIndex(const OD_entry_t *entry)
Return index from OD entry.
Definition CO_ODinterface.h:343
OD_ObjDicId_30x_t
Common DS301 object dictionary entries.
Definition CO_ODinterface.h:56
static bool_t OD_mappable(OD_stream_t *stream)
Check, if OD variable is mappable to PDO or SRDO.
Definition CO_ODinterface.h:358
@ ODR_INVALID_VALUE
SDO abort 0x06090030 - Invalid value for parameter (download only)
Definition CO_ODinterface.h:147
@ ODR_OUT_OF_MEM
SDO abort 0x05040005 - Out of memory.
Definition CO_ODinterface.h:133
@ ODR_OK
SDO abort 0x00000000 - Read/write successfully finished.
Definition CO_ODinterface.h:132
@ ODR_NO_RESOURCE
SDO abort 0x060A0023 - Resource not available: SDO connection.
Definition CO_ODinterface.h:151
@ ODR_DATA_DEV_STATE
SDO abort 0x08000022 - Data can't be transf.
Definition CO_ODinterface.h:155
@ ODR_UNSUPP_ACCESS
SDO abort 0x06010000 - Unsupported access to an object.
Definition CO_ODinterface.h:134
@ ODR_DATA_LOC_CTRL
SDO abort 0x08000021 - Data can't be transferred (local control)
Definition CO_ODinterface.h:154
@ ODR_DATA_TRANSF
SDO abort 0x08000020 - Data cannot be transferred or stored to app.
Definition CO_ODinterface.h:153
@ ODR_PAR_INCOMPAT
SDO abort 0x06040043 - General parameter incompatibility reasons.
Definition CO_ODinterface.h:140
@ ODR_DEV_INCOMPAT
SDO abort 0x06040047 - General internal incompatibility in device.
Definition CO_ODinterface.h:141
@ ODR_DATA_LONG
SDO abort 0x06070012 - Data type does not match, length too high.
Definition CO_ODinterface.h:144
@ ODR_WRITEONLY
SDO abort 0x06010001 - Attempt to read a write only object.
Definition CO_ODinterface.h:135
@ ODR_VALUE_LOW
SDO abort 0x06090032 - Value range of parameter written too low.
Definition CO_ODinterface.h:149
@ ODR_SUB_NOT_EXIST
SDO abort 0x06090011 - Sub index does not exist.
Definition CO_ODinterface.h:146
@ ODR_IDX_NOT_EXIST
SDO abort 0x06020000 - Object does not exist in the object dict.
Definition CO_ODinterface.h:137
@ ODR_NO_MAP
SDO abort 0x06040041 - Object cannot be mapped to the PDO.
Definition CO_ODinterface.h:138
@ ODR_VALUE_HIGH
SDO abort 0x06090031 - Value range of parameter written too high.
Definition CO_ODinterface.h:148
@ ODR_GENERAL
SDO abort 0x08000000 - General error.
Definition CO_ODinterface.h:152
@ ODR_READONLY
SDO abort 0x06010002 - Attempt to write a read only object.
Definition CO_ODinterface.h:136
@ ODR_COUNT
Last element, number of responses.
Definition CO_ODinterface.h:158
@ ODR_MAX_LESS_MIN
SDO abort 0x06090036 - Maximum value is less than minimum value.
Definition CO_ODinterface.h:150
@ ODR_TYPE_MISMATCH
SDO abort 0x06070010 - Data type does not match.
Definition CO_ODinterface.h:143
@ ODR_MAP_LEN
SDO abort 0x06040042 - PDO length exceeded.
Definition CO_ODinterface.h:139
@ ODR_DATA_SHORT
SDO abort 0x06070013 - Data type does not match, length too short.
Definition CO_ODinterface.h:145
@ ODR_HW
SDO abort 0x06060000 - Access failed due to hardware error.
Definition CO_ODinterface.h:142
@ ODR_OD_MISSING
SDO abort 0x08000023 - Object dictionary not present.
Definition CO_ODinterface.h:156
@ ODR_PARTIAL
Read/write is only partial, make more calls.
Definition CO_ODinterface.h:131
@ ODR_NO_DATA
SDO abort 0x08000024 - No data available.
Definition CO_ODinterface.h:157
@ ODA_SDO_RW
SDO server may read from or write to the variable.
Definition CO_ODinterface.h:112
@ ODA_TSRDO
Variable is mappable into transmitting SRDO.
Definition CO_ODinterface.h:116
@ ODA_RSRDO
Variable is mappable into receiving SRDO.
Definition CO_ODinterface.h:117
@ ODA_SDO_W
SDO server may write to the variable.
Definition CO_ODinterface.h:111
@ ODA_STR
Shorter value, than specified variable size, may be written to the variable.
Definition CO_ODinterface.h:120
@ ODA_TPDO
Variable is mappable into TPDO (can be read)
Definition CO_ODinterface.h:113
@ ODA_SDO_R
SDO server may read from the variable.
Definition CO_ODinterface.h:110
@ ODA_MB
Variable is multi-byte ((u)int16_t to (u)int64_t)
Definition CO_ODinterface.h:119
@ ODA_RPDO
Variable is mappable into RPDO (can be written)
Definition CO_ODinterface.h:114
@ ODA_TRPDO
Variable is mappable into TPDO or RPDO.
Definition CO_ODinterface.h:115
@ ODA_TRSRDO
Variable is mappable into tx or rx SRDO.
Definition CO_ODinterface.h:118
@ OD_H1023_OS_CMD
OS command.
Definition CO_ODinterface.h:86
@ OD_H1021_STORE_EDS
Store EDS.
Definition CO_ODinterface.h:84
@ OD_H1A00_TXPDO_1_MAPPING
TXPDO mapping parameters.
Definition CO_ODinterface.h:103
@ OD_H1011_RESTORE_DEFAULT
Restore default parameters.
Definition CO_ODinterface.h:74
@ OD_H1002_MANUF_STATUS_REG
Manufacturer status register.
Definition CO_ODinterface.h:59
@ OD_H1280_SDO_CLIENT_1_PARAM
SDO client parameter.
Definition CO_ODinterface.h:94
@ OD_H1022_STORE_FORMAT
Store format.
Definition CO_ODinterface.h:85
@ OD_H1007_SYNC_WINDOW_LEN
Sync windows length.
Definition CO_ODinterface.h:64
@ OD_H1006_COMM_CYCL_PERIOD
Communication cycle period.
Definition CO_ODinterface.h:63
@ OD_H100D_LIFETIME_FACTOR
Life time factor.
Definition CO_ODinterface.h:70
@ OD_H100E_RSV
Reserved.
Definition CO_ODinterface.h:71
@ OD_H100B_RSV
Reserved.
Definition CO_ODinterface.h:68
@ OD_H1012_COBID_TIME
Timestamp message cob-id.
Definition CO_ODinterface.h:75
@ OD_H1014_COBID_EMERGENCY
Emergency message cob-id.
Definition CO_ODinterface.h:77
@ OD_H1027_MODULE_LIST
Module list.
Definition CO_ODinterface.h:90
@ OD_H1029_ERR_BEHAVIOR
Error behaviour.
Definition CO_ODinterface.h:92
@ OD_H1026_OS_PROMPT
OS prompt.
Definition CO_ODinterface.h:89
@ OD_H1028_EMCY_CONSUMER
Emergency consumer object.
Definition CO_ODinterface.h:91
@ OD_H1013_HIGH_RES_TIMESTAMP
High resolution timestamp.
Definition CO_ODinterface.h:76
@ OD_H100F_RSV
Reserved.
Definition CO_ODinterface.h:72
@ OD_H1200_SDO_SERVER_1_PARAM
SDO server parameter.
Definition CO_ODinterface.h:93
@ OD_H1600_RXPDO_1_MAPPING
RXPDO mapping parameters.
Definition CO_ODinterface.h:101
@ OD_H1010_STORE_PARAMETERS
Store params in persistent mem.
Definition CO_ODinterface.h:73
@ OD_H100A_MANUF_SW_VERSION
Manufacturer software version.
Definition CO_ODinterface.h:67
@ OD_H1020_VERIFY_CONFIG
Verify configuration.
Definition CO_ODinterface.h:83
@ OD_H1381_SRDO_1_MAPPING
SRDO mapping parameter.
Definition CO_ODinterface.h:97
@ OD_H13FF_SRDO_CHECKSUM
SRDO configuration checksum.
Definition CO_ODinterface.h:99
@ OD_H1016_CONSUMER_HB_TIME
Consumer heartbeat time.
Definition CO_ODinterface.h:79
@ OD_H1008_MANUF_DEV_NAME
Manufacturer device name.
Definition CO_ODinterface.h:65
@ OD_H13FE_SRDO_VALID
SRDO Configuration valid.
Definition CO_ODinterface.h:98
@ OD_H1019_SYNC_CNT_OVERFLOW
Sync counter overflow value.
Definition CO_ODinterface.h:82
@ OD_H1018_IDENTITY_OBJECT
Identity object.
Definition CO_ODinterface.h:81
@ OD_H1800_TXPDO_1_PARAM
TXPDO communication parameter.
Definition CO_ODinterface.h:102
@ OD_H1025_OS_DBG_INTERFACE
OS debug interface.
Definition CO_ODinterface.h:88
@ OD_H1017_PRODUCER_HB_TIME
Producer heartbeat time.
Definition CO_ODinterface.h:80
@ OD_H1004_RSV
Reserved.
Definition CO_ODinterface.h:61
@ OD_H1024_OS_CMD_MODE
OS command mode.
Definition CO_ODinterface.h:87
@ OD_H1009_MANUF_HW_VERSION
Manufacturer hardware version.
Definition CO_ODinterface.h:66
@ OD_H1015_INHIBIT_TIME_EMCY
Inhibit time emergency message.
Definition CO_ODinterface.h:78
@ OD_H1005_COBID_SYNC
Sync message cob-id.
Definition CO_ODinterface.h:62
@ OD_H100C_GUARD_TIME
Guard time.
Definition CO_ODinterface.h:69
@ OD_H1003_PREDEF_ERR_FIELD
Predefined error field.
Definition CO_ODinterface.h:60
@ OD_H1400_RXPDO_1_PARAM
RXPDO communication parameter.
Definition CO_ODinterface.h:100
@ OD_H1000_DEV_TYPE
Device type.
Definition CO_ODinterface.h:57
@ OD_H1001_ERR_REG
Error register.
Definition CO_ODinterface.h:58
@ OD_H1300_GFC_PARAM
Global fail-safe command param.
Definition CO_ODinterface.h:95
@ OD_H1301_SRDO_1_PARAM
SRDO communication parameter.
Definition CO_ODinterface.h:96
#define NULL
NULL, for general usage.
Definition CO_driver.h:123
unsigned int uint16_t
UNSIGNED16 in CANopen (0006h), 16-bit unsigned integer.
Definition CO_driver.h:132
unsigned long int uint32_t
UNSIGNED32 in CANopen (0007h), 32-bit unsigned integer.
Definition CO_driver.h:133
float float32_t
REAL32 in CANopen (0008h), single precision floating point value, 32-bit.
Definition CO_driver.h:135
uint_fast8_t bool_t
Boolean data type for general use.
Definition CO_driver.h:126
signed long long int int64_t
INTEGER64 in CANopen (0015h), 64-bit signed integer.
Definition CO_driver.h:130
signed int int16_t
INTEGER16 in CANopen (0003h), 16-bit signed integer.
Definition CO_driver.h:128
unsigned char uint8_t
UNSIGNED8 in CANopen (0005h), 8-bit unsigned integer.
Definition CO_driver.h:131
double float64_t
REAL64 in CANopen (0011h), double precision floating point value, 64-bit.
Definition CO_driver.h:136
unsigned long long int uint64_t
UNSIGNED64 in CANopen (001Bh), 64-bit unsigned integer.
Definition CO_driver.h:134
signed long int int32_t
INTEGER32 in CANopen (0004h), 32-bit signed integer.
Definition CO_driver.h:129
signed char int8_t
INTEGER8 in CANopen (0002h), 8-bit signed integer.
Definition CO_driver.h:127
Structure for input / output on the OD variable.
Definition CO_ODinterface.h:181
OD_stream_t stream
Object Dictionary stream object, passed to read or write.
Definition CO_ODinterface.h:183
Object Dictionary entry for one OD object.
Definition CO_ODinterface.h:272
OD_extension_t * extension
Extension to OD, specified by application.
Definition CO_ODinterface.h:278
uint8_t subEntriesCount
Number of all sub-entries, including sub-entry at sub-index 0.
Definition CO_ODinterface.h:274
CO_PROGMEM void * odObject
OD object of type indicated by odObjectType, from which OD_getSub() fetches the information.
Definition CO_ODinterface.h:276
uint8_t odObjectType
Type of the odObject, indicated by OD_objectTypes_t enumerator.
Definition CO_ODinterface.h:275
uint16_t index
Object Dictionary index.
Definition CO_ODinterface.h:273
Extension of OD object, which can optionally be specified by application in initialization phase with...
Definition CO_ODinterface.h:245
uint8_t flagsPDO[OD_FLAGS_PDO_SIZE]
PDO flags bit-field provides one bit for each OD variable, which exist inside OD object at specific s...
Definition CO_ODinterface.h:261
void * object
Object on which read and write will operate, part of OD_stream_t.
Definition CO_ODinterface.h:247
Object for OD array of variables, used for "ARRAY" type OD objects.
Definition CO_ODinterface.h:682
OD_attr_t attribute0
Attribute bitfield for sub-index 0, see OD_attributes_t.
Definition CO_ODinterface.h:685
void * dataOrig
Pointer to array of data.
Definition CO_ODinterface.h:684
OD_attr_t attribute
Attribute bitfield for array elements.
Definition CO_ODinterface.h:686
OD_size_t dataElementLength
Data length of array elements in bytes.
Definition CO_ODinterface.h:687
OD_size_t dataElementSizeof
Sizeof one array element in bytes.
Definition CO_ODinterface.h:688
uint8_t * dataOrig0
Pointer to data for sub-index 0.
Definition CO_ODinterface.h:683
Object for OD sub-elements, used in "RECORD" type OD objects.
Definition CO_ODinterface.h:694
OD_size_t dataLength
Data length in bytes.
Definition CO_ODinterface.h:698
OD_attr_t attribute
Attribute bitfield, see OD_attributes_t.
Definition CO_ODinterface.h:697
uint8_t subIndex
Sub index of element.
Definition CO_ODinterface.h:696
void * dataOrig
Pointer to data.
Definition CO_ODinterface.h:695
Object for single OD variable, used for "VAR" type OD objects.
Definition CO_ODinterface.h:673
OD_size_t dataLength
Data length in bytes.
Definition CO_ODinterface.h:676
OD_attr_t attribute
Attribute bitfield, see OD_attributes_t.
Definition CO_ODinterface.h:675
void * dataOrig
Pointer to data.
Definition CO_ODinterface.h:674
IO stream structure, used for read/write access to OD variable, part of OD_IO_t.
Definition CO_ODinterface.h:164
OD_attr_t attribute
Attribute bit-field of the OD sub-object, see OD_attributes_t.
Definition CO_ODinterface.h:172
uint16_t index
Index of the OD object, informative.
Definition CO_ODinterface.h:173
uint8_t subIndex
Sub index of the OD sub-object, informative.
Definition CO_ODinterface.h:174
OD_size_t dataLength
Data length in bytes or 0, if length is not specified.
Definition CO_ODinterface.h:170
OD_size_t dataOffset
In case of large data, dataOffset indicates position of already transferred data.
Definition CO_ODinterface.h:171
void * dataOrig
Pointer to original data object, defined by Object Dictionary.
Definition CO_ODinterface.h:165
void * object
Pointer to object, passed by OD_extension_init().
Definition CO_ODinterface.h:168
Object Dictionary.
Definition CO_ODinterface.h:284
uint16_t size
Number of elements in the list, without last element, which is blank.
Definition CO_ODinterface.h:285
OD_entry_t * list
List OD entries (table of contents), ordered by index.
Definition CO_ODinterface.h:286