临时提交

This commit is contained in:
648540858
2024-07-01 17:59:14 +08:00
parent 2c7dfa03a8
commit 324fef2908
3 changed files with 24 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
package com.genersoft.iot.vmp.gb28181.bean;
import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -202,5 +203,19 @@ public class CommonGBChannel {
@Schema(description = "关联的拉流代理Id流来源是拉流代理时有效")
private Integer streamProxyId;
public String encode(CatalogEvent event){
String content;
if (event.getType().equals(CatalogEvent.DEL)
|| event.getType().equals(CatalogEvent.DEFECT)
|| event.getType().equals(CatalogEvent.VLOST)) {
content = "<Item>\n" +
"<DeviceID>" + this.getGbDeviceId() + "</DeviceID>\n" +
"<Event>" + event + "</Event>\r\n" +
"</Item>";
}
return content;
}
}

View File

@@ -230,4 +230,6 @@ public class DeviceChannel extends CommonGBChannel {
deviceChannel.setDeviceId(deviceElement.getText());
return deviceChannel;
}
}