CANopen.h
Go to the documentation of this file.
#ifndef CANopen_H
#define CANopen_H
#include "301/CO_driver.h"
#include "301/CO_ODinterface.h"
#include "301/CO_NMT_Heartbeat.h"
#if ((CO_CONFIG_HB_CONS) & CO_CONFIG_HB_CONS_ENABLE) || defined CO_DOXYGEN
#include "301/CO_HBconsumer.h"
#endif
#include "301/CO_Emergency.h"
#include "301/CO_SDOserver.h"
#if ((CO_CONFIG_SDO_CLI) & CO_CONFIG_SDO_CLI_ENABLE) || defined CO_DOXYGEN
#include "301/CO_SDOclient.h"
#endif
#if ((CO_CONFIG_SYNC) & CO_CONFIG_SYNC_ENABLE) || defined CO_DOXYGEN
#include "301/CO_SYNC.h"
#endif
#if ((CO_CONFIG_PDO) & (CO_CONFIG_RPDO_ENABLE | CO_CONFIG_TPDO_ENABLE)) || defined CO_DOXYGEN
#include "301/CO_PDO.h"
#endif
#if ((CO_CONFIG_TIME) & CO_CONFIG_TIME_ENABLE) || defined CO_DOXYGEN
#include "301/CO_TIME.h"
#endif
#if ((CO_CONFIG_LEDS) & CO_CONFIG_LEDS_ENABLE) || defined CO_DOXYGEN
#include "303/CO_LEDs.h"
#endif
#if ((CO_CONFIG_GFC) & CO_CONFIG_GFC_ENABLE) || defined CO_DOXYGEN
#include "304/CO_GFC.h"
#endif
#if ((CO_CONFIG_SRDO) & CO_CONFIG_SRDO_ENABLE) || defined CO_DOXYGEN
#include "304/CO_SRDO.h"
#endif
#if ((CO_CONFIG_LSS) & CO_CONFIG_LSS_SLAVE) || defined CO_DOXYGEN
#include "305/CO_LSSslave.h"
#endif
#if ((CO_CONFIG_LSS) & CO_CONFIG_LSS_MASTER) || defined CO_DOXYGEN
#include "305/CO_LSSmaster.h"
#endif
#if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII) || defined CO_DOXYGEN
#include "309/CO_gateway_ascii.h"
#endif
#if ((CO_CONFIG_TRACE) & CO_CONFIG_TRACE_ENABLE) || defined CO_DOXYGEN
#include "extra/CO_trace.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef CO_DOXYGEN
#define CO_MULTIPLE_OD
#endif
#ifdef CO_DOXYGEN
#define CO_USE_GLOBALS
#endif
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
typedef struct {
uint8_t CNT_NMT;
const OD_entry_t *ENTRY_H1017;
uint8_t CNT_HB_CONS;
const OD_entry_t *ENTRY_H1016;
uint8_t CNT_EM;
const OD_entry_t *ENTRY_H1001;
const OD_entry_t *ENTRY_H1014;
const OD_entry_t *ENTRY_H1015;
const OD_entry_t *ENTRY_H1003;
uint8_t CNT_SDO_SRV;
const OD_entry_t *ENTRY_H1200;
uint8_t CNT_SDO_CLI;
const OD_entry_t *ENTRY_H1280;
uint8_t CNT_TIME;
const OD_entry_t *ENTRY_H1012;
uint8_t CNT_SYNC;
const OD_entry_t *ENTRY_H1005;
const OD_entry_t *ENTRY_H1006;
const OD_entry_t *ENTRY_H1007;
const OD_entry_t *ENTRY_H1019;
uint16_t CNT_RPDO;
const OD_entry_t *ENTRY_H1400;
const OD_entry_t *ENTRY_H1600;
uint16_t CNT_TPDO;
const OD_entry_t *ENTRY_H1800;
const OD_entry_t *ENTRY_H1A00;
uint8_t CNT_LEDS;
uint8_t CNT_GFC;
const OD_entry_t *ENTRY_H1300;
uint8_t CNT_SRDO;
const OD_entry_t *ENTRY_H1301;
const OD_entry_t *ENTRY_H1381;
const OD_entry_t *ENTRY_H13FE;
const OD_entry_t *ENTRY_H13FF;
uint8_t CNT_LSS_SLV;
uint8_t CNT_LSS_MST;
uint8_t CNT_GTWA;
uint16_t CNT_TRACE;
} CO_config_t;
#else
typedef void CO_config_t;
#endif /* CO_MULTIPLE_OD */
typedef struct {
bool_t nodeIdUnconfigured;
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
CO_config_t *config;
#endif
CO_CANmodule_t *CANmodule;
CO_CANrx_t *CANrx;
CO_CANtx_t *CANtx;
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
uint16_t CNT_ALL_RX_MSGS;
uint16_t CNT_ALL_TX_MSGS;
#endif
CO_NMT_t *NMT;
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
uint16_t RX_IDX_NMT_SLV;
uint16_t TX_IDX_NMT_MST;
uint16_t TX_IDX_HB_PROD;
#endif
#if ((CO_CONFIG_HB_CONS) & CO_CONFIG_HB_CONS_ENABLE) || defined CO_DOXYGEN
CO_HBconsumer_t *HBcons;
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
uint16_t RX_IDX_HB_CONS;
#endif
#endif
CO_EM_t *em;
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
uint16_t RX_IDX_EM_CONS;
uint16_t TX_IDX_EM_PROD;
#endif
CO_SDOserver_t *SDOserver;
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
uint16_t RX_IDX_SDO_SRV;
uint16_t TX_IDX_SDO_SRV;
#endif
#if ((CO_CONFIG_SDO_CLI) & CO_CONFIG_SDO_CLI_ENABLE) || defined CO_DOXYGEN
CO_SDOclient_t *SDOclient;
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
uint16_t RX_IDX_SDO_CLI;
uint16_t TX_IDX_SDO_CLI;
#endif
#endif
#if ((CO_CONFIG_TIME) & CO_CONFIG_TIME_ENABLE) || defined CO_DOXYGEN
CO_TIME_t *TIME;
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
uint16_t RX_IDX_TIME;
uint16_t TX_IDX_TIME;
#endif
#endif
#if ((CO_CONFIG_SYNC) & CO_CONFIG_SYNC_ENABLE) || defined CO_DOXYGEN
CO_SYNC_t *SYNC;
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
uint16_t RX_IDX_SYNC;
uint16_t TX_IDX_SYNC;
#endif
#endif
#if ((CO_CONFIG_PDO) & CO_CONFIG_RPDO_ENABLE) || defined CO_DOXYGEN
CO_RPDO_t *RPDO;
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
uint16_t RX_IDX_RPDO;
#endif
#endif
#if ((CO_CONFIG_PDO) & CO_CONFIG_TPDO_ENABLE) || defined CO_DOXYGEN
CO_TPDO_t *TPDO;
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
uint16_t TX_IDX_TPDO;
#endif
#endif
#if ((CO_CONFIG_LEDS) & CO_CONFIG_LEDS_ENABLE) || defined CO_DOXYGEN
CO_LEDs_t *LEDs;
#endif
#if ((CO_CONFIG_GFC) & CO_CONFIG_GFC_ENABLE) || defined CO_DOXYGEN
CO_GFC_t *GFC;
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
uint16_t RX_IDX_GFC;
uint16_t TX_IDX_GFC;
#endif
#endif
#if ((CO_CONFIG_SRDO) & CO_CONFIG_SRDO_ENABLE) || defined CO_DOXYGEN
CO_SRDOGuard_t *SRDOGuard;
CO_SRDO_t *SRDO;
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
uint16_t RX_IDX_SRDO;
uint16_t TX_IDX_SRDO;
#endif
#endif
#if ((CO_CONFIG_LSS) & CO_CONFIG_LSS_SLAVE) || defined CO_DOXYGEN
CO_LSSslave_t *LSSslave;
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
uint16_t RX_IDX_LSS_SLV;
uint16_t TX_IDX_LSS_SLV;
#endif
#endif
#if ((CO_CONFIG_LSS) & CO_CONFIG_LSS_MASTER) || defined CO_DOXYGEN
CO_LSSmaster_t *LSSmaster;
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
uint16_t RX_IDX_LSS_MST;
uint16_t TX_IDX_LSS_MST;
#endif
#endif
#if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII) || defined CO_DOXYGEN
CO_GTWA_t *gtwa;
#if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
#endif
#endif
#if ((CO_CONFIG_TRACE) & CO_CONFIG_TRACE_ENABLE) || defined CO_DOXYGEN
CO_trace_t *trace;
#endif
} CO_t;
CO_t *CO_new(CO_config_t *config, uint32_t *heapMemoryUsed);
void CO_delete(CO_t *co);
bool_t CO_isLSSslaveEnabled(CO_t *co);
CO_ReturnError_t CO_CANinit(CO_t *co, void *CANptr, uint16_t bitRate);
#if ((CO_CONFIG_LSS) & CO_CONFIG_LSS_SLAVE) || defined CO_DOXYGEN
CO_ReturnError_t CO_LSSinit(CO_t *co,
CO_LSS_address_t *lssAddress,
uint8_t *pendingNodeID,
uint16_t *pendingBitRate);
#endif
CO_ReturnError_t CO_CANopenInit(CO_t *co,
CO_NMT_t *NMT,
CO_EM_t *em,
const OD_t *od,
const OD_entry_t *OD_statusBits,
CO_NMT_control_t NMTcontrol,
uint16_t firstHBTime_ms,
uint16_t SDOserverTimeoutTime_ms,
uint16_t SDOclientTimeoutTime_ms,
bool_t SDOclientBlockTransfer,
uint8_t nodeId);
CO_NMT_reset_cmd_t CO_process(CO_t *co,
bool_t enableGateway,
uint32_t timeDifference_us,
uint32_t *timerNext_us);
#if ((CO_CONFIG_SYNC) & CO_CONFIG_SYNC_ENABLE) || defined CO_DOXYGEN
bool_t CO_process_SYNC(CO_t *co,
uint32_t timeDifference_us,
uint32_t *timerNext_us);
#endif
#if ((CO_CONFIG_PDO) & CO_CONFIG_RPDO_ENABLE) || defined CO_DOXYGEN
void CO_process_RPDO(CO_t *co, bool_t syncWas);
#endif
#if ((CO_CONFIG_PDO) & CO_CONFIG_TPDO_ENABLE) || defined CO_DOXYGEN
void CO_process_TPDO(CO_t *co,
bool_t syncWas,
uint32_t timeDifference_us,
uint32_t *timerNext_us);
#endif
#if ((CO_CONFIG_SRDO) & CO_CONFIG_SRDO_ENABLE) || defined CO_DOXYGEN
void CO_process_SRDO(CO_t *co,
uint32_t timeDifference_us,
uint32_t *timerNext_us);
#endif
/* CO_CANopen */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* CANopen_H */
CO_config_t::CNT_GFC
uint8_t CNT_GFC
Number of GFC objects, 0 or 1 (CANrx + CANtx).
Definition: CANopen.h:276
CO_new
CO_t * CO_new(CO_config_t *config, uint32_t *heapMemoryUsed)
Create new CANopen object.
uint32_t
unsigned long int uint32_t
UNSIGNED32 in CANopen (0007h), 32-bit unsigned integer.
Definition: CO_driver.h:155
CO_t::TX_IDX_SDO_SRV
uint16_t TX_IDX_SDO_SRV
Start index in CANtx.
Definition: CANopen.h:338
CO_process
CO_NMT_reset_cmd_t CO_process(CO_t *co, bool_t enableGateway, uint32_t timeDifference_us, uint32_t *timerNext_us)
Process CANopen objects.
CO_config_t::ENTRY_H1006
const OD_entry_t * ENTRY_H1006
OD entry for CO_SYNC_init()
Definition: CANopen.h:262
CO_driver.h
Interface between CAN hardware and CANopenNode.
CO_trace.h
CANopen trace object for recording variables over time.
CO_t::TX_IDX_GFC
uint16_t TX_IDX_GFC
Start index in CANtx.
Definition: CANopen.h:387
CO_config_t::ENTRY_H1014
const OD_entry_t * ENTRY_H1014
OD entry for CO_EM_init()
Definition: CANopen.h:244
CO_config_t::ENTRY_H13FF
const OD_entry_t * ENTRY_H13FF
OD entry for CO_SRDOGuard_init()
Definition: CANopen.h:283
CO_config_t::CNT_EM
uint8_t CNT_EM
Number of Emergency objects, 0 or 1: optional producer (CANtx) + optional consumer (CANrx),...
Definition: CANopen.h:242
CO_config_t::CNT_SYNC
uint8_t CNT_SYNC
Number of SYNC objects, 0 or 1: consumer (CANrx) + optional producer (CANtx), configurable by CO_CONF...
Definition: CANopen.h:260
CO_config_t::CNT_HB_CONS
uint8_t CNT_HB_CONS
Number of Heartbeat consumer objects, 0 or 1: object uses from 1 to 127 internal consumers (CANrx),...
Definition: CANopen.h:237
CO_t::TX_IDX_SRDO
uint16_t TX_IDX_SRDO
Start index in CANtx.
Definition: CANopen.h:398
CO_SDOserver_t
SDO server object.
Definition: CO_SDOserver.h:439
CO_config_t::ENTRY_H1381
const OD_entry_t * ENTRY_H1381
OD entry for CO_SRDO_init()
Definition: CANopen.h:281
CO_RPDO_t
RPDO object.
Definition: CO_PDO.h:179
CO_t::CANtx
CO_CANtx_t * CANtx
CAN transmit message objects.
Definition: CANopen.h:309
CO_LEDs_t
LEDs object, initialized by CO_LEDs_init()
Definition: CO_LEDs.h:93
CO_config_t::ENTRY_H13FE
const OD_entry_t * ENTRY_H13FE
OD entry for CO_SRDOGuard_init()
Definition: CANopen.h:282
CO_trace_t
Trace object.
Definition: CO_trace.h:93
CO_t::RX_IDX_EM_CONS
uint16_t RX_IDX_EM_CONS
Start index in CANrx.
Definition: CANopen.h:331
CO_config_t::ENTRY_H1005
const OD_entry_t * ENTRY_H1005
OD entry for CO_SYNC_init()
Definition: CANopen.h:261
CO_t::TX_IDX_NMT_MST
uint16_t TX_IDX_NMT_MST
Start index in CANtx.
Definition: CANopen.h:318
CO_SDOclient_t
SDO client object.
Definition: CO_SDOclient.h:67
CO_t::RX_IDX_RPDO
uint16_t RX_IDX_RPDO
Start index in CANrx.
Definition: CANopen.h:368
uint16_t
unsigned int uint16_t
UNSIGNED16 in CANopen (0006h), 16-bit unsigned integer.
Definition: CO_driver.h:153
CO_delete
void CO_delete(CO_t *co)
Delete CANopen object and free memory.
CO_SDOclient.h
CANopen Service Data Object - client protocol.
CO_config_t::ENTRY_H1015
const OD_entry_t * ENTRY_H1015
OD entry for CO_EM_init()
Definition: CANopen.h:245
CO_t::CANmodule
CO_CANmodule_t * CANmodule
One CAN module object, initialised by CO_CANmodule_init()
Definition: CANopen.h:307
CO_config_t::ENTRY_H1600
const OD_entry_t * ENTRY_H1600
OD entry for CO_RPDO_init()
Definition: CANopen.h:268
CO_GFC_t
GFC object.
Definition: CO_GFC.h:60
CO_t::TX_IDX_TPDO
uint16_t TX_IDX_TPDO
Start index in CANtx.
Definition: CANopen.h:375
CO_ReturnError_t
CO_ReturnError_t
Return values of some CANopen functions.
Definition: CO_driver.h:488
CO_HBconsumer.h
CANopen Heartbeat consumer protocol.
CO_config_t::ENTRY_H1800
const OD_entry_t * ENTRY_H1800
OD entry for CO_TPDO_init()
Definition: CANopen.h:271
CO_process_SRDO
void CO_process_SRDO(CO_t *co, uint32_t timeDifference_us, uint32_t *timerNext_us)
Process CANopen SRDO objects.
CO_config_t::CNT_LSS_SLV
uint8_t CNT_LSS_SLV
Number of LSSslave objects, 0 or 1 (CANrx + CANtx).
Definition: CANopen.h:285
CO_config_t::ENTRY_H1007
const OD_entry_t * ENTRY_H1007
OD entry for CO_SYNC_init()
Definition: CANopen.h:263
bool_t
unsigned char bool_t
Boolean data type for general use.
Definition: CO_driver.h:141
CO_config_t::CNT_LEDS
uint8_t CNT_LEDS
Number of LEDs objects, 0 or 1.
Definition: CANopen.h:274
CO_config_t::CNT_SDO_SRV
uint8_t CNT_SDO_SRV
Number of SDO server objects, from 0 to 128 (CANrx + CANtx).
Definition: CANopen.h:249
CO_LSSmaster.h
CANopen Layer Setting Service - master protocol.
CO_t::TX_IDX_SYNC
uint16_t TX_IDX_SYNC
Start index in CANtx.
Definition: CANopen.h:361
CO_NMT_reset_cmd_t
CO_NMT_reset_cmd_t
Return code from CO_NMT_process() that tells application code what to reset.
Definition: CO_NMT_Heartbeat.h:112
CO_config_t::ENTRY_H1016
const OD_entry_t * ENTRY_H1016
OD entry for CO_HBconsumer_init()
Definition: CANopen.h:238
CO_config_t
CANopen configuration, used with CO_new()
Definition: CANopen.h:227
CO_config_t::ENTRY_H1019
const OD_entry_t * ENTRY_H1019
OD entry for CO_SYNC_init()
Definition: CANopen.h:264
CO_t::RX_IDX_TIME
uint16_t RX_IDX_TIME
Start index in CANrx.
Definition: CANopen.h:352
CO_t::GFC
CO_GFC_t * GFC
GFC object, initialised by CO_GFC_init()
Definition: CANopen.h:384
CO_t::RX_IDX_NMT_SLV
uint16_t RX_IDX_NMT_SLV
Start index in CANrx.
Definition: CANopen.h:317
CO_PDO.h
CANopen Process Data Object protocol.
CO_t::RX_IDX_HB_CONS
uint16_t RX_IDX_HB_CONS
Start index in CANrx.
Definition: CANopen.h:325
CO_t::TX_IDX_HB_PROD
uint16_t TX_IDX_HB_PROD
Start index in CANtx.
Definition: CANopen.h:319
CO_NMT_t
NMT consumer and Heartbeat producer object.
Definition: CO_NMT_Heartbeat.h:162
CO_SDOserver.h
CANopen Service Data Object - server protocol.
CO_isLSSslaveEnabled
bool_t CO_isLSSslaveEnabled(CO_t *co)
Test if LSS slave is enabled.
CO_SYNC.h
CANopen Synchronisation protocol.
CO_CANinit
CO_ReturnError_t CO_CANinit(CO_t *co, void *CANptr, uint16_t bitRate)
Initialize CAN driver.
CO_config_t::ENTRY_H1012
const OD_entry_t * ENTRY_H1012
OD entry for CO_TIME_init()
Definition: CANopen.h:257
CO_TIME_t
TIME producer and consumer object.
Definition: CO_TIME.h:99
CO_t::SRDOGuard
CO_SRDOGuard_t * SRDOGuard
SRDO object, initialised by CO_SRDOGuard_init(), single SRDOGuard object is included inside all SRDO ...
Definition: CANopen.h:393
CO_t::NMT
CO_NMT_t * NMT
NMT and heartbeat object, initialised by CO_NMT_init()
Definition: CANopen.h:315
CO_t::RPDO
CO_RPDO_t * RPDO
RPDO objects, initialised by CO_RPDO_init()
Definition: CANopen.h:366
CO_t::CNT_ALL_TX_MSGS
uint16_t CNT_ALL_TX_MSGS
Number of all CAN transmit message objects.
Definition: CANopen.h:312
CO_LSSslave_t
LSS slave object.
Definition: CO_LSSslave.h:90
CO_HBconsumer_t
Heartbeat consumer object.
Definition: CO_HBconsumer.h:138
CO_config_t::CNT_NMT
uint8_t CNT_NMT
Number of NMT objects, 0 or 1: NMT slave (CANrx) + Heartbeat producer (CANtx) + optional NMT master (...
Definition: CANopen.h:232
CO_GFC.h
CANopen Global fail-safe command protocol.
CO_config_t::ENTRY_H1A00
const OD_entry_t * ENTRY_H1A00
OD entry for CO_TPDO_init()
Definition: CANopen.h:272
CO_t::LSSmaster
CO_LSSmaster_t * LSSmaster
LSS master object, initialised by CO_LSSmaster_init().
Definition: CANopen.h:411
CO_TIME.h
CANopen Time-stamp protocol.
CO_config_t::ENTRY_H1200
const OD_entry_t * ENTRY_H1200
OD entry for CO_SDOserver_init()
Definition: CANopen.h:250
CO_LSSmaster_t
LSS master object.
Definition: CO_LSSmaster.h:108
CO_t::TX_IDX_LSS_MST
uint16_t TX_IDX_LSS_MST
Start index in CANtx.
Definition: CANopen.h:414
CO_t::TPDO
CO_TPDO_t * TPDO
TPDO objects, initialised by CO_TPDO_init()
Definition: CANopen.h:373
CO_t::TX_IDX_LSS_SLV
uint16_t TX_IDX_LSS_SLV
Start index in CANtx.
Definition: CANopen.h:406
CO_config_t::ENTRY_H1301
const OD_entry_t * ENTRY_H1301
OD entry for CO_SRDO_init()
Definition: CANopen.h:280
CO_t::trace
CO_trace_t * trace
Trace object, initialised by CO_trace_init().
Definition: CANopen.h:425
CO_t::RX_IDX_SYNC
uint16_t RX_IDX_SYNC
Start index in CANrx.
Definition: CANopen.h:360
CO_t::SYNC
CO_SYNC_t * SYNC
SYNC object, initialised by CO_SYNC_init()
Definition: CANopen.h:358
CO_t::SRDO
CO_SRDO_t * SRDO
SRDO objects, initialised by CO_SRDO_init()
Definition: CANopen.h:395
CO_t::RX_IDX_LSS_SLV
uint16_t RX_IDX_LSS_SLV
Start index in CANrx.
Definition: CANopen.h:405
CO_t::RX_IDX_SRDO
uint16_t RX_IDX_SRDO
Start index in CANrx.
Definition: CANopen.h:397
CO_config_t::ENTRY_H1017
const OD_entry_t * ENTRY_H1017
OD entry for CO_NMT_init()
Definition: CANopen.h:233
CO_config_t::CNT_TRACE
uint16_t CNT_TRACE
Number of trace objects, 0 or more.
Definition: CANopen.h:291
CO_EM_t
Emergency object.
Definition: CO_Emergency.h:369
CO_t::CANrx
CO_CANrx_t * CANrx
CAN receive message objects.
Definition: CANopen.h:308
CO_t::RX_IDX_GFC
uint16_t RX_IDX_GFC
Start index in CANrx.
Definition: CANopen.h:386
CO_config_t::ENTRY_H1280
const OD_entry_t * ENTRY_H1280
OD entry for CO_SDOclient_init()
Definition: CANopen.h:253
CO_NMT_Heartbeat.h
CANopen Network management and Heartbeat producer protocol.
CO_t::RX_IDX_SDO_SRV
uint16_t RX_IDX_SDO_SRV
Start index in CANrx.
Definition: CANopen.h:337
CO_t::CNT_ALL_RX_MSGS
uint16_t CNT_ALL_RX_MSGS
Number of all CAN receive message objects.
Definition: CANopen.h:311
CO_ODinterface.h
CANopen Object Dictionary interface.
CO_process_SYNC
bool_t CO_process_SYNC(CO_t *co, uint32_t timeDifference_us, uint32_t *timerNext_us)
Process CANopen SYNC objects.
CO_config_t::CNT_LSS_MST
uint8_t CNT_LSS_MST
Number of LSSmaster objects, 0 or 1 (CANrx + CANtx).
Definition: CANopen.h:287
CO_Emergency.h
CANopen Emergency protocol.
CO_t::config
CO_config_t * config
Remember the configuration parameters.
Definition: CANopen.h:304
CO_config_t::CNT_TPDO
uint16_t CNT_TPDO
Number of TPDO objects, from 0 to 512 producers (CANtx)
Definition: CANopen.h:270
OD_t
Object Dictionary.
Definition: CO_ODinterface.h:352
CO_t::gtwa
CO_GTWA_t * gtwa
Gateway-ascii object, initialised by CO_GTWA_init().
Definition: CANopen.h:419
CO_CANrx_t
Configuration object for CAN received message for specific CANopenNode Object.
Definition: CO_driver.h:257
CO_t::em
CO_EM_t * em
Emergency object, initialised by CO_EM_init()
Definition: CANopen.h:329
CO_config_t::ENTRY_H1001
const OD_entry_t * ENTRY_H1001
OD entry for CO_EM_init()
Definition: CANopen.h:243
CO_config_t::ENTRY_H1400
const OD_entry_t * ENTRY_H1400
OD entry for CO_RPDO_init()
Definition: CANopen.h:267
CO_config_t::CNT_SDO_CLI
uint8_t CNT_SDO_CLI
Number of SDO client objects, from 0 to 128 (CANrx + CANtx).
Definition: CANopen.h:252
CO_t::TX_IDX_TIME
uint16_t TX_IDX_TIME
Start index in CANtx.
Definition: CANopen.h:353
CO_t::TX_IDX_SDO_CLI
uint16_t TX_IDX_SDO_CLI
Start index in CANtx.
Definition: CANopen.h:345
CO_CANmodule_t
Complete CAN module object.
Definition: CO_driver.h:319
CO_t::TX_IDX_EM_PROD
uint16_t TX_IDX_EM_PROD
Start index in CANtx.
Definition: CANopen.h:332
CO_gateway_ascii.h
CANopen access from other networks - ASCII mapping (CiA 309-3 DS v3.0.0)
CO_SRDO_t
SRDO object.
Definition: CO_SRDO.h:124
CO_config_t::ENTRY_H1300
const OD_entry_t * ENTRY_H1300
OD entry for CO_GFC_init()
Definition: CANopen.h:277
CO_t::RX_IDX_SDO_CLI
uint16_t RX_IDX_SDO_CLI
Start index in CANrx.
Definition: CANopen.h:344
OD_entry_t
Object Dictionary entry for one OD object.
Definition: CO_ODinterface.h:336
CO_SRDOGuard_t
Gurad Object for SRDO monitors:
Definition: CO_SRDO.h:114
CO_t::SDOserver
CO_SDOserver_t * SDOserver
SDO server objects, initialised by CO_SDOserver_init()
Definition: CANopen.h:335
CO_t
CANopen object - collection of all CANopenNode objects.
Definition: CANopen.h:301
CO_SRDO.h
CANopen Safety Related Data Object protocol.
CO_LEDs.h
CANopen Indicator specification (CiA 303-3 v1.4.0)
CO_CANopenInit
CO_ReturnError_t CO_CANopenInit(CO_t *co, CO_NMT_t *NMT, CO_EM_t *em, const OD_t *od, const OD_entry_t *OD_statusBits, CO_NMT_control_t NMTcontrol, uint16_t firstHBTime_ms, uint16_t SDOserverTimeoutTime_ms, uint16_t SDOclientTimeoutTime_ms, bool_t SDOclientBlockTransfer, uint8_t nodeId)
Initialize CANopenNode.
CO_SYNC_t
SYNC producer and consumer object.
Definition: CO_SYNC.h:75
CO_t::LEDs
CO_LEDs_t * LEDs
LEDs object, initialised by CO_LEDs_init()
Definition: CANopen.h:380
CO_t::nodeIdUnconfigured
bool_t nodeIdUnconfigured
True in un-configured LSS slave.
Definition: CANopen.h:302
CO_t::SDOclient
CO_SDOclient_t * SDOclient
SDO client objects, initialised by CO_SDOclient_init()
Definition: CANopen.h:342
CO_config_t::CNT_GTWA
uint8_t CNT_GTWA
Number of gateway ascii objects, 0 or 1.
Definition: CANopen.h:289
CO_t::HBcons
CO_HBconsumer_t * HBcons
Heartbeat consumer object, initialised by CO_HBconsumer_init()
Definition: CANopen.h:323
CO_t::RX_IDX_LSS_MST
uint16_t RX_IDX_LSS_MST
Start index in CANrx.
Definition: CANopen.h:413
CO_NMT_control_t
CO_NMT_control_t
NMT control bitfield for NMT internal state.
Definition: CO_NMT_Heartbeat.h:135
CO_t::TIME
CO_TIME_t * TIME
TIME object, initialised by CO_TIME_init()
Definition: CANopen.h:350
CO_LSS_address_t
The LSS address is a 128 bit number, uniquely identifying each node.
Definition: CO_LSS.h:162
CO_config_t::CNT_SRDO
uint8_t CNT_SRDO
Number of SRDO objects, from 0 to 64 (2*CANrx + 2*CANtx).
Definition: CANopen.h:279
CO_t::LSSslave
CO_LSSslave_t * LSSslave
LSS slave object, initialised by CO_LSSslave_init().
Definition: CANopen.h:403
CO_process_RPDO
void CO_process_RPDO(CO_t *co, bool_t syncWas)
Process CANopen RPDO objects.
CO_LSSslave.h
CANopen Layer Setting Service - slave protocol.
CO_config_t::ENTRY_H1003
const OD_entry_t * ENTRY_H1003
OD entry for CO_EM_init()
Definition: CANopen.h:246
CO_CANtx_t
Configuration object for CAN transmit message for specific CANopenNode Object.
Definition: CO_driver.h:299
CO_TPDO_t
TPDO object.
Definition: CO_PDO.h:220
CO_process_TPDO
void CO_process_TPDO(CO_t *co, bool_t syncWas, uint32_t timeDifference_us, uint32_t *timerNext_us)
Process CANopen TPDO objects.
CO_GTWA_t
CANopen Gateway-ascii object.
Definition: CO_gateway_ascii.h:296
uint8_t
unsigned char uint8_t
UNSIGNED8 in CANopen (0005h), 8-bit unsigned integer.
Definition: CO_driver.h:151
CO_LSSinit
CO_ReturnError_t CO_LSSinit(CO_t *co, CO_LSS_address_t *lssAddress, uint8_t *pendingNodeID, uint16_t *pendingBitRate)
Initialize CANopen LSS slave.
CO_config_t::CNT_RPDO
uint16_t CNT_RPDO
Number of RPDO objects, from 0 to 512 consumers (CANrx)
Definition: CANopen.h:266
CO_config_t::CNT_TIME
uint8_t CNT_TIME
Number of TIME objects, 0 or 1: consumer (CANrx) + optional producer (CANtx), configurable by CO_CONF...
Definition: CANopen.h:256