| | |
| | | System.out.printf("Initialize failed:%d", netdevsdk.NETDEV_GetLastError()); |
| | | return; |
| | | } |
| | | try { |
| | | Common.updateStructureByReferenceMethod = Structure.class.getDeclaredMethod("updateStructureByReference", Class.class, Structure.class, Pointer.class); |
| | | Common.updateStructureByReferenceMethod.setAccessible(true); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | // try { |
| | | // Common.updateStructureByReferenceMethod = Structure.class.getDeclaredMethod("updateStructureByReference", Class.class, Structure.class, Pointer.class); |
| | | // Common.updateStructureByReferenceMethod.setAccessible(true); |
| | | // } catch (Exception e) { |
| | | // throw new RuntimeException(e); |
| | | // } |
| | | |
| | | File file=new File(strPicturePath); |
| | | if(!file.exists()){ |
| | | file.mkdir(); |
| | | } |
| | | // File file=new File(strPicturePath); |
| | | // if(!file.exists()){ |
| | | // file.mkdir(); |
| | | // } |
| | | |
| | | NetDEVSDKLib.NETDEV_REV_TIMEOUT_S pstRevTimeout=new NetDEVSDKLib.NETDEV_REV_TIMEOUT_S(); |
| | | pstRevTimeout.dwRevTimeOut=2; |
| | | pstRevTimeout.dwRevTimeOut=3; |
| | | pstRevTimeout.dwFileReportTimeOut=30; |
| | | pstRevTimeout.write(); |
| | | boolean rbet1=netdevsdk.NETDEV_SetRevTimeOut(pstRevTimeout); |
| | | boolean rbet2=netdevsdk.NETDEV_SetConnectTime(2, 1); |
| | | boolean rbet2=netdevsdk.NETDEV_SetConnectTime(3, 1); |
| | | |
| | | |
| | | } |