31#define CO_CONFIG_SRDO (0)
33#ifndef CO_CONFIG_SRDO_MINIMUM_DELAY
34#define CO_CONFIG_SRDO_MINIMUM_DELAY 0U
37#if (((CO_CONFIG_SRDO)&CO_CONFIG_SRDO_ENABLE) != 0) || defined CO_DOXYGEN
75#ifndef CO_SRDO_MAX_SIZE
76#define CO_SRDO_MAX_SIZE 8U
81#ifndef CO_SRDO_MAX_MAPPED_ENTRIES
82#define CO_SRDO_MAX_MAPPED_ENTRIES 16U
85#ifndef CO_SRDO_OWN_TYPES
161 volatile void* CANrxNew[2];
169#if (((CO_CONFIG_SRDO)&CO_CONFIG_FLAG_CALLBACK_PRE) != 0) || defined CO_DOXYGEN
170 void (*pFunctSignalPre)(
void* object);
225#if (((CO_CONFIG_SRDO)&CO_CONFIG_FLAG_CALLBACK_PRE) != 0) || defined CO_DOXYGEN
CANopen Emergency protocol.
CANopen Object Dictionary interface.
#define CO_SRDO_MAX_SIZE
Maximum size of SRDO message, 8 for standard CAN.
Definition CO_SRDO.h:76
#define CO_SRDO_MAX_MAPPED_ENTRIES
Maximum number of entries, which can be mapped to SRDO, 2*8 for standard CAN, may be less to preserve...
Definition CO_SRDO.h:82
CO_SRDO_state_t CO_SRDO_process(CO_SRDO_t *SRDO, uint32_t timeDifference_us, uint32_t *timerNext_us, bool_t NMTisOperational)
Process transmitting/receiving individual SRDO message.
uint8_t CO_SRDO_size_t
Variable of type CO_SRDO_size_t contains data length in bytes of SRDO.
Definition CO_SRDO.h:87
CO_SRDO_state_t
SRDO internal state.
Definition CO_SRDO.h:93
void CO_SRDO_initCallbackPre(CO_SRDO_t *SRDO, void *object, void(*pFunctSignalPre)(void *object))
Initialize SRDO callback function.
CO_ReturnError_t CO_SRDO_requestSend(CO_SRDO_t *SRDO)
Send SRDO on event.
CO_ReturnError_t CO_SRDO_init(CO_SRDO_t *SRDO, uint8_t SRDO_Index, CO_SRDOGuard_t *SRDOGuard, OD_t *OD, CO_EM_t *em, uint8_t nodeId, uint16_t defaultCOB_ID, OD_entry_t *OD_130x_SRDOCommPar, OD_entry_t *OD_138x_SRDOMapPar, CO_CANmodule_t *CANdevRxNormal, CO_CANmodule_t *CANdevRxInverted, uint16_t CANdevRxIdxNormal, uint16_t CANdevRxIdxInverted, CO_CANmodule_t *CANdevTxNormal, CO_CANmodule_t *CANdevTxInverted, uint16_t CANdevTxIdxNormal, uint16_t CANdevTxIdxInverted, uint32_t *errInfo)
Initialize SRDO object.
CO_ReturnError_t CO_SRDOGuard_init(CO_SRDOGuard_t *SRDOGuard, OD_entry_t *OD_13FE_configurationValid, OD_entry_t *OD_13FF_safetyConfigurationSignature, uint32_t *errInfo)
Initialize SRDOGuard object.
CO_ReturnError_t CO_SRDO_config(CO_SRDO_t *SRDO, uint8_t SRDO_Index, CO_SRDOGuard_t *SRDOGuard, uint32_t *errInfo)
Configure SRDO object.
@ CO_SRDO_state_error_rxNotInverted
Received SRDO messages was not inverted.
Definition CO_SRDO.h:100
@ CO_SRDO_state_error_txNotInverted
Transmitting SRDO messages was not inverted.
Definition CO_SRDO.h:96
@ CO_SRDO_state_error_rxShort
Received SRDO message is too short.
Definition CO_SRDO.h:101
@ CO_SRDO_state_nmtNotOperational
Internal NMT operating state is not NMT operational.
Definition CO_SRDO.h:103
@ CO_SRDO_state_deleted
informationDirection for this SRDO is set to 0
Definition CO_SRDO.h:107
@ CO_SRDO_state_initializing
Just entered NMT operational state, SRDO message not yet received or transmitted.
Definition CO_SRDO.h:104
@ CO_SRDO_state_error_rxTimeoutSRVT
SRDO message didn't receive inside SRVT time.
Definition CO_SRDO.h:98
@ CO_SRDO_state_unknown
unknown state, set by CO_SRDO_init()
Definition CO_SRDO.h:102
@ CO_SRDO_state_error_txFail
SRDO CAN message transmission failed.
Definition CO_SRDO.h:97
@ CO_SRDO_state_error_rxTimeoutSCT
SRDO inverted message didn't receive inside SCT time.
Definition CO_SRDO.h:99
@ CO_SRDO_state_error_configuration
error in parameters, emergency message was sent
Definition CO_SRDO.h:95
@ CO_SRDO_state_communicationEstablished
SRDO communication established, fully functional.
Definition CO_SRDO.h:106
@ CO_SRDO_state_error_internal
internal software error
Definition CO_SRDO.h:94
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
uint_fast8_t bool_t
Boolean data type for general use.
Definition CO_driver.h:126
unsigned char uint8_t
UNSIGNED8 in CANopen (0005h), 8-bit unsigned integer.
Definition CO_driver.h:131
CO_ReturnError_t
Return values of some CANopen functions.
Definition CO_driver.h:449
Complete CAN module object.
Definition CO_driver.h:268
Configuration object for CAN transmit message for specific CANopenNode Object.
Definition CO_driver.h:250
Emergency object.
Definition CO_Emergency.h:259
Guard Object for SRDO.
Definition CO_SRDO.h:118
OD_IO_t OD_IO_configurationValid
Object for input / output on the OD variable 13FE:00.
Definition CO_SRDO.h:122
OD_entry_t * OD_13FE_entry
From CO_SRDOGuard_init()
Definition CO_SRDO.h:124
bool_t configurationValid
True if all SRDO objects are properly configured.
Definition CO_SRDO.h:120
bool_t NMTisOperational
True if NMT operating state is operational.
Definition CO_SRDO.h:119
OD_extension_t OD_13FF_extension
Extension for OD object.
Definition CO_SRDO.h:127
OD_extension_t OD_13FE_extension
Extension for OD object.
Definition CO_SRDO.h:126
OD_entry_t * OD_13FF_entry
From CO_SRDOGuard_init()
Definition CO_SRDO.h:125
SRDO object.
Definition CO_SRDO.h:133
CO_EM_t * em
From CO_SRDO_init()
Definition CO_SRDO.h:136
CO_SRDO_state_t internalState
Internal state of this SRDO.
Definition CO_SRDO.h:143
uint8_t informationDirection
0 - SRDO is disabled; 1 - SRDO is producer (tx); 2 - SRDO is consumer (rx)
Definition CO_SRDO.h:145
CO_SRDO_size_t dataLength
Data length of the received SRDO message.
Definition CO_SRDO.h:151
uint32_t validationTime_us
Safety related validation time from object dictionary translated to microseconds.
Definition CO_SRDO.h:147
uint16_t defaultCOB_ID
From CO_SRDO_init()
Definition CO_SRDO.h:137
void * functSignalObjectPre
From CO_SRDO_initCallbackPre() or NULL.
Definition CO_SRDO.h:171
bool_t rxSrdoShort
true, if received SRDO is too short
Definition CO_SRDO.h:162
uint32_t validationTimer
validation timer variable in microseconds
Definition CO_SRDO.h:150
OD_t * OD
From CO_SRDO_init()
Definition CO_SRDO.h:135
OD_extension_t OD_communicationParam_ext
Extension for OD object.
Definition CO_SRDO.h:167
OD_entry_t * OD_mappingParam_entry
From CO_SRDO_init()
Definition CO_SRDO.h:166
bool_t NMTisOperationalPrevious
Copy of variable, internal usage.
Definition CO_SRDO.h:144
uint32_t cycleTimer
cycle timer variable in microseconds
Definition CO_SRDO.h:148
CO_SRDOGuard_t * SRDOGuard
From CO_SRDO_init()
Definition CO_SRDO.h:134
OD_extension_t OD_mappingParam_extension
Extension for OD object.
Definition CO_SRDO.h:168
uint8_t nodeId
From CO_SRDO_init()
Definition CO_SRDO.h:138
uint8_t mappedObjectsCount
Number of mapped objects in SRDO.
Definition CO_SRDO.h:152
bool_t nextIsNormal
If true, next processed SRDO message is normal (not inverted)
Definition CO_SRDO.h:164
uint32_t invertedDelay
inverted delay timer variable in microseconds
Definition CO_SRDO.h:149
OD_entry_t * OD_communicationParam_entry
From CO_SRDO_init()
Definition CO_SRDO.h:165
uint32_t cycleTime_us
Safety Cycle Time from object dictionary translated to microseconds.
Definition CO_SRDO.h:146
Structure for input / output on the OD variable.
Definition CO_ODinterface.h:181
Object Dictionary entry for one OD object.
Definition CO_ODinterface.h:272
Extension of OD object, which can optionally be specified by application in initialization phase with...
Definition CO_ODinterface.h:245
Object Dictionary.
Definition CO_ODinterface.h:284