Lely core libraries
2.2.5
|
Go to the documentation of this file.
23 #ifndef LELY_CO_SYNC_HPP_
24 #define LELY_CO_SYNC_HPP_
27 #error "include <lely/co/sync.h> for the C interface"
46 return __co_sync_alloc();
49 free(
void* ptr) noexcept {
55 return __co_sync_init(p, net, dev);
72 getNet()
const noexcept {
76 getDev()
const noexcept {
92 setInd(F* f) noexcept {
96 template <class C, typename c_mem_fn<co_sync_ind_t*, C>::type M>
98 setInd(C* obj) noexcept {
100 static_cast<void*
>(obj));
115 setErr(F* f) noexcept {
119 template <class C, typename c_mem_fn<co_sync_err_t*, C>::type M>
121 setErr(C* obj) noexcept {
123 static_cast<void*
>(obj));
132 #endif // !LELY_CO_SYNC_HPP_
The base class for a C++ interface to an incomplete C type.
void co_sync_set_err(co_sync_t *sync, co_sync_err_t *err, void *data)
Sets the error handling function of a SYNC consumer service.
void co_sync_ind_t(co_sync_t *sync, co_unsigned8_t cnt, void *data)
The type of a CANopen SYNC indication function, invoked after a SYNC message is received or transmitt...
void co_sync_get_err(const co_sync_t *sync, co_sync_err_t **perr, void **pdata)
Retrieves the error handling function of a SYNC consumer service.
An opaque CANopen SYNC producer/consumer service type.
An opaque CAN network interface type.
A class template supplying a uniform interface to certain attributes of C types.
void co_sync_get_ind(const co_sync_t *sync, co_sync_ind_t **pind, void **pdata)
Retrieves the indication function invoked after a CANopen SYNC message is received or transmitted.
void co_sync_err_t(co_sync_t *sync, co_unsigned16_t eec, co_unsigned8_t er, void *data)
The type of a CANopen SYNC error handling function, invoked when the SYNC data length does not match.
co_dev_t * co_sync_get_dev(const co_sync_t *sync)
Returns a pointer to the CANopen device of a SYNC producer/consumer service.
can_net_t * co_sync_get_net(const co_sync_t *sync)
Returns a pointer to the CAN network of a SYNC producer/consumer service.
A CANopen SYNC producer/consumer service.
An opaque CANopen device type.
void co_sync_set_ind(co_sync_t *sync, co_sync_ind_t *ind, void *data)
Sets the indication function invoked after a CANopen SYNC message is received or transmitted.