liurunyu
2024-11-05 981a099cdced2be1c87f4c4bdeab4f83705d7e83
Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
4个文件已修改
14 ■■■■■ 已修改文件
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/Notify.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/NotifyInfo.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/CommonV1.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/CommonV2.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/Notify.java
@@ -3,7 +3,7 @@
/**
 * @Author: liurunyu
 * @Date: 2024/11/3 13:12
 * @Description 只有驱动+协议解析器才知道RTU真实的状态,所认提供此接口,向外通知设备的一些状态
 * @Description 只有驱动+协议解析器才知道RTU真实的状态,所以提供此接口,向外通知设备的一些状态
 */
public interface Notify {
    /**
@@ -13,7 +13,7 @@
     * @param protocolVersion
     * @param info
     */
    public void notify(String rtuAddr,
    void notify(String rtuAddr,
                       String protocolName,
                       Short protocolVersion,
                       NotifyInfo ...info) ;
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/NotifyInfo.java
@@ -3,7 +3,7 @@
/**
 * @Author: liurunyu
 * @Date: 2024/11/3 13:12
 * @Description
 * @Description 驱动模块通知的信息,标识类接口,无具体方法
 */
public interface NotifyInfo {
}
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/CommonV1.java
@@ -15,7 +15,7 @@
    public Boolean isThisProtocolHead(byte[] bs) throws Exception{
        if(bs == null){
            return null ;
        }else if(bs.length >= (ProtocolConstantV206V1.ctrlIndex - 1)
        }else if(bs.length >= (ProtocolConstantV206V1.ctrlIndex)
                && bs[0] == ProtocolConstantV206V1.P_Head_Byte
                && bs[2] == ProtocolConstantV206V1.P_Head_Byte){
            //String vs = this.parseVersion(bs) ;
@@ -32,7 +32,9 @@
     * @throws Exception 异常
     */
    public void checkHead(byte[] bs) throws Exception{
        if(bs.length < ProtocolConstantV206V1.onLineDataMinLength || bs[0] != ProtocolConstantV206V1.P_Head_Byte || bs[2] != ProtocolConstantV206V1.P_Head_Byte){
        if(bs.length < ProtocolConstantV206V1.onLineDataMinLength
                || bs[0] != ProtocolConstantV206V1.P_Head_Byte
                || bs[2] != ProtocolConstantV206V1.P_Head_Byte){
            throw new Exception("上行数据帧头不正确!") ;
        }
    }
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V2/CommonV2.java
@@ -15,7 +15,7 @@
    public Boolean isThisProtocolHead(byte[] bs) throws Exception{
        if(bs == null){
            return null ;
        }else if(bs.length >= (ProtocolConstantV206V2.ctrlIndex - 1)
        }else if(bs.length >= (ProtocolConstantV206V2.ctrlIndex)
                && bs[ProtocolConstantV206V2.headFlag1Index] == ProtocolConstantV206V2.P_Head_Byte
                && bs[ProtocolConstantV206V2.headFlag2Index] == ProtocolConstantV206V2.P_Head_Byte){
            Short vs = this.parseVersion(bs) ;