From 3d68b56bb5ecbc3d34b2901c671dc7f1f0f82f74 Mon Sep 17 00:00:00 2001
From: pedoc <pedoc@qq.com>
Date: 星期一, 29 一月 2024 18:05:17 +0800
Subject: [PATCH] 修复未配置sipdomain时出现异常

---
 src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java |  413 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 379 insertions(+), 34 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java
index 74f86a2..34d624f 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java
@@ -1,55 +1,194 @@
 package com.genersoft.iot.vmp.gb28181.bean;
 
-import java.util.Map;
 
+import io.swagger.v3.oas.annotations.media.Schema;
 
+/**
+ * 鍥芥爣璁惧/骞冲彴
+ * @author lin
+ */
+@Schema(description = "鍥芥爣璁惧/骞冲彴")
 public class Device {
 
 	/**
-	 * 璁惧Id
+	 * 璁惧鍥芥爣缂栧彿
 	 */
+	@Schema(description = "璁惧鍥芥爣缂栧彿")
 	private String deviceId;
 
 	/**
 	 * 璁惧鍚�
 	 */
+	@Schema(description = "鍚嶇О")
 	private String name;
 	
 	/**
 	 * 鐢熶骇鍘傚晢
 	 */
+	@Schema(description = "鐢熶骇鍘傚晢")
 	private String manufacturer;
 	
 	/**
 	 * 鍨嬪彿
 	 */
+	@Schema(description = "鍨嬪彿")
 	private String model;
 	
 	/**
 	 * 鍥轰欢鐗堟湰
 	 */
+	@Schema(description = "鍥轰欢鐗堟湰")
 	private String firmware;
 
 	/**
 	 * 浼犺緭鍗忚
 	 * UDP/TCP
 	 */
+	@Schema(description = "浼犺緭鍗忚锛圲DP/TCP锛�")
 	private String transport;
+
+	/**
+	 * 鏁版嵁娴佷紶杈撴ā寮�
+	 * UDP:udp浼犺緭
+	 * TCP-ACTIVE锛歵cp涓诲姩妯″紡
+	 * TCP-PASSIVE锛歵cp琚姩妯″紡
+	 */
+	@Schema(description = "鏁版嵁娴佷紶杈撴ā寮�")
+	private String streamMode;
+
+	/**
+	 * wan鍦板潃_ip
+	 */
+	@Schema(description = "IP")
+	private String  ip;
+
+	/**
+	 * wan鍦板潃_port
+	 */
+	@Schema(description = "绔彛")
+	private int port;
 
 	/**
 	 * wan鍦板潃
 	 */
-	private Host host;
+	@Schema(description = "wan鍦板潃")
+	private String  hostAddress;
 	
 	/**
 	 * 鍦ㄧ嚎
 	 */
-	private int online;
+	@Schema(description = "鏄惁鍦ㄧ嚎锛宼rue涓哄湪绾匡紝false涓虹绾�")
+	private boolean onLine;
+
 
 	/**
-	 * 閫氶亾鍒楄〃
+	 * 娉ㄥ唽鏃堕棿
 	 */
-	private Map<String,DeviceChannel> channelMap;
+	@Schema(description = "娉ㄥ唽鏃堕棿")
+	private String registerTime;
+
+
+	/**
+	 * 蹇冭烦鏃堕棿
+	 */
+	@Schema(description = "蹇冭烦鏃堕棿")
+	private String keepaliveTime;
+
+
+	/**
+	 * 蹇冭烦闂撮殧
+	 */
+	@Schema(description = "蹇冭烦闂撮殧")
+	private int keepaliveIntervalTime;
+
+	/**
+	 * 閫氶亾涓暟
+	 */
+	@Schema(description = "閫氶亾涓暟")
+	private int channelCount;
+
+	/**
+	 * 娉ㄥ唽鏈夋晥鏈�
+	 */
+	@Schema(description = "娉ㄥ唽鏈夋晥鏈�")
+	private int expires;
+
+	/**
+	 * 鍒涘缓鏃堕棿
+	 */
+	@Schema(description = "鍒涘缓鏃堕棿")
+	private String createTime;
+
+	/**
+	 * 鏇存柊鏃堕棿
+	 */
+	@Schema(description = "鏇存柊鏃堕棿")
+	private String updateTime;
+
+	/**
+	 * 璁惧浣跨敤鐨勫獟浣搃d, 榛樿涓簄ull
+	 */
+	@Schema(description = "璁惧浣跨敤鐨勫獟浣搃d, 榛樿涓簄ull")
+	private String mediaServerId;
+
+	/**
+	 * 瀛楃闆�, 鏀寔 UTF-8 涓� GB2312
+	 */
+	@Schema(description = "绗﹂泦, 鏀寔 UTF-8 涓� GB2312")
+	private String charset ;
+
+	/**
+	 * 鐩綍璁㈤槄鍛ㄦ湡锛�0涓轰笉璁㈤槄
+	 */
+	@Schema(description = "鐩綍璁㈤槄鍛ㄦ湡锛宱涓轰笉璁㈤槄")
+	private int subscribeCycleForCatalog;
+
+	/**
+	 * 绉诲姩璁惧浣嶇疆璁㈤槄鍛ㄦ湡锛�0涓轰笉璁㈤槄
+	 */
+	@Schema(description = "绉诲姩璁惧浣嶇疆璁㈤槄鍛ㄦ湡锛�0涓轰笉璁㈤槄")
+	private int subscribeCycleForMobilePosition;
+
+	/**
+	 * 绉诲姩璁惧浣嶇疆淇℃伅涓婃姤鏃堕棿闂撮殧,鍗曚綅:绉�,榛樿鍊�5
+	 */
+	@Schema(description = "绉诲姩璁惧浣嶇疆淇℃伅涓婃姤鏃堕棿闂撮殧,鍗曚綅:绉�,榛樿鍊�5")
+	private int mobilePositionSubmissionInterval = 5;
+
+	/**
+	 * 鎶ヨ璁㈤槄鍛ㄦ湡锛�0涓轰笉璁㈤槄
+	 */
+	@Schema(description = "鎶ヨ蹇冭烦鏃堕棿璁㈤槄鍛ㄦ湡锛�0涓轰笉璁㈤槄")
+	private int subscribeCycleForAlarm;
+
+	/**
+	 * 鏄惁寮�鍚痵src鏍¢獙锛岄粯璁ゅ叧闂紝寮�鍚彲浠ラ槻姝覆娴�
+	 */
+	@Schema(description = "鏄惁寮�鍚痵src鏍¢獙锛岄粯璁ゅ叧闂紝寮�鍚彲浠ラ槻姝覆娴�")
+	private boolean ssrcCheck = false;
+
+	/**
+	 * 鍦扮悊鍧愭爣绯伙紝 鐩墠鏀寔 WGS84,GCJ02
+	 */
+	@Schema(description = "鍦扮悊鍧愭爣绯伙紝 鐩墠鏀寔 WGS84,GCJ02")
+	private String geoCoordSys;
+
+	@Schema(description = "瀵嗙爜")
+	private String password;
+
+	@Schema(description = "鏀舵祦IP")
+	private String sdpIp;
+
+	@Schema(description = "SIP浜や簰IP锛堣澶囪闂钩鍙扮殑IP锛�")
+	private String localIp;
+
+	@Schema(description = "鏄惁浣滀负娑堟伅閫氶亾")
+	private boolean asMessageChannel;
+
+	@Schema(description = "璁惧娉ㄥ唽鐨勪簨鍔′俊鎭�")
+	private SipTransactionInfo sipTransactionInfo;
+
+
 
 
 	public String getDeviceId() {
@@ -66,30 +205,6 @@
 
 	public void setName(String name) {
 		this.name = name;
-	}
-
-	public String getTransport() {
-		return transport;
-	}
-
-	public void setTransport(String transport) {
-		this.transport = transport;
-	}
-
-	public Host getHost() {
-		return host;
-	}
-
-	public void setHost(Host host) {
-		this.host = host;
-	}
-
-	public Map<String, DeviceChannel> getChannelMap() {
-		return channelMap;
-	}
-
-	public void setChannelMap(Map<String, DeviceChannel> channelMap) {
-		this.channelMap = channelMap;
 	}
 
 	public String getManufacturer() {
@@ -116,11 +231,241 @@
 		this.firmware = firmware;
 	}
 
-	public int getOnline() {
-		return online;
+	public String getTransport() {
+		return transport;
 	}
 
-	public void setOnline(int online) {
-		this.online = online;
+	public void setTransport(String transport) {
+		this.transport = transport;
 	}
+
+	public String getStreamMode() {
+		return streamMode;
+	}
+
+	public Integer getStreamModeForParam() {
+		if (streamMode == null) {
+			return 0;
+		}
+		if (streamMode.equalsIgnoreCase("UDP")) {
+			return 0;
+		}else if (streamMode.equalsIgnoreCase("TCP-PASSIVE")) {
+			return 1;
+		}else if (streamMode.equalsIgnoreCase("TCP-ACTIVE")) {
+			return 2;
+		}
+		return 0;
+	}
+
+	public void setStreamMode(String streamMode) {
+		this.streamMode = streamMode;
+	}
+
+	public String getIp() {
+		return ip;
+	}
+
+	public void setIp(String ip) {
+		this.ip = ip;
+	}
+
+	public int getPort() {
+		return port;
+	}
+
+	public void setPort(int port) {
+		this.port = port;
+	}
+
+	public String getHostAddress() {
+		return hostAddress;
+	}
+
+	public void setHostAddress(String hostAddress) {
+		this.hostAddress = hostAddress;
+	}
+
+	public boolean isOnLine() {
+		return onLine;
+	}
+
+	public void setOnLine(boolean onLine) {
+		this.onLine = onLine;
+	}
+
+	public int getChannelCount() {
+		return channelCount;
+	}
+
+	public void setChannelCount(int channelCount) {
+		this.channelCount = channelCount;
+	}
+
+	public String getRegisterTime() {
+		return registerTime;
+	}
+
+	public void setRegisterTime(String registerTime) {
+		this.registerTime = registerTime;
+	}
+
+	public String getKeepaliveTime() {
+		return keepaliveTime;
+	}
+
+	public void setKeepaliveTime(String keepaliveTime) {
+		this.keepaliveTime = keepaliveTime;
+	}
+
+	public int getExpires() {
+		return expires;
+	}
+
+	public void setExpires(int expires) {
+		this.expires = expires;
+	}
+
+	public String getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(String createTime) {
+		this.createTime = createTime;
+	}
+
+	public String getUpdateTime() {
+		return updateTime;
+	}
+
+	public void setUpdateTime(String updateTime) {
+		this.updateTime = updateTime;
+	}
+
+	public String getMediaServerId() {
+		return mediaServerId;
+	}
+
+	public void setMediaServerId(String mediaServerId) {
+		this.mediaServerId = mediaServerId;
+	}
+
+	public String getCharset() {
+		return charset;
+	}
+
+	public void setCharset(String charset) {
+		this.charset = charset;
+	}
+
+	public int getSubscribeCycleForCatalog() {
+		return subscribeCycleForCatalog;
+	}
+
+	public void setSubscribeCycleForCatalog(int subscribeCycleForCatalog) {
+		this.subscribeCycleForCatalog = subscribeCycleForCatalog;
+	}
+
+	public int getSubscribeCycleForMobilePosition() {
+		return subscribeCycleForMobilePosition;
+	}
+
+	public void setSubscribeCycleForMobilePosition(int subscribeCycleForMobilePosition) {
+		this.subscribeCycleForMobilePosition = subscribeCycleForMobilePosition;
+	}
+
+	public int getMobilePositionSubmissionInterval() {
+		return mobilePositionSubmissionInterval;
+	}
+
+	public void setMobilePositionSubmissionInterval(int mobilePositionSubmissionInterval) {
+		this.mobilePositionSubmissionInterval = mobilePositionSubmissionInterval;
+	}
+
+	public int getSubscribeCycleForAlarm() {
+		return subscribeCycleForAlarm;
+	}
+
+	public void setSubscribeCycleForAlarm(int subscribeCycleForAlarm) {
+		this.subscribeCycleForAlarm = subscribeCycleForAlarm;
+	}
+
+	public boolean isSsrcCheck() {
+		return ssrcCheck;
+	}
+
+	public void setSsrcCheck(boolean ssrcCheck) {
+		this.ssrcCheck = ssrcCheck;
+	}
+
+	public String getGeoCoordSys() {
+		return geoCoordSys;
+	}
+
+	public void setGeoCoordSys(String geoCoordSys) {
+		this.geoCoordSys = geoCoordSys;
+	}
+
+	public String getPassword() {
+		return password;
+	}
+
+	public void setPassword(String password) {
+		this.password = password;
+	}
+
+	public String getSdpIp() {
+		return sdpIp;
+	}
+
+	public void setSdpIp(String sdpIp) {
+		this.sdpIp = sdpIp;
+	}
+
+	public String getLocalIp() {
+		return localIp;
+	}
+
+	public void setLocalIp(String localIp) {
+		this.localIp = localIp;
+	}
+
+	public int getKeepaliveIntervalTime() {
+		return keepaliveIntervalTime;
+	}
+
+	public void setKeepaliveIntervalTime(int keepaliveIntervalTime) {
+		this.keepaliveIntervalTime = keepaliveIntervalTime;
+	}
+
+	public boolean isAsMessageChannel() {
+		return asMessageChannel;
+	}
+
+	public void setAsMessageChannel(boolean asMessageChannel) {
+		this.asMessageChannel = asMessageChannel;
+	}
+
+	public SipTransactionInfo getSipTransactionInfo() {
+		return sipTransactionInfo;
+	}
+
+	public void setSipTransactionInfo(SipTransactionInfo sipTransactionInfo) {
+		this.sipTransactionInfo = sipTransactionInfo;
+	}
+
+	/*======================璁惧涓诲瓙鐮佹祦閫昏緫START=========================*/
+	@Schema(description = "寮�鍚富瀛愮爜娴佸垏鎹㈢殑寮�鍏筹紙false-涓嶅紑鍚紝true-寮�鍚級")
+	private boolean switchPrimarySubStream;
+
+	public boolean isSwitchPrimarySubStream() {
+		return switchPrimarySubStream;
+	}
+
+	public void setSwitchPrimarySubStream(boolean switchPrimarySubStream) {
+		this.switchPrimarySubStream = switchPrimarySubStream;
+	}
+
+	/*======================璁惧涓诲瓙鐮佹祦閫昏緫END=========================*/
+
+
 }

--
Gitblit v1.8.0