Lely core libraries  2.2.5
nmt.h
Go to the documentation of this file.
1 
22 #ifndef LELY_CO_NMT_H_
23 #define LELY_CO_NMT_H_
24 
25 #include <lely/can/net.h>
26 #include <lely/co/type.h>
27 
28 #ifndef LELY_CO_NMT_TIMEOUT
33 #define LELY_CO_NMT_TIMEOUT 100
34 #endif
35 
37 #define CO_NMT_CS_CANID 0x000
38 
40 #define CO_NMT_CS_START 0x01
41 
43 #define CO_NMT_CS_STOP 0x02
44 
46 #define CO_NMT_CS_ENTER_PREOP 0x80
47 
49 #define CO_NMT_CS_RESET_NODE 0x81
50 
52 #define CO_NMT_CS_RESET_COMM 0x82
53 
55 #define CO_NMT_ST_BOOTUP 0x00
56 
58 #define CO_NMT_ST_STOP 0x04
59 
61 #define CO_NMT_ST_START 0x05
62 
64 #define CO_NMT_ST_RESET_NODE 0x06
65 
67 #define CO_NMT_ST_RESET_COMM 0x07
68 
70 #define CO_NMT_ST_PREOP 0x7f
71 
73 #define CO_NMT_ST_TOGGLE 0x80
74 
76 #define CO_NMT_EC_CANID(id) (0x700 + ((id)&0x7f))
77 
78 enum {
83 };
84 
85 enum {
90 };
91 
92 #ifdef __cplusplus
93 extern "C" {
94 #endif
95 
110 typedef void co_nmt_cs_ind_t(co_nmt_t *nmt, co_unsigned8_t cs, void *data);
111 
126 typedef void co_nmt_ng_ind_t(co_nmt_t *nmt, co_unsigned8_t id, int state,
127  int reason, void *data);
128 
139 typedef void co_nmt_lg_ind_t(co_nmt_t *nmt, int state, void *data);
140 
155 typedef void co_nmt_hb_ind_t(co_nmt_t *nmt, co_unsigned8_t id, int state,
156  int reason, void *data);
157 
176 typedef void co_nmt_st_ind_t(co_nmt_t *nmt, co_unsigned8_t id,
177  co_unsigned8_t st, void *data);
178 
188 typedef void co_nmt_lss_req_t(co_nmt_t *nmt, co_lss_t *lss, void *data);
189 
200 typedef void co_nmt_boot_ind_t(co_nmt_t *nmt, co_unsigned8_t id,
201  co_unsigned8_t st, char es, void *data);
202 
214 typedef void co_nmt_cfg_ind_t(
215  co_nmt_t *nmt, co_unsigned8_t id, co_csdo_t *sdo, void *data);
216 
227 typedef void co_nmt_cfg_con_t(co_nmt_t *nmt, co_unsigned8_t id,
228  co_unsigned32_t ac, void *data);
229 
246 typedef void co_nmt_sdo_ind_t(co_nmt_t *nmt, co_unsigned8_t id,
247  co_unsigned16_t idx, co_unsigned8_t subidx, size_t size,
248  size_t nbyte, void *data);
249 
260 typedef void co_nmt_sync_ind_t(co_nmt_t *nmt, co_unsigned8_t cnt, void *data);
261 
273 co_unsigned32_t co_dev_cfg_hb(
274  co_dev_t *dev, co_unsigned8_t id, co_unsigned16_t ms);
275 
277 const char *co_nmt_es2str(char es);
278 
279 void *__co_nmt_alloc(void);
280 void __co_nmt_free(void *ptr);
281 struct __co_nmt *__co_nmt_init(
282  struct __co_nmt *nmt, can_net_t *net, co_dev_t *dev);
283 void __co_nmt_fini(struct __co_nmt *nmt);
284 
297 
299 void co_nmt_destroy(co_nmt_t *nmt);
300 
302 can_net_t *co_nmt_get_net(const co_nmt_t *nmt);
303 
305 co_dev_t *co_nmt_get_dev(const co_nmt_t *nmt);
306 
318 void co_nmt_get_cs_ind(
319  const co_nmt_t *nmt, co_nmt_cs_ind_t **pind, void **pdata);
320 
331 void co_nmt_set_cs_ind(co_nmt_t *nmt, co_nmt_cs_ind_t *ind, void *data);
332 
344 void co_nmt_get_ng_ind(
345  const co_nmt_t *nmt, co_nmt_ng_ind_t **pind, void **pdata);
346 
359 void co_nmt_set_ng_ind(co_nmt_t *nmt, co_nmt_ng_ind_t *ind, void *data);
360 
368 void co_nmt_on_ng(co_nmt_t *nmt, co_unsigned8_t id, int state, int reason);
369 
381 void co_nmt_get_lg_ind(
382  const co_nmt_t *nmt, co_nmt_lg_ind_t **pind, void **pdata);
383 
396 void co_nmt_set_lg_ind(co_nmt_t *nmt, co_nmt_lg_ind_t *ind, void *data);
397 
405 void co_nmt_on_lg(co_nmt_t *nmt, int state);
406 
418 void co_nmt_get_hb_ind(
419  const co_nmt_t *nmt, co_nmt_hb_ind_t **pind, void **pdata);
420 
433 void co_nmt_set_hb_ind(co_nmt_t *nmt, co_nmt_hb_ind_t *ind, void *data);
434 
444 void co_nmt_on_hb(co_nmt_t *nmt, co_unsigned8_t id, int state, int reason);
445 
457 void co_nmt_get_st_ind(
458  const co_nmt_t *nmt, co_nmt_st_ind_t **pind, void **pdata);
459 
472 void co_nmt_set_st_ind(co_nmt_t *nmt, co_nmt_st_ind_t *ind, void *data);
473 
482 void co_nmt_on_st(co_nmt_t *nmt, co_unsigned8_t id, co_unsigned8_t st);
483 
496 void co_nmt_get_lss_req(
497  const co_nmt_t *nmt, co_nmt_lss_req_t **pind, void **pdata);
498 
511 void co_nmt_set_lss_req(co_nmt_t *nmt, co_nmt_lss_req_t *ind, void *data);
512 
526  const co_nmt_t *nmt, co_nmt_boot_ind_t **pind, void **pdata);
527 
539 void co_nmt_set_boot_ind(co_nmt_t *nmt, co_nmt_boot_ind_t *ind, void *data);
540 
553 void co_nmt_get_cfg_ind(
554  const co_nmt_t *nmt, co_nmt_cfg_ind_t **pind, void **pdata);
555 
567 void co_nmt_set_cfg_ind(co_nmt_t *nmt, co_nmt_cfg_ind_t *ind, void *data);
568 
581 void co_nmt_get_dn_ind(
582  const co_nmt_t *nmt, co_nmt_sdo_ind_t **pind, void **pdata);
583 
595 void co_nmt_set_dn_ind(co_nmt_t *nmt, co_nmt_sdo_ind_t *ind, void *data);
596 
609 void co_nmt_get_up_ind(
610  const co_nmt_t *nmt, co_nmt_sdo_ind_t **pind, void **pdata);
611 
623 void co_nmt_set_up_ind(co_nmt_t *nmt, co_nmt_sdo_ind_t *ind, void *data);
624 
638  const co_nmt_t *nmt, co_nmt_sync_ind_t **pind, void **pdata);
639 
651 void co_nmt_set_sync_ind(co_nmt_t *nmt, co_nmt_sync_ind_t *ind, void *data);
652 
662 void co_nmt_on_sync(co_nmt_t *nmt, co_unsigned8_t cnt);
663 
671 void co_nmt_on_err(co_nmt_t *nmt, co_unsigned16_t eec, co_unsigned8_t er,
672  const co_unsigned8_t msef[5]);
673 
687 void co_nmt_on_tpdo_event(co_nmt_t *nmt, co_unsigned16_t n);
688 
696 
702 
704 co_unsigned8_t co_nmt_get_id(const co_nmt_t *nmt);
705 
719 int co_nmt_set_id(co_nmt_t *nmt, co_unsigned8_t id);
720 
726 co_unsigned8_t co_nmt_get_st(const co_nmt_t *nmt);
727 
729 int co_nmt_is_master(const co_nmt_t *nmt);
730 
737 int co_nmt_get_timeout(const co_nmt_t *nmt);
738 
748 void co_nmt_set_timeout(co_nmt_t *nmt, int timeout);
749 
763 int co_nmt_cs_req(co_nmt_t *nmt, co_unsigned8_t cs, co_unsigned8_t id);
764 
773 int co_nmt_lss_con(co_nmt_t *nmt);
774 
786 int co_nmt_boot_req(co_nmt_t *nmt, co_unsigned8_t id, int timeout);
787 
792 int co_nmt_is_booting(const co_nmt_t *nmt, co_unsigned8_t id);
793 
808 int co_nmt_cfg_req(co_nmt_t *nmt, co_unsigned8_t id, int timeout,
809  co_nmt_cfg_con_t *con, void *data);
810 
823 int co_nmt_cfg_res(co_nmt_t *nmt, co_unsigned8_t id, co_unsigned32_t ac);
824 
838 int co_nmt_ng_req(co_nmt_t *nmt, co_unsigned8_t id, co_unsigned16_t gt,
839  co_unsigned8_t ltf);
840 
861 int co_nmt_cs_ind(co_nmt_t *nmt, co_unsigned8_t cs);
862 
868 void co_nmt_comm_err_ind(co_nmt_t *nmt);
869 
881 int co_nmt_node_err_ind(co_nmt_t *nmt, co_unsigned8_t id);
882 
889 co_rpdo_t *co_nmt_get_rpdo(const co_nmt_t *nmt, co_unsigned16_t n);
890 
897 co_tpdo_t *co_nmt_get_tpdo(const co_nmt_t *nmt, co_unsigned16_t n);
898 
905 co_ssdo_t *co_nmt_get_ssdo(const co_nmt_t *nmt, co_unsigned8_t n);
906 
913 co_csdo_t *co_nmt_get_csdo(const co_nmt_t *nmt, co_unsigned8_t n);
914 
916 co_sync_t *co_nmt_get_sync(const co_nmt_t *nmt);
917 
919 co_time_t *co_nmt_get_time(const co_nmt_t *nmt);
920 
922 co_emcy_t *co_nmt_get_emcy(const co_nmt_t *nmt);
923 
925 co_lss_t *co_nmt_get_lss(const co_nmt_t *nmt);
926 
927 #ifdef __cplusplus
928 }
929 #endif
930 
931 #endif // !LELY_CO_NMT_H_
This header file is part of the CAN library; it contains the CAN network interface declarations.
co_tpdo_t * co_nmt_get_tpdo(const co_nmt_t *nmt, co_unsigned16_t n)
Returns a pointer to a Transmit-PDO service.
Definition: nmt.c:1910
void co_nmt_destroy(co_nmt_t *nmt)
Destroys a CANopen NMT master/slave service.
Definition: nmt.c:1068
can_net_t * co_nmt_get_net(const co_nmt_t *nmt)
Returns a pointer to the CAN network of an NMT master/slave service.
Definition: nmt.c:1077
void co_nmt_set_sync_ind(co_nmt_t *nmt, co_nmt_sync_ind_t *ind, void *data)
Sets the indication function invoked by co_nmt_on_sync() after all PDOs have been transmitted/process...
Definition: nmt.c:1377
void co_nmt_get_sync_ind(const co_nmt_t *nmt, co_nmt_sync_ind_t **pind, void **pdata)
Retrieves the indication function invoked by co_nmt_on_sync() after all PDOs have been transmitted/pr...
Definition: nmt.c:1366
co_nmt_t * co_nmt_create(can_net_t *net, co_dev_t *dev)
Creates a new CANopen NMT master/slave service.
Definition: nmt.c:1043
void co_nmt_lss_req_t(co_nmt_t *nmt, co_lss_t *lss, void *data)
The type of a CANopen LSS request function, invoked by an NMT master before booting the slaves (see F...
Definition: nmt.h:188
int co_nmt_cs_ind(co_nmt_t *nmt, co_unsigned8_t cs)
Processes an NMT command from the master or the application.
Definition: nmt.c:1822
void co_nmt_on_sync(co_nmt_t *nmt, co_unsigned8_t cnt)
Implements the default behavior after a SYNC object is received or transmitted.
Definition: nmt.c:1386
void co_nmt_get_cs_ind(const co_nmt_t *nmt, co_nmt_cs_ind_t **pind, void **pdata)
Retrieves the indication function invoked when an NMT command is received.
Definition: nmt.c:1093
void co_nmt_get_up_ind(const co_nmt_t *nmt, co_nmt_sdo_ind_t **pind, void **pdata)
Retrieves the indication function used to notify the user of the progress of the current SDO upload r...
Definition: nmt.c:1344
void co_nmt_lg_ind_t(co_nmt_t *nmt, int state, void *data)
The type of a CANopen NMT life guarding indication function, invoked when a life guarding event occur...
Definition: nmt.h:139
void co_nmt_set_cfg_ind(co_nmt_t *nmt, co_nmt_cfg_ind_t *ind, void *data)
Sets the indication function invoked when a CANopen NMT 'configuration request' process is received.
Definition: nmt.c:1315
void co_nmt_get_st_ind(const co_nmt_t *nmt, co_nmt_st_ind_t **pind, void **pdata)
Retrieves the indication function invoked when a state change is detected.
Definition: nmt.c:1218
void co_nmt_get_lss_req(const co_nmt_t *nmt, co_nmt_lss_req_t **pind, void **pdata)
Retrieves the request function invoked to perform LSS when booting an NMT master.
Definition: nmt.c:1262
co_dev_t * co_nmt_get_dev(const co_nmt_t *nmt)
Returns a pointer to the CANopen device of an NMT master/slave service.
Definition: nmt.c:1085
void co_nmt_set_up_ind(co_nmt_t *nmt, co_nmt_sdo_ind_t *ind, void *data)
Sets the indication function used to notify the user of the progress of the current SDO upload reques...
Definition: nmt.c:1355
void co_nmt_on_lg(co_nmt_t *nmt, int state)
Implements the default behavior when a life guarding event occurs (see section 7.2....
Definition: nmt.c:1170
void co_nmt_on_st(co_nmt_t *nmt, co_unsigned8_t id, co_unsigned8_t st)
Implements the default behavior when a state change is detected by the node guarding or heartbeat pro...
Definition: nmt.c:1238
void co_nmt_get_dn_ind(const co_nmt_t *nmt, co_nmt_sdo_ind_t **pind, void **pdata)
Retrieves the indication function used to notify the user of the progress of the current SDO download...
Definition: nmt.c:1324
co_ssdo_t * co_nmt_get_ssdo(const co_nmt_t *nmt, co_unsigned8_t n)
Returns a pointer to a Server-SDO service.
Definition: nmt.c:1921
void co_nmt_set_hb_ind(co_nmt_t *nmt, co_nmt_hb_ind_t *ind, void *data)
Sets the indication function invoked when a heartbeat event occurs.
Definition: nmt.c:1190
void co_nmt_ng_ind_t(co_nmt_t *nmt, co_unsigned8_t id, int state, int reason, void *data)
The type of a CANopen NMT node guarding indication function, invoked when a node guarding event occur...
Definition: nmt.h:126
void co_nmt_get_ng_ind(const co_nmt_t *nmt, co_nmt_ng_ind_t **pind, void **pdata)
Retrieves the indication function invoked when a node guarding event occurs.
Definition: nmt.c:1115
void co_nmt_on_tpdo_event(co_nmt_t *nmt, co_unsigned16_t n)
Implements the default behavior when an event is indicated for an event-driven (asynchronous) Transmi...
Definition: nmt.c:1435
void co_nmt_get_boot_ind(const co_nmt_t *nmt, co_nmt_boot_ind_t **pind, void **pdata)
Retrieves the indication function invoked when a CANopen NMT 'boot slave' process completes.
Definition: nmt.c:1284
void co_nmt_set_lss_req(co_nmt_t *nmt, co_nmt_lss_req_t *ind, void *data)
Sets the request function invoked to perform LSS when booting an NMT master.
Definition: nmt.c:1273
int co_nmt_get_timeout(const co_nmt_t *nmt)
Returns the default SDO timeout used during the NMT 'boot slave' and 'check configuration' processes.
Definition: nmt.c:1553
void co_nmt_st_ind_t(co_nmt_t *nmt, co_unsigned8_t id, co_unsigned8_t st, void *data)
The type of a CANopen NMT state change indication function, invoked when a state change is detected b...
Definition: nmt.h:176
co_rpdo_t * co_nmt_get_rpdo(const co_nmt_t *nmt, co_unsigned16_t n)
Returns a pointer to a Receive-PDO service.
Definition: nmt.c:1899
void co_nmt_on_tpdo_event_lock(co_nmt_t *nmt)
Postpones the transmission of PDOs triggered by co_nmt_on_tpdo_event() until a matching call to co_nm...
Definition: nmt.c:1466
void co_nmt_on_err(co_nmt_t *nmt, co_unsigned16_t eec, co_unsigned8_t er, const co_unsigned8_t msef[5])
Implements the default error handling behavior by generating an EMCY message with co_emcy_push() and ...
Definition: nmt.c:1412
int co_nmt_cfg_req(co_nmt_t *nmt, co_unsigned8_t id, int timeout, co_nmt_cfg_con_t *con, void *data)
Issues the NMT 'configuration request' for the specified node.
Definition: nmt.c:1701
void co_nmt_on_tpdo_event_unlock(co_nmt_t *nmt)
Undoes the effect of a single call to co_nmt_on_tpdo_event_lock() and possibly triggers the transmiss...
Definition: nmt.c:1474
co_unsigned8_t co_nmt_get_id(const co_nmt_t *nmt)
Returns the pending node-ID.
Definition: nmt.c:1506
void co_nmt_get_lg_ind(const co_nmt_t *nmt, co_nmt_lg_ind_t **pind, void **pdata)
Retrieves the indication function invoked when a life guarding event occurs.
Definition: nmt.c:1150
void co_nmt_set_boot_ind(co_nmt_t *nmt, co_nmt_boot_ind_t *ind, void *data)
Sets the indication function invoked when a CANopen NMT 'boot slave' process completes.
Definition: nmt.c:1295
int co_nmt_is_booting(const co_nmt_t *nmt, co_unsigned8_t id)
Returns 1 if the NMT 'boot slave' process is currently running for the specified node,...
Definition: nmt.c:1687
void co_nmt_cfg_ind_t(co_nmt_t *nmt, co_unsigned8_t id, co_csdo_t *sdo, void *data)
The type of a CANopen NMT 'update configuration' indication function, invoked when a configuration re...
Definition: nmt.h:214
void co_nmt_on_hb(co_nmt_t *nmt, co_unsigned8_t id, int state, int reason)
Implements the default behavior when a heartbeat event occurs (see sections 7.2.8....
Definition: nmt.c:1199
void co_nmt_get_cfg_ind(const co_nmt_t *nmt, co_nmt_cfg_ind_t **pind, void **pdata)
Retrieves the indication function invoked when a CANopen NMT 'configuration request' is received.
Definition: nmt.c:1304
int co_nmt_boot_req(co_nmt_t *nmt, co_unsigned8_t id, int timeout)
Requests the NMT 'boot slave' process for the specified node.
Definition: nmt.c:1632
@ CO_NMT_EC_STATE
An NMT error control state change event.
Definition: nmt.h:89
@ CO_NMT_EC_TIMEOUT
An NMT error control timeout event.
Definition: nmt.h:87
void co_nmt_boot_ind_t(co_nmt_t *nmt, co_unsigned8_t id, co_unsigned8_t st, char es, void *data)
The type of a CANopen NMT 'boot slave' indication function, invoked when the 'boot slave' process com...
Definition: nmt.h:200
void co_nmt_sync_ind_t(co_nmt_t *nmt, co_unsigned8_t cnt, void *data)
The type of a SYNC indication function, invoked by co_nmt_on_sync() after PDOs are transmitted/proces...
Definition: nmt.h:260
co_csdo_t * co_nmt_get_csdo(const co_nmt_t *nmt, co_unsigned8_t n)
Returns a pointer to a Client-SDO service.
Definition: nmt.c:1932
void co_nmt_hb_ind_t(co_nmt_t *nmt, co_unsigned8_t id, int state, int reason, void *data)
The type of a CANopen NMT heartbeat indication function, invoked when a heartbeat event occurs (see s...
Definition: nmt.h:155
void co_nmt_cs_ind_t(co_nmt_t *nmt, co_unsigned8_t cs, void *data)
The type of a CANopen NMT command indication function, invoked when an NMT command is received (and a...
Definition: nmt.h:110
void co_nmt_set_lg_ind(co_nmt_t *nmt, co_nmt_lg_ind_t *ind, void *data)
Sets the indication function invoked when a life guarding event occurs.
Definition: nmt.c:1161
co_unsigned8_t co_nmt_get_st(const co_nmt_t *nmt)
Returns the current state of a CANopen NMT service (one of CO_NMT_ST_BOOTUP, CO_NMT_ST_STOP,...
Definition: nmt.c:1529
int co_nmt_cfg_res(co_nmt_t *nmt, co_unsigned8_t id, co_unsigned32_t ac)
Indicates the result of the 'update configuration' step of an NMT 'request configuration' request for...
Definition: nmt.c:1759
void co_nmt_set_timeout(co_nmt_t *nmt, int timeout)
Sets the default SDO timeout used during the NMT 'boot slave' and 'check configuration' processes.
Definition: nmt.c:1561
co_sync_t * co_nmt_get_sync(const co_nmt_t *nmt)
Returns a pointer to the SYNC producer/consumer service.
Definition: nmt.c:1943
int co_nmt_node_err_ind(co_nmt_t *nmt, co_unsigned8_t id)
Indicates the occurrence of an error event and triggers the error handling process (see Fig.
Definition: nmt.c:1856
co_emcy_t * co_nmt_get_emcy(const co_nmt_t *nmt)
Returns a pointer to the EMCY producer/consumer service.
Definition: nmt.c:1959
int co_nmt_ng_req(co_nmt_t *nmt, co_unsigned8_t id, co_unsigned16_t gt, co_unsigned8_t ltf)
Request the node guarding service for the specified node, even if it is not in the network list.
Definition: nmt.c:1777
co_unsigned32_t co_dev_cfg_hb(co_dev_t *dev, co_unsigned8_t id, co_unsigned16_t ms)
Configures heartbeat consumption for the specified node by updating CANopen object 1016 (Consumer hea...
Definition: nmt.c:661
void co_nmt_set_ng_ind(co_nmt_t *nmt, co_nmt_ng_ind_t *ind, void *data)
Sets the indication function invoked when a node guarding event occurs.
Definition: nmt.c:1126
co_lss_t * co_nmt_get_lss(const co_nmt_t *nmt)
Returns a pointer to the LSS master/slave service.
Definition: nmt.c:1967
void co_nmt_set_dn_ind(co_nmt_t *nmt, co_nmt_sdo_ind_t *ind, void *data)
Sets the indication function used to notify the user of the progress of the current SDO download requ...
Definition: nmt.c:1335
void co_nmt_comm_err_ind(co_nmt_t *nmt)
Indicates the occurrence of a communication error and invokes the specified error behavior (object 10...
Definition: nmt.c:1840
int co_nmt_cs_req(co_nmt_t *nmt, co_unsigned8_t cs, co_unsigned8_t id)
Submits an NMT request to a slave.
Definition: nmt.c:1569
void co_nmt_set_cs_ind(co_nmt_t *nmt, co_nmt_cs_ind_t *ind, void *data)
Sets the indication function invoked when an NMT command is received.
Definition: nmt.c:1104
int co_nmt_set_id(co_nmt_t *nmt, co_unsigned8_t id)
Sets the pending node-ID.
Definition: nmt.c:1514
void co_nmt_on_ng(co_nmt_t *nmt, co_unsigned8_t id, int state, int reason)
Implements the default behavior when a node guarding event occurs (see sections 7....
Definition: nmt.c:1135
const char * co_nmt_es2str(char es)
Returns a pointer to a string describing an NMT boot error status.
Definition: nmt.c:703
int co_nmt_is_master(const co_nmt_t *nmt)
Returns 1 if the specified CANopen NMT service is a master, and 0 if not.
Definition: nmt.c:1537
void co_nmt_get_hb_ind(const co_nmt_t *nmt, co_nmt_hb_ind_t **pind, void **pdata)
Retrieves the indication function invoked when a heartbeat event occurs.
Definition: nmt.c:1179
@ CO_NMT_EC_OCCURRED
An NMT error control event occurred.
Definition: nmt.h:80
@ CO_NMT_EC_RESOLVED
An NMT error control event was resolved.
Definition: nmt.h:82
void co_nmt_set_st_ind(co_nmt_t *nmt, co_nmt_st_ind_t *ind, void *data)
Sets the indication function invoked when a state change is detected.
Definition: nmt.c:1229
int co_nmt_lss_con(co_nmt_t *nmt)
Confirms the completion of the process when booting an NMT master.
Definition: nmt.c:1616
void co_nmt_sdo_ind_t(co_nmt_t *nmt, co_unsigned8_t id, co_unsigned16_t idx, co_unsigned8_t subidx, size_t size, size_t nbyte, void *data)
The type of an SDO request progress indication function, invoked by a CANopen NMT master to notify th...
Definition: nmt.h:246
void co_nmt_cfg_con_t(co_nmt_t *nmt, co_unsigned8_t id, co_unsigned32_t ac, void *data)
The type of a CANopen NMT 'configuration request' confirmation callback function, invoked when a conf...
Definition: nmt.h:227
co_time_t * co_nmt_get_time(const co_nmt_t *nmt)
Returns a pointer to the TIME producer/consumer service.
Definition: nmt.c:1951
A CAN network interface.
Definition: net.c:37
A CANopen Client-SDO.
Definition: csdo.c:45
A CANopen device.
Definition: dev.c:41
A CANopen EMCY producer/consumer service.
Definition: emcy.c:83
A CANopen LSS master/slave service.
Definition: lss.c:44
A CANopen NMT master/slave service.
Definition: nmt.c:104
int timeout
The default SDO timeout (in milliseconds) used during the NMT 'boot slave' and 'check configuration' ...
Definition: nmt.c:198
co_dev_t * dev
A pointer to a CANopen device.
Definition: nmt.c:108
co_unsigned16_t gt
The guard time (in milliseconds).
Definition: nmt.c:148
can_net_t * net
A pointer to a CAN network interface.
Definition: nmt.c:106
co_unsigned8_t ltf
The lifetime factor.
Definition: nmt.c:150
co_nmt_state_t * state
The current state.
Definition: nmt.c:118
co_unsigned8_t st
The state of the NMT service (including the toggle bit).
Definition: nmt.c:146
A CANopen Receive-PDO.
Definition: rpdo.c:41
A CANopen Server-SDO.
Definition: ssdo.c:43
A CANopen SYNC producer/consumer service.
Definition: sync.c:40
A CANopen TIME producer/consumer service.
Definition: time.c:41
A CANopen Transmit-PDO.
Definition: tpdo.c:40
This header file is part of the CANopen library; it contains the CANopen type definitions.