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 {
110 setInd(
C* obj)
noexcept {
112 static_cast<void*
>(obj));
127 setErr(
F* f)
noexcept {
133 setErr(
C* obj)
noexcept {
135 static_cast<void*
>(obj));
An opaque CAN network interface type.
An opaque CANopen device type.
An opaque CANopen SYNC producer/consumer service type.
The base class for a C++ interface to an incomplete C type.
This header file is part of the CAN library; it contains the C++ interface of the CAN network interfa...
A CANopen SYNC producer/consumer service.
A class template supplying a uniform interface to certain attributes of C types.
This header file is part of the CANopen library; it contains the synchronization (SYNC) object declar...
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.
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.
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_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.
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_stop(co_sync_t *sync)
Stops a SYNC service.
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.
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.