Lely core libraries  2.2.5
nmt_srv.h
Go to the documentation of this file.
1 
23 #ifndef LELY_CO_INTERN_NMT_SRV_H_
24 #define LELY_CO_INTERN_NMT_SRV_H_
25 
26 #include "co.h"
27 #include <lely/co/nmt.h>
28 
30 struct co_nmt_srv {
38  int set;
42  co_unsigned16_t nrpdo;
46  co_unsigned16_t ntpdo;
50  co_unsigned8_t nssdo;
54  co_unsigned8_t ncsdo;
63 };
64 
66 #define CO_NMT_SRV_PDO 0x01
67 
69 #define CO_NMT_SRV_SDO 0x02
70 
72 #define CO_NMT_SRV_SYNC 0x04
73 
75 #define CO_NMT_SRV_TIME 0x08
76 
78 #define CO_NMT_SRV_EMCY 0x10
79 
81 #define CO_NMT_SRV_LSS 0x20
82 
83 #ifdef __cplusplus
84 extern "C" {
85 #endif
86 
88 void co_nmt_srv_init(struct co_nmt_srv *srv, co_nmt_t *nmt);
89 
91 void co_nmt_srv_fini(struct co_nmt_srv *srv);
92 
103 void co_nmt_srv_set(struct co_nmt_srv *srv, co_nmt_t *nmt, int set);
104 
105 #ifdef __cplusplus
106 }
107 #endif
108 
109 #endif // !LELY_CO_INTERN_NMT_SRV_H_
This header file is part of the CANopen library; it contains the network management (NMT) declaration...
void co_nmt_srv_set(struct co_nmt_srv *srv, co_nmt_t *nmt, int set)
Enables/disables the specified CANopen services.
Definition: nmt_srv.c:152
void co_nmt_srv_fini(struct co_nmt_srv *srv)
Finalizes a CANopen NMT service manager.
Definition: nmt_srv.c:144
void co_nmt_srv_init(struct co_nmt_srv *srv, co_nmt_t *nmt)
Initializes a CANopen NMT service manager.
Definition: nmt_srv.c:117
This is the internal header file of the CANopen library.
A CANopen Client-SDO.
Definition: csdo.c:45
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
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
A CANopen NMT service manager.
Definition: nmt_srv.h:30
co_tpdo_t ** tpdos
An array of pointers to the Transmit-PDO services.
Definition: nmt_srv.h:44
co_unsigned16_t ntpdo
The number of Transmit-PDO services.
Definition: nmt_srv.h:46
co_lss_t * lss
A pointer to the LSS master/slave service.
Definition: nmt_srv.h:62
co_ssdo_t ** ssdos
An array of pointers to the Server-SDO services.
Definition: nmt_srv.h:48
int set
The currently enabled CANopen services (any combination of CO_NMT_SRV_PDO, CO_NMT_SRV_SDO,...
Definition: nmt_srv.h:38
co_rpdo_t ** rpdos
An array of pointers to the Receive-PDO services.
Definition: nmt_srv.h:40
co_unsigned8_t ncsdo
The number of Client-SDO services.
Definition: nmt_srv.h:54
co_unsigned8_t nssdo
The number of Server-SDO services.
Definition: nmt_srv.h:50
co_nmt_t * nmt
A pointer to the NMT master/slave service.
Definition: nmt_srv.h:32
co_time_t * time
A pointer to the TIME producer/consumer service.
Definition: nmt_srv.h:58
co_csdo_t ** csdos
An array of pointers to the Client-SDO services.
Definition: nmt_srv.h:52
co_emcy_t * emcy
A pointer to the EMCY producer/consumer service.
Definition: nmt_srv.h:60
co_unsigned16_t nrpdo
The number of Receive-PDO services.
Definition: nmt_srv.h:42
co_sync_t * sync
A pointer to the SYNC producer/consumer service.
Definition: nmt_srv.h:56