From d7aaa1eae5335b38ba1e8e9a465ef9099bc334c5 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 28 二月 2025 11:53:56 +0800
Subject: [PATCH] jtt808初始化
---
server/jtt808_parent/jtt808-server/src/main/java/org/yzh/protocol/t808/T0200.java | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/server/jtt808_parent/jtt808-server/src/main/java/org/yzh/protocol/t808/T0200.java b/server/jtt808_parent/jtt808-server/src/main/java/org/yzh/protocol/t808/T0200.java
index 572b018..0fda714 100644
--- a/server/jtt808_parent/jtt808-server/src/main/java/org/yzh/protocol/t808/T0200.java
+++ b/server/jtt808_parent/jtt808-server/src/main/java/org/yzh/protocol/t808/T0200.java
@@ -3,6 +3,7 @@
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.github.yezhihao.protostar.annotation.Field;
import io.github.yezhihao.protostar.annotation.Message;
+import lombok.Data;
import org.yzh.protocol.basics.JTMessage;
import org.yzh.protocol.commons.JT808;
import org.yzh.protocol.commons.transform.AttributeConverter;
@@ -15,8 +16,22 @@
* @author yezhihao
* https://gitee.com/yezhihao/jt808-server
*/
-@JsonIgnoreProperties({"attributes", "alarmList", "dateTime", "messageId", "properties", "protocolVersion", "clientId", "serialNo", "packageTotal", "packageNo", "verified", "bodyLength", "encryption", "subpackage", "version", "reserved"})
+@JsonIgnoreProperties({"attributes",
+ "alarmList",
+ "dateTime",
+ "messageId",
+ "properties",
+ "protocolVersion",
+ "clientId", "serialNo",
+ "packageTotal", "packageNo",
+ "verified",
+ "bodyLength",
+ "encryption",
+ "subpackage",
+ "version",
+ "reserved"})
@Message(JT808.浣嶇疆淇℃伅姹囨姤)
+@Data
public class T0200 extends JTMessage {
@Field(length = 4, desc = "鎶ヨ鏍囧織")
@@ -39,7 +54,7 @@
private LocalDateTime deviceTime;
@Field(converter = AttributeConverter.class, desc = "浣嶇疆闄勫姞淇℃伅", version = {-1, 0})
@Field(converter = AttributeConverterYue.class, desc = "浣嶇疆闄勫姞淇℃伅(绮ゆ爣)", version = 1)
- private Map<Long, Object> attributes;
+ private Map<Integer, Object> attributes;
public int getWarnBit() {
return warnBit;
@@ -105,13 +120,6 @@
this.deviceTime = deviceTime;
}
- public Map<Long, Object> getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Map<Long, Object> attributes) {
- this.attributes = attributes;
- }
public int getAttributeInt(int key) {
if (attributes != null) {
--
Gitblit v1.9.3