CANopenNode
CANopen protocol stack
Loading...
Searching...
No Matches
CO_EM_t Struct Reference

Emergency object. More...

#include <CO_Emergency.h>

+ Collaboration diagram for CO_EM_t:

Data Fields

uint8_t errorStatusBits [CO_CONFIG_EM_ERR_STATUS_BITS_COUNT/8U]
 Bitfield for the internal indication of the error condition.
 
uint8_terrorRegister
 Pointer to error register in object dictionary at 0x1001,00.
 
uint16_t CANerrorStatusOld
 Old CAN error status bitfield.
 
CO_CANmodule_tCANdevTx
 From CO_EM_init()
 
CO_EM_fifo_tfifo
 Internal circular FIFO buffer for storing pre-processed emergency messages.
 
uint8_t fifoSize
 Size of the above buffer, specified by CO_EM_init().
 
uint8_t fifoWrPtr
 Pointer for the fifo buffer, where next emergency message will be written by CO_error() function.
 
uint8_t fifoPpPtr
 Pointer for the fifo, where next emergency message has to be post-processed by CO_EM_process() function.
 
uint8_t fifoOverflow
 Indication of overflow - messages in buffer are not post-processed.
 
uint8_t fifoCount
 Count of emergency messages in fifo, used for OD object 0x1003.
 
bool_t producerEnabled
 True, if emergency producer is enabled, from Object dictionary.
 
uint8_t nodeId
 Copy of CANopen node ID, from CO_EM_init()
 
CO_CANtx_tCANtxBuff
 CAN transmit buffer.
 
OD_extension_t OD_1014_extension
 Extension for OD object.
 
uint16_t producerCanId
 COB ID of emergency message, from Object dictionary.
 
uint16_t CANdevTxIdx
 From CO_EM_init()
 
uint32_t inhibitEmTime_us
 Inhibit time for emergency message, from Object dictionary.
 
uint32_t inhibitEmTimer
 Internal timer for inhibit time.
 
OD_extension_t OD_1015_extension
 Extension for OD object.
 
OD_extension_t OD_1003_extension
 Extension for OD object.
 
OD_extension_t OD_statusBits_extension
 Extension for OD object.
 
void(* pFunctSignalRx )(const uint16_t ident, const uint16_t errorCode, const uint8_t errorRegister, const uint8_t errorBit, const uint32_t infoCode)
 From CO_EM_initCallbackRx() or NULL.
 
void(* pFunctSignalPre )(void *object)
 From CO_EM_initCallbackPre() or NULL.
 
void * functSignalObjectPre
 From CO_EM_initCallbackPre() or NULL.
 

Detailed Description

Emergency object.

Field Documentation

◆ fifo

CO_EM_fifo_t* CO_EM_t::fifo

Internal circular FIFO buffer for storing pre-processed emergency messages.

Messages are added by CO_error() function. All messages are later post-processed by CO_EM_process() function. In case of overflow, error is indicated but emergency message is not sent. Fifo is also used for error history, OD object 0x1003, "Pre-defined error field". Buffer is defined by CO_EM_init().

◆ fifoPpPtr

uint8_t CO_EM_t::fifoPpPtr

Pointer for the fifo, where next emergency message has to be post-processed by CO_EM_process() function.

If equal to bufWrPtr, then all messages has been post-processed.


The documentation for this struct was generated from the following file: