Lely core libraries
2.2.5
|
Go to the documentation of this file.
22 #ifndef LELY_CO_TIME_H_
23 #define LELY_CO_TIME_H_
29 #define CO_TIME_COBID_CONSUMER UINT32_C(0x80000000)
32 #define CO_TIME_COBID_PRODUCER UINT32_C(0x40000000)
38 #define CO_TIME_COBID_FRAME UINT32_C(0x20000000)
53 co_time_t *time,
const struct timespec *tp,
void *data);
83 void *__co_time_alloc(
void);
84 void __co_time_free(
void *ptr);
87 void __co_time_fini(
struct __co_time *time);
154 const struct timespec *interval);
163 #endif // !LELY_CO_TIME_H_
void co_time_of_day_get(const co_time_of_day_t *tod, struct timespec *tp)
Loads the absolute time from a CANopen TIME_OF_DAY value.
void co_time_diff_set(co_time_diff_t *td, const struct timespec *tp)
Stores a time difference into a CANopen TIME_DIFFERENCE value.
A CANopen TIME producer/consumer 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.
can_net_t * net
A pointer to a CAN network interface.
void co_time_stop(co_time_t *time)
Stops a CANopen TIME producer.
void co_time_destroy(co_time_t *time)
Destroys a CANopen TIME producer/consumer service.
void * data
A pointer to user-specified data for ind.
co_dev_t * dev
A pointer to a CANopen device.
void co_time_of_day_set(co_time_of_day_t *tod, const struct timespec *tp)
Stores the absolute time into a CANopen TIME_OF_DAY value.
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_diff_get(const co_time_diff_t *td, struct timespec *tp)
Loads a time difference from a CANopen TIME_DIFFERENCE value.
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.
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.
co_time_ind_t * ind
A pointer to the indication function.
co_time_t * co_time_create(can_net_t *net, co_dev_t *dev)
Creates a new CANopen TIME producer/consumer service.
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.
struct timespec start
The creation time of the service.
void co_time_start(co_time_t *time, const struct timespec *start, const struct timespec *interval)
Starts a CANopen TIME producer.