23#ifndef LELY_CO_WTM_HPP_
24#define LELY_CO_WTM_HPP_
26#if !defined(__cplusplus) || LELY_NO_CXX
27#error "include <lely/co/wtm.h> for the C interface"
54 return __co_wtm_alloc();
57 free(
void* ptr)
noexcept {
63 return __co_wtm_init(p);
79 getNIF()
const noexcept {
113 setDiagCANCon(
F* f)
noexcept {
115 static_cast<void*
>(f));
120 setDiagCANCon(
C* obj)
noexcept {
122 static_cast<void*
>(obj));
137 setDiagWTMCon(
F* f)
noexcept {
139 static_cast<void*
>(f));
144 setDiagWTMCon(
C* obj)
noexcept {
146 static_cast<void*
>(obj));
161 setDiagCANInd(
F* f)
noexcept {
163 static_cast<void*
>(f));
168 setDiagCANInd(
C* obj)
noexcept {
170 static_cast<void*
>(obj));
185 setDiagWTMInd(
F* f)
noexcept {
187 static_cast<void*
>(f));
192 setDiagWTMInd(
C* obj)
noexcept {
194 static_cast<void*
>(obj));
209 setDiagACInd(
F* f)
noexcept {
211 static_cast<void*
>(f));
216 setDiagACInd(
C* obj)
noexcept {
218 static_cast<void*
>(obj));
222 recv(
const void* buf,
size_t nbytes)
noexcept {
238 setRecvFunc(
F* f)
noexcept {
240 static_cast<void*
>(f));
245 setRecvFunc(
C* obj)
noexcept {
247 static_cast<void*
>(obj));
266 sendAlive()
noexcept {
312 setSendFunc(
F* f)
noexcept {
314 static_cast<void*
>(f));
319 setSendFunc(
C* obj)
noexcept {
321 static_cast<void*
>(obj));
This header file is part of the utilities library; it contains the C callback wrapper declarations.
This header file is part of the utilities library; it contains the C to C++ interface declarations.
An opaque CANopen Wireless Transmission Media (WTM) interface type.
The base class for a C++ interface to an incomplete C type.
A CANopen Wireless Transmission Media (WTM) interface.
A CAN or CAN FD format frame.
A class template supplying a uniform interface to certain attributes of C types.
A time type with nanosecond resolution.
This header file is part of the CANopen library; it contains the Wireless Transmission Media (WTM) de...
void co_wtm_diag_can_con_t(co_wtm_t *wtm, uint_least8_t nif, uint_least8_t st, uint_least8_t err, uint_least8_t load, uint_least16_t ec, uint_least16_t foc, uint_least16_t coc, void *data)
The type of a CANopen WTM diagnostic confirmation function, invoked when a CAN communication quality ...
void co_wtm_get_diag_ac_ind(const co_wtm_t *wtm, co_wtm_diag_ac_ind_t **pind, void **pdata)
Retrieves the indication function invoked when an abort code is generated or received by a CANopen WT...
int co_wtm_set_diag_wtm(co_wtm_t *wtm, uint_least8_t quality)
Sets the diagnostic parameters of a WTM interface.
int co_wtm_send_diag_wtm_rst(co_wtm_t *wtm, uint_least8_t nif)
Sends a WTM communication quality reset message.
void co_wtm_get_diag_can_ind(const co_wtm_t *wtm, co_wtm_diag_can_ind_t **pcon, void **pdata)
Retrieves the indication function invoked when a CAN communication quality reset message is received ...
void co_wtm_diag_can_ind_t(co_wtm_t *wtm, uint_least8_t nif, void *data)
The type of a CANopen WTM diagnostic indication function, invoked when a CAN communication quality re...
void co_wtm_set_diag_wtm_ind(co_wtm_t *wtm, co_wtm_diag_wtm_ind_t *con, void *data)
Sets the indication function invoked when a WTM communication quality reset message is received by a ...
void co_wtm_diag_wtm_ind_t(co_wtm_t *wtm, void *data)
The type of a CANopen WTM diagnostic indication function, invoked when a WTM communication quality re...
int co_wtm_get_time(const co_wtm_t *wtm, uint_least8_t nif, struct timespec *tp)
Retrieves the current time of a CANopen WTM interface.
int co_wtm_send_alive(co_wtm_t *wtm)
Sends a keep-alive message from a CANopen WTM interface.
void co_wtm_get_diag_wtm_con(const co_wtm_t *wtm, co_wtm_diag_wtm_con_t **pcon, void **pdata)
Retrieves the confirmation function invoked when a WTM communication quality response is received by ...
int co_wtm_send_func_t(co_wtm_t *wtm, const void *buf, size_t nbytes, void *data)
The type of a CANopen WTM send callback function, invoked when a byte stream needs to be sent.
void co_wtm_get_diag_wtm_ind(const co_wtm_t *wtm, co_wtm_diag_wtm_ind_t **pcon, void **pdata)
Retrieves the indication function invoked when a WTM communication quality reset message is received ...
int co_wtm_send_diag_ac(co_wtm_t *wtm, uint_least32_t ac)
Sends a diagnostic abort message from a CANopen WTM interface.
void co_wtm_set_diag_can_ind(co_wtm_t *wtm, co_wtm_diag_can_ind_t *con, void *data)
Sets the indication function invoked when a CAN communication quality reset message is received by a ...
int co_wtm_send_diag_can_req(co_wtm_t *wtm, uint_least8_t nif)
Sends a CAN communication quality request.
void co_wtm_set_diag_ac_ind(co_wtm_t *wtm, co_wtm_diag_ac_ind_t *ind, void *data)
Sets the indication function invoked when an abort code is generated or received by a CANopen WTM int...
void co_wtm_set_recv_func(co_wtm_t *wtm, co_wtm_recv_func_t *func, void *data)
Sets the callback function invoked when a CAN frame is received by a CANopen WTM interface.
void co_wtm_set_send_func(co_wtm_t *wtm, co_wtm_send_func_t *func, void *data)
Sets the callback function used to send byte streams from a CANopen WTM interface.
void co_wtm_recv(co_wtm_t *wtm, const void *buf, size_t nbytes)
Receives and processes a byte stream with a CANopen WTM interface.
void co_wtm_get_diag_can_con(const co_wtm_t *wtm, co_wtm_diag_can_con_t **pcon, void **pdata)
Retrieves the confirmation function invoked when a CAN communication quality response is received by ...
void co_wtm_get_recv_func(const co_wtm_t *wtm, co_wtm_recv_func_t **pfunc, void **pdata)
Retrieves the callback function invoked when a CAN frame is received by a CANopen WTM interface.
int co_wtm_send(co_wtm_t *wtm, uint_least8_t nif, const struct can_msg *msg)
Sends a CAN frame from a CANopen WTM interface.
int co_wtm_send_diag_wtm_req(co_wtm_t *wtm, uint_least8_t nif)
Sends a WTM communication quality request.
int co_wtm_send_diag_can_rst(co_wtm_t *wtm, uint_least8_t nif)
Sends a CAN communication quality reset message.
int co_wtm_flush(co_wtm_t *wtm)
Flushes the current send buffer of a CANopen WTM interface.
void co_wtm_diag_ac_ind_t(co_wtm_t *wtm, uint_least32_t ac, void *data)
The type of a CANopen WTM diagnostic indication function, invoked when an abort code is generated or ...
void co_wtm_set_diag_can_con(co_wtm_t *wtm, co_wtm_diag_can_con_t *con, void *data)
Sets the confirmation function invoked when a CAN communication quality response is received by a CAN...
void co_wtm_get_send_func(const co_wtm_t *wtm, co_wtm_send_func_t **pfunc, void **pdata)
Retrieves the callback function used to send byte streams from a CANopen WTM interface.
int co_wtm_recv_func_t(co_wtm_t *wtm, uint_least8_t nif, const struct timespec *tp, const struct can_msg *msg, void *data)
The type of a CANopen WTM receive callback function, invoked when a CAN frame is received.
int co_wtm_set_diag_can(co_wtm_t *wtm, uint_least8_t nif, uint_least8_t st, uint_least8_t err, uint_least8_t load, uint_least16_t ec, uint_least16_t foc, uint_least16_t coc)
Sets the diagnostic parameters of a CAN interface.
uint_least8_t co_wtm_get_nif(const co_wtm_t *wtm)
Returns the interface indicator of a CANopen WTM interface.
void co_wtm_diag_wtm_con_t(co_wtm_t *wtm, uint_least8_t nif, uint_least8_t quality, void *data)
The type of a CANopen WTM diagnostic confirmation function, invoked when a WTM communication quality ...
int co_wtm_set_nif(co_wtm_t *wtm, uint_least8_t nif)
Sets the interface indicator of a CANopen WTM interface.
int co_wtm_set_time(co_wtm_t *wtm, uint_least8_t nif, const struct timespec *tp)
Sets the current time of a CANopen WTM interface.
void co_wtm_set_diag_wtm_con(co_wtm_t *wtm, co_wtm_diag_wtm_con_t *con, void *data)
Sets the confirmation function invoked when a WTM communication quality response is received by a CAN...
lely::COWTM co_wtm_t
An opaque CANopen Wireless Transmission Media (WTM) interface type.