23 #ifndef LELY_CO_TIME_HPP_
24 #define LELY_CO_TIME_HPP_
27 #error "include <lely/co/time.h> for the C interface"
46 return __co_time_alloc();
49 free(
void* ptr) noexcept {
55 return __co_time_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_time_ind_t*, C>::type M>
98 setInd(C* obj) noexcept {
100 static_cast<void*
>(obj));
104 start(
const timespec* start = 0,
const timespec* interval = 0) 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 CANopen TIME producer.
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_start(co_time_t *time, const struct timespec *start, const struct timespec *interval)
Starts 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.
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.