2020年10月18日日曜日

 

sendMsgBuf()

Description

Transmit data to remote CAN device.(

Depending on your preferences, you can use this function to transmit data instead of the beginTransmission() and write() functions.

Syntax


CAN.sendMsgBuf(id, ext, len, buf)

Parameters

id:Device ID for the remote CAN device
ext:Data transmission format

  1. CAN_STDID:Standard data frame, comply with CAN 2.0A standard. ID range: 0 ~ 0x7FF
  2. CAN_EXTID:Extended data frame, based on CAN 2.0B standard. ID range: 0 ~ 0x1FFFFFFF
  3. CAN_STDID_REMOTE:Standard data frame, comply with CAN 2.0A standard. ID range: 0 ~ 0x7FF
  4. CAN_EXTID_REMOTE:Extended data frame, comply with CAN 2.0B standard. ID range: 0 ~ 0x1FFFFFF

len:size of the array
buf:data array

Returns

CAN_OK:Data transmitted
CAN_FAIL:Data transmission failed.

0 件のコメント: