| | |
| | | import com.ycl.api.YS.lib.NetDEVSDKLib; |
| | | import com.ycl.api.YS.login.Login; |
| | | import com.ycl.platform.domain.result.OSDResult; |
| | | import enumeration.DeviceType; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.nio.charset.StandardCharsets; |
| | |
| | | } |
| | | stOSDInfo.read(); |
| | | //省份 |
| | | String name = new String(stOSDInfo.stNameOSD.szOSDText, StandardCharsets.UTF_8); |
| | | String name = new String(stOSDInfo.stNameOSD.szOSDText, StandardCharsets.UTF_8).trim(); |
| | | osdResult.setOSD1(name); |
| | | // log.info("name"+name); |
| | | int num = 0; |
| | | for (NetDEVSDKLib.NETDEV_OSD_TEXT_OVERLAY_S osd : stOSDInfo.astTextOverlay) { |
| | | String text = new String(osd.szOSDText, StandardCharsets.UTF_8).trim(); |
| | | // log.info("num:"+num+",texr:"+text); |
| | | if (num == 0) { |
| | | osdResult.setOSD2(text); |
| | | } else if (num == 1) { |
| | |
| | | } |
| | | //登出 |
| | | YSInit.netdevsdk.NETDEV_Logout(lpUserID); |
| | | osdResult.setDeviceBrand(DeviceType.YS.getType()); |
| | | return osdResult; |
| | | } else { |
| | | // log.error("ip:"+ip+",error code" + YSInit.netdevsdk.NETDEV_GetLastError()); |