ITS
apiNetwork.h
Go to the documentation of this file.
1 
3 #ifndef APINETWORK_H
4 #define APINETWORK_H
5 
6 #include <QObject>
7 #include <api.h>
8 
9 #define TST_MAX 4294967295
10 #define SN_MAX 65535
11 
18 quint64 get_INT64(u_char *field, qint64 *int64);
19 
26 quint64 get_UINT64(u_char *field, quint64 *uint64);
27 
34 quint64 get_INT32(u_char *field, qint32 *int32);
35 
42 quint64 get_UINT32(u_char *field, quint32 *uint32);
43 
50 quint64 get_INT16(u_char *field, qint16 *int16);
51 
58 quint64 get_UINT16(u_char *field, quint16 *uint16);
59 
66 quint64 get_INT8(u_char *field, qint8 *int8);
67 
74 quint64 get_UINT8(u_char *field, quint8 *uint8);
75 
82 bool isDuplicatePacketDetectionTimestamp(quint32 lastReceivedTimestamp, quint32 nowReceivedTimestamp);
91 bool isDuplicatePacketDetectionTimestampSN(quint32 lastReceivedTimestamp, quint32 nowReceivedTimestamp, quint16 lastReceivedSN, quint16 nowReceivedSN);
92 
93 
94 #endif // APINETWORK_H
quint64 get_INT8(u_char *field, qint8 *int8)
get_INT8 Extract an integer encoded in 8 bits from a byte array.
Definition: apiNetwork.cpp:81
quint64 get_INT64(u_char *field, qint64 *int64)
get_INT64 Extract an integer encoded in 64 bits from a byte array.
Definition: apiNetwork.cpp:3
Usefull functions and declarations.
quint64 get_UINT32(u_char *field, quint32 *uint32)
get_UINT32 Extract an unsigned integer encoded in 32 bits from a byte array.
Definition: apiNetwork.cpp:43
quint64 get_INT16(u_char *field, qint16 *int16)
get_INT16 Extract an integer encoded in 16 bits from a byte array.
Definition: apiNetwork.cpp:55
quint64 get_INT32(u_char *field, qint32 *int32)
get_INT32 Extract an integer encoded in 32 bits from a byte array.
Definition: apiNetwork.cpp:29
bool isDuplicatePacketDetectionTimestampSN(quint32 lastReceivedTimestamp, quint32 nowReceivedTimestamp, quint16 lastReceivedSN, quint16 nowReceivedSN)
isDuplicatePacketDetectionTimestamp Calculate if the packet is a duplicate using the timestamp and th...
Definition: apiNetwork.cpp:104
quint64 get_UINT8(u_char *field, quint8 *uint8)
get_UINT8 Extract an unsigned integer encoded in 64 bits from a byte array.
Definition: apiNetwork.cpp:88
quint64 get_UINT16(u_char *field, quint16 *uint16)
get_INT64 Extract an integer encoded in 64 bits from a byte array.
Definition: apiNetwork.cpp:69
bool isDuplicatePacketDetectionTimestamp(quint32 lastReceivedTimestamp, quint32 nowReceivedTimestamp)
isDuplicatePacketDetectionTimestamp Calculate if the packet is a duplicate using the timestamp of the...
Definition: apiNetwork.cpp:95
quint64 get_UINT64(u_char *field, quint64 *uint64)
get_UINT64 Extract an unsigned integer encoded in 64 bits from a byte array.
Definition: apiNetwork.cpp:17