Lely core libraries 2.3.4
vci.h File Reference

This header file is part of the CAN library; it contains the IXXAT VCI V4 interface declarations. More...

#include <lely/can/msg.h>
Include dependency graph for vci.h:

Go to the source code of this file.

Functions

int CANMSG_is_error (const void *msg, enum can_state *pstate, enum can_error *perror)
 Checks if an IXXAT VCI CAN message is an error message and parses the bus state and error flags if it is. More...
 
int CANMSG2can_msg (const void *src, struct can_msg *dst)
 Converts an IXXAT VCI CAN message to a can_msg frame. More...
 
int can_msg2CANMSG (const struct can_msg *src, void *dst)
 Converts a can_msg frame to an IXXAT VCI CAN message. More...
 

Detailed Description

This header file is part of the CAN library; it contains the IXXAT VCI V4 interface declarations.

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 vci.h.

Function Documentation

◆ CANMSG_is_error()

int CANMSG_is_error ( const void *  msg,
enum can_state pstate,
enum can_error perror 
)

Checks if an IXXAT VCI CAN message is an error message and parses the bus state and error flags if it is.

Parameters
msga pointer to an IXXAT VCI CAN message.
pstatethe address at which to store the updated CAN node state (can be NULL). The value is only updated if the error frame indicates a state change.
perrorthe address at which to store the updated CAN bus errors (can be NULL). Any new error flags indicated by by the error frame are set in *perror, but existing flags are not cleared.
Returns
1 if the CAN message is an error message, 0 if not, and -1 on error. In the latter case, the error number can be obtained with get_errc().

◆ CANMSG2can_msg()

int CANMSG2can_msg ( const void *  src,
struct can_msg dst 
)

Converts an IXXAT VCI CAN message to a can_msg frame.

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

◆ can_msg2CANMSG()

int can_msg2CANMSG ( const struct can_msg src,
void *  dst 
)

Converts a can_msg frame to an IXXAT VCI CAN message.

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