package com.unis.detectionnum.server.service;

import com.github.pagehelper.PageInfo;
import com.serotonin.modbus4j.exception.ErrorResponseException;
import com.serotonin.modbus4j.exception.ModbusInitException;
import com.serotonin.modbus4j.exception.ModbusTransportException;
import com.unis.detectionnum.common.vo.DeviceCameraParamVO;
import com.unis.detectionnum.common.vo.DeviceInfoQueryVO;
import com.unis.detectionnum.common.vo.DeviceInfoVO;
import com.unis.detectionnum.common.vo.DeviceParamVO;
import com.unis.detectionnum.common.vo.DeviceProbeParamVO;
import com.unis.detectionnum.server.entity.DeviceInfoDO;

import java.util.List;

/**
 * 
 * @Package: com.unis.detectionnum.server.service
 * @Description:设备参数管理service
 * @Author: LiuFeng
 * @Date: Created in 2019/8/15
 */
public interface DeviceParamService {

	/**
	 * 
	 * @Description:根据设备相关信息，获取设备当前参数
	 * @param deviceInfoQueryVO 设备信息查询对象
	 * @Author: LiuFeng
	 * @Date: Created in 2019/8/15
	 */
	int readDeviceParam(DeviceInfoQueryVO deviceInfoQueryVO) throws ModbusTransportException, ErrorResponseException, ModbusInitException;

	void writeDeviceParam(DeviceParamVO deviceParamVO, DeviceInfoQueryVO deviceInfoQueryVO)  throws ModbusTransportException, ErrorResponseException, ModbusInitException ;

	/** 
	 * @Title: saveProbeParam 
	 * @Description: 激光探头参数新增
	 * @param deviceProbeVO
	 * @return void
	 * @throws 
	 */
	int saveProbeParam(DeviceProbeParamVO deviceProbeVO);

	/** 
	 * @Title: updateProbeParam 
	 * @Description: 激光探头参数修改
	 * @param deviceProbeVO
	 * @return void
	 * @throws 
	 */
	int updateProbeParam(DeviceProbeParamVO deviceProbeVO);

	/** 
	 * @Title: getDevicePageList 
	 * @Description: 分页查询硬件设备信息
	 * @param deviceInfoQueryVO
	 * @param pageNum
	 * @param pageSize
	 * @return PageInfo<DeviceInfoVO>
	 * @throws 
	 */
	PageInfo<DeviceInfoVO> getDevicePageList(DeviceInfoQueryVO deviceInfoQueryVO, Integer pageNum, Integer pageSize);

	/** 
	 * @Title: getDeviceProbeParam 
	 * @Description: 根据设备code查询探头参数信息
	 * @param sbCode
	 * @param @return
	 * @return DeviceProbeParamVO
	 * @throws 
	 */
	DeviceProbeParamVO getDeviceProbeParam(String sbCode);

	/** 
	 * @Title: deleteProbeParam 
	 * @Description: 根据设备code删除激光探头设备参数
	 * @param sbCode
	 * @return int
	 * @throws 
	 */
	int deleteProbeParam(String sbCode);
	
	/** 
	 * @Title: deleteCameraParam 
	 * @Description: 根据设备code删除摄像头设备参数
	 * @param sbCode
	 * @return int
	 * @throws 
	 */
	int deleteCameraParam(String sbCode);

	/** 
	 * @Title: saveCameraParam 
	 * @Description: 摄像头信息新增
	 * @param deviceCameraVO
	 * @return void
	 * @throws 
	 */
	int saveCameraParam(DeviceCameraParamVO deviceCameraVO);

	/** 
	 * @Title: updateCameraParam 
	 * @Description: 摄像头信息修改
	 * @param deviceCameraVO
	 * @return void
	 * @throws 
	 */
	int updateCameraParam(DeviceCameraParamVO deviceCameraVO);

	/** 
	 * @Title: getDeviceCameraParam 
	 * @Description: 根据设备code获取摄像头信息
	 * @param sbCode
	 * @return DeviceCameraParamVO
	 * @throws 
	 */
	DeviceCameraParamVO getDeviceCameraParam(String sbCode);

	/** 
	 * @Title: getDeviceNo 
	 * @Description: TODO
	 * @param @param cfbh
	 * @param @return
	 * @return String
	 * @throws 
	 */
	String getDeviceNo(String cfbh);

	/** 
	 * @Title: getDeviceProbe 
	 * @Description: TODO
	 * @param infoQueryVO
	 * @return DeviceInfoVO
	 * @throws 
	 */
	DeviceInfoVO getDeviceProbe(DeviceInfoQueryVO infoQueryVO);

	List<DeviceInfoDO> selectListAll();
}
