Main Page | Data Structures | File List | Data Fields | Globals

cangw_msg.h

Go to the documentation of this file.
00001 #ifndef __CANGW_MSG_H__
00002 #define __CANGW_MSG_H__
00003 
00004 typedef enum {CANGW_11B=0, CANGW_29B=1} cangw_id_len_t;
00005 typedef enum {CANGW_125=0, CANGW_250=1, CANGW_500=2, CANGW_1000=3} cangw_baud_t;
00006 
00007 #ifdef _MSC_VER
00008   #pragma pack(1)               // set alignment to 1 byte (Microsoft style)
00009 #endif // _MSC_VER
00010 
00011 #if (defined _MSC_VER)
00012 # define __LITTLE_ENDIAN 1234                                                    
00013 # define __BYTE_ORDER __LITTLE_ENDIAN
00014 #endif
00015 
00021 typedef struct _cangw_msg_t {
00022         unsigned long timestamp; 
00023         unsigned long id; 
00025 #if __BYTE_ORDER == __LITTLE_ENDIAN
00026         unsigned char reserved:3;
00027         unsigned char rtr:1;
00028         unsigned char len:4; 
00029 #else
00030         unsigned char len:4; 
00031         unsigned char rtr:1;
00032         unsigned char reserved:3;
00033 #endif
00034 
00035         unsigned char data[8]; 
00036 }
00037 #ifdef __GNUC__
00038 __attribute__((packed))
00039 #endif //__GNUC__
00040 cangw_msg_t;
00041 
00042 #ifdef _MSC_VER
00043   #pragma pack()                // set alignment to standard (Microsoft style)
00044 #endif // _MSC_VER
00045 
00046 #endif //__CANGW_MSG_H__

Generated on Thu Oct 28 12:08:02 2004 for CANGW client library by doxygen 1.3.5