Lely core libraries  2.2.5
nmt_cfg.h
Go to the documentation of this file.
1 
24 #ifndef LELY_CO_INTERN_NMT_CFG_H_
25 #define LELY_CO_INTERN_NMT_CFG_H_
26 
27 #include "co.h"
28 #include <lely/co/csdo.h>
29 #include <lely/co/nmt.h>
30 
31 struct __co_nmt_cfg;
32 #ifndef __cplusplus
33 typedef struct __co_nmt_cfg co_nmt_cfg_t;
35 #endif
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
49 void co_nmt_cfg_ind(co_nmt_t *nmt, co_unsigned8_t id, co_csdo_t *sdo);
50 
59 void co_nmt_cfg_con(co_nmt_t *nmt, co_unsigned8_t id, co_unsigned32_t ac);
60 
61 void *__co_nmt_cfg_alloc(void);
62 void __co_nmt_cfg_free(void *ptr);
63 struct __co_nmt_cfg *__co_nmt_cfg_init(struct __co_nmt_cfg *boot,
65 void __co_nmt_cfg_fini(struct __co_nmt_cfg *boot);
66 
80 
83 
101 int co_nmt_cfg_cfg_req(co_nmt_cfg_t *cfg, co_unsigned8_t id, int timeout,
102  co_csdo_ind_t *dn_ind, co_csdo_ind_t *up_ind, void *data);
103 
114 int co_nmt_cfg_cfg_res(co_nmt_cfg_t *cfg, co_unsigned32_t ac);
115 
116 #ifdef __cplusplus
117 }
118 #endif
119 
120 #endif // !LELY_CO_INTERN_NMT_CFG_H_
A CAN network interface.
Definition: net.c:37
void co_nmt_cfg_ind(co_nmt_t *nmt, co_unsigned8_t id, co_csdo_t *sdo)
The CANopen NMT &#39;update configuration&#39; indication function, invoked when a configuration request is r...
Definition: nmt.c:2049
This header file is part of the CANopen library; it contains the Client-SDO declarations.
int co_nmt_cfg_cfg_res(co_nmt_cfg_t *cfg, co_unsigned32_t ac)
Indicates the result of the &#39;update configuration&#39; step of an NMT &#39;configuration request&#39;.
Definition: nmt_cfg.c:453
co_unsigned32_t ac
The SDO abort code.
Definition: nmt_cfg.c:72
This is the internal header file of the CANopen library.
A CANopen Client-SDO.
Definition: csdo.c:45
A CANopen NMT master/slave service.
Definition: nmt.c:104
co_dev_t * dev
A pointer to a CANopen device.
Definition: nmt_cfg.c:56
A CANopen NMT &#39;configuration request&#39; service.
Definition: nmt_cfg.c:52
void co_csdo_ind_t(const co_csdo_t *sdo, co_unsigned16_t idx, co_unsigned8_t subidx, size_t size, size_t nbyte, void *data)
The type of a CANopen Client-SDO request progress indication function, used to notify the user of the...
Definition: csdo.h:79
A CANopen device.
Definition: dev.c:41
co_nmt_cfg_t * co_nmt_cfg_create(can_net_t *net, co_dev_t *dev, co_nmt_t *nmt)
Creates a new CANopen NMT &#39;configuration request&#39;.
Definition: nmt_cfg.c:388
co_nmt_t * nmt
A pointer to an NMT master service.
Definition: nmt_cfg.c:58
can_net_t * net
A pointer to a CAN network interface.
Definition: nmt_cfg.c:54
co_csdo_t * sdo
A pointer to the Client-SDO used to access slave objects.
Definition: nmt_cfg.c:70
This header file is part of the CANopen library; it contains the network management (NMT) declaration...
void co_nmt_cfg_destroy(co_nmt_cfg_t *boot)
Destroys a CANopen NMT &#39;configuration request&#39;.
Definition: nmt_cfg.c:413
void co_nmt_cfg_con(co_nmt_t *nmt, co_unsigned8_t id, co_unsigned32_t ac)
The CANopen NMT &#39;configuration request&#39; confirmation function, invoked when a configuration request c...
Definition: nmt.c:2063
int co_nmt_cfg_cfg_req(co_nmt_cfg_t *cfg, co_unsigned8_t id, int timeout, co_csdo_ind_t *dn_ind, co_csdo_ind_t *up_ind, void *data)
Starts a CANopen NMT &#39;configuration request&#39;.
Definition: nmt_cfg.c:422