Rev 270 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 270 | Rev 800 | ||
|---|---|---|---|
| 1 | #ifndef __CANPROTOMESSAGE_H |
1 | #ifndef __CANPROTOMESSAGE_H |
| 2 | #define __CANPROTOMESSAGE_H |
2 | #define __CANPROTOMESSAGE_H |
| 3 | 3 | ||
| 4 | #include <tchar.h> |
4 | #include <tchar.h> |
| 5 | #include <windows.h> |
5 | #include <windows.h> |
| 6 | #include "compiler.h" |
6 | #include "compiler.h" |
| 7 | 7 | ||
| 8 | class CanProtoMessage |
8 | class CanProtoMessage |
| 9 | { |
9 | { |
| 10 | public: |
10 | public: |
| 11 | CanProtoMessage(); |
11 | CanProtoMessage(); |
| 12 | CanProtoMessage(unsigned char funct, unsigned int funcc, unsigned char nid, unsigned int sid, unsigned char data_length, unsigned char data[]); |
12 | CanProtoMessage(unsigned char funct, unsigned int funcc, unsigned char nid, unsigned int sid, unsigned char data_length, unsigned char data[]); |
| 13 | CanProtoMessage(unsigned char bytes[],int startIndex); |
13 | CanProtoMessage(unsigned char bytes[],int startIndex); |
| 14 | ~CanProtoMessage(); |
14 | ~CanProtoMessage(); |
| 15 | bool equals(CanProtoMessage *cpm); |
15 | bool equals(CanProtoMessage *cpm); |
| 16 | unsigned char getFunct(void); |
16 | unsigned char getFunct(void); |
| 17 | unsigned int getFuncc(void); |
17 | unsigned int getFuncc(void); |
| 18 | unsigned char getNid(void); |
18 | unsigned char getNid(void); |
| 19 | unsigned int getSid(void); |
19 | unsigned int getSid(void); |
| 20 | unsigned char getDataLength(void); |
20 | unsigned char getDataLength(void); |
| 21 | unsigned char* getData(void); |
21 | unsigned char* getData(void); |
| 22 | void getBytes(unsigned char bytes[]); |
22 | void getBytes(unsigned char bytes[]); |
| 23 | protected: |
23 | protected: |
| 24 | unsigned char funct; |
24 | unsigned char funct; |
| 25 | unsigned int funcc; |
25 | unsigned int funcc; |
| 26 | unsigned char nid; |
26 | unsigned char nid; |
| 27 | unsigned int sid; |
27 | unsigned int sid; |
| 28 | unsigned char data_length; |
28 | unsigned char data_length; |
| 29 | unsigned char data[8]; |
29 | unsigned char data[8]; |
| 30 | }; |
30 | }; |
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | #endif |
33 | #endif |