23 #ifndef LELY_CO_TPDO_HPP_
24 #define LELY_CO_TPDO_HPP_
26 #if !defined(__cplusplus) || LELY_NO_CXX
27 #error "include <lely/co/tpdo.h> for the C interface"
46 return __co_tpdo_alloc();
50 free(
void* ptr) noexcept {
56 return __co_tpdo_init(p, net, dev, num);
84 getNet()
const noexcept {
89 getDev()
const noexcept {
94 getNum()
const noexcept {
99 getCommPar()
const noexcept {
104 getMapPar()
const noexcept {
120 setInd(F* f) noexcept {
124 template <class C, typename c_mem_fn<co_tpdo_ind_t*, C>::type M>
126 setInd(C* obj) noexcept {
128 static_cast<void*
>(obj));
137 sync(co_unsigned8_t cnt) noexcept {
142 getNext(timespec& tp) noexcept {
An opaque CAN network interface type.
An opaque CANopen device type.
An opaque CANopen Transmit-PDO 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 PDO communication parameter record.
A PDO mapping parameter record.
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 Transmit-PDO declarations.
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_event(co_tpdo_t *pdo)
Triggers the transmission of an acyclic or event-driven PDO.
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_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...
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.
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.