NMT master/slave and HB producer/consumer
CANopen_301 » Driver » Stack configuration

## Macros

#define | CO_CONFIG_NMT (0)
| Configuration of NMT and Heartbeat. More...
#define | CO_CONFIG_HB_CONS (CO_CONFIG_HB_CONS_ENABLE)
| Configuration of Heartbeat consumer. More...
#define | CO_CONFIG_HB_CONS_SIZE 8
| Number of heartbeat consumer objects, where each object corresponds to one sub-index in OD object 0x1016, "Consumer heartbeat time". More...

## Detailed Description

## Macro Definition Documentation

## CO_CONFIG_NMT

#define CO_CONFIG_NMT (0)

Configuration of NMT and Heartbeat.

Possible flags, can be ORed:

- CO_CONFIG_NMT_CALLBACK_CHANGE - Enable custom callback after NMT state changes. Callback is configured by CO_NMT_initCallbackChanged().
- CO_CONFIG_NMT_MASTER - Enable simple NMT master
- CO_CONFIG_FLAG_CALLBACK_PRE - Enable custom callback after preprocessing received NMT CAN message. Callback is configured by CO_NMT_initCallbackPre().
- CO_CONFIG_FLAG_TIMERNEXT - Enable calculation of timerNext_us variable inside CO_NMT_process().

## CO_CONFIG_HB_CONS

#define CO_CONFIG_HB_CONS (CO_CONFIG_HB_CONS_ENABLE)

Configuration of Heartbeat consumer.

Possible flags, can be ORed:

- CO_CONFIG_FLAG_CALLBACK_PRE - Enable custom callback after preprocessing received heartbeat CAN message. Callback is configured by CO_HBconsumer_initCallbackPre().
- CO_CONFIG_FLAG_TIMERNEXT - Enable calculation of timerNext_us variable inside CO_HBconsumer_process().
- CO_CONFIG_HB_CONS_ENABLE - Enable heartbeat consumer.
- CO_CONFIG_HB_CONS_CALLBACK_CHANGE - Enable custom common callback after NMT state of the monitored node changes. Callback is configured by CO_HBconsumer_initCallbackNmtChanged().
- CO_CONFIG_HB_CONS_CALLBACK_MULTI - Enable multiple custom callbacks, which can be configured individually for each monitored node. Callbacks are configured by CO_HBconsumer_initCallbackNmtChanged(), CO_HBconsumer_initCallbackHeartbeatStarted(), CO_HBconsumer_initCallbackTimeout() and CO_HBconsumer_initCallbackRemoteReset() functions.
- CO_CONFIG_HB_CONS_QUERY_FUNCT - Enable functions for query HB state or NMT state of the specific monitored node. Note that CO_CONFIG_HB_CONS_CALLBACK_CHANGE and CO_CONFIG_HB_CONS_CALLBACK_MULTI cannot be set simultaneously.

## CO_CONFIG_HB_CONS_SIZE

#define CO_CONFIG_HB_CONS_SIZE 8

Number of heartbeat consumer objects, where each object corresponds to one sub-index in OD object 0x1016, "Consumer heartbeat time".

If heartbeat consumer is enabled, then valid values are 1 to 127.