• Ready for review
  • CanTransmitMessage

    The function CanTransmitMessage transmits a message onto the CAN-bus.

    BOOL CanTransmittMessage(PCAN_MESSAGE_EXT msg ); BOOL DCanTransmittMessage(int devno, PCAN_MESSAGE_EXT msg );

    Parameters

    devno
    Index of SJA1000-controller to use (starting with 0).
    msg
    Message to be transmitted.

    typedef struct _CAN_MESSAGE_EXT { int frametype; // STANDARD or EXTENDED UINT id; // Message Identifier (11 or 29 Bit) BOOL rtr; // True: Remote Frame (ignore length) USHORT length; // Message length (0-7) USHORT place; // Message place ULONG time_stamp; // (0 if not supported) ULONG ErrorStatus; // != 0 -> this is an error frame UCHAR data[8]; // Message data } CAN_MESSAGE_EXT, *PCAN_MESSAGE_EXT;

    Return Values

    If this function succeeds, the return value is TRUE.
    If the function fails, the return value is FALSE. Additional error-information is available through CanGetLastError

    Remarks

    Requirements

    OS Versions: Windows CE 4.2 and later.
    Header: gfcan32ce.h, canlib.h
    Link Library: singlecan.lib (one sja1000-controller), dualcan.lib (two or more sja1000-controller)

    See Also

    SJA1000 Can Bus Support