clenaup more 8-bit characterswq
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 3 Oct 2020 08:56:12 +0000 (10:56 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 3 Oct 2020 08:56:12 +0000 (10:56 +0200)
Protocol.pm

index c6d829e..9629347 100644 (file)
@@ -113,28 +113,28 @@ sub read_parameter_frame {
 
 # 6. Protocol Format 
 # Valid data ID and parameter range supported by the product 
-# DATA ID      ID Description  Data Type( Data Length)       R/W     Range   Default         Remark 
+# 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       /                /      / 
+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 
-0x09   X axis relative angle           f Float(4)      R       ‐90°~90°    0       Return the X angle value according to the set relative zero 
-0x0A   Y axis relative angle           f Float(4)      R       ‐90°~90°    0       Return the Y angle value according to the set relative zero 
-0x0C   Sensor temperature              s Word(2)       R       â\80\9032768~32767  /       signed,sensor temperature =Data/100, unit â\84\83 
+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 
+0x09   X axis relative angle           f Float(4)      R       -90-90          0       Return the X angle value according to the set relative zero 
+0x0A   Y axis relative angle           f Float(4)      R       -90-90          0       Return the Y angle value according to the set relative zero 
+0x0C   Sensor temperature              s Word(2)       R       -32768-32767    /       signed,sensor temperature =Data/100, unit \83 
 0x0D   Power source voltage            S Word(2)       R       0~65535         /       Voltage= Data/100, unit V 
 0x0E   Heartbeat interval              l DWord(4)      R/W     60~2160000      86400   ZCT330E Interval at which the device periodically uploads data to the server 
 0x0F   Failure interval                l DWord(4)      R/W     60~2160000      3600    ZCT330E Interval at which the device failure is retransmitted
-0x11   Arming/disarming                C Byte(1)       R/W     0~255           1       0 means disarming, nonzero means arming 
+0x11   Arming/disarming                C Byte(1)       R/W     0~255           1       0 means disarming, non zero means arming 
 0x12   Alarm delay time                C Byte(1)       R/W     3~255           20      ZCT330M The unit is 0.1 second, which means that the product responds to the alarm only after the alarm has exceeded the alarm angle for a certain period of time. (mot used by ZCT330E, only ZCT330M) 
 
-0x13   Restore factory setting         C Byte(1)       R/W     0~255           0       0: Do nothing Non‐zero: Restore the non‐network‐related parameters of the sensor. 
+0x13   Restore factory setting         C Byte(1)       R/W     0~255           0       0: Do nothing Non zero: Restore the non network related parameters of the sensor. 
 0x14   Server IP&port                  CCCCs 4*Byte(1)+Word(2) R/W             /       CTIOT:117.60.157.137,5683 MQTT:0.0.0.0,0        The server address should be IP, not the domain name; using the domain name may cause the connection server to be unstable and cause data loss. After the function is set, content of 0x34 will be cleared, if 0x14 and 0x34 is set at the same time, priority is given to 0x14 (passive upload)
 0x17   Signal strength                 C Byte(1)       R       10~34           /       A larger value indicates a stronger signal 
 0x18   Sensor operating mode           C Byte(1)       R/W     0               0       0: absolute angle, 1: relative angle, 2: vibration, ZCT330Mx sensor can only work in absolute measurement mode, ZCT330Ex supports all modes
-0x19   Alarm axis                      C Byte(1)       R       0~3             /       0: no alarm; 1: Xaxis alarm 2: Y axis alarm; 3: X/Y axis alarm at the same time 
+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
@@ -143,11 +143,11 @@ __DATA__
 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 NBIOT network module in the product. 
+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, nonzero means on 
+0x24   Backup server enable            C Byte(1)       R/W     0~255   0       0 means off, non-zero means on 
 0x33   DNS IP address                  CCCC 4*Byte(1)  R/W     /       208.67.222.222  / 
-0x34   Domain name and port            a* 64*Byte(1)   R/W     /       mqtt.zc‐sensor.com,1883       Supports CTIOT and MQTT protocols. Priority IP in the case of IP (ID number 0x14); domain name and port should be separated with comma, length <=64, cleared by setting 0x14
+0x34   Domain name and port            a* 64*Byte(1)   R/W     /       mqtt.zc-sensor.com,1883 Supports CTIOT and MQTT protocols. Priority IP in the case of IP (ID number 0x14); domain name and port should be separated with comma, length <=64, cleared by setting 0x14
 0x35   MQTT-ClientID                   a* 32*Byte(1)   R/W      /      IMEI number of the device       Length <=32, subject to MQTT related specifications 
 0x36   MQTT-Username                   a* 32*Byte(1)   R/W     /       empty           Length <=32, subject to MQTT related specifications 
 
@@ -155,7 +155,7 @@ __DATA__
 0x38   MQTT-published topic name       a* 128*Byte(1)  R/W     /       Inclinometer/ZCT330Mx_SWP_N_YK/IMEI/up  Length <=128, subject to MQTT related specifications 
 0x39   MQTT-subscribed topic name      a* 128*Byte(1)  R/W     /       Inclinometer/ZCT330Mx_SWP_N_YK/IMEI/down        Length <=128, subject to MQTT related specifications 
 0x3A   Set relative zero command       C Byte(1)       R/W     0~255   0               0: absolute angle mode 1: Set the current position to zero, relative angle mode (0x09, 0x0A content will be set to the current angle), Other values are invalid. 
-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
+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)