| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 查询远程设备状态
|
| | | */
|
| | | public static boolean queryRemotDevState(NetSDKLib.LLong hLoginHandle, int nChn, int nType, NetSDKLib.SdkStructure stuInfo) {
|
| | |
|
| | | 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());
|
| | | return false;
|
| | | }
|
| | | stuInfo.read();
|
| | | return true;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取单个配置
|
| | | *
|
| | | * @param hLoginHandle 登陆句柄
|
| | |
| | | int nBufferLen = 2 * 1024 * 1024;
|
| | | byte[] strBuffer = new byte[nBufferLen];
|
| | | cmdObject.write();
|
| | | boolean bRet = netsdk.CLIENT_QueryNewSystemInfo(hLoginHandle, strCmd, nChn, strBuffer, cmdObject.size(), error,3000);
|
| | | boolean bRet = netsdk.CLIENT_QueryNewSystemInfo(hLoginHandle, strCmd, nChn, strBuffer, cmdObject.size(), error, 3000);
|
| | | if (bRet) {
|
| | | cmdObject.read();
|
| | | } else {
|
| | |
| | | }
|
| | | return result;
|
| | | }
|
| | |
|
| | | // 获取配置
|
| | | public static boolean GetConfig(NetSDKLib.LLong hLoginHandle, int nChn,int type,Structure cmdObject) {
|
| | | boolean result = false;
|
| | | // 获取
|
| | | cmdObject.write();
|
| | | if (netsdk.CLIENT_GetConfig(hLoginHandle, type, nChn, cmdObject.getPointer(), cmdObject.size(), 4000, null)) {
|
| | | cmdObject.read();
|
| | | result=true;
|
| | | } else {
|
| | | System.err.println("GetConfig Failed!" + getErrorCodePrint());
|
| | | result=false;
|
| | | }
|
| | | return result;
|
| | | }
|
| | | /**
|
| | | * 设置单个配置
|
| | | *
|
| | |
| | | return result;
|
| | | }
|
| | |
|
| | |
|
| | | }
|