Lely core libraries  2.3.4
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_
co_nmt_cfg_destroy
void co_nmt_cfg_destroy(co_nmt_cfg_t *boot)
Destroys a CANopen NMT 'configuration request'.
Definition: nmt_cfg.c:426
__co_nmt_cfg::ac
co_unsigned32_t ac
The SDO abort code.
Definition: nmt_cfg.c:76
co_nmt_cfg_cfg_res
int co_nmt_cfg_cfg_res(co_nmt_cfg_t *cfg, co_unsigned32_t ac)
Indicates the result of the 'update configuration' step of an NMT 'configuration request'.
Definition: nmt_cfg.c:466
co_csdo_ind_t
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
__co_nmt_cfg::nmt
co_nmt_t * nmt
A pointer to an NMT master service.
Definition: nmt_cfg.c:62
co_nmt_cfg_cfg_req
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 'configuration request'.
Definition: nmt_cfg.c:435
co.h
co_nmt_cfg_ind
void co_nmt_cfg_ind(co_nmt_t *nmt, co_unsigned8_t id, co_csdo_t *sdo)
The CANopen NMT 'update configuration' indication function, invoked when a configuration request is r...
Definition: nmt.c:2375
__co_nmt_cfg::sdo
co_csdo_t * sdo
A pointer to the Client-SDO used to access slave objects.
Definition: nmt_cfg.c:74
__co_nmt
A CANopen NMT master/slave service.
Definition: nmt.c:148
nmt.h
co_nmt_cfg_con
void co_nmt_cfg_con(co_nmt_t *nmt, co_unsigned8_t id, co_unsigned32_t ac)
The CANopen NMT 'configuration request' confirmation function, invoked when a configuration request c...
Definition: nmt.c:2389
__co_dev
A CANopen device.
Definition: dev.h:30
__co_csdo
A CANopen Client-SDO.
Definition: csdo.c:71
co_nmt_cfg_create
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 'configuration request'.
Definition: nmt_cfg.c:401
csdo.h
__co_nmt_cfg::net
can_net_t * net
A pointer to a CAN network interface.
Definition: nmt_cfg.c:58
__co_nmt_cfg::dev
co_dev_t * dev
A pointer to a CANopen device.
Definition: nmt_cfg.c:60
__can_net
A CAN network interface.
Definition: net.c:37
__co_nmt_cfg
A CANopen NMT 'configuration request' service.
Definition: nmt_cfg.c:56