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
8be6979911
commit
c8ddee905f
@ -6,7 +6,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
* JT 通信模块属性
|
* JT 通信模块属性
|
||||||
*/
|
*/
|
||||||
@Schema(description = "JT通信模块属性")
|
@Schema(description = "JT通信模块属性")
|
||||||
public class JCommunicationModuleAttribute {
|
public class JTCommunicationModuleAttribute {
|
||||||
|
|
||||||
private boolean gprs ;
|
private boolean gprs ;
|
||||||
private boolean cdma ;
|
private boolean cdma ;
|
||||||
@ -17,7 +17,7 @@ public class JCommunicationModuleAttribute {
|
|||||||
private boolean other ;
|
private boolean other ;
|
||||||
|
|
||||||
|
|
||||||
public static JCommunicationModuleAttribute getInstance(short content) {
|
public static JTCommunicationModuleAttribute getInstance(short content) {
|
||||||
boolean gprs = (content & 1) == 1;
|
boolean gprs = (content & 1) == 1;
|
||||||
boolean cdma = (content >>> 1 & 1) == 1;
|
boolean cdma = (content >>> 1 & 1) == 1;
|
||||||
boolean tdScdma = (content >>> 2 & 1) == 1;
|
boolean tdScdma = (content >>> 2 & 1) == 1;
|
||||||
@ -25,10 +25,10 @@ public class JCommunicationModuleAttribute {
|
|||||||
boolean cdma2000 = (content >>> 4 & 1) == 1;
|
boolean cdma2000 = (content >>> 4 & 1) == 1;
|
||||||
boolean tdLte = (content >>> 5 & 1) == 1;
|
boolean tdLte = (content >>> 5 & 1) == 1;
|
||||||
boolean other = (content >>> 7 & 1) == 1;
|
boolean other = (content >>> 7 & 1) == 1;
|
||||||
return new JCommunicationModuleAttribute(gprs, cdma, tdScdma, wcdma, cdma2000, tdLte, other);
|
return new JTCommunicationModuleAttribute(gprs, cdma, tdScdma, wcdma, cdma2000, tdLte, other);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JCommunicationModuleAttribute(boolean gprs, boolean cdma, boolean tdScdma, boolean wcdma, boolean cdma2000, boolean tdLte, boolean other) {
|
public JTCommunicationModuleAttribute(boolean gprs, boolean cdma, boolean tdScdma, boolean wcdma, boolean cdma2000, boolean tdLte, boolean other) {
|
||||||
this.gprs = gprs;
|
this.gprs = gprs;
|
||||||
this.cdma = cdma;
|
this.cdma = cdma;
|
||||||
this.tdScdma = tdScdma;
|
this.tdScdma = tdScdma;
|
||||||
@ -3,7 +3,7 @@ package com.genersoft.iot.vmp.jt1078.bean;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
@Schema(description = "人工确认报警类型")
|
@Schema(description = "人工确认报警类型")
|
||||||
public class JConfirmationAlarmMessageType {
|
public class JTConfirmationAlarmMessageType {
|
||||||
@Schema(description = "确认紧急报警")
|
@Schema(description = "确认紧急报警")
|
||||||
private boolean urgent;
|
private boolean urgent;
|
||||||
@Schema(description = "确认危险预警")
|
@Schema(description = "确认危险预警")
|
||||||
@ -1,10 +1,5 @@
|
|||||||
package com.genersoft.iot.vmp.jt1078.bean;
|
package com.genersoft.iot.vmp.jt1078.bean;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.common.ConfigAttribute;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.config.CameraTimer;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.config.CollisionAlarmParams;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.config.GnssPositioningMode;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.config.IllegalDrivingPeriods;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -35,10 +30,10 @@ public class JTDeviceAttribute {
|
|||||||
private String firmwareVersion ;
|
private String firmwareVersion ;
|
||||||
|
|
||||||
@Schema(description = "GNSS 模块属性")
|
@Schema(description = "GNSS 模块属性")
|
||||||
private JGnssAttribute gnssAttribute ;
|
private JTGnssAttribute gnssAttribute ;
|
||||||
|
|
||||||
@Schema(description = "通信模块属性")
|
@Schema(description = "通信模块属性")
|
||||||
private JCommunicationModuleAttribute communicationModuleAttribute ;
|
private JTCommunicationModuleAttribute communicationModuleAttribute ;
|
||||||
|
|
||||||
public JTDeviceType getType() {
|
public JTDeviceType getType() {
|
||||||
return type;
|
return type;
|
||||||
@ -96,19 +91,19 @@ public class JTDeviceAttribute {
|
|||||||
this.firmwareVersion = firmwareVersion;
|
this.firmwareVersion = firmwareVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JGnssAttribute getGnssAttribute() {
|
public JTGnssAttribute getGnssAttribute() {
|
||||||
return gnssAttribute;
|
return gnssAttribute;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGnssAttribute(JGnssAttribute gnssAttribute) {
|
public void setGnssAttribute(JTGnssAttribute gnssAttribute) {
|
||||||
this.gnssAttribute = gnssAttribute;
|
this.gnssAttribute = gnssAttribute;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JCommunicationModuleAttribute getCommunicationModuleAttribute() {
|
public JTCommunicationModuleAttribute getCommunicationModuleAttribute() {
|
||||||
return communicationModuleAttribute;
|
return communicationModuleAttribute;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCommunicationModuleAttribute(JCommunicationModuleAttribute communicationModuleAttribute) {
|
public void setCommunicationModuleAttribute(JTCommunicationModuleAttribute communicationModuleAttribute) {
|
||||||
this.communicationModuleAttribute = communicationModuleAttribute;
|
this.communicationModuleAttribute = communicationModuleAttribute;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -116,7 +116,7 @@ public class JTDeviceConfig {
|
|||||||
private Integer fenceRadius;
|
private Integer fenceRadius;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x32, type="IllegalDrivingPeriods", description = "违规行驶时段范围 ,精确到分")
|
@ConfigAttribute(id = 0x32, type="IllegalDrivingPeriods", description = "违规行驶时段范围 ,精确到分")
|
||||||
private IllegalDrivingPeriods illegalDrivingPeriods;
|
private JTIllegalDrivingPeriods illegalDrivingPeriods;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x40, type="String", description = "监控平台电话号码")
|
@ConfigAttribute(id = 0x40, type="String", description = "监控平台电话号码")
|
||||||
private String platformPhoneNumber;
|
private String platformPhoneNumber;
|
||||||
@ -188,13 +188,13 @@ public class JTDeviceConfig {
|
|||||||
private Integer drowsyDrivingWarningDifference;
|
private Integer drowsyDrivingWarningDifference;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x5d, type="CollisionAlarmParams", description = "碰撞报警参数设置")
|
@ConfigAttribute(id = 0x5d, type="CollisionAlarmParams", description = "碰撞报警参数设置")
|
||||||
private CollisionAlarmParams collisionAlarmParams;
|
private JTCollisionAlarmParams collisionAlarmParams;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x5e, type="Integer", description = "侧翻报警参数设置:侧翻角度,单位为度,默认为30")
|
@ConfigAttribute(id = 0x5e, type="Integer", description = "侧翻报警参数设置:侧翻角度,单位为度,默认为30")
|
||||||
private Integer rolloverAlarm;
|
private Integer rolloverAlarm;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x64, type="CameraTimer", description = "定时拍照控制")
|
@ConfigAttribute(id = 0x64, type="CameraTimer", description = "定时拍照控制")
|
||||||
private CameraTimer cameraTimer;
|
private JTCameraTimer cameraTimer;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x70, type="Long", description = "图像/视频质量 设置范围为1~10 1表示最优质量")
|
@ConfigAttribute(id = 0x70, type="Long", description = "图像/视频质量 设置范围为1~10 1表示最优质量")
|
||||||
private Long qualityForVideo;
|
private Long qualityForVideo;
|
||||||
@ -212,25 +212,25 @@ public class JTDeviceConfig {
|
|||||||
private Long chroma;
|
private Long chroma;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x75, type="VideoParam", description = "音视频参数设置")
|
@ConfigAttribute(id = 0x75, type="VideoParam", description = "音视频参数设置")
|
||||||
private VideoParam videoParam;
|
private JTVideoParam videoParam;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x76, type="ChannelListParam", description = "音视频通道列表设置")
|
@ConfigAttribute(id = 0x76, type="ChannelListParam", description = "音视频通道列表设置")
|
||||||
private ChannelListParam channelListParam;
|
private JTChannelListParam channelListParam;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x77, type="ChannelParam", description = "音视频通道列表设置")
|
@ConfigAttribute(id = 0x77, type="ChannelParam", description = "音视频通道列表设置")
|
||||||
private ChannelParam channelParam;
|
private JTChannelParam channelParam;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x79, type="AlarmRecordingParam", description = "特殊报警录像参数设置")
|
@ConfigAttribute(id = 0x79, type="AlarmRecordingParam", description = "特殊报警录像参数设置")
|
||||||
private AlarmRecordingParam alarmRecordingParam;
|
private JTAlarmRecordingParam alarmRecordingParam;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x7a, type="VideoAlarmBit", description = "视频相关报警屏蔽字")
|
@ConfigAttribute(id = 0x7a, type="VideoAlarmBit", description = "视频相关报警屏蔽字")
|
||||||
private VideoAlarmBit videoAlarmBit;
|
private JTVideoAlarmBit videoAlarmBit;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x7b, type="AnalyzeAlarmParam", description = "图像分析报警参数设置")
|
@ConfigAttribute(id = 0x7b, type="AnalyzeAlarmParam", description = "图像分析报警参数设置")
|
||||||
private AnalyzeAlarmParam analyzeAlarmParam;
|
private JTAnalyzeAlarmParam analyzeAlarmParam;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x7c, type="AwakenParam", description = "终端休眠唤醒模式设置")
|
@ConfigAttribute(id = 0x7c, type="AwakenParam", description = "终端休眠唤醒模式设置")
|
||||||
private AwakenParam awakenParam;
|
private JTAwakenParam awakenParam;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x80, type="Long", description = "车辆里程表读数,单位'1/10km")
|
@ConfigAttribute(id = 0x80, type="Long", description = "车辆里程表读数,单位'1/10km")
|
||||||
private Long mileage;
|
private Long mileage;
|
||||||
@ -248,7 +248,7 @@ public class JTDeviceConfig {
|
|||||||
private Short licensePlateColor;
|
private Short licensePlateColor;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x90, type="Short", description = "GNSS定位模式")
|
@ConfigAttribute(id = 0x90, type="Short", description = "GNSS定位模式")
|
||||||
private GnssPositioningMode gnssPositioningMode;
|
private JTGnssPositioningMode gnssPositioningMode;
|
||||||
|
|
||||||
@ConfigAttribute(id = 0x91, type="Short", description = "GNSS 波特率,定义如下: 0: 4800, 1:9600, 2:19200, 3:38400, 4:57600, 5:115200")
|
@ConfigAttribute(id = 0x91, type="Short", description = "GNSS 波特率,定义如下: 0: 4800, 1:9600, 2:19200, 3:38400, 4:57600, 5:115200")
|
||||||
private Short gnssBaudRate;
|
private Short gnssBaudRate;
|
||||||
@ -289,11 +289,11 @@ public class JTDeviceConfig {
|
|||||||
private Integer canUploadIntervalForChannel2;
|
private Integer canUploadIntervalForChannel2;
|
||||||
|
|
||||||
|
|
||||||
public AnalyzeAlarmParam getAnalyzeAlarmParam() {
|
public JTAnalyzeAlarmParam getAnalyzeAlarmParam() {
|
||||||
return analyzeAlarmParam;
|
return analyzeAlarmParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAnalyzeAlarmParam(AnalyzeAlarmParam analyzeAlarmParam) {
|
public void setAnalyzeAlarmParam(JTAnalyzeAlarmParam analyzeAlarmParam) {
|
||||||
this.analyzeAlarmParam = analyzeAlarmParam;
|
this.analyzeAlarmParam = analyzeAlarmParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -577,11 +577,11 @@ public class JTDeviceConfig {
|
|||||||
this.fenceRadius = fenceRadius;
|
this.fenceRadius = fenceRadius;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IllegalDrivingPeriods getIllegalDrivingPeriods() {
|
public JTIllegalDrivingPeriods getIllegalDrivingPeriods() {
|
||||||
return illegalDrivingPeriods;
|
return illegalDrivingPeriods;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIllegalDrivingPeriods(IllegalDrivingPeriods illegalDrivingPeriods) {
|
public void setIllegalDrivingPeriods(JTIllegalDrivingPeriods illegalDrivingPeriods) {
|
||||||
this.illegalDrivingPeriods = illegalDrivingPeriods;
|
this.illegalDrivingPeriods = illegalDrivingPeriods;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -769,11 +769,11 @@ public class JTDeviceConfig {
|
|||||||
this.drowsyDrivingWarningDifference = drowsyDrivingWarningDifference;
|
this.drowsyDrivingWarningDifference = drowsyDrivingWarningDifference;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CollisionAlarmParams getCollisionAlarmParams() {
|
public JTCollisionAlarmParams getCollisionAlarmParams() {
|
||||||
return collisionAlarmParams;
|
return collisionAlarmParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCollisionAlarmParams(CollisionAlarmParams collisionAlarmParams) {
|
public void setCollisionAlarmParams(JTCollisionAlarmParams collisionAlarmParams) {
|
||||||
this.collisionAlarmParams = collisionAlarmParams;
|
this.collisionAlarmParams = collisionAlarmParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -785,11 +785,11 @@ public class JTDeviceConfig {
|
|||||||
this.rolloverAlarm = rolloverAlarm;
|
this.rolloverAlarm = rolloverAlarm;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CameraTimer getCameraTimer() {
|
public JTCameraTimer getCameraTimer() {
|
||||||
return cameraTimer;
|
return cameraTimer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCameraTimer(CameraTimer cameraTimer) {
|
public void setCameraTimer(JTCameraTimer cameraTimer) {
|
||||||
this.cameraTimer = cameraTimer;
|
this.cameraTimer = cameraTimer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -873,11 +873,11 @@ public class JTDeviceConfig {
|
|||||||
this.licensePlateColor = licensePlateColor;
|
this.licensePlateColor = licensePlateColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GnssPositioningMode getGnssPositioningMode() {
|
public JTGnssPositioningMode getGnssPositioningMode() {
|
||||||
return gnssPositioningMode;
|
return gnssPositioningMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGnssPositioningMode(GnssPositioningMode gnssPositioningMode) {
|
public void setGnssPositioningMode(JTGnssPositioningMode gnssPositioningMode) {
|
||||||
this.gnssPositioningMode = gnssPositioningMode;
|
this.gnssPositioningMode = gnssPositioningMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -953,46 +953,55 @@ public class JTDeviceConfig {
|
|||||||
this.canUploadIntervalForChannel2 = canUploadIntervalForChannel2;
|
this.canUploadIntervalForChannel2 = canUploadIntervalForChannel2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public VideoParam getVideoParam() {
|
public JTVideoParam getVideoParam() {
|
||||||
return videoParam;
|
return videoParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVideoParam(VideoParam videoParam) {
|
public void setVideoParam(JTVideoParam videoParam) {
|
||||||
this.videoParam = videoParam;
|
this.videoParam = videoParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChannelListParam getChannelListParam() {
|
public JTChannelListParam getChannelListParam() {
|
||||||
return channelListParam;
|
return channelListParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setChannelListParam(ChannelListParam channelListParam) {
|
public void setChannelListParam(JTChannelListParam channelListParam) {
|
||||||
this.channelListParam = channelListParam;
|
this.channelListParam = channelListParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChannelParam getChannelParam() {
|
public JTChannelParam getChannelParam() {
|
||||||
return channelParam;
|
return channelParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setChannelParam(ChannelParam channelParam) {
|
public void setChannelParam(JTChannelParam channelParam) {
|
||||||
this.channelParam = channelParam;
|
this.channelParam = channelParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AlarmRecordingParam getAlarmRecordingParam() {
|
public JTAlarmRecordingParam getAlarmRecordingParam() {
|
||||||
return alarmRecordingParam;
|
return alarmRecordingParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAlarmRecordingParam(AlarmRecordingParam alarmRecordingParam) {
|
public void setAlarmRecordingParam(JTAlarmRecordingParam alarmRecordingParam) {
|
||||||
this.alarmRecordingParam = alarmRecordingParam;
|
this.alarmRecordingParam = alarmRecordingParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
public VideoAlarmBit getVideoAlarmBit() {
|
public JTVideoAlarmBit getVideoAlarmBit() {
|
||||||
return videoAlarmBit;
|
return videoAlarmBit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVideoAlarmBit(VideoAlarmBit videoAlarmBit) {
|
public void setVideoAlarmBit(JTVideoAlarmBit videoAlarmBit) {
|
||||||
this.videoAlarmBit = videoAlarmBit;
|
this.videoAlarmBit = videoAlarmBit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public JTAwakenParam getAwakenParam() {
|
||||||
|
return awakenParam;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAwakenParam(JTAwakenParam awakenParam) {
|
||||||
|
this.awakenParam = awakenParam;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "JTDeviceConfig{" +
|
return "JTDeviceConfig{" +
|
||||||
|
|||||||
@ -1,10 +1,5 @@
|
|||||||
package com.genersoft.iot.vmp.jt1078.bean;
|
package com.genersoft.iot.vmp.jt1078.bean;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.common.ConfigAttribute;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.config.CameraTimer;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.config.CollisionAlarmParams;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.config.GnssPositioningMode;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.config.IllegalDrivingPeriods;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
* JT GNSS 模块属性
|
* JT GNSS 模块属性
|
||||||
*/
|
*/
|
||||||
@Schema(description = "JTGNSS 模块属性")
|
@Schema(description = "JTGNSS 模块属性")
|
||||||
public class JGnssAttribute {
|
public class JTGnssAttribute {
|
||||||
|
|
||||||
private boolean gps;
|
private boolean gps;
|
||||||
|
|
||||||
@ -16,15 +16,15 @@ public class JGnssAttribute {
|
|||||||
|
|
||||||
private boolean gaLiLeo;
|
private boolean gaLiLeo;
|
||||||
|
|
||||||
public static JGnssAttribute getInstance(short content) {
|
public static JTGnssAttribute getInstance(short content) {
|
||||||
boolean gps = (content & 1) == 1;
|
boolean gps = (content & 1) == 1;
|
||||||
boolean beidou = (content >>> 1 & 1) == 1;
|
boolean beidou = (content >>> 1 & 1) == 1;
|
||||||
boolean glonass = (content >>> 2 & 1) == 1;
|
boolean glonass = (content >>> 2 & 1) == 1;
|
||||||
boolean gaLiLeo = (content >>> 3 & 1) == 1;
|
boolean gaLiLeo = (content >>> 3 & 1) == 1;
|
||||||
return new JGnssAttribute(gps, beidou, glonass, gaLiLeo);
|
return new JTGnssAttribute(gps, beidou, glonass, gaLiLeo);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JGnssAttribute(boolean gps, boolean beidou, boolean glonass, boolean gaLiLeo) {
|
public JTGnssAttribute(boolean gps, boolean beidou, boolean glonass, boolean gaLiLeo) {
|
||||||
this.gps = gps;
|
this.gps = gps;
|
||||||
this.beidou = beidou;
|
this.beidou = beidou;
|
||||||
this.glonass = glonass;
|
this.glonass = glonass;
|
||||||
@ -0,0 +1,197 @@
|
|||||||
|
package com.genersoft.iot.vmp.jt1078.bean;
|
||||||
|
|
||||||
|
import com.genersoft.iot.vmp.jt1078.bean.config.JTDeviceSubConfig;
|
||||||
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端上传音视频属性
|
||||||
|
*/
|
||||||
|
public class JTMediaAttribute implements JTDeviceSubConfig {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 输入音频编码方式:
|
||||||
|
* 1 G. 721
|
||||||
|
* 2 G. 722
|
||||||
|
* 3 G. 723
|
||||||
|
* 4 G. 728
|
||||||
|
* 5 G. 729
|
||||||
|
* 6 G. 711A
|
||||||
|
* 7 G. 711U
|
||||||
|
* 8 G. 726
|
||||||
|
* 9 G. 729A
|
||||||
|
* 10 DVI4 3
|
||||||
|
* 11 DVI4 4
|
||||||
|
* 12 DVI4 8K
|
||||||
|
* 13 DVI4 16K
|
||||||
|
* 14 LPC
|
||||||
|
* 15 S16BE STEREO
|
||||||
|
* 16 S16BE MONO
|
||||||
|
* 17 MPEGAUDIO
|
||||||
|
* 18 LPCM
|
||||||
|
* 19 AAC
|
||||||
|
* 20 WMA9STD
|
||||||
|
* 21 HEAAC
|
||||||
|
* 22 PCM VOICE
|
||||||
|
* 23 PCM AUDIO
|
||||||
|
* 24 AACLC
|
||||||
|
* 25 MP3
|
||||||
|
* 26 ADPCMA
|
||||||
|
* 27 MP4AUDIO
|
||||||
|
* 28 AMR
|
||||||
|
*/
|
||||||
|
private int audioEncoder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 输入音频声道数
|
||||||
|
*/
|
||||||
|
private int audioChannels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 输入音频采样率:
|
||||||
|
* 0:8 kHz;
|
||||||
|
* 1:22. 05 kHz;
|
||||||
|
* 2:44. 1 kHz;
|
||||||
|
* 3:48 kHz
|
||||||
|
*/
|
||||||
|
private int audioSamplingRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 输入音频采样位数:
|
||||||
|
* 0:8 位;
|
||||||
|
* 1:16 位;
|
||||||
|
* 2:32 位
|
||||||
|
*/
|
||||||
|
private int audioSamplingBits;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 音频帧长度: 范围 1 ~ 4 294 967 295
|
||||||
|
*/
|
||||||
|
private int audioFrameLength;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否支持音频输出:
|
||||||
|
* 0:不支持;1:支持
|
||||||
|
*/
|
||||||
|
private int audioOutputEnable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频编码方式:
|
||||||
|
* 98 H. 264
|
||||||
|
* 99 H. 265
|
||||||
|
* 100 AVS
|
||||||
|
* 101 SVAC
|
||||||
|
*/
|
||||||
|
private int videoEncoder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端支持的最大音频物理通道数量:
|
||||||
|
*/
|
||||||
|
private int audioChannelMax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端支持的最大视频物理通道数量:
|
||||||
|
*/
|
||||||
|
private int videoChannelMax;
|
||||||
|
|
||||||
|
public int getAudioEncoder() {
|
||||||
|
return audioEncoder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAudioEncoder(int audioEncoder) {
|
||||||
|
this.audioEncoder = audioEncoder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAudioChannels() {
|
||||||
|
return audioChannels;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAudioChannels(int audioChannels) {
|
||||||
|
this.audioChannels = audioChannels;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAudioSamplingRate() {
|
||||||
|
return audioSamplingRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAudioSamplingRate(int audioSamplingRate) {
|
||||||
|
this.audioSamplingRate = audioSamplingRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAudioFrameLength() {
|
||||||
|
return audioFrameLength;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAudioFrameLength(int audioFrameLength) {
|
||||||
|
this.audioFrameLength = audioFrameLength;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAudioOutputEnable() {
|
||||||
|
return audioOutputEnable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAudioOutputEnable(int audioOutputEnable) {
|
||||||
|
this.audioOutputEnable = audioOutputEnable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getVideoEncoder() {
|
||||||
|
return videoEncoder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideoEncoder(int videoEncoder) {
|
||||||
|
this.videoEncoder = videoEncoder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAudioChannelMax() {
|
||||||
|
return audioChannelMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAudioChannelMax(int audioChannelMax) {
|
||||||
|
this.audioChannelMax = audioChannelMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getVideoChannelMax() {
|
||||||
|
return videoChannelMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideoChannelMax(int videoChannelMax) {
|
||||||
|
this.videoChannelMax = videoChannelMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAudioSamplingBits() {
|
||||||
|
return audioSamplingBits;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAudioSamplingBits(int audioSamplingBits) {
|
||||||
|
this.audioSamplingBits = audioSamplingBits;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ByteBuf encode() {
|
||||||
|
ByteBuf byteBuf = Unpooled.buffer();
|
||||||
|
byteBuf.writeByte(audioEncoder);
|
||||||
|
byteBuf.writeByte(audioChannels);
|
||||||
|
byteBuf.writeByte(audioSamplingRate);
|
||||||
|
byteBuf.writeByte(audioSamplingBits);
|
||||||
|
byteBuf.writeShort(audioFrameLength);
|
||||||
|
byteBuf.writeByte(audioOutputEnable);
|
||||||
|
byteBuf.writeByte(videoEncoder);
|
||||||
|
byteBuf.writeByte(audioChannelMax);
|
||||||
|
byteBuf.writeByte(videoChannelMax);
|
||||||
|
return byteBuf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static JTMediaAttribute decode(ByteBuf byteBuf) {
|
||||||
|
JTMediaAttribute jtMediaAttribute = new JTMediaAttribute();
|
||||||
|
jtMediaAttribute.setAudioEncoder(byteBuf.readUnsignedByte());
|
||||||
|
jtMediaAttribute.setAudioChannels(byteBuf.readUnsignedByte());
|
||||||
|
jtMediaAttribute.setAudioSamplingRate(byteBuf.readUnsignedByte());
|
||||||
|
jtMediaAttribute.setAudioSamplingBits(byteBuf.readUnsignedByte());
|
||||||
|
jtMediaAttribute.setAudioFrameLength(byteBuf.readUnsignedShort());
|
||||||
|
jtMediaAttribute.setAudioOutputEnable(byteBuf.readUnsignedByte());
|
||||||
|
jtMediaAttribute.setVideoEncoder(byteBuf.readUnsignedByte());
|
||||||
|
jtMediaAttribute.setAudioChannelMax(byteBuf.readUnsignedByte());
|
||||||
|
jtMediaAttribute.setVideoChannelMax(byteBuf.readUnsignedByte());
|
||||||
|
return jtMediaAttribute;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,11 +0,0 @@
|
|||||||
package com.genersoft.iot.vmp.jt1078.bean.config;
|
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
|
||||||
|
|
||||||
public class AwakenParam implements JTDeviceSubConfig{
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ByteBuf encode() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -6,7 +6,7 @@ import io.netty.buffer.Unpooled;
|
|||||||
/**
|
/**
|
||||||
* 特殊报警录像参数
|
* 特殊报警录像参数
|
||||||
*/
|
*/
|
||||||
public class AlarmRecordingParam implements JTDeviceSubConfig{
|
public class JTAlarmRecordingParam implements JTDeviceSubConfig{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 特殊报警录像存储阈值, 分比,取值 特殊报警录像占用主存储器存储阈值百 1 ~ 99,默认值为 20
|
* 特殊报警录像存储阈值, 分比,取值 特殊报警录像占用主存储器存储阈值百 1 ~ 99,默认值为 20
|
||||||
@ -56,8 +56,8 @@ public class AlarmRecordingParam implements JTDeviceSubConfig{
|
|||||||
return byteBuf;
|
return byteBuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static AlarmRecordingParam decode(ByteBuf byteBuf) {
|
public static JTAlarmRecordingParam decode(ByteBuf byteBuf) {
|
||||||
AlarmRecordingParam alarmRecordingParam = new AlarmRecordingParam();
|
JTAlarmRecordingParam alarmRecordingParam = new JTAlarmRecordingParam();
|
||||||
alarmRecordingParam.setStorageLimit(byteBuf.readUnsignedByte());
|
alarmRecordingParam.setStorageLimit(byteBuf.readUnsignedByte());
|
||||||
alarmRecordingParam.setDuration(byteBuf.readUnsignedByte());
|
alarmRecordingParam.setDuration(byteBuf.readUnsignedByte());
|
||||||
alarmRecordingParam.setStartTime(byteBuf.readUnsignedByte());
|
alarmRecordingParam.setStartTime(byteBuf.readUnsignedByte());
|
||||||
@ -91,7 +91,7 @@ public class JTAloneChanel implements JTDeviceSubConfig{
|
|||||||
/**
|
/**
|
||||||
* 字幕叠加设置
|
* 字幕叠加设置
|
||||||
*/
|
*/
|
||||||
private OSDConfig osd;
|
private JTOSDConfig osd;
|
||||||
|
|
||||||
public int getLogicChannelId() {
|
public int getLogicChannelId() {
|
||||||
return logicChannelId;
|
return logicChannelId;
|
||||||
@ -181,11 +181,11 @@ public class JTAloneChanel implements JTDeviceSubConfig{
|
|||||||
this.storageStreamCodeRate = storageStreamCodeRate;
|
this.storageStreamCodeRate = storageStreamCodeRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OSDConfig getOsd() {
|
public JTOSDConfig getOsd() {
|
||||||
return osd;
|
return osd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOsd(OSDConfig osd) {
|
public void setOsd(JTOSDConfig osd) {
|
||||||
this.osd = osd;
|
this.osd = osd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ public class JTAloneChanel implements JTDeviceSubConfig{
|
|||||||
jtAloneChanel.setStorageStreamIInterval(buf.readUnsignedShort());
|
jtAloneChanel.setStorageStreamIInterval(buf.readUnsignedShort());
|
||||||
jtAloneChanel.setStorageStreamFrameRate(buf.readByte());
|
jtAloneChanel.setStorageStreamFrameRate(buf.readByte());
|
||||||
jtAloneChanel.setStorageStreamCodeRate(buf.readUnsignedInt());
|
jtAloneChanel.setStorageStreamCodeRate(buf.readUnsignedInt());
|
||||||
jtAloneChanel.setOsd(OSDConfig.decode(buf));
|
jtAloneChanel.setOsd(JTOSDConfig.decode(buf));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import io.netty.buffer.Unpooled;
|
|||||||
/**
|
/**
|
||||||
* 视频分析报警参数
|
* 视频分析报警参数
|
||||||
*/
|
*/
|
||||||
public class AnalyzeAlarmParam implements JTDeviceSubConfig{
|
public class JTAnalyzeAlarmParam implements JTDeviceSubConfig{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车辆核载人数
|
* 车辆核载人数
|
||||||
@ -44,8 +44,8 @@ public class AnalyzeAlarmParam implements JTDeviceSubConfig{
|
|||||||
return byteBuf;
|
return byteBuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static AnalyzeAlarmParam decode(ByteBuf byteBuf) {
|
public static JTAnalyzeAlarmParam decode(ByteBuf byteBuf) {
|
||||||
AnalyzeAlarmParam analyzeAlarmParam = new AnalyzeAlarmParam();
|
JTAnalyzeAlarmParam analyzeAlarmParam = new JTAnalyzeAlarmParam();
|
||||||
analyzeAlarmParam.setNumberForPeople(byteBuf.readUnsignedByte());
|
analyzeAlarmParam.setNumberForPeople(byteBuf.readUnsignedByte());
|
||||||
analyzeAlarmParam.setFatigueThreshold(byteBuf.readUnsignedByte());
|
analyzeAlarmParam.setFatigueThreshold(byteBuf.readUnsignedByte());
|
||||||
return analyzeAlarmParam;
|
return analyzeAlarmParam;
|
||||||
@ -0,0 +1,466 @@
|
|||||||
|
package com.genersoft.iot.vmp.jt1078.bean.config;
|
||||||
|
|
||||||
|
import com.genersoft.iot.vmp.jt1078.util.BCDUtil;
|
||||||
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端休眠唤醒模式设置
|
||||||
|
*/
|
||||||
|
public class JTAwakenParam implements JTDeviceSubConfig{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 休眠唤醒模式-条件唤醒
|
||||||
|
*/
|
||||||
|
private boolean wakeUpModeByCondition;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 休眠唤醒模式-定时唤醒
|
||||||
|
*/
|
||||||
|
private boolean wakeUpModeByTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 休眠唤醒模式-手动唤醒
|
||||||
|
*/
|
||||||
|
private boolean wakeUpModeByManual;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 唤醒条件类型-紧急报警
|
||||||
|
*/
|
||||||
|
private boolean wakeUpConditionsByAlarm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 唤醒条件类型-碰撞侧翻报警
|
||||||
|
*/
|
||||||
|
private boolean wakeUpConditionsByRollover;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 唤醒条件类型-车辆开门
|
||||||
|
*/
|
||||||
|
private boolean wakeUpConditionsByOpenTheDoor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时唤醒日设置-周一
|
||||||
|
*/
|
||||||
|
private boolean awakeningDayForMonday;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时唤醒日设置-周二
|
||||||
|
*/
|
||||||
|
private boolean awakeningDayForTuesday;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时唤醒日设置-周三
|
||||||
|
*/
|
||||||
|
private boolean awakeningDayForWednesday;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时唤醒日设置-周四
|
||||||
|
*/
|
||||||
|
private boolean awakeningDayForThursday;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时唤醒日设置-周五
|
||||||
|
*/
|
||||||
|
private boolean awakeningDayForFriday;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时唤醒日设置-周六
|
||||||
|
*/
|
||||||
|
private boolean awakeningDayForSaturday;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时唤醒日设置-周日
|
||||||
|
*/
|
||||||
|
private boolean awakeningDayForSunday;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日定时唤醒-启用时间段1
|
||||||
|
*/
|
||||||
|
private boolean time1Enable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日定时唤醒-时间段1开始时间
|
||||||
|
*/
|
||||||
|
private String time1StartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日定时唤醒-时间段1结束时间
|
||||||
|
*/
|
||||||
|
private String time1EndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日定时唤醒-启用时间段2
|
||||||
|
*/
|
||||||
|
private boolean time2Enable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日定时唤醒-时间段2开始时间
|
||||||
|
*/
|
||||||
|
private String time2StartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日定时唤醒-时间段2结束时间
|
||||||
|
*/
|
||||||
|
private String time2EndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日定时唤醒-启用时间段3
|
||||||
|
*/
|
||||||
|
private boolean time3Enable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日定时唤醒-时间段3开始时间
|
||||||
|
*/
|
||||||
|
private String time3StartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日定时唤醒-时间段3结束时间
|
||||||
|
*/
|
||||||
|
private String time3EndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日定时唤醒-启用时间段4
|
||||||
|
*/
|
||||||
|
private boolean time4Enable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日定时唤醒-时间段4开始时间
|
||||||
|
*/
|
||||||
|
private String time4StartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日定时唤醒-时间段4结束时间
|
||||||
|
*/
|
||||||
|
private String time4EndTime;
|
||||||
|
|
||||||
|
public boolean isWakeUpModeByCondition() {
|
||||||
|
return wakeUpModeByCondition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWakeUpModeByCondition(boolean wakeUpModeByCondition) {
|
||||||
|
this.wakeUpModeByCondition = wakeUpModeByCondition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isWakeUpModeByTime() {
|
||||||
|
return wakeUpModeByTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWakeUpModeByTime(boolean wakeUpModeByTime) {
|
||||||
|
this.wakeUpModeByTime = wakeUpModeByTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isWakeUpModeByManual() {
|
||||||
|
return wakeUpModeByManual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWakeUpModeByManual(boolean wakeUpModeByManual) {
|
||||||
|
this.wakeUpModeByManual = wakeUpModeByManual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isWakeUpConditionsByAlarm() {
|
||||||
|
return wakeUpConditionsByAlarm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWakeUpConditionsByAlarm(boolean wakeUpConditionsByAlarm) {
|
||||||
|
this.wakeUpConditionsByAlarm = wakeUpConditionsByAlarm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isWakeUpConditionsByRollover() {
|
||||||
|
return wakeUpConditionsByRollover;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWakeUpConditionsByRollover(boolean wakeUpConditionsByRollover) {
|
||||||
|
this.wakeUpConditionsByRollover = wakeUpConditionsByRollover;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isWakeUpConditionsByOpenTheDoor() {
|
||||||
|
return wakeUpConditionsByOpenTheDoor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWakeUpConditionsByOpenTheDoor(boolean wakeUpConditionsByOpenTheDoor) {
|
||||||
|
this.wakeUpConditionsByOpenTheDoor = wakeUpConditionsByOpenTheDoor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAwakeningDayForMonday() {
|
||||||
|
return awakeningDayForMonday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAwakeningDayForMonday(boolean awakeningDayForMonday) {
|
||||||
|
this.awakeningDayForMonday = awakeningDayForMonday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAwakeningDayForTuesday() {
|
||||||
|
return awakeningDayForTuesday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAwakeningDayForTuesday(boolean awakeningDayForTuesday) {
|
||||||
|
this.awakeningDayForTuesday = awakeningDayForTuesday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAwakeningDayForWednesday() {
|
||||||
|
return awakeningDayForWednesday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAwakeningDayForWednesday(boolean awakeningDayForWednesday) {
|
||||||
|
this.awakeningDayForWednesday = awakeningDayForWednesday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAwakeningDayForThursday() {
|
||||||
|
return awakeningDayForThursday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAwakeningDayForThursday(boolean awakeningDayForThursday) {
|
||||||
|
this.awakeningDayForThursday = awakeningDayForThursday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAwakeningDayForFriday() {
|
||||||
|
return awakeningDayForFriday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAwakeningDayForFriday(boolean awakeningDayForFriday) {
|
||||||
|
this.awakeningDayForFriday = awakeningDayForFriday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAwakeningDayForSaturday() {
|
||||||
|
return awakeningDayForSaturday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAwakeningDayForSaturday(boolean awakeningDayForSaturday) {
|
||||||
|
this.awakeningDayForSaturday = awakeningDayForSaturday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAwakeningDayForSunday() {
|
||||||
|
return awakeningDayForSunday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAwakeningDayForSunday(boolean awakeningDayForSunday) {
|
||||||
|
this.awakeningDayForSunday = awakeningDayForSunday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isTime1Enable() {
|
||||||
|
return time1Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime1Enable(boolean time1Enable) {
|
||||||
|
this.time1Enable = time1Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTime1StartTime() {
|
||||||
|
return time1StartTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime1StartTime(String time1StartTime) {
|
||||||
|
this.time1StartTime = time1StartTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTime1EndTime() {
|
||||||
|
return time1EndTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime1EndTime(String time1EndTime) {
|
||||||
|
this.time1EndTime = time1EndTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isTime2Enable() {
|
||||||
|
return time2Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime2Enable(boolean time2Enable) {
|
||||||
|
this.time2Enable = time2Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTime2StartTime() {
|
||||||
|
return time2StartTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime2StartTime(String time2StartTime) {
|
||||||
|
this.time2StartTime = time2StartTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTime2EndTime() {
|
||||||
|
return time2EndTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime2EndTime(String time2EndTime) {
|
||||||
|
this.time2EndTime = time2EndTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isTime3Enable() {
|
||||||
|
return time3Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime3Enable(boolean time3Enable) {
|
||||||
|
this.time3Enable = time3Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTime3StartTime() {
|
||||||
|
return time3StartTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime3StartTime(String time3StartTime) {
|
||||||
|
this.time3StartTime = time3StartTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTime3EndTime() {
|
||||||
|
return time3EndTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime3EndTime(String time3EndTime) {
|
||||||
|
this.time3EndTime = time3EndTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isTime4Enable() {
|
||||||
|
return time4Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime4Enable(boolean time4Enable) {
|
||||||
|
this.time4Enable = time4Enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTime4StartTime() {
|
||||||
|
return time4StartTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime4StartTime(String time4StartTime) {
|
||||||
|
this.time4StartTime = time4StartTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTime4EndTime() {
|
||||||
|
return time4EndTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime4EndTime(String time4EndTime) {
|
||||||
|
this.time4EndTime = time4EndTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ByteBuf encode() {
|
||||||
|
ByteBuf byteBuf = Unpooled.buffer();
|
||||||
|
byte wakeUpTypeByte = 0;
|
||||||
|
byte wakeUpConditionsByte = 0;
|
||||||
|
byte wakeDayByte = 0;
|
||||||
|
if (wakeUpModeByCondition) {
|
||||||
|
wakeUpTypeByte = (byte)(wakeUpTypeByte | 1);
|
||||||
|
}
|
||||||
|
if (wakeUpModeByTime) {
|
||||||
|
wakeUpTypeByte = (byte)(wakeUpTypeByte | (1 << 1));
|
||||||
|
}
|
||||||
|
if (wakeUpModeByManual) {
|
||||||
|
wakeUpTypeByte = (byte)(wakeUpTypeByte | (1 << 2));
|
||||||
|
}
|
||||||
|
byteBuf.writeByte(wakeUpTypeByte);
|
||||||
|
if (wakeUpConditionsByAlarm) {
|
||||||
|
wakeUpConditionsByte = (byte)(wakeUpConditionsByte | 1);
|
||||||
|
}
|
||||||
|
if (wakeUpConditionsByRollover) {
|
||||||
|
wakeUpConditionsByte = (byte)(wakeUpConditionsByte | (1 << 1));
|
||||||
|
}
|
||||||
|
if (wakeUpConditionsByOpenTheDoor) {
|
||||||
|
wakeUpConditionsByte = (byte)(wakeUpConditionsByte | (1 << 2));
|
||||||
|
}
|
||||||
|
byteBuf.writeByte(wakeUpConditionsByte);
|
||||||
|
if (awakeningDayForMonday) {
|
||||||
|
wakeDayByte = (byte)(wakeDayByte | 1);
|
||||||
|
}
|
||||||
|
if (awakeningDayForTuesday) {
|
||||||
|
wakeDayByte = (byte)(wakeDayByte | (1 << 1));
|
||||||
|
}
|
||||||
|
if (awakeningDayForWednesday) {
|
||||||
|
wakeDayByte = (byte)(wakeDayByte | (1 << 2));
|
||||||
|
}
|
||||||
|
if (awakeningDayForThursday) {
|
||||||
|
wakeDayByte = (byte)(wakeDayByte | (1 << 3));
|
||||||
|
}
|
||||||
|
if (awakeningDayForFriday) {
|
||||||
|
wakeDayByte = (byte)(wakeDayByte | (1 << 4));
|
||||||
|
}
|
||||||
|
if (awakeningDayForSaturday) {
|
||||||
|
wakeDayByte = (byte)(wakeDayByte | (1 << 5));
|
||||||
|
}
|
||||||
|
if (awakeningDayForSunday) {
|
||||||
|
wakeDayByte = (byte)(wakeDayByte | (1 << 6));
|
||||||
|
}
|
||||||
|
byteBuf.writeByte(wakeDayByte);
|
||||||
|
byte enableByte = 0;
|
||||||
|
if (time1Enable) {
|
||||||
|
enableByte = (byte)(enableByte | 1);
|
||||||
|
}
|
||||||
|
if (time2Enable) {
|
||||||
|
enableByte = (byte)(enableByte | (1 << 1));
|
||||||
|
}
|
||||||
|
if (time3Enable) {
|
||||||
|
enableByte = (byte)(enableByte | (1 << 2));
|
||||||
|
}
|
||||||
|
if (time4Enable) {
|
||||||
|
enableByte = (byte)(enableByte | (1 << 3));
|
||||||
|
}
|
||||||
|
byteBuf.writeByte(enableByte);
|
||||||
|
byteBuf.writeBytes(transportTime(time1StartTime));
|
||||||
|
byteBuf.writeBytes(transportTime(time1EndTime));
|
||||||
|
byteBuf.writeBytes(transportTime(time2StartTime));
|
||||||
|
byteBuf.writeBytes(transportTime(time2EndTime));
|
||||||
|
byteBuf.writeBytes(transportTime(time3StartTime));
|
||||||
|
byteBuf.writeBytes(transportTime(time3EndTime));
|
||||||
|
byteBuf.writeBytes(transportTime(time4StartTime));
|
||||||
|
byteBuf.writeBytes(transportTime(time4EndTime));
|
||||||
|
return byteBuf;
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte[] transportTime(String time) {
|
||||||
|
return BCDUtil.strToBcd(time.replace(":", ""));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static JTAwakenParam decode(ByteBuf byteBuf) {
|
||||||
|
JTAwakenParam awakenParam = new JTAwakenParam();
|
||||||
|
short wakeUpTypeByte = byteBuf.readUnsignedByte();
|
||||||
|
awakenParam.wakeUpModeByCondition = ((wakeUpTypeByte & 1) == 1);
|
||||||
|
awakenParam.wakeUpModeByTime = ((wakeUpTypeByte >>> 1 & 1) == 1);
|
||||||
|
awakenParam.wakeUpModeByManual = ((wakeUpTypeByte >>> 2 & 1) == 1);
|
||||||
|
|
||||||
|
short wakeUpConditionsByte = byteBuf.readUnsignedByte();
|
||||||
|
awakenParam.wakeUpConditionsByAlarm = ((wakeUpConditionsByte & 1) == 1);
|
||||||
|
awakenParam.wakeUpConditionsByRollover = ((wakeUpConditionsByte >>> 1 & 1) == 1);
|
||||||
|
awakenParam.wakeUpConditionsByOpenTheDoor = ((wakeUpConditionsByte >>> 2 & 1) == 1);
|
||||||
|
|
||||||
|
short wakeDayByte = byteBuf.readUnsignedByte();
|
||||||
|
awakenParam.awakeningDayForMonday = ((wakeDayByte & 1) == 1);
|
||||||
|
awakenParam.awakeningDayForTuesday = ((wakeDayByte >>> 1 & 1) == 1);
|
||||||
|
awakenParam.awakeningDayForWednesday = ((wakeDayByte >>> 2 & 1) == 1);
|
||||||
|
awakenParam.awakeningDayForThursday = ((wakeDayByte >>> 3 & 1) == 1);
|
||||||
|
awakenParam.awakeningDayForFriday = ((wakeDayByte >>> 4 & 1) == 1);
|
||||||
|
awakenParam.awakeningDayForSaturday = ((wakeDayByte >>> 5 & 1) == 1);
|
||||||
|
awakenParam.awakeningDayForSunday = ((wakeDayByte >>> 6 & 1) == 1);
|
||||||
|
short enableByte = byteBuf.readUnsignedByte();
|
||||||
|
awakenParam.time1Enable = ((enableByte & 1) == 1);
|
||||||
|
awakenParam.time2Enable = ((enableByte >>> 1 & 1) == 1);
|
||||||
|
awakenParam.time3Enable = ((enableByte >>> 2 & 1) == 1);
|
||||||
|
awakenParam.time4Enable = ((enableByte >>> 3 & 1) == 1);
|
||||||
|
byte[] timeBytes = new byte[2];
|
||||||
|
byteBuf.readBytes(timeBytes);
|
||||||
|
awakenParam.time1StartTime = transportTime(timeBytes);
|
||||||
|
byteBuf.readBytes(timeBytes);
|
||||||
|
awakenParam.time1EndTime = transportTime(timeBytes);
|
||||||
|
|
||||||
|
byteBuf.readBytes(timeBytes);
|
||||||
|
awakenParam.time2StartTime = transportTime(timeBytes);
|
||||||
|
byteBuf.readBytes(timeBytes);
|
||||||
|
awakenParam.time2EndTime = transportTime(timeBytes);
|
||||||
|
|
||||||
|
byteBuf.readBytes(timeBytes);
|
||||||
|
awakenParam.time3StartTime = transportTime(timeBytes);
|
||||||
|
byteBuf.readBytes(timeBytes);
|
||||||
|
awakenParam.time3EndTime = transportTime(timeBytes);
|
||||||
|
|
||||||
|
byteBuf.readBytes(timeBytes);
|
||||||
|
awakenParam.time4StartTime = transportTime(timeBytes);
|
||||||
|
byteBuf.readBytes(timeBytes);
|
||||||
|
awakenParam.time4EndTime = transportTime(timeBytes);
|
||||||
|
return awakenParam;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String transportTime(byte[] timeBytes) {
|
||||||
|
String time1Str = BCDUtil.transform(timeBytes);
|
||||||
|
return time1Str.replace(time1Str.substring(0, 2), time1Str.substring(0, 2) + ":");
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -6,7 +6,7 @@ import io.netty.buffer.Unpooled;
|
|||||||
/**
|
/**
|
||||||
* 定时拍照控制
|
* 定时拍照控制
|
||||||
*/
|
*/
|
||||||
public class CameraTimer implements JTDeviceSubConfig{
|
public class JTCameraTimer implements JTDeviceSubConfig{
|
||||||
/**
|
/**
|
||||||
* 摄像通道1 定时拍照开关标志
|
* 摄像通道1 定时拍照开关标志
|
||||||
*/
|
*/
|
||||||
@ -9,7 +9,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 音视频通道列表设置
|
* 音视频通道列表设置
|
||||||
*/
|
*/
|
||||||
public class ChannelListParam implements JTDeviceSubConfig{
|
public class JTChannelListParam implements JTDeviceSubConfig{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 音视频通道总数
|
* 音视频通道总数
|
||||||
@ -73,8 +73,8 @@ public class ChannelListParam implements JTDeviceSubConfig{
|
|||||||
return byteBuf;
|
return byteBuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ChannelListParam decode(ByteBuf byteBuf) {
|
public static JTChannelListParam decode(ByteBuf byteBuf) {
|
||||||
ChannelListParam channelListParam = new ChannelListParam();
|
JTChannelListParam channelListParam = new JTChannelListParam();
|
||||||
channelListParam.setVideoAndAudioCount(byteBuf.readUnsignedByte());
|
channelListParam.setVideoAndAudioCount(byteBuf.readUnsignedByte());
|
||||||
channelListParam.setAudioCount(byteBuf.readUnsignedByte());
|
channelListParam.setAudioCount(byteBuf.readUnsignedByte());
|
||||||
channelListParam.setVideoCount(byteBuf.readUnsignedByte());
|
channelListParam.setVideoCount(byteBuf.readUnsignedByte());
|
||||||
@ -9,7 +9,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 单独视频通道参数设置
|
* 单独视频通道参数设置
|
||||||
*/
|
*/
|
||||||
public class ChannelParam implements JTDeviceSubConfig {
|
public class JTChannelParam implements JTDeviceSubConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单独通道视频参数设置列表
|
* 单独通道视频参数设置列表
|
||||||
@ -34,8 +34,8 @@ public class ChannelParam implements JTDeviceSubConfig {
|
|||||||
return byteBuf;
|
return byteBuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ChannelParam decode(ByteBuf byteBuf) {
|
public static JTChannelParam decode(ByteBuf byteBuf) {
|
||||||
ChannelParam channelParam = new ChannelParam();
|
JTChannelParam channelParam = new JTChannelParam();
|
||||||
int length = byteBuf.readUnsignedByte();
|
int length = byteBuf.readUnsignedByte();
|
||||||
List<JTAloneChanel> jtAloneChanelList = new ArrayList<>(length);
|
List<JTAloneChanel> jtAloneChanelList = new ArrayList<>(length);
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
@ -6,7 +6,7 @@ import io.netty.buffer.Unpooled;
|
|||||||
/**
|
/**
|
||||||
* 碰撞报警参数设置
|
* 碰撞报警参数设置
|
||||||
*/
|
*/
|
||||||
public class CollisionAlarmParams implements JTDeviceSubConfig{
|
public class JTCollisionAlarmParams implements JTDeviceSubConfig{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 碰撞时间 单位为毫秒(ms)
|
* 碰撞时间 单位为毫秒(ms)
|
||||||
@ -4,5 +4,4 @@ import io.netty.buffer.ByteBuf;
|
|||||||
|
|
||||||
public interface JTDeviceSubConfig {
|
public interface JTDeviceSubConfig {
|
||||||
ByteBuf encode();
|
ByteBuf encode();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import io.netty.buffer.Unpooled;
|
|||||||
/**
|
/**
|
||||||
* GNSS 定位模式
|
* GNSS 定位模式
|
||||||
*/
|
*/
|
||||||
public class GnssPositioningMode implements JTDeviceSubConfig{
|
public class JTGnssPositioningMode implements JTDeviceSubConfig{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GPS 定位 true: 开启, false: 关闭
|
* GPS 定位 true: 开启, false: 关闭
|
||||||
@ -6,7 +6,7 @@ import io.netty.buffer.Unpooled;
|
|||||||
/**
|
/**
|
||||||
* 违规行驶时段范围 ,精确到分
|
* 违规行驶时段范围 ,精确到分
|
||||||
*/
|
*/
|
||||||
public class IllegalDrivingPeriods implements JTDeviceSubConfig{
|
public class JTIllegalDrivingPeriods implements JTDeviceSubConfig{
|
||||||
/**
|
/**
|
||||||
* 违规行驶时段-开始时间 HH:mm
|
* 违规行驶时段-开始时间 HH:mm
|
||||||
*/
|
*/
|
||||||
@ -6,7 +6,7 @@ import io.netty.buffer.Unpooled;
|
|||||||
/**
|
/**
|
||||||
* OSD字幕叠加设置
|
* OSD字幕叠加设置
|
||||||
*/
|
*/
|
||||||
public class OSDConfig {
|
public class JTOSDConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日期和时间
|
* 日期和时间
|
||||||
@ -129,8 +129,8 @@ public class OSDConfig {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static OSDConfig decode(ByteBuf buf) {
|
public static JTOSDConfig decode(ByteBuf buf) {
|
||||||
OSDConfig config = new OSDConfig();
|
JTOSDConfig config = new JTOSDConfig();
|
||||||
int content = buf.readUnsignedShort();
|
int content = buf.readUnsignedShort();
|
||||||
config.setTime((content & 1) == 1);
|
config.setTime((content & 1) == 1);
|
||||||
config.setLicensePlate((content >>> 1 & 1) == 1);
|
config.setLicensePlate((content >>> 1 & 1) == 1);
|
||||||
@ -6,7 +6,7 @@ import io.netty.buffer.Unpooled;
|
|||||||
/**
|
/**
|
||||||
* 视频报警标志位
|
* 视频报警标志位
|
||||||
*/
|
*/
|
||||||
public class VideoAlarmBit implements JTDeviceSubConfig{
|
public class JTVideoAlarmBit implements JTDeviceSubConfig{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 视频信号丢失报警
|
* 视频信号丢失报警
|
||||||
@ -125,8 +125,8 @@ public class VideoAlarmBit implements JTDeviceSubConfig{
|
|||||||
return byteBuf;
|
return byteBuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static VideoAlarmBit decode(ByteBuf byteBuf) {
|
public static JTVideoAlarmBit decode(ByteBuf byteBuf) {
|
||||||
VideoAlarmBit videoAlarmBit = new VideoAlarmBit();
|
JTVideoAlarmBit videoAlarmBit = new JTVideoAlarmBit();
|
||||||
byte content = byteBuf.readByte();
|
byte content = byteBuf.readByte();
|
||||||
videoAlarmBit.setLossSignal((content & 1) == 1);
|
videoAlarmBit.setLossSignal((content & 1) == 1);
|
||||||
videoAlarmBit.setOcclusionSignal((content >>> 1 & 1) == 1);
|
videoAlarmBit.setOcclusionSignal((content >>> 1 & 1) == 1);
|
||||||
@ -6,7 +6,7 @@ import io.netty.buffer.Unpooled;
|
|||||||
/**
|
/**
|
||||||
* 违规行驶时段范围 ,精确到分
|
* 违规行驶时段范围 ,精确到分
|
||||||
*/
|
*/
|
||||||
public class VideoParam implements JTDeviceSubConfig{
|
public class JTVideoParam implements JTDeviceSubConfig{
|
||||||
/**
|
/**
|
||||||
* 实时流编码模式
|
* 实时流编码模式
|
||||||
* 0:CBR( 固定码率) ;
|
* 0:CBR( 固定码率) ;
|
||||||
@ -85,7 +85,7 @@ public class VideoParam implements JTDeviceSubConfig{
|
|||||||
/**
|
/**
|
||||||
* 字幕叠加设置
|
* 字幕叠加设置
|
||||||
*/
|
*/
|
||||||
private OSDConfig osd;
|
private JTOSDConfig osd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否启用音频输出, 0:不启用;1:启用
|
* 是否启用音频输出, 0:不启用;1:启用
|
||||||
@ -173,11 +173,11 @@ public class VideoParam implements JTDeviceSubConfig{
|
|||||||
this.storageStreamCodeRate = storageStreamCodeRate;
|
this.storageStreamCodeRate = storageStreamCodeRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OSDConfig getOsd() {
|
public JTOSDConfig getOsd() {
|
||||||
return osd;
|
return osd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOsd(OSDConfig osd) {
|
public void setOsd(JTOSDConfig osd) {
|
||||||
this.osd = osd;
|
this.osd = osd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,8 +208,8 @@ public class VideoParam implements JTDeviceSubConfig{
|
|||||||
return byteBuf;
|
return byteBuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static VideoParam decode(ByteBuf buf) {
|
public static JTVideoParam decode(ByteBuf buf) {
|
||||||
VideoParam videoParam = new VideoParam();
|
JTVideoParam videoParam = new JTVideoParam();
|
||||||
videoParam.setLiveStreamCodeRateType(buf.readByte());
|
videoParam.setLiveStreamCodeRateType(buf.readByte());
|
||||||
videoParam.setLiveStreamResolving(buf.readByte());
|
videoParam.setLiveStreamResolving(buf.readByte());
|
||||||
videoParam.setLiveStreamIInterval(buf.readUnsignedShort());
|
videoParam.setLiveStreamIInterval(buf.readUnsignedShort());
|
||||||
@ -221,7 +221,7 @@ public class VideoParam implements JTDeviceSubConfig{
|
|||||||
videoParam.setStorageStreamIInterval(buf.readUnsignedShort());
|
videoParam.setStorageStreamIInterval(buf.readUnsignedShort());
|
||||||
videoParam.setStorageStreamFrameRate(buf.readByte());
|
videoParam.setStorageStreamFrameRate(buf.readByte());
|
||||||
videoParam.setStorageStreamCodeRate(buf.readUnsignedInt());
|
videoParam.setStorageStreamCodeRate(buf.readUnsignedInt());
|
||||||
videoParam.setOsd(OSDConfig.decode(buf));
|
videoParam.setOsd(JTOSDConfig.decode(buf));
|
||||||
videoParam.setAudioEnable(buf.readByte());
|
videoParam.setAudioEnable(buf.readByte());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -45,6 +45,7 @@ public class JT1078Template {
|
|||||||
private static final String H8803 = "8803";
|
private static final String H8803 = "8803";
|
||||||
private static final String H8804 = "8804";
|
private static final String H8804 = "8804";
|
||||||
private static final String H8805 = "8805";
|
private static final String H8805 = "8805";
|
||||||
|
private static final String H9003 = "9003";
|
||||||
private static final String H9101 = "9101";
|
private static final String H9101 = "9101";
|
||||||
private static final String H9102 = "9102";
|
private static final String H9102 = "9102";
|
||||||
private static final String H9201 = "9201";
|
private static final String H9201 = "9201";
|
||||||
@ -69,6 +70,7 @@ public class JT1078Template {
|
|||||||
private static final String H0801 = "0801";
|
private static final String H0801 = "0801";
|
||||||
private static final String H0802 = "0802";
|
private static final String H0802 = "0802";
|
||||||
private static final String H0805 = "0805";
|
private static final String H0805 = "0805";
|
||||||
|
private static final String H1003 = "1003";
|
||||||
private static final String H1205 = "1205";
|
private static final String H1205 = "1205";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -630,4 +632,15 @@ public class JT1078Template {
|
|||||||
.build();
|
.build();
|
||||||
return SessionManager.INSTANCE.request(cmd, timeOut);
|
return SessionManager.INSTANCE.request(cmd, timeOut);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Object queryMediaAttribute(String devId, J9003 j9003, int timeOut) {
|
||||||
|
Cmd cmd = new Cmd.Builder()
|
||||||
|
.setDevId(devId)
|
||||||
|
.setPackageNo(randomInt())
|
||||||
|
.setMsgId(H9003)
|
||||||
|
.setRespId(H1003)
|
||||||
|
.setRs(j9003)
|
||||||
|
.build();
|
||||||
|
return SessionManager.INSTANCE.request(cmd, timeOut);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -905,5 +905,14 @@ public class JT1078Controller {
|
|||||||
}
|
}
|
||||||
service.record(deviceId, 0, time, save, samplingRate);
|
service.record(deviceId, 0, time, save, samplingRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "1078-查询终端音视频属性", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
|
@Parameter(name = "deviceId", description = "设备国标编号", required = true)
|
||||||
|
@GetMapping("/media/attribute")
|
||||||
|
public JTMediaAttribute queryMediaAttribute(HttpServletRequest request,
|
||||||
|
@Parameter(required = true) String deviceId
|
||||||
|
) {
|
||||||
|
return service.queryMediaAttribute(deviceId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package com.genersoft.iot.vmp.jt1078.controller.bean;
|
package com.genersoft.iot.vmp.jt1078.controller.bean;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.JConfirmationAlarmMessageType;
|
import com.genersoft.iot.vmp.jt1078.bean.JTConfirmationAlarmMessageType;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -14,7 +14,7 @@ public class ConfirmationAlarmMessageParam {
|
|||||||
@Schema(description = "报警消息流水号")
|
@Schema(description = "报警消息流水号")
|
||||||
private int alarmPackageNo;
|
private int alarmPackageNo;
|
||||||
@Schema(description = "人工确认报警类型")
|
@Schema(description = "人工确认报警类型")
|
||||||
private JConfirmationAlarmMessageType alarmMessageType;
|
private JTConfirmationAlarmMessageType alarmMessageType;
|
||||||
|
|
||||||
public String getDeviceId() {
|
public String getDeviceId() {
|
||||||
return deviceId;
|
return deviceId;
|
||||||
@ -24,11 +24,11 @@ public class ConfirmationAlarmMessageParam {
|
|||||||
this.deviceId = deviceId;
|
this.deviceId = deviceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JConfirmationAlarmMessageType getAlarmMessageType() {
|
public JTConfirmationAlarmMessageType getAlarmMessageType() {
|
||||||
return alarmMessageType;
|
return alarmMessageType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAlarmMessageType(JConfirmationAlarmMessageType alarmMessageType) {
|
public void setAlarmMessageType(JTConfirmationAlarmMessageType alarmMessageType) {
|
||||||
this.alarmMessageType = alarmMessageType;
|
this.alarmMessageType = alarmMessageType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package com.genersoft.iot.vmp.jt1078.controller.bean;
|
package com.genersoft.iot.vmp.jt1078.controller.bean;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.JConfirmationAlarmMessageType;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.JTTextSign;
|
import com.genersoft.iot.vmp.jt1078.bean.JTTextSign;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
package com.genersoft.iot.vmp.jt1078.proc.request;
|
package com.genersoft.iot.vmp.jt1078.proc.request;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.annotation.MsgId;
|
import com.genersoft.iot.vmp.jt1078.annotation.MsgId;
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.JTDevice;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.JTDeviceConfig;
|
import com.genersoft.iot.vmp.jt1078.bean.JTDeviceConfig;
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.common.ConfigAttribute;
|
import com.genersoft.iot.vmp.jt1078.bean.common.ConfigAttribute;
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.config.*;
|
import com.genersoft.iot.vmp.jt1078.bean.config.*;
|
||||||
@ -13,9 +11,7 @@ import com.genersoft.iot.vmp.jt1078.service.Ijt1078Service;
|
|||||||
import com.genersoft.iot.vmp.jt1078.session.Session;
|
import com.genersoft.iot.vmp.jt1078.session.Session;
|
||||||
import com.genersoft.iot.vmp.jt1078.session.SessionManager;
|
import com.genersoft.iot.vmp.jt1078.session.SessionManager;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.ByteBufUtil;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.poi.util.StringUtil;
|
|
||||||
import org.springframework.context.ApplicationEvent;
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
@ -81,25 +77,25 @@ public class J0104 extends Re {
|
|||||||
methodForShort.invoke(deviceConfig, buf.readUnsignedByte());
|
methodForShort.invoke(deviceConfig, buf.readUnsignedByte());
|
||||||
continue;
|
continue;
|
||||||
case "IllegalDrivingPeriods":
|
case "IllegalDrivingPeriods":
|
||||||
IllegalDrivingPeriods illegalDrivingPeriods = new IllegalDrivingPeriods();
|
JTIllegalDrivingPeriods illegalDrivingPeriods = new JTIllegalDrivingPeriods();
|
||||||
int startHour = buf.readUnsignedByte();
|
int startHour = buf.readUnsignedByte();
|
||||||
int startMinute = buf.readUnsignedByte();
|
int startMinute = buf.readUnsignedByte();
|
||||||
int stopHour = buf.readUnsignedByte();
|
int stopHour = buf.readUnsignedByte();
|
||||||
int stopMinute = buf.readUnsignedByte();
|
int stopMinute = buf.readUnsignedByte();
|
||||||
illegalDrivingPeriods.setStartTime(startHour + ":" + startMinute);
|
illegalDrivingPeriods.setStartTime(startHour + ":" + startMinute);
|
||||||
illegalDrivingPeriods.setEndTime(stopHour + ":" + stopMinute);
|
illegalDrivingPeriods.setEndTime(stopHour + ":" + stopMinute);
|
||||||
Method methodForIllegalDrivingPeriods = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), IllegalDrivingPeriods.class);
|
Method methodForIllegalDrivingPeriods = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTIllegalDrivingPeriods.class);
|
||||||
methodForIllegalDrivingPeriods.invoke(deviceConfig, illegalDrivingPeriods);
|
methodForIllegalDrivingPeriods.invoke(deviceConfig, illegalDrivingPeriods);
|
||||||
continue;
|
continue;
|
||||||
case "CollisionAlarmParams":
|
case "CollisionAlarmParams":
|
||||||
CollisionAlarmParams collisionAlarmParams = new CollisionAlarmParams();
|
JTCollisionAlarmParams collisionAlarmParams = new JTCollisionAlarmParams();
|
||||||
collisionAlarmParams.setCollisionAlarmTime(buf.readUnsignedByte());
|
collisionAlarmParams.setCollisionAlarmTime(buf.readUnsignedByte());
|
||||||
collisionAlarmParams.setCollisionAcceleration(buf.readUnsignedByte());
|
collisionAlarmParams.setCollisionAcceleration(buf.readUnsignedByte());
|
||||||
Method methodForCollisionAlarmParams = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), CollisionAlarmParams.class);
|
Method methodForCollisionAlarmParams = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTCollisionAlarmParams.class);
|
||||||
methodForCollisionAlarmParams.invoke(deviceConfig, collisionAlarmParams);
|
methodForCollisionAlarmParams.invoke(deviceConfig, collisionAlarmParams);
|
||||||
continue;
|
continue;
|
||||||
case "CameraTimer":
|
case "CameraTimer":
|
||||||
CameraTimer cameraTimer = new CameraTimer();
|
JTCameraTimer cameraTimer = new JTCameraTimer();
|
||||||
long cameraTimerContent = buf.readUnsignedInt();
|
long cameraTimerContent = buf.readUnsignedInt();
|
||||||
cameraTimer.setSwitchForChannel1((cameraTimerContent & 1) == 1);
|
cameraTimer.setSwitchForChannel1((cameraTimerContent & 1) == 1);
|
||||||
cameraTimer.setSwitchForChannel2((cameraTimerContent >>> 1 & 1) == 1);
|
cameraTimer.setSwitchForChannel2((cameraTimerContent >>> 1 & 1) == 1);
|
||||||
@ -113,48 +109,53 @@ public class J0104 extends Re {
|
|||||||
cameraTimer.setStorageFlagsForChannel5((cameraTimerContent >>> 11 & 1) == 1);
|
cameraTimer.setStorageFlagsForChannel5((cameraTimerContent >>> 11 & 1) == 1);
|
||||||
cameraTimer.setTimeUnit((cameraTimerContent >>> 15 & 1) == 1);
|
cameraTimer.setTimeUnit((cameraTimerContent >>> 15 & 1) == 1);
|
||||||
cameraTimer.setTimeInterval((int)cameraTimerContent >>> 16);
|
cameraTimer.setTimeInterval((int)cameraTimerContent >>> 16);
|
||||||
Method methodForCameraTimer = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), CameraTimer.class);
|
Method methodForCameraTimer = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTCameraTimer.class);
|
||||||
methodForCameraTimer.invoke(deviceConfig, cameraTimer);
|
methodForCameraTimer.invoke(deviceConfig, cameraTimer);
|
||||||
continue;
|
continue;
|
||||||
case "GnssPositioningMode":
|
case "GnssPositioningMode":
|
||||||
GnssPositioningMode gnssPositioningMode = new GnssPositioningMode();
|
JTGnssPositioningMode gnssPositioningMode = new JTGnssPositioningMode();
|
||||||
short gnssPositioningModeContent = buf.readUnsignedByte();
|
short gnssPositioningModeContent = buf.readUnsignedByte();
|
||||||
gnssPositioningMode.setGps((gnssPositioningModeContent& 1) == 1);
|
gnssPositioningMode.setGps((gnssPositioningModeContent& 1) == 1);
|
||||||
gnssPositioningMode.setBeidou((gnssPositioningModeContent >>> 1 & 1) == 1);
|
gnssPositioningMode.setBeidou((gnssPositioningModeContent >>> 1 & 1) == 1);
|
||||||
gnssPositioningMode.setGlonass((gnssPositioningModeContent >>> 2 & 1) == 1);
|
gnssPositioningMode.setGlonass((gnssPositioningModeContent >>> 2 & 1) == 1);
|
||||||
gnssPositioningMode.setGaLiLeo((gnssPositioningModeContent >>> 3 & 1) == 1);
|
gnssPositioningMode.setGaLiLeo((gnssPositioningModeContent >>> 3 & 1) == 1);
|
||||||
Method methodForGnssPositioningMode = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), GnssPositioningMode.class);
|
Method methodForGnssPositioningMode = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTGnssPositioningMode.class);
|
||||||
methodForGnssPositioningMode.invoke(deviceConfig, gnssPositioningMode);
|
methodForGnssPositioningMode.invoke(deviceConfig, gnssPositioningMode);
|
||||||
continue;
|
continue;
|
||||||
case "VideoParam":
|
case "VideoParam":
|
||||||
VideoParam videoParam = VideoParam.decode(buf);
|
JTVideoParam videoParam = JTVideoParam.decode(buf);
|
||||||
Method methodForVideoParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), VideoParam.class);
|
Method methodForVideoParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTVideoParam.class);
|
||||||
methodForVideoParam.invoke(deviceConfig, videoParam);
|
methodForVideoParam.invoke(deviceConfig, videoParam);
|
||||||
continue;
|
continue;
|
||||||
case "ChannelListParam":
|
case "ChannelListParam":
|
||||||
ChannelListParam channelListParam = ChannelListParam.decode(buf);
|
JTChannelListParam channelListParam = JTChannelListParam.decode(buf);
|
||||||
Method methodForChannelListParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), ChannelListParam.class);
|
Method methodForChannelListParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTChannelListParam.class);
|
||||||
methodForChannelListParam.invoke(deviceConfig, channelListParam);
|
methodForChannelListParam.invoke(deviceConfig, channelListParam);
|
||||||
case "ChannelParam":
|
case "ChannelParam":
|
||||||
ChannelParam channelParam = ChannelParam.decode(buf);
|
JTChannelParam channelParam = JTChannelParam.decode(buf);
|
||||||
Method methodForChannelParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), ChannelParam.class);
|
Method methodForChannelParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTChannelParam.class);
|
||||||
methodForChannelParam.invoke(deviceConfig, channelParam);
|
methodForChannelParam.invoke(deviceConfig, channelParam);
|
||||||
continue;
|
continue;
|
||||||
case "alarmRecordingParam":
|
case "alarmRecordingParam":
|
||||||
AlarmRecordingParam alarmRecordingParam = AlarmRecordingParam.decode(buf);
|
JTAlarmRecordingParam alarmRecordingParam = JTAlarmRecordingParam.decode(buf);
|
||||||
Method methodForAlarmRecordingParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), AlarmRecordingParam.class);
|
Method methodForAlarmRecordingParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTAlarmRecordingParam.class);
|
||||||
methodForAlarmRecordingParam.invoke(deviceConfig, alarmRecordingParam);
|
methodForAlarmRecordingParam.invoke(deviceConfig, alarmRecordingParam);
|
||||||
continue;
|
continue;
|
||||||
case "VideoAlarmBit":
|
case "VideoAlarmBit":
|
||||||
VideoAlarmBit videoAlarmBit = VideoAlarmBit.decode(buf);
|
JTVideoAlarmBit videoAlarmBit = JTVideoAlarmBit.decode(buf);
|
||||||
Method methodForVideoAlarmBit = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), VideoAlarmBit.class);
|
Method methodForVideoAlarmBit = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTVideoAlarmBit.class);
|
||||||
methodForVideoAlarmBit.invoke(deviceConfig, videoAlarmBit);
|
methodForVideoAlarmBit.invoke(deviceConfig, videoAlarmBit);
|
||||||
continue;
|
continue;
|
||||||
case "AnalyzeAlarmParam":
|
case "AnalyzeAlarmParam":
|
||||||
AnalyzeAlarmParam analyzeAlarmParam = AnalyzeAlarmParam.decode(buf);
|
JTAnalyzeAlarmParam analyzeAlarmParam = JTAnalyzeAlarmParam.decode(buf);
|
||||||
Method methodForAnalyzeAlarmParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), AnalyzeAlarmParam.class);
|
Method methodForAnalyzeAlarmParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTAnalyzeAlarmParam.class);
|
||||||
methodForAnalyzeAlarmParam.invoke(deviceConfig, analyzeAlarmParam);
|
methodForAnalyzeAlarmParam.invoke(deviceConfig, analyzeAlarmParam);
|
||||||
continue;
|
continue;
|
||||||
|
case "AwakenParam":
|
||||||
|
JTAwakenParam awakenParamParam = JTAwakenParam.decode(buf);
|
||||||
|
Method methodForAwakenParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTAwakenParam.class);
|
||||||
|
methodForAwakenParam.invoke(deviceConfig, awakenParamParam);
|
||||||
|
continue;
|
||||||
default:
|
default:
|
||||||
System.err.println(field.getGenericType().getTypeName());
|
System.err.println(field.getGenericType().getTypeName());
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@ -2,12 +2,6 @@ package com.genersoft.iot.vmp.jt1078.proc.request;
|
|||||||
|
|
||||||
import com.genersoft.iot.vmp.jt1078.annotation.MsgId;
|
import com.genersoft.iot.vmp.jt1078.annotation.MsgId;
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.*;
|
import com.genersoft.iot.vmp.jt1078.bean.*;
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.common.ConfigAttribute;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.config.CameraTimer;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.config.CollisionAlarmParams;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.config.GnssPositioningMode;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.config.IllegalDrivingPeriods;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.controller.JT1078Controller;
|
|
||||||
import com.genersoft.iot.vmp.jt1078.proc.Header;
|
import com.genersoft.iot.vmp.jt1078.proc.Header;
|
||||||
import com.genersoft.iot.vmp.jt1078.proc.response.J8001;
|
import com.genersoft.iot.vmp.jt1078.proc.response.J8001;
|
||||||
import com.genersoft.iot.vmp.jt1078.proc.response.Rs;
|
import com.genersoft.iot.vmp.jt1078.proc.response.Rs;
|
||||||
@ -16,20 +10,11 @@ import com.genersoft.iot.vmp.jt1078.session.Session;
|
|||||||
import com.genersoft.iot.vmp.jt1078.session.SessionManager;
|
import com.genersoft.iot.vmp.jt1078.session.SessionManager;
|
||||||
import com.genersoft.iot.vmp.jt1078.util.BCDUtil;
|
import com.genersoft.iot.vmp.jt1078.util.BCDUtil;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.ByteBufUtil;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.context.ApplicationEvent;
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询终端属性应答
|
* 查询终端属性应答
|
||||||
@ -72,8 +57,8 @@ public class J0107 extends Re {
|
|||||||
int firmwareVersionLength = buf.readUnsignedByte();
|
int firmwareVersionLength = buf.readUnsignedByte();
|
||||||
deviceAttribute.setFirmwareVersion(buf.readCharSequence(firmwareVersionLength, Charset.forName("GBK")).toString().trim());
|
deviceAttribute.setFirmwareVersion(buf.readCharSequence(firmwareVersionLength, Charset.forName("GBK")).toString().trim());
|
||||||
|
|
||||||
deviceAttribute.setGnssAttribute(JGnssAttribute.getInstance(buf.readUnsignedByte()));
|
deviceAttribute.setGnssAttribute(JTGnssAttribute.getInstance(buf.readUnsignedByte()));
|
||||||
deviceAttribute.setCommunicationModuleAttribute(JCommunicationModuleAttribute.getInstance(buf.readUnsignedByte()));
|
deviceAttribute.setCommunicationModuleAttribute(JTCommunicationModuleAttribute.getInstance(buf.readUnsignedByte()));
|
||||||
|
|
||||||
SessionManager.INSTANCE.response(header.getTerminalId(), "0107", null, deviceAttribute);
|
SessionManager.INSTANCE.response(header.getTerminalId(), "0107", null, deviceAttribute);
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -0,0 +1,43 @@
|
|||||||
|
package com.genersoft.iot.vmp.jt1078.proc.request;
|
||||||
|
|
||||||
|
import com.genersoft.iot.vmp.jt1078.annotation.MsgId;
|
||||||
|
import com.genersoft.iot.vmp.jt1078.bean.JTMediaAttribute;
|
||||||
|
import com.genersoft.iot.vmp.jt1078.proc.Header;
|
||||||
|
import com.genersoft.iot.vmp.jt1078.proc.response.J8001;
|
||||||
|
import com.genersoft.iot.vmp.jt1078.proc.response.Rs;
|
||||||
|
import com.genersoft.iot.vmp.jt1078.service.Ijt1078Service;
|
||||||
|
import com.genersoft.iot.vmp.jt1078.session.Session;
|
||||||
|
import com.genersoft.iot.vmp.jt1078.session.SessionManager;
|
||||||
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端上传音视频属性
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@MsgId(id = "1003")
|
||||||
|
public class J1003 extends Re {
|
||||||
|
|
||||||
|
JTMediaAttribute mediaAttribute;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Rs decode0(ByteBuf buf, Header header, Session session) {
|
||||||
|
mediaAttribute = JTMediaAttribute.decode(buf);
|
||||||
|
SessionManager.INSTANCE.response(header.getTerminalId(), "1003", null, mediaAttribute);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Rs handler(Header header, Session session, Ijt1078Service service) {
|
||||||
|
J8001 j8001 = new J8001();
|
||||||
|
j8001.setRespNo(header.getSn());
|
||||||
|
j8001.setRespId(header.getMsgId());
|
||||||
|
j8001.setResult(J8001.SUCCESS);
|
||||||
|
return j8001;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplicationEvent getEvent() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -95,6 +95,7 @@ public class J8103 extends Rs {
|
|||||||
case "AlarmShielding":
|
case "AlarmShielding":
|
||||||
case "VideoAlarmBit":
|
case "VideoAlarmBit":
|
||||||
case "AnalyzeAlarmParam":
|
case "AnalyzeAlarmParam":
|
||||||
|
case "AwakenParam":
|
||||||
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();
|
||||||
|
|||||||
@ -1,10 +1,9 @@
|
|||||||
package com.genersoft.iot.vmp.jt1078.proc.response;
|
package com.genersoft.iot.vmp.jt1078.proc.response;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.jt1078.annotation.MsgId;
|
import com.genersoft.iot.vmp.jt1078.annotation.MsgId;
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.JConfirmationAlarmMessageType;
|
import com.genersoft.iot.vmp.jt1078.bean.JTConfirmationAlarmMessageType;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人工确认报警消息
|
* 人工确认报警消息
|
||||||
@ -19,7 +18,7 @@ public class J8203 extends Rs {
|
|||||||
/**
|
/**
|
||||||
* 人工确认报警类型
|
* 人工确认报警类型
|
||||||
*/
|
*/
|
||||||
private JConfirmationAlarmMessageType alarmMessageType;
|
private JTConfirmationAlarmMessageType alarmMessageType;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ByteBuf encode() {
|
public ByteBuf encode() {
|
||||||
@ -39,11 +38,11 @@ public class J8203 extends Rs {
|
|||||||
this.alarmPackageNo = alarmPackageNo;
|
this.alarmPackageNo = alarmPackageNo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JConfirmationAlarmMessageType getAlarmMessageType() {
|
public JTConfirmationAlarmMessageType getAlarmMessageType() {
|
||||||
return alarmMessageType;
|
return alarmMessageType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAlarmMessageType(JConfirmationAlarmMessageType alarmMessageType) {
|
public void setAlarmMessageType(JTConfirmationAlarmMessageType alarmMessageType) {
|
||||||
this.alarmMessageType = alarmMessageType;
|
this.alarmMessageType = alarmMessageType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,19 @@
|
|||||||
|
package com.genersoft.iot.vmp.jt1078.proc.response;
|
||||||
|
|
||||||
|
import com.genersoft.iot.vmp.jt1078.annotation.MsgId;
|
||||||
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询终端音视频属性
|
||||||
|
*/
|
||||||
|
@MsgId(id = "9003")
|
||||||
|
public class J9003 extends Rs {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ByteBuf encode() {
|
||||||
|
ByteBuf buffer = Unpooled.buffer();
|
||||||
|
return buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -4,7 +4,6 @@ import com.genersoft.iot.vmp.common.GeneralCallback;
|
|||||||
import com.genersoft.iot.vmp.common.StreamInfo;
|
import com.genersoft.iot.vmp.common.StreamInfo;
|
||||||
import com.genersoft.iot.vmp.jt1078.bean.*;
|
import com.genersoft.iot.vmp.jt1078.bean.*;
|
||||||
import com.genersoft.iot.vmp.jt1078.proc.request.J1205;
|
import com.genersoft.iot.vmp.jt1078.proc.request.J1205;
|
||||||
import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -58,7 +57,7 @@ public interface Ijt1078Service {
|
|||||||
|
|
||||||
void tempPositionTrackingControl(String deviceId, Integer timeInterval, Long validityPeriod);
|
void tempPositionTrackingControl(String deviceId, Integer timeInterval, Long validityPeriod);
|
||||||
|
|
||||||
void confirmationAlarmMessage(String deviceId, int alarmPackageNo, JConfirmationAlarmMessageType alarmMessageType);
|
void confirmationAlarmMessage(String deviceId, int alarmPackageNo, JTConfirmationAlarmMessageType alarmMessageType);
|
||||||
|
|
||||||
int linkDetection(String deviceId);
|
int linkDetection(String deviceId);
|
||||||
|
|
||||||
@ -105,4 +104,6 @@ public interface Ijt1078Service {
|
|||||||
void record(String deviceId, int command, Integer time, Integer save, Integer samplingRate);
|
void record(String deviceId, int command, Integer time, Integer save, Integer samplingRate);
|
||||||
|
|
||||||
void uploadMediaDataForSingle(String deviceId, Long mediaId, Integer delete);
|
void uploadMediaDataForSingle(String deviceId, Long mediaId, Integer delete);
|
||||||
|
|
||||||
|
JTMediaAttribute queryMediaAttribute(String deviceId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -561,7 +561,7 @@ public class jt1078ServiceImpl implements Ijt1078Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void confirmationAlarmMessage(String deviceId, int alarmPackageNo, JConfirmationAlarmMessageType alarmMessageType) {
|
public void confirmationAlarmMessage(String deviceId, int alarmPackageNo, JTConfirmationAlarmMessageType alarmMessageType) {
|
||||||
J8203 j8203 = new J8203();
|
J8203 j8203 = new J8203();
|
||||||
j8203.setAlarmMessageType(alarmMessageType);
|
j8203.setAlarmMessageType(alarmMessageType);
|
||||||
j8203.setAlarmPackageNo(alarmPackageNo);
|
j8203.setAlarmPackageNo(alarmPackageNo);
|
||||||
@ -744,4 +744,10 @@ public class jt1078ServiceImpl implements Ijt1078Service {
|
|||||||
j8805.setDelete(delete);
|
j8805.setDelete(delete);
|
||||||
jt1078Template.uploadMediaDataForSingle(deviceId, j8805, 10);
|
jt1078Template.uploadMediaDataForSingle(deviceId, j8805, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JTMediaAttribute queryMediaAttribute(String deviceId) {
|
||||||
|
J9003 j9003 = new J9003();
|
||||||
|
return (JTMediaAttribute)jt1078Template.queryMediaAttribute(deviceId, j9003, 300);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user