public uint CANFDTransmit(XLClass.xl_canfd_event_collection xlEventCollection) { XLDefine.XL_Status txStatus; /* * xlEventCollection = new XLClass.xl_canfd_event_collection(1); * xlEventCollection.xlCANFDEvent[0].tag = XLDefine.XL_CANFD_TX_EventTags.XL_CAN_EV_TAG_TX_MSG; * xlEventCollection.xlCANFDEvent[0].tagData.canId = 0x80000000 | 0x14420FFF; * xlEventCollection.xlCANFDEvent[0].tagData.dlc = XLDefine.XL_CANFD_DLC.DLC_CAN_CANFD_8_BYTES; * xlEventCollection.xlCANFDEvent[0].tagData.msgFlags = XLDefine.XL_CANFD_TX_MessageFlags.XL_CAN_TXMSG_FLAG_BRS | XLDefine.XL_CANFD_TX_MessageFlags.XL_CAN_TXMSG_FLAG_EDL; * xlEventCollection.xlCANFDEvent[0].tagData.data[0] = 0x50; * xlEventCollection.xlCANFDEvent[0].tagData.data[1] = 0xFF; * xlEventCollection.xlCANFDEvent[0].tagData.data[2] = 0xFF; * xlEventCollection.xlCANFDEvent[0].tagData.data[3] = 0xFF; * xlEventCollection.xlCANFDEvent[0].tagData.data[4] = 0xFF; * xlEventCollection.xlCANFDEvent[0].tagData.data[5] = 0xFF; * xlEventCollection.xlCANFDEvent[0].tagData.data[6] = 0xFF; * xlEventCollection.xlCANFDEvent[0].tagData.data[7] = 0xFF; */ uint messageCounterSent = 0; txStatus = CANDriver.XL_CanTransmitEx(portHandle, txMask, ref messageCounterSent, xlEventCollection); return(messageCounterSent); }