/// <summary> /// 添加预置位 /// </summary> /// <param name="tmpTurntablePresetData"></param> /// <returns></returns> static public Guid?AddrPreset(TurntablePresetData tmpTurntablePresetData) { Guid?strAddrPresetType = null; PresetListRepository tmpPresetListRepository = new PresetListRepository(); PresetList entityToInsert = null; Guid tmpTurntableGuid; if (ControlBusinessData.CameraList_Dictionary[tmpTurntablePresetData.VideoGuid.ToString()].Turntable_PTZ_DeviceID != null) { tmpTurntableGuid = ControlBusinessData.CameraList_Dictionary[tmpTurntablePresetData.VideoGuid.ToString()].Turntable_PTZ_DeviceID.Value; int VideoType = ControlBusinessData.GetCameraVideoType(tmpTurntablePresetData.VideoGuid); switch (VideoType) { case (int)VideoCommandType.VideoCCD: { entityToInsert = new PresetList(); entityToInsert.PresetName = tmpTurntablePresetData.PresetName; entityToInsert.CameraDeviceID = tmpTurntablePresetData.VideoGuid.Value; entityToInsert.PresetType = 0; entityToInsert.Horizontal_Data = ControlBusinessData.DynamicDataOfTurntable_Dictionary[tmpTurntableGuid].Horizontal_Data.ToString(); /**水平-原始数据*/ entityToInsert.Vertical_Data = ControlBusinessData.DynamicDataOfTurntable_Dictionary[tmpTurntableGuid].Vertical_Data.ToString(); /**俯仰-原始数据*/ entityToInsert.CCDorIR_Depth = ControlBusinessData.DynamicDataOfTurntable_Dictionary[tmpTurntableGuid].CCD_Depth_Data.ToString(); /**白光变倍-原始数据*/ entityToInsert.CCDorIR_Focus = ControlBusinessData.DynamicDataOfTurntable_Dictionary[tmpTurntableGuid].CCD_Focus_Data.ToString(); /**白光聚焦-原始数据*/ strAddrPresetType = tmpPresetListRepository.Insert(entityToInsert); } break; case (int)VideoCommandType.VideoIR: { entityToInsert = new PresetList(); entityToInsert.PresetName = tmpTurntablePresetData.PresetName; entityToInsert.CameraDeviceID = tmpTurntablePresetData.VideoGuid.Value; entityToInsert.PresetType = 0; entityToInsert.Horizontal_Data = ControlBusinessData.DynamicDataOfTurntable_Dictionary[tmpTurntableGuid].Horizontal_Data.ToString(); /**水平-原始数据*/ entityToInsert.Vertical_Data = ControlBusinessData.DynamicDataOfTurntable_Dictionary[tmpTurntableGuid].Vertical_Data.ToString(); /**俯仰-原始数据*/ entityToInsert.CCDorIR_Depth = ControlBusinessData.DynamicDataOfTurntable_Dictionary[tmpTurntableGuid].IR_Depth_Data.ToString(); /**红外变倍-原始数据*/ entityToInsert.CCDorIR_Focus = ControlBusinessData.DynamicDataOfTurntable_Dictionary[tmpTurntableGuid].IR_Focus_Data.ToString(); /**红外聚焦-原始数据*/ strAddrPresetType = tmpPresetListRepository.Insert(entityToInsert); } break; case (int)VideoCommandType.VideoPTZ: { entityToInsert = new PresetList(); entityToInsert.CameraDeviceID = tmpTurntablePresetData.VideoGuid.Value; entityToInsert.PresetName = tmpTurntablePresetData.PresetName; entityToInsert.PresetType = 0; entityToInsert.PresetNo = 1; //ProtocolBusinessLogic strAddrPresetType = tmpPresetListRepository.Insert(entityToInsert); } break; } } else { } return(strAddrPresetType); }
public static TurntableStateData GetTurntableStateData(Guid?VideoGuid) { TurntableStateData tmpTurntableStateData = new TurntableStateData(); tmpTurntableStateData = ControlBusinessData.GetTurntableState(VideoGuid); return(tmpTurntableStateData); }
public static void Init() { ControlBusinessData.Init(); //初始化转台/云台基本数据 SerialCOMInit.SerialCOMEquipmentInit(); //初始化串口设备 //CHCNetSDKInterface.HK_EquipmentInit(); //初始化HK网络设备 ////////////自动获取UPS数据/////////////////// UPSDataInterface(); IRProtect(); }
public static string SuperiorGetTurntableStateData(Guid?VideoGuid) { string tmpData; TurntableStateData tmpTurntableStateData = new TurntableStateData(); tmpTurntableStateData = ControlBusinessData.GetTurntableState(VideoGuid); tmpData = tmpTurntableStateData.VideoGuid.ToString() + "," + tmpTurntableStateData.iHorizontalData.ToString() + "," + tmpTurntableStateData.iVerticalData.ToString() + "," + tmpTurntableStateData.iDepth + "," + tmpTurntableStateData.iFocus.ToString(); return(tmpData); }
/// <summary> /// 红外控制 /// </summary> /// <param name="tmp_ControlData"></param> /// <returns></returns> public static string SetIRControl_Business(ControlData tmp_ControlData) { string strIRControlState = ""; tmp_StaticDataT = new StaticDataOfTurntable(); tmp_StaticDataT = ControlBusinessData.GetStaticDataOfTurntable(tmp_ControlData.VideoGuid); if (tmp_StaticDataT.GuidDeviceID != null) { SetIR(tmp_StaticDataT, tmp_ControlData.iAction, tmp_ControlData.iSpeed, tmp_ControlData.Parameter); } return(strIRControlState); }
/// <summary> /// 扇扫结束 /// </summary> /// <param name="tmpSectorScanData"></param> /// <returns></returns> public static string SectorScanControlOff_Business(SectorScanData tmpSectorScanData) { string strSectorScanControl = ""; tmp_StaticDataT = new StaticDataOfTurntable(); tmp_StaticDataT = ControlBusinessData.GetStaticDataOfTurntable(tmpSectorScanData.VideoGuid); if (tmp_StaticDataT.GuidDeviceID != null) { SectorScanControlOff(tmp_StaticDataT); } return(strSectorScanControl); }
/// <summary> /// 扇扫开启 /// </summary> /// <param name="tmpSectorScanData"></param> /// <returns></returns> public static string SectorScanControlOpen_Business(SectorScanData tmpSectorScanData) { string strSectorScanControl = ""; tmp_StaticDataT = new StaticDataOfTurntable(); tmp_StaticDataT = ControlBusinessData.GetStaticDataOfTurntable(tmpSectorScanData.VideoGuid); if (tmp_StaticDataT.GuidDeviceID != null) { SectorScanControlOpen(tmp_StaticDataT, tmpSectorScanData.i_HorizontalSt, tmpSectorScanData.i_HorizontalEnd, tmpSectorScanData.i_Hspeed, tmpSectorScanData.i_VerticalSt, tmpSectorScanData.i_VerticalEnd, tmpSectorScanData.i_Vspeed); } return(strSectorScanControl); }
/// <summary> /// 删除预置位 /// </summary> /// <param name="tmpTurntablePresetData"></param> /// <returns></returns> static public string DelPreset(TurntablePresetData tmpTurntablePresetData) { string strDelPreset = ""; PresetListRepository tmpPresetListRepository = new PresetListRepository(); //List<PresetList> tmp = tmpPresetListRepository.GetList(); int VideoType = ControlBusinessData.GetCameraVideoType(tmpTurntablePresetData.VideoGuid); Guid PresetGuid = GetPresetGuid(tmpTurntablePresetData.VideoGuid, tmpTurntablePresetData.PresetName); if (VideoType == (int)VideoCommandType.VideoCCD || VideoType == (int)VideoCommandType.VideoIR) { tmpPresetListRepository.Delete(PresetGuid); } else { tmpPresetListRepository.Delete(PresetGuid); } return(strDelPreset); }
/// <summary> /// 调用预置位 /// </summary> /// <param name="tmpTurntablePresetData"></param> static public void SetPreset(TurntablePresetData tmpTurntablePresetData) { tmp_StaticDataT = new StaticDataOfTurntable(); tmp_StaticDataT = ControlBusinessData.GetStaticDataOfTurntable(tmpTurntablePresetData.VideoGuid); PresetListRepository tmpPresetListRepository = new PresetListRepository(); List <PresetList> tmp = tmpPresetListRepository.GetList(); if (tmp.Count > 0) { for (int i = 0; i < tmp.Count; i++) { if (tmp[i].PresetName == tmpTurntablePresetData.PresetName && tmp[i].CameraDeviceID == tmpTurntablePresetData.VideoGuid) { ProtocolBusinessLogic.SetPreset_Business(tmp_StaticDataT, tmp[i]); break; } } } }
/// <summary> /// UPS信息 /// </summary> /// <returns></returns> public static List <DynamicDataOfUps3onedata> UpsGet() { List <DynamicDataOfUps3onedata> tmpUpsData = ControlBusinessData.GetUpsData(); return(tmpUpsData); }