
Document Reference No.: ES_000010
USB2-F-7x01 Programming Guide
Version 1.01
Clearance No.: ES# 27
©2009-2010 EasySync Ltd. 11
2.2.6 canplus_Write
Summary
Write a message to the open channel with handle h. Message is contained within the message
structure.
Definition
int canplus_Write( CANHANDLE h, CANMsg *msg );
Parameters
h handle returned by canplus_Open for the desired USB2-F-7x01
msg transmitted message frame structure
Remarks
// Message flags
#define CANMSG_EXTENDED 0x80 // Extended CAN id
#define CANMSG_RTR 0x40 // Remote frame
// CAN Frame
typedef struct {
_u32 id; // Message id
_u32 timestamp; // timestamp in milliseconds
_u8 flags; // [extended_id|1][RTR:1][reserver:6]
_u8 len; // Frame size (0.8)
_u8 data[ 8 ]; // Databytes 0..7
} CANMsg;
Return Codes
>0 ERROR_CANPLUS_OK
Standard/Extended Frame written successfully
<=0 Error as noted below:
ERROR_CANPLUS_FAIL
Standard/Extended Frame write Failure
Comentarios a estos manuales