@@ -1,28 +1,27 | |||||
1 | #ifndef TCPACKETTOSEND_H |
|
1 | #ifndef TCPACKETTOSEND_H | |
2 | #define TCPACKETTOSEND_H |
|
2 | #define TCPACKETTOSEND_H | |
3 |
|
3 | |||
4 | #include <QObject> |
|
4 | #include <QObject> | |
5 |
|
5 | |||
6 | #include "parameterdump_global.h" |
|
|||
7 | #include <TC_types.h> |
|
6 | #include <TC_types.h> | |
8 |
|
7 | |||
9 | class TCPacketToSend : public QObject |
|
8 | class TCPacketToSend : public QObject | |
10 | { |
|
9 | { | |
11 | Q_OBJECT |
|
10 | Q_OBJECT | |
12 | public: |
|
11 | public: | |
13 | explicit TCPacketToSend(QObject *parent = 0); |
|
12 | explicit TCPacketToSend(QObject *parent = 0); | |
14 |
|
13 | |||
15 | unsigned char calculateDataCRC(char *data, int nbBytes); |
|
14 | unsigned char calculateDataCRC(char *data, int nbBytes); | |
16 | void initLookUpTableForCRC( void ); |
|
15 | void initLookUpTableForCRC( void ); | |
17 |
|
16 | |||
18 | void GetCRCAsTwoBytes(unsigned char* data, unsigned char* crcAsTwoBytes, unsigned int sizeOfData); |
|
17 | void GetCRCAsTwoBytes(unsigned char* data, unsigned char* crcAsTwoBytes, unsigned int sizeOfData); | |
19 | unsigned int Crc_opt( unsigned char D, unsigned int Chk); |
|
18 | unsigned int Crc_opt( unsigned char D, unsigned int Chk); | |
20 | unsigned int lookUpTableForCRC[256]; |
|
19 | unsigned int lookUpTableForCRC[256]; | |
21 |
|
20 | |||
22 | signals: |
|
21 | signals: | |
23 |
|
22 | |||
24 | public slots: |
|
23 | public slots: | |
25 |
|
24 | |||
26 | }; |
|
25 | }; | |
27 |
|
26 | |||
28 | #endif // TCPACKETTOSEND_H |
|
27 | #endif // TCPACKETTOSEND_H |
General Comments 0
You need to be logged in to leave comments.
Login now