linux

canGetErrorText

Syntax


#include <canlib.h>
canStatus canGetErrorText(canStatus err, char* buf, int bufsiz);

Description

This function translates an error code (of type canStatus) to a human-readable, English text.

Input Parameters

err
The error code.
buf
The buffer which is to receive the text, which is a zero-terminated string (provided the buffer is large enough.)
bufsiz
The length of the input buffer.
Return Value

canOK (zero) if success
canERR_xxx (negative) if failure.

Related Topics

An example.