CANopen gateway
CANopen_301 » Driver » Stack configuration

Specified in standard CiA 309. More...

## Macros

#define | CO_CONFIG_GTW (0)
| Configuration of Gateway ASCII mapping. More...
#define | CO_CONFIG_GTW_BLOCK_DL_LOOP 1
| Number of loops of CO_SDOclientDownload() in case of block download. More...
#define | CO_CONFIG_GTWA_COMM_BUF_SIZE 200
| Size of command buffer in ASCII gateway object. More...
#define | CO_CONFIG_GTWA_LOG_BUF_SIZE 2000
| Size of message log buffer in ASCII gateway object.

## Detailed Description

Specified in standard CiA 309.

## Macro Definition Documentation

## CO_CONFIG_GTW

#define CO_CONFIG_GTW (0)

Configuration of Gateway ASCII mapping.

Gateway object is covered by standard CiA 309 - CANopen access from other networks. It enables usage of the NMT master, SDO client and LSS master as a gateway device.

Possible flags, can be ORed:

- CO_CONFIG_GTW_MULTI_NET - Enable multiple network interfaces in gateway device. This functionality is currently not implemented.
- CO_CONFIG_GTW_ASCII - Enable gateway device with ASCII mapping (CiA 309-3) If set, then CO_CONFIG_FIFO_ASCII_COMMANDS must also be set.
- CO_CONFIG_GTW_ASCII_SDO - Enable SDO client. If set, then CO_CONFIG_FIFO_ASCII_DATATYPES must also be set.
- CO_CONFIG_GTW_ASCII_NMT - Enable NMT master
- CO_CONFIG_GTW_ASCII_LSS - Enable LSS master
- CO_CONFIG_GTW_ASCII_LOG - Enable non-standard message log read
- CO_CONFIG_GTW_ASCII_ERROR_DESC - Print error description as additional comments in gateway-ascii device for SDO and gateway errors.
- CO_CONFIG_GTW_ASCII_PRINT_HELP - use non-standard command "help" to print help usage.
- CO_CONFIG_GTW_ASCII_PRINT_LEDS - Display "red" and "green" CANopen status LED diodes on terminal.

## CO_CONFIG_GTW_BLOCK_DL_LOOP

#define CO_CONFIG_GTW_BLOCK_DL_LOOP 1

Number of loops of CO_SDOclientDownload() in case of block download.

If SDO clint has block download in progress and OS has buffer for CAN tx messages, then CO_SDOclientDownload() functionion can be called multiple times within own loop (up to 127). This can speed-up SDO block transfer.

## CO_CONFIG_GTWA_COMM_BUF_SIZE

#define CO_CONFIG_GTWA_COMM_BUF_SIZE 200

Size of command buffer in ASCII gateway object.

If large amount of data is transferred (block transfer), then this should be increased to 1000 or more. Buffer may be refilled between the block transfer.