1078-补充终端音视频参数设置 + 查询终端音视频属性
This commit is contained in:
@@ -6,7 +6,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
* JT 通信模块属性
|
||||
*/
|
||||
@Schema(description = "JT通信模块属性")
|
||||
public class JCommunicationModuleAttribute {
|
||||
public class JTCommunicationModuleAttribute {
|
||||
|
||||
private boolean gprs ;
|
||||
private boolean cdma ;
|
||||
@@ -17,7 +17,7 @@ public class JCommunicationModuleAttribute {
|
||||
private boolean other ;
|
||||
|
||||
|
||||
public static JCommunicationModuleAttribute getInstance(short content) {
|
||||
public static JTCommunicationModuleAttribute getInstance(short content) {
|
||||
boolean gprs = (content & 1) == 1;
|
||||
boolean cdma = (content >>> 1 & 1) == 1;
|
||||
boolean tdScdma = (content >>> 2 & 1) == 1;
|
||||
@@ -25,10 +25,10 @@ public class JCommunicationModuleAttribute {
|
||||
boolean cdma2000 = (content >>> 4 & 1) == 1;
|
||||
boolean tdLte = (content >>> 5 & 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.cdma = cdma;
|
||||
this.tdScdma = tdScdma;
|
||||
@@ -3,7 +3,7 @@ package com.genersoft.iot.vmp.jt1078.bean;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "人工确认报警类型")
|
||||
public class JConfirmationAlarmMessageType {
|
||||
public class JTConfirmationAlarmMessageType {
|
||||
@Schema(description = "确认紧急报警")
|
||||
private boolean urgent;
|
||||
@Schema(description = "确认危险预警")
|
||||
@@ -1,10 +1,5 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
@@ -35,10 +30,10 @@ public class JTDeviceAttribute {
|
||||
private String firmwareVersion ;
|
||||
|
||||
@Schema(description = "GNSS 模块属性")
|
||||
private JGnssAttribute gnssAttribute ;
|
||||
private JTGnssAttribute gnssAttribute ;
|
||||
|
||||
@Schema(description = "通信模块属性")
|
||||
private JCommunicationModuleAttribute communicationModuleAttribute ;
|
||||
private JTCommunicationModuleAttribute communicationModuleAttribute ;
|
||||
|
||||
public JTDeviceType getType() {
|
||||
return type;
|
||||
@@ -96,19 +91,19 @@ public class JTDeviceAttribute {
|
||||
this.firmwareVersion = firmwareVersion;
|
||||
}
|
||||
|
||||
public JGnssAttribute getGnssAttribute() {
|
||||
public JTGnssAttribute getGnssAttribute() {
|
||||
return gnssAttribute;
|
||||
}
|
||||
|
||||
public void setGnssAttribute(JGnssAttribute gnssAttribute) {
|
||||
public void setGnssAttribute(JTGnssAttribute gnssAttribute) {
|
||||
this.gnssAttribute = gnssAttribute;
|
||||
}
|
||||
|
||||
public JCommunicationModuleAttribute getCommunicationModuleAttribute() {
|
||||
public JTCommunicationModuleAttribute getCommunicationModuleAttribute() {
|
||||
return communicationModuleAttribute;
|
||||
}
|
||||
|
||||
public void setCommunicationModuleAttribute(JCommunicationModuleAttribute communicationModuleAttribute) {
|
||||
public void setCommunicationModuleAttribute(JTCommunicationModuleAttribute communicationModuleAttribute) {
|
||||
this.communicationModuleAttribute = communicationModuleAttribute;
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ public class JTDeviceConfig {
|
||||
private Integer fenceRadius;
|
||||
|
||||
@ConfigAttribute(id = 0x32, type="IllegalDrivingPeriods", description = "违规行驶时段范围 ,精确到分")
|
||||
private IllegalDrivingPeriods illegalDrivingPeriods;
|
||||
private JTIllegalDrivingPeriods illegalDrivingPeriods;
|
||||
|
||||
@ConfigAttribute(id = 0x40, type="String", description = "监控平台电话号码")
|
||||
private String platformPhoneNumber;
|
||||
@@ -188,13 +188,13 @@ public class JTDeviceConfig {
|
||||
private Integer drowsyDrivingWarningDifference;
|
||||
|
||||
@ConfigAttribute(id = 0x5d, type="CollisionAlarmParams", description = "碰撞报警参数设置")
|
||||
private CollisionAlarmParams collisionAlarmParams;
|
||||
private JTCollisionAlarmParams collisionAlarmParams;
|
||||
|
||||
@ConfigAttribute(id = 0x5e, type="Integer", description = "侧翻报警参数设置:侧翻角度,单位为度,默认为30")
|
||||
private Integer rolloverAlarm;
|
||||
|
||||
@ConfigAttribute(id = 0x64, type="CameraTimer", description = "定时拍照控制")
|
||||
private CameraTimer cameraTimer;
|
||||
private JTCameraTimer cameraTimer;
|
||||
|
||||
@ConfigAttribute(id = 0x70, type="Long", description = "图像/视频质量 设置范围为1~10 1表示最优质量")
|
||||
private Long qualityForVideo;
|
||||
@@ -212,25 +212,25 @@ public class JTDeviceConfig {
|
||||
private Long chroma;
|
||||
|
||||
@ConfigAttribute(id = 0x75, type="VideoParam", description = "音视频参数设置")
|
||||
private VideoParam videoParam;
|
||||
private JTVideoParam videoParam;
|
||||
|
||||
@ConfigAttribute(id = 0x76, type="ChannelListParam", description = "音视频通道列表设置")
|
||||
private ChannelListParam channelListParam;
|
||||
private JTChannelListParam channelListParam;
|
||||
|
||||
@ConfigAttribute(id = 0x77, type="ChannelParam", description = "音视频通道列表设置")
|
||||
private ChannelParam channelParam;
|
||||
private JTChannelParam channelParam;
|
||||
|
||||
@ConfigAttribute(id = 0x79, type="AlarmRecordingParam", description = "特殊报警录像参数设置")
|
||||
private AlarmRecordingParam alarmRecordingParam;
|
||||
private JTAlarmRecordingParam alarmRecordingParam;
|
||||
|
||||
@ConfigAttribute(id = 0x7a, type="VideoAlarmBit", description = "视频相关报警屏蔽字")
|
||||
private VideoAlarmBit videoAlarmBit;
|
||||
private JTVideoAlarmBit videoAlarmBit;
|
||||
|
||||
@ConfigAttribute(id = 0x7b, type="AnalyzeAlarmParam", description = "图像分析报警参数设置")
|
||||
private AnalyzeAlarmParam analyzeAlarmParam;
|
||||
private JTAnalyzeAlarmParam analyzeAlarmParam;
|
||||
|
||||
@ConfigAttribute(id = 0x7c, type="AwakenParam", description = "终端休眠唤醒模式设置")
|
||||
private AwakenParam awakenParam;
|
||||
private JTAwakenParam awakenParam;
|
||||
|
||||
@ConfigAttribute(id = 0x80, type="Long", description = "车辆里程表读数,单位'1/10km")
|
||||
private Long mileage;
|
||||
@@ -248,7 +248,7 @@ public class JTDeviceConfig {
|
||||
private Short licensePlateColor;
|
||||
|
||||
@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")
|
||||
private Short gnssBaudRate;
|
||||
@@ -289,11 +289,11 @@ public class JTDeviceConfig {
|
||||
private Integer canUploadIntervalForChannel2;
|
||||
|
||||
|
||||
public AnalyzeAlarmParam getAnalyzeAlarmParam() {
|
||||
public JTAnalyzeAlarmParam getAnalyzeAlarmParam() {
|
||||
return analyzeAlarmParam;
|
||||
}
|
||||
|
||||
public void setAnalyzeAlarmParam(AnalyzeAlarmParam analyzeAlarmParam) {
|
||||
public void setAnalyzeAlarmParam(JTAnalyzeAlarmParam analyzeAlarmParam) {
|
||||
this.analyzeAlarmParam = analyzeAlarmParam;
|
||||
}
|
||||
|
||||
@@ -577,11 +577,11 @@ public class JTDeviceConfig {
|
||||
this.fenceRadius = fenceRadius;
|
||||
}
|
||||
|
||||
public IllegalDrivingPeriods getIllegalDrivingPeriods() {
|
||||
public JTIllegalDrivingPeriods getIllegalDrivingPeriods() {
|
||||
return illegalDrivingPeriods;
|
||||
}
|
||||
|
||||
public void setIllegalDrivingPeriods(IllegalDrivingPeriods illegalDrivingPeriods) {
|
||||
public void setIllegalDrivingPeriods(JTIllegalDrivingPeriods illegalDrivingPeriods) {
|
||||
this.illegalDrivingPeriods = illegalDrivingPeriods;
|
||||
}
|
||||
|
||||
@@ -769,11 +769,11 @@ public class JTDeviceConfig {
|
||||
this.drowsyDrivingWarningDifference = drowsyDrivingWarningDifference;
|
||||
}
|
||||
|
||||
public CollisionAlarmParams getCollisionAlarmParams() {
|
||||
public JTCollisionAlarmParams getCollisionAlarmParams() {
|
||||
return collisionAlarmParams;
|
||||
}
|
||||
|
||||
public void setCollisionAlarmParams(CollisionAlarmParams collisionAlarmParams) {
|
||||
public void setCollisionAlarmParams(JTCollisionAlarmParams collisionAlarmParams) {
|
||||
this.collisionAlarmParams = collisionAlarmParams;
|
||||
}
|
||||
|
||||
@@ -785,11 +785,11 @@ public class JTDeviceConfig {
|
||||
this.rolloverAlarm = rolloverAlarm;
|
||||
}
|
||||
|
||||
public CameraTimer getCameraTimer() {
|
||||
public JTCameraTimer getCameraTimer() {
|
||||
return cameraTimer;
|
||||
}
|
||||
|
||||
public void setCameraTimer(CameraTimer cameraTimer) {
|
||||
public void setCameraTimer(JTCameraTimer cameraTimer) {
|
||||
this.cameraTimer = cameraTimer;
|
||||
}
|
||||
|
||||
@@ -873,11 +873,11 @@ public class JTDeviceConfig {
|
||||
this.licensePlateColor = licensePlateColor;
|
||||
}
|
||||
|
||||
public GnssPositioningMode getGnssPositioningMode() {
|
||||
public JTGnssPositioningMode getGnssPositioningMode() {
|
||||
return gnssPositioningMode;
|
||||
}
|
||||
|
||||
public void setGnssPositioningMode(GnssPositioningMode gnssPositioningMode) {
|
||||
public void setGnssPositioningMode(JTGnssPositioningMode gnssPositioningMode) {
|
||||
this.gnssPositioningMode = gnssPositioningMode;
|
||||
}
|
||||
|
||||
@@ -953,46 +953,55 @@ public class JTDeviceConfig {
|
||||
this.canUploadIntervalForChannel2 = canUploadIntervalForChannel2;
|
||||
}
|
||||
|
||||
public VideoParam getVideoParam() {
|
||||
public JTVideoParam getVideoParam() {
|
||||
return videoParam;
|
||||
}
|
||||
|
||||
public void setVideoParam(VideoParam videoParam) {
|
||||
public void setVideoParam(JTVideoParam videoParam) {
|
||||
this.videoParam = videoParam;
|
||||
}
|
||||
|
||||
public ChannelListParam getChannelListParam() {
|
||||
public JTChannelListParam getChannelListParam() {
|
||||
return channelListParam;
|
||||
}
|
||||
|
||||
public void setChannelListParam(ChannelListParam channelListParam) {
|
||||
public void setChannelListParam(JTChannelListParam channelListParam) {
|
||||
this.channelListParam = channelListParam;
|
||||
}
|
||||
|
||||
public ChannelParam getChannelParam() {
|
||||
public JTChannelParam getChannelParam() {
|
||||
return channelParam;
|
||||
}
|
||||
|
||||
public void setChannelParam(ChannelParam channelParam) {
|
||||
public void setChannelParam(JTChannelParam channelParam) {
|
||||
this.channelParam = channelParam;
|
||||
}
|
||||
|
||||
public AlarmRecordingParam getAlarmRecordingParam() {
|
||||
public JTAlarmRecordingParam getAlarmRecordingParam() {
|
||||
return alarmRecordingParam;
|
||||
}
|
||||
|
||||
public void setAlarmRecordingParam(AlarmRecordingParam alarmRecordingParam) {
|
||||
public void setAlarmRecordingParam(JTAlarmRecordingParam alarmRecordingParam) {
|
||||
this.alarmRecordingParam = alarmRecordingParam;
|
||||
}
|
||||
|
||||
public VideoAlarmBit getVideoAlarmBit() {
|
||||
public JTVideoAlarmBit getVideoAlarmBit() {
|
||||
return videoAlarmBit;
|
||||
}
|
||||
|
||||
public void setVideoAlarmBit(VideoAlarmBit videoAlarmBit) {
|
||||
public void setVideoAlarmBit(JTVideoAlarmBit videoAlarmBit) {
|
||||
this.videoAlarmBit = videoAlarmBit;
|
||||
}
|
||||
|
||||
|
||||
public JTAwakenParam getAwakenParam() {
|
||||
return awakenParam;
|
||||
}
|
||||
|
||||
public void setAwakenParam(JTAwakenParam awakenParam) {
|
||||
this.awakenParam = awakenParam;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "JTDeviceConfig{" +
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
* JT GNSS 模块属性
|
||||
*/
|
||||
@Schema(description = "JTGNSS 模块属性")
|
||||
public class JGnssAttribute {
|
||||
public class JTGnssAttribute {
|
||||
|
||||
private boolean gps;
|
||||
|
||||
@@ -16,15 +16,15 @@ public class JGnssAttribute {
|
||||
|
||||
private boolean gaLiLeo;
|
||||
|
||||
public static JGnssAttribute getInstance(short content) {
|
||||
public static JTGnssAttribute getInstance(short content) {
|
||||
boolean gps = (content & 1) == 1;
|
||||
boolean beidou = (content >>> 1 & 1) == 1;
|
||||
boolean glonass = (content >>> 2 & 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.beidou = beidou;
|
||||
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
|
||||
@@ -56,8 +56,8 @@ public class AlarmRecordingParam implements JTDeviceSubConfig{
|
||||
return byteBuf;
|
||||
}
|
||||
|
||||
public static AlarmRecordingParam decode(ByteBuf byteBuf) {
|
||||
AlarmRecordingParam alarmRecordingParam = new AlarmRecordingParam();
|
||||
public static JTAlarmRecordingParam decode(ByteBuf byteBuf) {
|
||||
JTAlarmRecordingParam alarmRecordingParam = new JTAlarmRecordingParam();
|
||||
alarmRecordingParam.setStorageLimit(byteBuf.readUnsignedByte());
|
||||
alarmRecordingParam.setDuration(byteBuf.readUnsignedByte());
|
||||
alarmRecordingParam.setStartTime(byteBuf.readUnsignedByte());
|
||||
@@ -91,7 +91,7 @@ public class JTAloneChanel implements JTDeviceSubConfig{
|
||||
/**
|
||||
* 字幕叠加设置
|
||||
*/
|
||||
private OSDConfig osd;
|
||||
private JTOSDConfig osd;
|
||||
|
||||
public int getLogicChannelId() {
|
||||
return logicChannelId;
|
||||
@@ -181,11 +181,11 @@ public class JTAloneChanel implements JTDeviceSubConfig{
|
||||
this.storageStreamCodeRate = storageStreamCodeRate;
|
||||
}
|
||||
|
||||
public OSDConfig getOsd() {
|
||||
public JTOSDConfig getOsd() {
|
||||
return osd;
|
||||
}
|
||||
|
||||
public void setOsd(OSDConfig osd) {
|
||||
public void setOsd(JTOSDConfig osd) {
|
||||
this.osd = osd;
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ public class JTAloneChanel implements JTDeviceSubConfig{
|
||||
jtAloneChanel.setStorageStreamIInterval(buf.readUnsignedShort());
|
||||
jtAloneChanel.setStorageStreamFrameRate(buf.readByte());
|
||||
jtAloneChanel.setStorageStreamCodeRate(buf.readUnsignedInt());
|
||||
jtAloneChanel.setOsd(OSDConfig.decode(buf));
|
||||
jtAloneChanel.setOsd(JTOSDConfig.decode(buf));
|
||||
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;
|
||||
}
|
||||
|
||||
public static AnalyzeAlarmParam decode(ByteBuf byteBuf) {
|
||||
AnalyzeAlarmParam analyzeAlarmParam = new AnalyzeAlarmParam();
|
||||
public static JTAnalyzeAlarmParam decode(ByteBuf byteBuf) {
|
||||
JTAnalyzeAlarmParam analyzeAlarmParam = new JTAnalyzeAlarmParam();
|
||||
analyzeAlarmParam.setNumberForPeople(byteBuf.readUnsignedByte());
|
||||
analyzeAlarmParam.setFatigueThreshold(byteBuf.readUnsignedByte());
|
||||
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 定时拍照开关标志
|
||||
*/
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
public static ChannelListParam decode(ByteBuf byteBuf) {
|
||||
ChannelListParam channelListParam = new ChannelListParam();
|
||||
public static JTChannelListParam decode(ByteBuf byteBuf) {
|
||||
JTChannelListParam channelListParam = new JTChannelListParam();
|
||||
channelListParam.setVideoAndAudioCount(byteBuf.readUnsignedByte());
|
||||
channelListParam.setAudioCount(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;
|
||||
}
|
||||
|
||||
public static ChannelParam decode(ByteBuf byteBuf) {
|
||||
ChannelParam channelParam = new ChannelParam();
|
||||
public static JTChannelParam decode(ByteBuf byteBuf) {
|
||||
JTChannelParam channelParam = new JTChannelParam();
|
||||
int length = byteBuf.readUnsignedByte();
|
||||
List<JTAloneChanel> jtAloneChanelList = new ArrayList<>(length);
|
||||
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)
|
||||
@@ -4,5 +4,4 @@ import io.netty.buffer.ByteBuf;
|
||||
|
||||
public interface JTDeviceSubConfig {
|
||||
ByteBuf encode();
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import io.netty.buffer.Unpooled;
|
||||
/**
|
||||
* GNSS 定位模式
|
||||
*/
|
||||
public class GnssPositioningMode implements JTDeviceSubConfig{
|
||||
public class JTGnssPositioningMode implements JTDeviceSubConfig{
|
||||
|
||||
/**
|
||||
* GPS 定位 true: 开启, false: 关闭
|
||||
@@ -6,7 +6,7 @@ import io.netty.buffer.Unpooled;
|
||||
/**
|
||||
* 违规行驶时段范围 ,精确到分
|
||||
*/
|
||||
public class IllegalDrivingPeriods implements JTDeviceSubConfig{
|
||||
public class JTIllegalDrivingPeriods implements JTDeviceSubConfig{
|
||||
/**
|
||||
* 违规行驶时段-开始时间 HH:mm
|
||||
*/
|
||||
@@ -6,7 +6,7 @@ import io.netty.buffer.Unpooled;
|
||||
/**
|
||||
* OSD字幕叠加设置
|
||||
*/
|
||||
public class OSDConfig {
|
||||
public class JTOSDConfig {
|
||||
|
||||
/**
|
||||
* 日期和时间
|
||||
@@ -129,8 +129,8 @@ public class OSDConfig {
|
||||
|
||||
}
|
||||
|
||||
public static OSDConfig decode(ByteBuf buf) {
|
||||
OSDConfig config = new OSDConfig();
|
||||
public static JTOSDConfig decode(ByteBuf buf) {
|
||||
JTOSDConfig config = new JTOSDConfig();
|
||||
int content = buf.readUnsignedShort();
|
||||
config.setTime((content & 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;
|
||||
}
|
||||
|
||||
public static VideoAlarmBit decode(ByteBuf byteBuf) {
|
||||
VideoAlarmBit videoAlarmBit = new VideoAlarmBit();
|
||||
public static JTVideoAlarmBit decode(ByteBuf byteBuf) {
|
||||
JTVideoAlarmBit videoAlarmBit = new JTVideoAlarmBit();
|
||||
byte content = byteBuf.readByte();
|
||||
videoAlarmBit.setLossSignal((content & 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( 固定码率) ;
|
||||
@@ -85,7 +85,7 @@ public class VideoParam implements JTDeviceSubConfig{
|
||||
/**
|
||||
* 字幕叠加设置
|
||||
*/
|
||||
private OSDConfig osd;
|
||||
private JTOSDConfig osd;
|
||||
|
||||
/**
|
||||
* 是否启用音频输出, 0:不启用;1:启用
|
||||
@@ -173,11 +173,11 @@ public class VideoParam implements JTDeviceSubConfig{
|
||||
this.storageStreamCodeRate = storageStreamCodeRate;
|
||||
}
|
||||
|
||||
public OSDConfig getOsd() {
|
||||
public JTOSDConfig getOsd() {
|
||||
return osd;
|
||||
}
|
||||
|
||||
public void setOsd(OSDConfig osd) {
|
||||
public void setOsd(JTOSDConfig osd) {
|
||||
this.osd = osd;
|
||||
}
|
||||
|
||||
@@ -208,8 +208,8 @@ public class VideoParam implements JTDeviceSubConfig{
|
||||
return byteBuf;
|
||||
}
|
||||
|
||||
public static VideoParam decode(ByteBuf buf) {
|
||||
VideoParam videoParam = new VideoParam();
|
||||
public static JTVideoParam decode(ByteBuf buf) {
|
||||
JTVideoParam videoParam = new JTVideoParam();
|
||||
videoParam.setLiveStreamCodeRateType(buf.readByte());
|
||||
videoParam.setLiveStreamResolving(buf.readByte());
|
||||
videoParam.setLiveStreamIInterval(buf.readUnsignedShort());
|
||||
@@ -221,7 +221,7 @@ public class VideoParam implements JTDeviceSubConfig{
|
||||
videoParam.setStorageStreamIInterval(buf.readUnsignedShort());
|
||||
videoParam.setStorageStreamFrameRate(buf.readByte());
|
||||
videoParam.setStorageStreamCodeRate(buf.readUnsignedInt());
|
||||
videoParam.setOsd(OSDConfig.decode(buf));
|
||||
videoParam.setOsd(JTOSDConfig.decode(buf));
|
||||
videoParam.setAudioEnable(buf.readByte());
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user