CANopenNode
CANopen.h
Go to the documentation of this file.
1 
28 #ifndef CANopen_H
29 #define CANopen_H
30 
31 #include "301/CO_driver.h"
32 #include "301/CO_ODinterface.h"
33 #include "301/CO_NMT_Heartbeat.h"
34 
35 #if ((CO_CONFIG_HB_CONS) & CO_CONFIG_HB_CONS_ENABLE) || defined CO_DOXYGEN
36 #include "301/CO_HBconsumer.h"
37 #endif
38 
39 #include "301/CO_Emergency.h"
40 #include "301/CO_SDOserver.h"
41 
42 #if ((CO_CONFIG_SDO_CLI) & CO_CONFIG_SDO_CLI_ENABLE) || defined CO_DOXYGEN
43 #include "301/CO_SDOclient.h"
44 #endif
45 
46 #if ((CO_CONFIG_SYNC) & CO_CONFIG_SYNC_ENABLE) || defined CO_DOXYGEN
47 #include "301/CO_SYNC.h"
48 #endif
49 
50 #if ((CO_CONFIG_PDO) & (CO_CONFIG_RPDO_ENABLE | CO_CONFIG_TPDO_ENABLE)) || defined CO_DOXYGEN
51 #include "301/CO_PDO.h"
52 #endif
53 
54 #if ((CO_CONFIG_TIME) & CO_CONFIG_TIME_ENABLE) || defined CO_DOXYGEN
55 #include "301/CO_TIME.h"
56 #endif
57 
58 #if ((CO_CONFIG_LEDS) & CO_CONFIG_LEDS_ENABLE) || defined CO_DOXYGEN
59 #include "303/CO_LEDs.h"
60 #endif
61 
62 #if ((CO_CONFIG_GFC) & CO_CONFIG_GFC_ENABLE) || defined CO_DOXYGEN
63 #include "304/CO_GFC.h"
64 #endif
65 
66 #if ((CO_CONFIG_SRDO) & CO_CONFIG_SRDO_ENABLE) || defined CO_DOXYGEN
67 #include "304/CO_SRDO.h"
68 #endif
69 
70 #if ((CO_CONFIG_LSS) & CO_CONFIG_LSS_SLAVE) || defined CO_DOXYGEN
71 #include "305/CO_LSSslave.h"
72 #endif
73 
74 #if ((CO_CONFIG_LSS) & CO_CONFIG_LSS_MASTER) || defined CO_DOXYGEN
75 #include "305/CO_LSSmaster.h"
76 #endif
77 
78 #if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII) || defined CO_DOXYGEN
79 #include "309/CO_gateway_ascii.h"
80 #endif
81 
82 #if ((CO_CONFIG_TRACE) & CO_CONFIG_TRACE_ENABLE) || defined CO_DOXYGEN
83 #include "extra/CO_trace.h"
84 #endif
85 
86 
87 #ifdef __cplusplus
88 extern "C" {
89 #endif
90 
206 #ifdef CO_DOXYGEN
207 #define CO_MULTIPLE_OD
208 #endif
209 
215 #ifdef CO_DOXYGEN
216 #define CO_USE_GLOBALS
217 #endif
218 
219 
220 #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
221 
227 typedef struct {
292 } CO_config_t;
293 #else
294 typedef void CO_config_t;
295 #endif /* CO_MULTIPLE_OD */
296 
297 
301 typedef struct {
303  #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
305  #endif
306 
310  #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
313  #endif
314 
316  #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
320  #endif
321 #if ((CO_CONFIG_HB_CONS) & CO_CONFIG_HB_CONS_ENABLE) || defined CO_DOXYGEN
322 
324  #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
326  #endif
327 #endif
328 
330  #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
333  #endif
334 
336  #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
339  #endif
340 #if ((CO_CONFIG_SDO_CLI) & CO_CONFIG_SDO_CLI_ENABLE) || defined CO_DOXYGEN
341 
343  #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
346  #endif
347 #endif
348 #if ((CO_CONFIG_TIME) & CO_CONFIG_TIME_ENABLE) || defined CO_DOXYGEN
349 
351  #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
354  #endif
355 #endif
356 #if ((CO_CONFIG_SYNC) & CO_CONFIG_SYNC_ENABLE) || defined CO_DOXYGEN
357 
359  #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
362  #endif
363 #endif
364 #if ((CO_CONFIG_PDO) & CO_CONFIG_RPDO_ENABLE) || defined CO_DOXYGEN
365 
367  #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
369  #endif
370 #endif
371 #if ((CO_CONFIG_PDO) & CO_CONFIG_TPDO_ENABLE) || defined CO_DOXYGEN
372 
374  #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
376  #endif
377 #endif
378 #if ((CO_CONFIG_LEDS) & CO_CONFIG_LEDS_ENABLE) || defined CO_DOXYGEN
379 
381 #endif
382 #if ((CO_CONFIG_GFC) & CO_CONFIG_GFC_ENABLE) || defined CO_DOXYGEN
383 
385  #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
388  #endif
389 #endif
390 #if ((CO_CONFIG_SRDO) & CO_CONFIG_SRDO_ENABLE) || defined CO_DOXYGEN
391 
396  #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
399  #endif
400 #endif
401 #if ((CO_CONFIG_LSS) & CO_CONFIG_LSS_SLAVE) || defined CO_DOXYGEN
402 
404  #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
407  #endif
408 #endif
409 #if ((CO_CONFIG_LSS) & CO_CONFIG_LSS_MASTER) || defined CO_DOXYGEN
410 
412  #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
415  #endif
416 #endif
417 #if ((CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII) || defined CO_DOXYGEN
418 
420  #if defined CO_MULTIPLE_OD || defined CO_DOXYGEN
421  #endif
422 #endif
423 #if ((CO_CONFIG_TRACE) & CO_CONFIG_TRACE_ENABLE) || defined CO_DOXYGEN
424 
426 #endif
427 } CO_t;
428 
429 
449 CO_t *CO_new(CO_config_t *config, uint32_t *heapMemoryUsed);
450 
451 
457 void CO_delete(CO_t *co);
458 
459 
468 
469 
481 CO_ReturnError_t CO_CANinit(CO_t *co, void *CANptr, uint16_t bitRate);
482 
483 
484 #if ((CO_CONFIG_LSS) & CO_CONFIG_LSS_SLAVE) || defined CO_DOXYGEN
485 
500  CO_LSS_address_t *lssAddress,
501  uint8_t *pendingNodeID,
502  uint16_t *pendingBitRate);
503 #endif
504 
505 
535  CO_NMT_t *NMT,
536  CO_EM_t *em,
537  const OD_t *od,
538  const OD_entry_t *OD_statusBits,
539  CO_NMT_control_t NMTcontrol,
540  uint16_t firstHBTime_ms,
541  uint16_t SDOserverTimeoutTime_ms,
542  uint16_t SDOclientTimeoutTime_ms,
543  bool_t SDOclientBlockTransfer,
544  uint8_t nodeId);
545 
546 
570  bool_t enableGateway,
571  uint32_t timeDifference_us,
572  uint32_t *timerNext_us);
573 
574 
575 #if ((CO_CONFIG_SYNC) & CO_CONFIG_SYNC_ENABLE) || defined CO_DOXYGEN
576 
591  uint32_t timeDifference_us,
592  uint32_t *timerNext_us);
593 #endif
594 
595 
596 #if ((CO_CONFIG_PDO) & CO_CONFIG_RPDO_ENABLE) || defined CO_DOXYGEN
597 
608 void CO_process_RPDO(CO_t *co, bool_t syncWas);
609 #endif
610 
611 
612 #if ((CO_CONFIG_PDO) & CO_CONFIG_TPDO_ENABLE) || defined CO_DOXYGEN
613 
627 void CO_process_TPDO(CO_t *co,
628  bool_t syncWas,
629  uint32_t timeDifference_us,
630  uint32_t *timerNext_us);
631 #endif
632 
633 
634 #if ((CO_CONFIG_SRDO) & CO_CONFIG_SRDO_ENABLE) || defined CO_DOXYGEN
635 
647 void CO_process_SRDO(CO_t *co,
648  uint32_t timeDifference_us,
649  uint32_t *timerNext_us);
650 #endif
651  /* CO_CANopen */
653 
654 #ifdef __cplusplus
655 }
656 #endif /* __cplusplus */
657 
658 #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