CO_EM_t Struct Reference
CANopen_301 » Emergency

Emergency object. More...

`#include <CO_Emergency.h>`

## Data Fields

uint8_t | errorStatusBits [CO_CONFIG_EM_ERR_STATUS_BITS_COUNT/8]
| Bitfield for the internal indication of the error condition.
uint8_t * | errorRegister
| Pointer to error register in object dictionary at 0x1001,00.
uint16_t | CANerrorStatusOld
| Old CAN error status bitfield.
uint32_t | fifo [CO_CONFIG_EM_BUFFER_SIZE+1][2]
| Internal circular FIFO buffer for storing pre-processed emergency messages. More...
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. More...
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_CANmodule_t * | CANdevTx
| From CO_EM_init()
CO_CANtx_t * | CANtxBuff
| CAN transmit buffer.
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. More...
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

uint32_t CO_EM_t::fifo[CO_CONFIG_EM_BUFFER_SIZE+1][2]

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. Fifo is also used for error history - OD object 0x1003, "Pre-defined error field".

## 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.

## inhibitEmTime_us

uint32_t CO_EM_t::inhibitEmTime_us

Inhibit time for emergency message, from Object dictionary.

Internal timer for inhibit time

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

- 301/CO_Emergency.h