]> rtime.felk.cvut.cz Git - lincan.git/commitdiff
Message declaration updated to match VCA provided version.
authorppisa <ppisa>
Sat, 14 May 2005 21:24:49 +0000 (21:24 +0000)
committerppisa <ppisa>
Sat, 14 May 2005 21:24:49 +0000 (21:24 +0000)
The in memory layout is not changed. It is preparation for
changes required for future compatibility with 32 bit user
space on 64 bit systems.

lincan/include/canmsg.h

index 61f327ac2052cd7fb1688de27035dcdd7856735d..779f68c52c3fc23026cba058d1919084f3d3c63e 100644 (file)
@@ -39,6 +39,8 @@ extern "C" {
 
 typedef struct timeval canmsg_tstamp_t ;
 
 
 typedef struct timeval canmsg_tstamp_t ;
 
+typedef unsigned long canmsg_id_t;
+
 /**
  * struct canmsg_t - structure representing CAN message
  * @flags:  message flags
 /**
  * struct canmsg_t - structure representing CAN message
  * @flags:  message flags
@@ -57,7 +59,7 @@ typedef struct timeval canmsg_tstamp_t ;
 struct canmsg_t {
        int             flags;
        int             cob;
 struct canmsg_t {
        int             flags;
        int             cob;
-       unsigned long   id;
+       canmsg_id_t     id;
        canmsg_tstamp_t timestamp;
        unsigned short  length;
        unsigned char   data[CAN_MSG_LENGTH];
        canmsg_tstamp_t timestamp;
        unsigned short  length;
        unsigned char   data[CAN_MSG_LENGTH];
@@ -67,15 +69,12 @@ struct canmsg_t {
 #ifndef PACKED
 #define PACKED __attribute__((packed))
 #endif
 #ifndef PACKED
 #define PACKED __attribute__((packed))
 #endif
-
-typedef unsigned long canmsg_tstamp_t ;
-
 /* Old, deprecated version of canmsg_t structure */
 struct canmsg_t {
        short           flags;
        int             cob;
 /* Old, deprecated version of canmsg_t structure */
 struct canmsg_t {
        short           flags;
        int             cob;
-       unsigned long   id;
-       canmsg_tstamp_t timestamp;
+       canmsg_id_t     id;
+       unsigned long   timestamp;
        unsigned int    length;
        unsigned char   data[CAN_MSG_LENGTH];
 } PACKED;
        unsigned int    length;
        unsigned char   data[CAN_MSG_LENGTH];
 } PACKED;
@@ -107,8 +106,8 @@ struct canfilt_t {
        int             flags;
        int             queid;
        int             cob;
        int             flags;
        int             queid;
        int             cob;
-       unsigned long   id;
-       unsigned long   mask;
+       canmsg_id_t     id;
+       canmsg_id_t     mask;
 };
 
 typedef struct canfilt_t canfilt_t;
 };
 
 typedef struct canfilt_t canfilt_t;