Lely core libraries
2.3.4
|
Go to the documentation of this file.
23 #ifndef LELY_CO_SYNC_HPP_
24 #define LELY_CO_SYNC_HPP_
26 #if !defined(__cplusplus) || LELY_NO_CXX
27 #error "include <lely/co/sync.h> for the C interface"
46 return __co_sync_alloc();
50 free(
void* ptr) noexcept {
56 return __co_sync_init(p, net, dev);
83 getNet()
const noexcept {
88 getDev()
const noexcept {
104 setInd(F* f) noexcept {
108 template <class C, typename c_mem_fn<co_sync_ind_t*, C>::type M>
110 setInd(C* obj) noexcept {
112 static_cast<void*
>(obj));
127 setErr(F* f) noexcept {
131 template <class C, typename c_mem_fn<co_sync_err_t*, C>::type M>
133 setErr(C* obj) noexcept {
135 static_cast<void*
>(obj));
144 #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...
int co_sync_start(co_sync_t *sync)
Starts a SYNC service.
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.
void co_sync_stop(co_sync_t *sync)
Stops a SYNC 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.