USB-CANmodul
50
SYS TEC electronic GmbH 2001 L-487e_6
UcanWriteCanMsg
Syntax:
BYTE STDCALL UcanWriteCanMsg (tUcanHandle UcanHandle_p,
tCanMsgStruct* pCanMsg_p);
Usability:
CAN_INIT
Parameter:
UcanHandle_p: USB-CAN handle received with the function
UcanInitHardware ().
pCanMsg_p: Address to a CAN message structure. This address
must not be ZERO.
typedef struct
{
DWORD m_dwID; // CAN identifier
BYTE m_bFF; // CAN frame format
BYTE m_bDLC; // CAN data length code
BYTE m_bData[8]; // CAN data
DWORD m_dwTime; // has no meaning in this function
} tCanMsgStruct;
Return value: Error code of the function.
USBCAN_SUCCESSFUL
USBCAN_ERR_MAXINSTANCES
USBCAN_ERR_ILLHANDLE
USBCAN_ERR_CANNOTINIT
USBCAN_ERR_ILLPARAM
USBCAN_ERR_DLL_TXFULL
Description:
Transmits a CAN message through the USB-CANmodul.