-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdlt645defines.h
61 lines (43 loc) · 1.99 KB
/
dlt645defines.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef DLT645DEFINES_H
#define DLT645DEFINES_H
#include <QString>
#define DLT645_WAKE_UP_BYTE 0xFE
#define DLT645_START_FRAME 0x68
#define DLT645_BROADCASTADDRPART 0x99 //A PART
#define DLT645_BROADCASTADDRLEN 6
#define DLT645_BROADCASTADDRLENNUMB DLT645_BROADCASTADDRLEN * 2
#define DLT645_MIN_FRAME_LEN 11 //<START 1><ADDR 6><START 1><CONTROL 1><LEN 1><CHECK BYTE 1><END FRAME 1>
#define DLT645_END_FRAME 0x16
#define DLT645_CNTR_MASTER_READ_DATA 0x01
#define DLT645_CNTR_MASTER_WRITE_DATA 0x04
//T0,T1...T4, 4-bytes, XXXXXX,XX, Do not forget to add 0x33 and to change bytes order
#define DLT645_TOTAL_A_POSITIVE 0x901F
#define DLT645_TOTAL_A_REVERSE 0x902F
#define DLT645_TOTAL_R_POSITIVE 0x911F
#define DLT645_TOTAL_R_REVERSE 0x912F
//the maximum depth is 1 month
#define DLT645_EOF_MONTH_A_POSITIVE 0x941F
#define DLT645_EOF_MONTH_A_REVERSE 0x942F
#define DLT645_EOF_MONTH_R_POSITIVE 0x951F
#define DLT645_EOF_MONTH_R_REVERSE 0x952F
#define DLT645_METER_SN 0xC032
#define DLT645_DATE 0xC010
#define DLT645_TIME 0xC011
#define DLT645_VOLTAGE_A 0xB611
#define DLT645_VOLTAGE_B 0xB612
#define DLT645_VOLTAGE_C 0xB613
#define DLT645_CURRENT_A 0xB621
#define DLT645_CURRENT_B 0xB622
#define DLT645_CURRENT_C 0xB623
#define DLT645_POWER_ACTIVE_A 0xB631
#define DLT645_POWER_ACTIVE_B 0xB632
#define DLT645_POWER_ACTIVE_C 0xB633
#define DLT645_POWER_REACTIVE_A 0xB641
#define DLT645_POWER_REACTIVE_B 0xB642
#define DLT645_POWER_REACTIVE_C 0xB643
#define DLT645_POWER_FACTOR_A 0xB651
#define DLT645_POWER_FACTOR_B 0xB652
#define DLT645_POWER_FACTOR_C 0xB653
#define DLT645_HAS_NO_ERRORS 0
#define DLT645_HAS_ABNORMAL_ERROR 1
#endif // DLT645DEFINES_H