23 #ifndef LELY_CO_TIME_HPP_
24 #define LELY_CO_TIME_HPP_
26 #if !defined(__cplusplus) || LELY_NO_CXX
27 #error "include <lely/co/time.h> for the C interface"
46 return __co_time_alloc();
50 free(
void* ptr) noexcept {
56 return __co_time_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_time_ind_t*, C>::type M>
110 setInd(C* obj) noexcept {
112 static_cast<void*
>(obj));
116 startProd(
const timespec* start = 0,
const timespec* interval = 0) noexcept {
121 stopProd() noexcept {
An opaque CAN network interface type.
An opaque CANopen device type.
An opaque CANopen TIME producer/consumer service type.
The base class for a C++ interface to an incomplete C type.
This header file is part of the CANopen library; it contains the time stamp (TIME) object declaration...
void co_time_stop(co_time_t *time)
Stops a TIME service.
void co_time_set_ind(co_time_t *time, co_time_ind_t *ind, void *data)
Sets the indication function invoked when a CANopen time stamp is received.
void co_time_stop_prod(co_time_t *time)
Stops a CANopen TIME producer.
co_dev_t * co_time_get_dev(const co_time_t *time)
Returns a pointer to the CANopen device of a TIME producer/consumer service.
int co_time_start(co_time_t *time)
Starts a TIME service.
void co_time_start_prod(co_time_t *time, const struct timespec *start, const struct timespec *interval)
Starts a CANopen TIME producer.
void co_time_get_ind(const co_time_t *time, co_time_ind_t **pind, void **pdata)
Retrieves the indication function invoked when a CANopen time stamp is received.
can_net_t * co_time_get_net(const co_time_t *time)
Returns a pointer to the CAN network of a TIME producer/consumer service.
void co_time_ind_t(co_time_t *time, const struct timespec *tp, void *data)
The type of a CANopen TIME indication function, invoked when a time stamp is received.
This header file is part of the CAN library; it contains the C++ interface of the CAN network interfa...
A CANopen TIME producer/consumer service.
A class template supplying a uniform interface to certain attributes of C types.