Dword(4) unpack as L
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 20 Nov 2022 09:38:37 +0000 (10:38 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 20 Nov 2022 09:38:37 +0000 (10:38 +0100)
Protocol.pm

index 3ec521d..dec24d3 100644 (file)
@@ -283,8 +283,8 @@ sub protocol_decode {
 # DATA ID      ID Description  Data Type(Data Length)  R/W     Range   Default         Remark 
 
 __DATA__
-0x00   Seq #                           l DWord(4)      R       /               0       The platform can carry the ID when the platform downstream reads and sets the device parameters, and the device returns the same data. Please refer to the example for use.Each seq # refer to one command and its response. 
-0x01   PN                              l DWord(4)      R       /               /       / 
+0x00   Seq #                           L DWord(4)      R       /               0       The platform can carry the ID when the platform downstream reads and sets the device parameters, and the device returns the same data. Please refer to the example for use.Each seq # refer to one command and its response. 
+0x01   PN                              L DWord(4)      R       /               /       / 
 0x02   Model                           C Byte(1)       R       32              32      Inner number:32 
 0x03   X axis angle                    f Float(4)      R       -90-90          /       X axis angle 
 0x04   Y axis angle                    f Float(4)      R       -90-90          /       Y axis angle 
@@ -304,12 +304,12 @@ __DATA__
 0x19   Alarm axis                      C Byte(1)       R       0~3             /       0: no alarm; 1: X axis alarm 2: Y axis alarm; 3: X/Y axis alarm at the same time 
 0x1A   SIM card ID                     Q QWord(8)      R       0~18446744073709551615  /       Take the first 19 digits, the last digit is discarded 
 0x1B   Alarm angle                     f Float(4)      R/W     0.06-30.00      5.0     ZCT330E relative mode, passive upload
-0x1C   Alarm trigger time              l Dword(4)      R/W     2-20            2       ZCT330E relative mode, passive upload
+0x1C   Alarm trigger time              L Dword(4)      R/W     2-20            2       ZCT330E relative mode, passive upload
 0x1D   Static angle                    f Float(4)      R/W     0.06-30.00      2.5     ZCT330E relative mode, passive upload
-0x1E   Static trigger time             l Dword(4)      R/W     2-20            2       ZCT330E relative mode, passive upload
-0x1F   Acquisition interval            l Dword(4)      R/W     1-2160000       60      ZCT330E absolute mode, passive upload
-0x20   Failure retransmission          l Dword(4)      R/W     20-2160000      3600    ZCT330E absolute mode, passive upload
-0x21   Heartbeat interval              l DWord(4)      R/W     60~131071       86400   Interval at which the device periodically uploads data to the server 
+0x1E   Static trigger time             L Dword(4)      R/W     2-20            2       ZCT330E relative mode, passive upload
+0x1F   Acquisition interval            L Dword(4)      R/W     1-2160000       60      ZCT330E absolute mode, passive upload
+0x20   Failure retransmission          L Dword(4)      R/W     20-2160000      3600    ZCT330E absolute mode, passive upload
+0x21   Heartbeat interval              L DWord(4)      R/W     60~131071       86400   Interval at which the device periodically uploads data to the server 
 0x22   IMEI number of the device       Q QWord(8)       R      0~18446744073709551615  /       Refers to the IMEI of the NB-IOT network module in the product. 
 0x23   Backup server IP&port           CCCCs 4*Byte(1)+Word(2) R/W     /       CTIOT:117.60.157.137,5683 MQTT:0.0.0.0,0        / if set, clears 0x3b, if 0x23 and 0x3b are set at same time, 0x23 has priority
 0x24   Backup server enable            C Byte(1)       R/W     0~255   0       0 means off, non-zero means on 
@@ -325,11 +325,11 @@ __DATA__
 0x3B   Backup server domain name and port      a* 64*Byte(1)   R/W     /       mqtt.zc-sensor.com,1883         Supports CTIOT and MQTT protocols. In the case of backup IP, the IP is preferentially backed up; the domain name and port are distinguished by commas, and the length is <=64. , will be cleared if 0x23 is set
 0x3D   Protocol type                   C Byte(1)       R/W     0~1     CTIOT   0:CTIOT 1:MQTT Other values are invalid. 
 0x3E   Alarm angle                     f Float(4)      R/W     0.06-30.00      2.0     ZCT330E vibration mode, passive upload
-0x3F   Alarm trigger time              l Dword(4)      R/W     80-20000        240     ZCT330E vibration mode, passive upload (trigger time in ms)
+0x3F   Alarm trigger time              L Dword(4)      R/W     80-20000        240     ZCT330E vibration mode, passive upload (trigger time in ms)
 0x40   Static angle                    f Float(4)      R/W     0.06-30.00      1.0     ZCT330E vibration mode, passive upload
-0x41   Static trigger time             l Dword(4)      R/W     80-20000        240     ZCT330E vibration mode, passive upload (trigger time in ms)
-0x42   Heartbeat interval              l DWord(4)      R/W     60~2160000      86400   ZCT330E (unit: s) vibration mode, Interval at which the device periodically uploads data to the server 
-0x43   Failure retransmission          l Dword(4)      R/W     20-2160000      3600    ZCT330E (unit: s) vibration mode, passive upload
+0x41   Static trigger time             L Dword(4)      R/W     80-20000        240     ZCT330E vibration mode, passive upload (trigger time in ms)
+0x42   Heartbeat interval              L DWord(4)      R/W     60~2160000      86400   ZCT330E (unit: s) vibration mode, Interval at which the device periodically uploads data to the server 
+0x43   Failure retransmission          L Dword(4)      R/W     20-2160000      3600    ZCT330E (unit: s) vibration mode, passive upload
 0x44   Alarm angle                     f Float(4)      R/W     ZCT330M:‐90°~90°,ZCT330E:0.06-30.00         ZCT330M:3°,ZCT330E:5.0         X/Y axis alarm angle is consistent, ZCT330E in absolue mode, passsive upload 
-0x45   Alarm trigger time              l Dword(4)      R/W     0-3600          0       ZCT330E Sensor waiting time for the server to issue a command (s), passive upload
+0x45   Alarm trigger time              L Dword(4)      R/W     0-3600          0       ZCT330E Sensor waiting time for the server to issue a command (s), passive upload