1078-音视频参数设置+音视频通道列表设置

This commit is contained in:
648540858
2024-05-21 23:56:51 +08:00
parent e085258d74
commit 82ab524fc4
12 changed files with 595 additions and 19 deletions

View File

@@ -5,10 +5,7 @@ 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.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.bean.config.*;
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;
@@ -129,6 +126,11 @@ public class J0104 extends Re {
Method methodForGnssPositioningMode = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), GnssPositioningMode.class);
methodForGnssPositioningMode.invoke(deviceConfig, gnssPositioningMode);
continue;
case "VideoParam":
VideoParam videoParam = VideoParam.decode(buf);
Method methodForVideoParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), VideoParam.class);
methodForVideoParam.invoke(deviceConfig, videoParam);
continue;
default:
System.err.println(field.getGenericType().getTypeName());
continue;

View File

@@ -88,10 +88,11 @@ public class J8103 extends Rs {
case "CollisionAlarmParams":
case "CameraTimer":
case "GnssPositioningMode":
case "VideoParam":
field.setAccessible(true);
JTDeviceSubConfig subConfig = (JTDeviceSubConfig)field.get(config);
byte[] bytesForIllegalDrivingPeriods = subConfig.encode();
buffer.writeByte(bytesForIllegalDrivingPeriods.length);
ByteBuf bytesForIllegalDrivingPeriods = subConfig.encode();
buffer.writeByte(bytesForIllegalDrivingPeriods.readableBytes());
buffer.writeBytes(bytesForIllegalDrivingPeriods);
continue;
}