Lely core libraries
2.2.5
|
Go to the documentation of this file.
23 #ifndef LELY_CO_TPDO_HPP_
24 #define LELY_CO_TPDO_HPP_
27 #error "include <lely/co/tpdo.h> for the C interface"
46 return __co_tpdo_alloc();
49 free(
void* ptr) noexcept {
55 return __co_tpdo_init(p, net, dev, num);
73 getNet()
const noexcept {
77 getDev()
const noexcept {
82 getNum()
const noexcept {
87 getCommPar()
const noexcept {
92 getMapPar()
const noexcept {
108 setInd(F* f) noexcept {
112 template <class C, typename c_mem_fn<co_tpdo_ind_t*, C>::type M>
114 setInd(C* obj) noexcept {
116 static_cast<void*
>(obj));
125 sync(co_unsigned8_t cnt) noexcept {
130 getNext(timespec& tp) noexcept {
140 #endif // !LELY_CO_TPDO_HPP_
The base class for a C++ interface to an incomplete C type.
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.
can_net_t * co_tpdo_get_net(const co_tpdo_t *pdo)
Returns a pointer to the CAN network of a Transmit-PDO.
A PDO communication parameter record.
co_unsigned16_t co_tpdo_get_num(const co_tpdo_t *pdo)
Returns the PDO number of a Transmit-PDO.
An opaque CANopen Transmit-PDO service type.
An opaque CAN network interface type.
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.
A class template supplying a uniform interface to certain attributes of C types.
int co_tpdo_sync(co_tpdo_t *pdo, co_unsigned8_t cnt)
Triggers the transmission of a synchronous PDO.
int co_tpdo_event(co_tpdo_t *pdo)
Triggers the transmission of an acyclic or event-driven PDO.
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 error occurs.
A PDO mapping parameter record.
co_dev_t * co_tpdo_get_dev(const co_tpdo_t *pdo)
Returns a pointer to the CANopen device of a Transmit-PDO.
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.
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 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...
An opaque CANopen device type.