Lely core libraries  2.2.5
wtm.c File Reference
#include "co.h"
#include <lely/can/err.h>
#include <lely/co/crc.h>
#include <lely/co/wtm.h>
#include <lely/util/diag.h>
#include <lely/util/endian.h>
#include <lely/util/time.h>
#include <assert.h>
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for wtm.c:

Go to the source code of this file.

Data Structures

struct  co_wtm_can
 A CANopen WTM CAN interface. More...
 
struct  __co_wtm
 A CANopen Wireless Transmission Media (WTM) interface. More...
 

Macros

#define CO_WTM_MAX_NIF   127
 The maximum value of a CAN/WTM interface indicator.
 

Functions

static int co_wtm_send_diag_can_res (co_wtm_t *wtm, uint_least8_t nif)
 Sends a communication quality response for a CAN interface.
 
static int co_wtm_send_diag_wtm_res (co_wtm_t *wtm)
 Sends a communication quality response for a WTM interface.
 
static void co_wtm_diag_ac (co_wtm_t *wtm, uint_least32_t ac)
 Invokes the diagnostic indication function.
 
static void default_wtm_diag_ac_ind (co_wtm_t *wtm, uint_least32_t ac, void *data)
 The default diagnostic indication function. More...
 
static uint_least32_t co_wtm_recv_can (co_wtm_t *wtm, const void *buf, size_t nbytes)
 Processes a generic frame containing CAN messages. More...
 
const char * co_wtm_ac_str (uint_least32_t ac)
 Returns a string describing a CANopen WTM abort code.
 
co_wtm_tco_wtm_create (void)
 Creates a new CANopen Wireless Transmission Media (WTM) interface. More...
 
void co_wtm_destroy (co_wtm_t *wtm)
 Destroys a CANopen Wireless Transmission Media (WTM) interface. More...
 
uint_least8_t co_wtm_get_nif (const co_wtm_t *wtm)
 Returns the interface indicator of a CANopen WTM interface. More...
 
int co_wtm_set_nif (co_wtm_t *wtm, uint_least8_t nif)
 Sets the interface indicator of a CANopen WTM interface. More...
 
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. More...
 
int co_wtm_set_diag_wtm (co_wtm_t *wtm, uint_least8_t quality)
 Sets the diagnostic parameters of a WTM interface. More...
 
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 a CANopen WTM interface. More...
 
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 CANopen WTM interface. More...
 
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 a CANopen WTM interface. More...
 
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 CANopen WTM interface. More...
 
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 by a CANopen WTM interface. More...
 
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 CANopen WTM interface. More...
 
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 by a CANopen WTM interface. More...
 
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 CANopen WTM interface. More...
 
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 WTM interface. More...
 
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 interface. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
int co_wtm_send_alive (co_wtm_t *wtm)
 Sends a keep-alive message from a CANopen WTM interface. More...
 
int co_wtm_send_diag_can_req (co_wtm_t *wtm, uint_least8_t nif)
 Sends a CAN communication quality request. More...
 
int co_wtm_send_diag_wtm_req (co_wtm_t *wtm, uint_least8_t nif)
 Sends a WTM communication quality request. More...
 
int co_wtm_send_diag_can_rst (co_wtm_t *wtm, uint_least8_t nif)
 Sends a CAN communication quality reset message. More...
 
int co_wtm_send_diag_wtm_rst (co_wtm_t *wtm, uint_least8_t nif)
 Sends a WTM communication quality reset message. More...
 
int co_wtm_send_diag_ac (co_wtm_t *wtm, uint_least32_t ac)
 Sends a diagnostic abort message from a CANopen WTM interface. More...
 
int co_wtm_flush (co_wtm_t *wtm)
 Flushes the current send buffer of a CANopen WTM interface. More...
 
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. More...
 
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. More...
 

Detailed Description

This file is part of the CANopen library; it contains the implementation of the Wireless Transmission Media (WTM) functions.

See also
lely/co/wtm.h
Author
J. S. Seldenthuis jseld.nosp@m.enth.nosp@m.uis@l.nosp@m.ely..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file wtm.c.

Function Documentation

◆ default_wtm_diag_ac_ind()

static void default_wtm_diag_ac_ind ( co_wtm_t wtm,
uint_least32_t  ac,
void *  data 
)
static

The default diagnostic indication function.

See also
co_wtm_diag_ac_ind_t

Definition at line 1117 of file wtm.c.

◆ co_wtm_recv_can()

static uint_least32_t co_wtm_recv_can ( co_wtm_t wtm,
const void *  buf,
size_t  nbytes 
)
static

Processes a generic frame containing CAN messages.

Parameters
wtma pointer to a CANopen WTM interface.
bufa pointer to the payload of the generic frame.
nbytesthe number of bytes at buf.
Returns
0 on success, or a WTM abort code on error.

Definition at line 1127 of file wtm.c.

◆ co_wtm_create()

co_wtm_t* co_wtm_create ( void  )

Creates a new CANopen Wireless Transmission Media (WTM) interface.

Returns
a pointer to a new WTM interface, or NULL on error. In the latter case, the error number can be obtained with get_errc().
See also
co_wtm_destroy()

Definition at line 290 of file wtm.c.

◆ co_wtm_destroy()

void co_wtm_destroy ( co_wtm_t wtm)

Destroys a CANopen Wireless Transmission Media (WTM) interface.

See also
co_wtm_create()

Definition at line 315 of file wtm.c.

◆ co_wtm_get_nif()

uint_least8_t co_wtm_get_nif ( const co_wtm_t wtm)

Returns the interface indicator of a CANopen WTM interface.

See also
co_wtm_set_nif()

Definition at line 324 of file wtm.c.

◆ co_wtm_set_nif()

int co_wtm_set_nif ( co_wtm_t wtm,
uint_least8_t  nif 
)

Sets the interface indicator of a CANopen WTM interface.

Parameters
wtma pointer to a CANopen WTM interface.
nifthe WTM interface indicator (in the range [1..127]).
Returns
0 on success, or -1 on error. In the latter case, the error number can be obtained with get_errc().
See also
co_wtm_get_nif()

Definition at line 332 of file wtm.c.

◆ co_wtm_set_diag_can()

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.

Parameters
wtma pointer to a CANopen WTM interface.
nifthe local CAN interface indicator (in the range [1..127]).
stThe current CAN controller status (one of CAN_STATE_ACTIVE, CAN_STATE_PASSIVE or CAN_STATE_BUSOFF, or 0xf if the information is not available).
errthe last detected error (0 if no error was detected, one of CAN_ERROR_BIT, CAN_ERROR_STUFF, CAN_ERROR_CRC, CAN_ERROR_FORM or CAN_ERROR_ACK in case of an error, or 0xf if the information is not available).
loadthe current busload percentage (in the range [0..100], or 0xff if the information is not available).
ecthe number of detected errors that led to the increase of one of the CAN controller internal error counters (in the range [0..0xfffe], or 0xffff if the information is not available).
focthe FIFO overrun counter (in the range [0..0xfffe], or 0xffff if the information is not available).
cocthe CAN controller overrun counter (in the range [0..0xfffe], or 0xffff if the information is not available).
Returns
0 on success, or -1 on error. In the latter case, the error number can be obtained with get_errc().

Definition at line 347 of file wtm.c.

◆ co_wtm_set_diag_wtm()

int co_wtm_set_diag_wtm ( co_wtm_t wtm,
uint_least8_t  quality 
)

Sets the diagnostic parameters of a WTM interface.

Parameters
wtma pointer to a CANopen WTM interface.
qualitythe link quality percentage (in the range [0..100], or 0xff if the information is not available).
Returns
0 on success, or -1 on error. In the latter case, the error number can be obtained with get_errc().

Definition at line 398 of file wtm.c.

◆ co_wtm_get_diag_can_con()

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 a CANopen WTM interface.

Parameters
wtma pointer to a CANopen WTM interface.
pconthe address at which to store a pointer to the confirmation function (can be NULL).
pdatathe address at which to store a pointer to user-specified data (can be NULL).
See also
co_wtm_set_diag_can_con()

Definition at line 413 of file wtm.c.

◆ co_wtm_set_diag_can_con()

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 CANopen WTM interface.

Parameters
wtma pointer to a CANopen WTM interface.
cona pointer to the function to be invoked.
dataa pointer to user-specified data (can be NULL). data is passed as the last parameter to con.
See also
co_wtm_get_diag_can_con()

Definition at line 425 of file wtm.c.

◆ co_wtm_get_diag_wtm_con()

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 a CANopen WTM interface.

Parameters
wtma pointer to a CANopen WTM interface.
pconthe address at which to store a pointer to the confirmation function (can be NULL).
pdatathe address at which to store a pointer to user-specified data (can be NULL).
See also
co_wtm_set_diag_wtm_con()

Definition at line 434 of file wtm.c.

◆ co_wtm_set_diag_wtm_con()

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 CANopen WTM interface.

Parameters
wtma pointer to a CANopen WTM interface.
cona pointer to the function to be invoked.
dataa pointer to user-specified data (can be NULL). data is passed as the last parameter to con.
See also
co_wtm_get_diag_wtm_con()

Definition at line 446 of file wtm.c.

◆ co_wtm_get_diag_can_ind()

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 by a CANopen WTM interface.

Parameters
wtma pointer to a CANopen WTM interface.
pconthe address at which to store a pointer to the indication function (can be NULL).
pdatathe address at which to store a pointer to user-specified data (can be NULL).
See also
co_wtm_set_diag_can_ind()

Definition at line 455 of file wtm.c.

◆ co_wtm_set_diag_can_ind()

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 CANopen WTM interface.

Parameters
wtma pointer to a CANopen WTM interface.
cona pointer to the function to be invoked.
dataa pointer to user-specified data (can be NULL). data is passed as the last parameter to con.
See also
co_wtm_get_diag_can_ind()

Definition at line 467 of file wtm.c.

◆ co_wtm_get_diag_wtm_ind()

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 by a CANopen WTM interface.

Parameters
wtma pointer to a CANopen WTM interface.
pconthe address at which to store a pointer to the indication function (can be NULL).
pdatathe address at which to store a pointer to user-specified data (can be NULL).
See also
co_wtm_set_diag_wtm_ind()

Definition at line 476 of file wtm.c.

◆ co_wtm_set_diag_wtm_ind()

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 CANopen WTM interface.

Parameters
wtma pointer to a CANopen WTM interface.
cona pointer to the function to be invoked.
dataa pointer to user-specified data (can be NULL). data is passed as the last parameter to con.
See also
co_wtm_get_diag_wtm_ind()

Definition at line 488 of file wtm.c.

◆ co_wtm_get_diag_ac_ind()

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 WTM interface.

Parameters
wtma pointer to a CANopen WTM interface.
pindthe address at which to store a pointer to the indication function (can be NULL).
pdatathe address at which to store a pointer to user-specified data (can be NULL).
See also
co_wtm_set_diag_ac_ind()

Definition at line 497 of file wtm.c.

◆ co_wtm_set_diag_ac_ind()

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 interface.

Parameters
wtma pointer to a CANopen WTM interface.
inda pointer to the function to be invoked. If ind is NULL, the default indication function will be used (which invokes diag()).
dataa pointer to user-specified data (can be NULL). data is passed as the last parameter to ind.
See also
co_wtm_get_diag_ac_ind()

Definition at line 509 of file wtm.c.

◆ co_wtm_recv()

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.

This function MAY invoke the callback function specified to co_wtm_set_recv_func() 0 or more times.

Parameters
wtma pointer to a CANopen WTM interface.
bufa pointer to the bytes to be processed.
nbytesthe number of bytes received.

Definition at line 518 of file wtm.c.

◆ co_wtm_get_recv_func()

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.

Parameters
wtma pointer to a CANopen WTM interface.
pfuncthe address at which to store a pointer to the callback function (can be NULL).
pdatathe address at which to store a pointer to user-specified data (can be NULL).
See also
co_wtm_set_recv_func()

Definition at line 769 of file wtm.c.

◆ co_wtm_set_recv_func()

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.

Parameters
wtma pointer to a CANopen WTM interface.
funca pointer to the function to be invoked by co_wtm_recv().
dataa pointer to user-specified data (can be NULL). data is passed as the last parameter to func.
See also
co_wtm_get_recv_func()

Definition at line 781 of file wtm.c.

◆ co_wtm_get_time()

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.

Parameters
wtma pointer to a CANopen WTM interface.
nifthe CAN interface indicator (in the range [1..127]).
tpthe address at which to store the current time (can be NULL).
Returns
0 on success, or -1 on error. In the latter case, the error number can be obtained with get_errc().
See also
co_wtm_set_time()

Definition at line 790 of file wtm.c.

◆ co_wtm_set_time()

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.

This function MAY invoke the callback function set by co_wtm_set_send_func().

Parameters
wtma pointer to a CANopen WTM interface.
nifthe CAN interface indicator (in the range [1..127]).
tpa pointer to the current time.
Returns
0 on success, or -1 on error. In the latter case, the error number can be obtained with get_errc().
See also
co_wtm_get_time()

Definition at line 806 of file wtm.c.

◆ co_wtm_send()

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.

This function MAY invoke the callback function set by co_wtm_set_send_func(). Note that no generic frames are sent until the send buffer is full. Sending a generic frame can be forced with co_wtm_flush().

Parameters
wtma pointer to a CANopen WTM interface.
nifthe CAN interface indicator (in the range [1..127]).
msga pointer to the CAN frame to be sent.
Returns
0 on success, or -1 on error. In the latter case, the error number can be obtained with get_errc().

Definition at line 840 of file wtm.c.

◆ co_wtm_send_alive()

int co_wtm_send_alive ( co_wtm_t wtm)

Sends a keep-alive message from a CANopen WTM interface.

This function MAY invoke the callback function set by co_wtm_set_send_func().

Returns
0 on success, or -1 on error. In the latter case, the error number can be obtained with get_errc().

Definition at line 922 of file wtm.c.

◆ co_wtm_send_diag_can_req()

int co_wtm_send_diag_can_req ( co_wtm_t wtm,
uint_least8_t  nif 
)

Sends a CAN communication quality request.

The function specified to co_wtm_set_diag_can_con() is invoked if a response is received.

Parameters
wtma pointer to a CANopen WTM interface.
nifthe remote CAN interface indicator (in the range [1..127]).
Returns
0 on success, or -1 on error. In the latter case, the error number can be obtained with get_errc().

Definition at line 936 of file wtm.c.

◆ co_wtm_send_diag_wtm_req()

int co_wtm_send_diag_wtm_req ( co_wtm_t wtm,
uint_least8_t  nif 
)

Sends a WTM communication quality request.

The function specified to co_wtm_set_diag_wtm_con() is invoked if a response is received.

Parameters
wtma pointer to a CANopen WTM interface.
nifthe remote WTM interface indicator (in the range [1..127]).
Returns
0 on success, or -1 on error. In the latter case, the error number can be obtained with get_errc().

Definition at line 954 of file wtm.c.

◆ co_wtm_send_diag_can_rst()

int co_wtm_send_diag_can_rst ( co_wtm_t wtm,
uint_least8_t  nif 
)

Sends a CAN communication quality reset message.

Parameters
wtma pointer to a CANopen WTM interface.
nifthe remote CAN interface indicator (in the range [1..127]).
Returns
0 on success, or -1 on error. In the latter case, the error number can be obtained with get_errc().

Definition at line 972 of file wtm.c.

◆ co_wtm_send_diag_wtm_rst()

int co_wtm_send_diag_wtm_rst ( co_wtm_t wtm,
uint_least8_t  nif 
)

Sends a WTM communication quality reset message.

Parameters
wtma pointer to a CANopen WTM interface.
nifthe remote WTM interface indicator (in the range [1..127]).
Returns
0 on success, or -1 on error. In the latter case, the error number can be obtained with get_errc().

Definition at line 990 of file wtm.c.

◆ co_wtm_send_diag_ac()

int co_wtm_send_diag_ac ( co_wtm_t wtm,
uint_least32_t  ac 
)

Sends a diagnostic abort message from a CANopen WTM interface.

This function MAY invoke the callback function set by co_wtm_set_send_func().

Parameters
wtma pointer to a CANopen WTM interface.
acthe abort code.
Returns
0 on success, or -1 on error. In the latter case, the error number can be obtained with get_errc().

Definition at line 1008 of file wtm.c.

◆ co_wtm_flush()

int co_wtm_flush ( co_wtm_t wtm)

Flushes the current send buffer of a CANopen WTM interface.

This function MAY invoke the callback function set by co_wtm_set_send_func().

Returns
0 on success, or -1 on error. In the latter case, the error number can be obtained with get_errc().

Definition at line 1023 of file wtm.c.

◆ co_wtm_get_send_func()

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.

Parameters
wtma pointer to a CANopen WTM interface.
pfuncthe address at which to store a pointer to the callback function (can be NULL).
pdatathe address at which to store a pointer to user-specified data (can be NULL).
See also
co_wtm_set_send_func()

Definition at line 1053 of file wtm.c.

◆ co_wtm_set_send_func()

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.

Parameters
wtma pointer to a CANopen WTM interface.
funca pointer to the function to be invoked by co_wtm_send().
dataa pointer to user-specified data (can be NULL). data is passed as the last parameter to func.
See also
co_wtm_get_send_func()

Definition at line 1065 of file wtm.c.