![Sys Tec Electronic USB-CANmodul System Manual Download Page 51](http://html1.mh-extra.com/html/sys-tec-electronic/usb-canmodul/usb-canmodul_system-manual_1421546051.webp)
Software
SYS TEC electronic GmbH 2001 L-487e_6
49
Return value: Error code of the function.
USBCAN_SUCCESSFUL
USBCAN_ERR_MAXINSTANCES
USBCAN_ERR_ILLHANDLE
USBCAN_ERR_CANNOTINIT
USBCAN_ERR_ILLPARAM
USBCAN_WARN_NODATA
USBCAN_WARN_SYS_RXOVERRUN
USBCAN_WARN_DLL_RXOVERRUN
Description:
Reads a CAN message from the buffer. If the buffer contains no CAN
messages, this function returns a warning. If a buffer overrun
occurred, this function returns a valid CAN message and a warning.
Example:
tUcanHandle UcanHandle;
tCabMsgStruct CanMsg;
BYTE bRet;
...
//read CAN messages
bRet = UcanReadCanMsg (UcanHandle, &CanMsg);
// no errors? print CAN message
if (!bRet) PrintCanMsg (&CanMsg);
else
{
// no warning? print error
if (!(bRet & USBCAN_WARNING)) PrintError (bRet);
else
{
// valid message in CanMsg?
if (bRet != USBCAN_WARN_NODATA)
{
// print CAN message
PrintCanMsg (&CanMsg);
// print warning
PrintWarning (bRet);
}
}
}
...
Summary of Contents for USB-CANmodul
Page 1: ...A Product of PHYTEC Technologie Holding AG USB CANmodul Systems Manual Edition March 2001 ...
Page 10: ...USB CANmodul 8 SYS TEC electronic GmbH 2001 L 487e_6 ...
Page 22: ...USB CANmodul 20 SYS TEC electronic GmbH 2001 L 487e_6 ...
Page 70: ...USB CANmodul 68 SYS TEC electronic GmbH 2001 L 487e_6 ...
Page 74: ...Published by SYS TEC electronic 2001 Ordering No L 487e_6 Printed in Germany ...