mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-25 06:27:50 +08:00
1078-图像分析报警参数设置
This commit is contained in:
parent
1e9cdfe87f
commit
8be6979911
@ -223,9 +223,15 @@ public class JTDeviceConfig {
|
|||||||
@ConfigAttribute(id = 0x79, type="AlarmRecordingParam", description = "特殊报警录像参数设置")
|
@ConfigAttribute(id = 0x79, type="AlarmRecordingParam", description = "特殊报警录像参数设置")
|
||||||
private AlarmRecordingParam alarmRecordingParam;
|
private AlarmRecordingParam alarmRecordingParam;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x79, type="VideoAlarmBit", description = "视频相关报警屏蔽字")
|
@ConfigAttribute(id = 0x7a, type="VideoAlarmBit", description = "视频相关报警屏蔽字")
|
||||||
private VideoAlarmBit videoAlarmBit;
|
private VideoAlarmBit videoAlarmBit;
|
||||||
|
|
||||||
|
@ConfigAttribute(id = 0x7b, type="AnalyzeAlarmParam", description = "图像分析报警参数设置")
|
||||||
|
private AnalyzeAlarmParam analyzeAlarmParam;
|
||||||
|
|
||||||
|
@ConfigAttribute(id = 0x7c, type="AwakenParam", description = "终端休眠唤醒模式设置")
|
||||||
|
private AwakenParam awakenParam;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x80, type="Long", description = "车辆里程表读数,单位'1/10km")
|
@ConfigAttribute(id = 0x80, type="Long", description = "车辆里程表读数,单位'1/10km")
|
||||||
private Long mileage;
|
private Long mileage;
|
||||||
|
|
||||||
@ -283,6 +289,14 @@ public class JTDeviceConfig {
|
|||||||
private Integer canUploadIntervalForChannel2;
|
private Integer canUploadIntervalForChannel2;
|
||||||
|
|
||||||
|
|
||||||
|
public AnalyzeAlarmParam getAnalyzeAlarmParam() {
|
||||||
|
return analyzeAlarmParam;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAnalyzeAlarmParam(AnalyzeAlarmParam analyzeAlarmParam) {
|
||||||
|
this.analyzeAlarmParam = analyzeAlarmParam;
|
||||||
|
}
|
||||||
|
|
||||||
public Long getKeepaliveInterval() {
|
public Long getKeepaliveInterval() {
|
||||||
return keepaliveInterval;
|
return keepaliveInterval;
|
||||||
}
|
}
|
||||||
@ -971,6 +985,14 @@ public class JTDeviceConfig {
|
|||||||
this.alarmRecordingParam = alarmRecordingParam;
|
this.alarmRecordingParam = alarmRecordingParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public VideoAlarmBit getVideoAlarmBit() {
|
||||||
|
return videoAlarmBit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideoAlarmBit(VideoAlarmBit videoAlarmBit) {
|
||||||
|
this.videoAlarmBit = videoAlarmBit;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "JTDeviceConfig{" +
|
return "JTDeviceConfig{" +
|
||||||
|
|||||||
@ -0,0 +1,53 @@
|
|||||||
|
package com.genersoft.iot.vmp.jt1078.bean.config;
|
||||||
|
|
||||||
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频分析报警参数
|
||||||
|
*/
|
||||||
|
public class AnalyzeAlarmParam implements JTDeviceSubConfig{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆核载人数
|
||||||
|
*/
|
||||||
|
private int numberForPeople;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 疲劳程度阈值
|
||||||
|
*/
|
||||||
|
private int fatigueThreshold;
|
||||||
|
|
||||||
|
|
||||||
|
public int getNumberForPeople() {
|
||||||
|
return numberForPeople;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumberForPeople(int numberForPeople) {
|
||||||
|
this.numberForPeople = numberForPeople;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getFatigueThreshold() {
|
||||||
|
return fatigueThreshold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFatigueThreshold(int fatigueThreshold) {
|
||||||
|
this.fatigueThreshold = fatigueThreshold;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ByteBuf encode() {
|
||||||
|
ByteBuf byteBuf = Unpooled.buffer();
|
||||||
|
byteBuf.writeByte(numberForPeople);
|
||||||
|
byteBuf.writeByte(fatigueThreshold);
|
||||||
|
return byteBuf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static AnalyzeAlarmParam decode(ByteBuf byteBuf) {
|
||||||
|
AnalyzeAlarmParam analyzeAlarmParam = new AnalyzeAlarmParam();
|
||||||
|
analyzeAlarmParam.setNumberForPeople(byteBuf.readUnsignedByte());
|
||||||
|
analyzeAlarmParam.setFatigueThreshold(byteBuf.readUnsignedByte());
|
||||||
|
return analyzeAlarmParam;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.genersoft.iot.vmp.jt1078.bean.config;
|
||||||
|
|
||||||
|
import io.netty.buffer.ByteBuf;
|
||||||
|
|
||||||
|
public class AwakenParam implements JTDeviceSubConfig{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ByteBuf encode() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -150,6 +150,11 @@ public class J0104 extends Re {
|
|||||||
Method methodForVideoAlarmBit = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), VideoAlarmBit.class);
|
Method methodForVideoAlarmBit = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), VideoAlarmBit.class);
|
||||||
methodForVideoAlarmBit.invoke(deviceConfig, videoAlarmBit);
|
methodForVideoAlarmBit.invoke(deviceConfig, videoAlarmBit);
|
||||||
continue;
|
continue;
|
||||||
|
case "AnalyzeAlarmParam":
|
||||||
|
AnalyzeAlarmParam analyzeAlarmParam = AnalyzeAlarmParam.decode(buf);
|
||||||
|
Method methodForAnalyzeAlarmParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), AnalyzeAlarmParam.class);
|
||||||
|
methodForAnalyzeAlarmParam.invoke(deviceConfig, analyzeAlarmParam);
|
||||||
|
continue;
|
||||||
default:
|
default:
|
||||||
System.err.println(field.getGenericType().getTypeName());
|
System.err.println(field.getGenericType().getTypeName());
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@ -94,6 +94,7 @@ public class J8103 extends Rs {
|
|||||||
case "AlarmRecordingParam":
|
case "AlarmRecordingParam":
|
||||||
case "AlarmShielding":
|
case "AlarmShielding":
|
||||||
case "VideoAlarmBit":
|
case "VideoAlarmBit":
|
||||||
|
case "AnalyzeAlarmParam":
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
JTDeviceSubConfig subConfig = (JTDeviceSubConfig)field.get(config);
|
JTDeviceSubConfig subConfig = (JTDeviceSubConfig)field.get(config);
|
||||||
ByteBuf bytesForIllegalDrivingPeriods = subConfig.encode();
|
ByteBuf bytesForIllegalDrivingPeriods = subConfig.encode();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user