EasySync USB2-F-7101 Bedienungsanleitung Seite 10

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 30
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 9
Document Reference No.: ES_000010
USB2-F-7x01 Programming Guide
Version 1.01
Clearance No.: ES# 27
©2009-2010 EasySync Ltd. 10
2.2.5 canplus_Read
Summary
Read a message from the open channel with handle h. Message is contained within the message
structure.
Definition
int canplus_Read( CANHANDLE h, CANMsg *msg );
Parameters
h handle returned by canplus_Open for the desired USB2-F-7x01
msg received 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
CAN channel is closed successfully
<=0 Error as noted below:
ERROR_CANPLUS_NO_MESSAGE
The receive buffer is empty
Seitenansicht 9
1 2 ... 5 6 7 8 9 10 11 12 13 14 15 ... 29 30

Kommentare zu diesen Handbüchern

Keine Kommentare