package com.iailab.module.data.video.dahua;
|
|
import com.alibaba.fastjson.JSON;
|
import com.iailab.module.data.common.utils.HttpRequest;
|
import com.iailab.netsdk.lib.NetSDKLib;
|
import com.sun.jna.Pointer;
|
import org.slf4j.Logger;
|
import org.slf4j.LoggerFactory;
|
|
import java.util.HashMap;
|
import java.util.Map;
|
|
/**
|
* 重连回调
|
*
|
* @author PanZhibao
|
* @Description
|
* @createTime 2024年03月06日
|
*/
|
public class HaveReConnect implements NetSDKLib.fHaveReConnect {
|
private Logger logger = LoggerFactory.getLogger(getClass());
|
|
private String url = "http://127.0.0.1:8080/iailab/api/re-connect";
|
|
@Override
|
public void invoke(NetSDKLib.LLong m_hLoginHandle, String pchDVRIP, int nDVRPort, Pointer dwUser) {
|
logger.info("ReConnect Device[%s] Port[%d]\n", pchDVRIP, nDVRPort);
|
|
Map<String, String> params = new HashMap<>();
|
params.put("pchDVRIP", pchDVRIP);
|
params.put("nDVRPort", Integer.valueOf(nDVRPort).toString());
|
HttpRequest.doPost(url, JSON.toJSONString(params), "utf-8", "");
|
}
|
}
|