ard-work/src/main/java/com/ruoyi/device/dhsdk/module/ConfigModule.java
@@ -4,6 +4,7 @@
import com.ruoyi.device.dhsdk.lib.ToolKits;
import com.sun.jna.Structure;
import com.sun.jna.ptr.IntByReference;
import lombok.extern.slf4j.Slf4j;
import static com.ruoyi.device.dhsdk.lib.ToolKits.getErrorCodePrint;
@@ -13,6 +14,7 @@
 * @Author: 刘苏义
 * @Date: 2023年10月14日14:57:01
 **/
@Slf4j(topic = "dhSdk")
public class ConfigModule {
    public static NetSDKLib netsdk = NetSDKLib.NETSDK_INSTANCE;
    public static NetSDKLib configsdk = NetSDKLib.CONFIG_INSTANCE;
@@ -39,7 +41,7 @@
        IntByReference intRetLen = new IntByReference();
        stuInfo.write();
        if (!netsdk.CLIENT_QueryRemotDevState(hLoginHandle, nType, nChn, stuInfo.getPointer(), stuInfo.size(), intRetLen, 3000)) {
            System.err.println("Config Failed!" + ToolKits.getErrorCodePrint());
            log.error("Config Failed!" + ToolKits.getErrorCodePrint());
            return false;
        }
        stuInfo.read();
@@ -67,11 +69,11 @@
                cmdObject.read();
                result = true;
            } else {
                System.err.println("Parse " + strCmd + " Config Failed!" + ToolKits.getErrorCodePrint());
                log.error("Parse " + strCmd + " Config Failed!" + ToolKits.getErrorCodePrint());
                result = false;
            }
        } else {
            System.err.printf("Get %s Config Failed!Last Error = %s\n", strCmd, getErrorCodePrint());
            log.error("Get %s Config Failed!Last Error = %s\n", strCmd, getErrorCodePrint());
            result = false;
        }
@@ -88,7 +90,7 @@
        if (bRet) {
            cmdObject.read();
        } else {
            System.err.printf("Get %s Config Failed!Last Error = %s\n", strCmd, getErrorCodePrint());
            log.error("Get %s Config Failed!Last Error = %s\n", strCmd, getErrorCodePrint());
            result = false;
        }
        return result;
@@ -102,7 +104,7 @@
            cmdObject.read();
            result=true;
        } else {
            System.err.println("GetConfig Failed!" + getErrorCodePrint());
            log.error("GetConfig Failed!" + getErrorCodePrint());
            result=false;
        }
        return result;
@@ -129,11 +131,11 @@
            if (netsdk.CLIENT_SetNewDevConfig(hLoginHandle, strCmd, nChn, szBuffer, nBufferLen, error, restart, 3000)) {
                result = true;
            } else {
                System.err.printf("Set %s Config Failed! Last Error = %s\n", strCmd, getErrorCodePrint());
                log.error("Set %s Config Failed! Last Error = %s\n", strCmd, getErrorCodePrint());
                result = false;
            }
        } else {
            System.err.println("Packet " + strCmd + " Config Failed!" + getErrorCodePrint());
            log.error("Packet " + strCmd + " Config Failed!" + getErrorCodePrint());
            result = false;
        }