Lely core libraries
2.2.5
|
Go to the documentation of this file.
22 #ifndef LELY_CO_GW_HPP_
23 #define LELY_CO_GW_HPP_
26 #error "include <lely/co/gw.h> for the C interface"
52 return __co_gw_alloc();
55 free(
void* ptr) noexcept {
61 return __co_gw_init(p);
77 initNet(co_unsigned16_t
id,
CONMT* nmt) noexcept {
82 finiNet(co_unsigned16_t
id) noexcept {
103 setSendFunc(F* f) noexcept {
105 static_cast<void*
>(f));
108 template <class C, typename c_mem_fn<co_gw_send_func_t*, C>::type M>
110 setSendFunc(C* obj) noexcept {
112 static_cast<void*
>(obj));
127 setRateFunc(F* f) noexcept {
129 static_cast<void*
>(f));
132 template <class C, typename c_mem_fn<co_gw_rate_func_t*, C>::type M>
134 setRateFunc(C* obj) noexcept {
136 static_cast<void*
>(obj));
145 #endif // !LELY_CO_GW_HPP_
The base class for a C++ interface to an incomplete C type.
void co_gw_rate_func_t(co_unsigned16_t net, co_unsigned16_t rate, void *data)
The type of a CANopen gateway 'set bit timing' function, invoked when a baudrate switch is needed aft...
The common parameters of a CANopen gateway request.
void co_gw_set_rate_func(co_gw_t *gw, co_gw_rate_func_t *func, void *data)
Sets the callback function invoked when a baudrate switch is needed after an 'Initialize gateway' com...
int co_gw_send_func_t(const struct co_gw_srv *srv, void *data)
The type of a CANopen gateway send callback function, invoked by a gateway when an indication or conf...
An opaque CANopen NMT master/slave service type.
int co_gw_init_net(co_gw_t *gw, co_unsigned16_t id, co_nmt_t *nmt)
Registers a CANopen network with a gateway.
int co_gw_recv(co_gw_t *gw, const struct co_gw_req *req)
Receives and processes a request with a CANopen gateway.
lely::COGW co_gw_t
An opaque CANopen gateway type.
int co_gw_fini_net(co_gw_t *gw, co_unsigned16_t id)
Unregisters a CANopen network with a gateway.
A class template supplying a uniform interface to certain attributes of C types.
void co_gw_set_send_func(co_gw_t *gw, co_gw_send_func_t *func, void *data)
Sets the callback function used to send indications and confirmations from a CANopen gateway.
void co_gw_get_send_func(const co_gw_t *gw, co_gw_send_func_t **pfunc, void **pdata)
Retrieves the callback function used to send indications and confirmations from a CANopen gateway.
An opaque CANopen gateway type.
void co_gw_get_rate_func(const co_gw_t *gw, co_gw_rate_func_t **pfunc, void **pdata)
Retrieves the callback function invoked when a baudrate switch is needed after an 'Initialize gateway...