22#ifndef LELY_CO_TPDO_H_
23#define LELY_CO_TPDO_H_
47 size_t n,
void *data);
62void *__co_tpdo_alloc(
void);
63void __co_tpdo_free(
void *ptr);
66void __co_tpdo_fini(
struct __co_tpdo *pdo);
250 co_unsigned8_t subidx,
const co_unsigned8_t data[4]);
265 co_tpdo_t *pdo, co_unsigned16_t idx, co_unsigned8_t subidx);
This header file is part of the CAN library; it contains the CAN network interface declarations.
This header file is part of the CANopen library; it contains the Process Data Object (PDO) declaratio...
co_unsigned16_t num
The PDO number.
co_dev_t * dev
A pointer to a CANopen device.
can_net_t * net
A pointer to a CAN network interface.
A PDO communication parameter record.
A PDO mapping parameter record.
A time type with nanosecond resolution.
int co_tpdo_sample_ind_t(co_tpdo_t *pdo, void *data)
The type of a CANopen Transmit-PDO sampling indication function, invoked when the device starts sampl...
int co_tpdo_is_stopped(const co_tpdo_t *pdo)
Retuns 1 if the specified Transmit-PDO service is stopped, and 0 if not.
can_net_t * co_tpdo_get_net(const co_tpdo_t *pdo)
Returns a pointer to the CAN network of a Transmit-PDO.
void co_tpdo_set_sample_ind(co_tpdo_t *pdo, co_tpdo_sample_ind_t *ind, void *data)
Sets the indication function invoked when a Transmit-PDO starts sampling after the reception of a SYN...
int co_tpdo_event(co_tpdo_t *pdo)
Triggers the transmission of an acyclic or event-driven PDO.
void co_tpdo_get_sample_ind(const co_tpdo_t *pdo, co_tpdo_sample_ind_t **pind, void **pdata)
Retrieves the indication function invoked when a Transmit-PDO starts sampling after the reception of ...
int co_sam_mpdo_event(co_tpdo_t *pdo, co_unsigned16_t idx, co_unsigned8_t subidx)
Triggers the transmission of a DAM-MPDO.
void co_tpdo_destroy(co_tpdo_t *pdo)
Destroys a CANopen Transmit-PDO service.
const struct co_pdo_map_par * co_tpdo_get_map_par(const co_tpdo_t *pdo)
Returns a pointer to the PDO mapping parameter record of a Transmit-PDO.
int co_tpdo_sample_res(co_tpdo_t *pdo, co_unsigned32_t ac)
Indicates the result of the sampling step after the reception of a SYNC event.
const struct co_pdo_comm_par * co_tpdo_get_comm_par(const co_tpdo_t *pdo)
Returns a pointer to the PDO communication parameter record of a Transmit-PDO.
co_tpdo_t * co_tpdo_create(can_net_t *net, co_dev_t *dev, co_unsigned16_t num)
Creates a new CANopen Transmit-PDO service.
void co_tpdo_get_next(const co_tpdo_t *pdo, struct timespec *tp)
Retrieves the time at which the next event-driven TPDO may be sent.
void co_tpdo_get_ind(const co_tpdo_t *pdo, co_tpdo_ind_t **pind, void **pdata)
Retrieves the indication function invoked when a Transmit-PDO is sent or an error occurs.
void co_tpdo_ind_t(co_tpdo_t *pdo, co_unsigned32_t ac, const void *ptr, size_t n, void *data)
The type of a CANopen Transmit-PDO indication function, invoked when a PDO is sent or an error occurs...
int co_dam_mpdo_event(co_tpdo_t *pdo, co_unsigned8_t id, co_unsigned16_t idx, co_unsigned8_t subidx, const co_unsigned8_t data[4])
Triggers the transmission of a DAM-MPDO.
void co_tpdo_set_ind(co_tpdo_t *pdo, co_tpdo_ind_t *ind, void *data)
Sets the indication function invoked when a Transmit-PDO is sent or an error occurs.
int co_tpdo_start(co_tpdo_t *pdo)
Starts a Transmit-PDO service.
int co_tpdo_sync(co_tpdo_t *pdo, co_unsigned8_t cnt)
Triggers the transmission of a synchronous PDO.
co_dev_t * co_tpdo_get_dev(const co_tpdo_t *pdo)
Returns a pointer to the CANopen device of a Transmit-PDO.
void co_tpdo_stop(co_tpdo_t *pdo)
Stops a Transmit-PDO service.
co_unsigned16_t co_tpdo_get_num(const co_tpdo_t *pdo)
Returns the PDO number of a Transmit-PDO.