xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 5KB
    文件類型: .cs
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-06-05
  • 語(yǔ)言: C#
  • 標(biāo)簽: PelcoD??C??#??

資源簡(jiǎn)介

標(biāo)準(zhǔn)PelcoD協(xié)議C#源碼,不必造輪子,直接調(diào)用豈不更方便.

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.Collections;

namespace?VWMS.CommonClass
{
????class?PelcoD
????{
????????private?string?watchdir?=?““;//監(jiān)控方向
????????private?static?readonly?byte?STX?=?0xFF;//同步字節(jié)

????????#region??監(jiān)控方向和定時(shí)監(jiān)控實(shí)體
????????public?string?WatchDir
????????{
????????????get
????????????{
????????????????return?watchdir;
????????????}
????????????set
????????????{
????????????????watchdir?=?value;
????????????}
????????}
????????#endregion

????????#region?基本指令定義
????????#region?指令碼1
????????private?const?byte?FocusNear?=?0x01;//增加聚焦
????????private?const?byte?IrisOpen?=?0x02;//減小光圈
????????private?const?byte?IrisClose?=?0x04;//增加光圈
????????private?const?byte?CameraOnOff?=?0x08;//攝像機(jī)打開(kāi)和關(guān)閉
????????private?const?byte?AutoManualScan?=?0x10;//自動(dòng)和手動(dòng)掃描
????????private?const?byte?Sense?=?0x80;//Sence碼
????????#endregion

????????#region??指令碼2
????????private?const?byte?PanRight?=?0x02;//右
????????private?const?byte?PanLeft?=?0x04;//左
????????private?const?byte?TiltUp?=?0x08;//上
????????private?const?byte?TiltDown?=?0x10;//下
????????private?const?byte?ZoomTele?=?0x20;//增加對(duì)焦
????????private?const?byte?ZoomWide?=?0x40;//減小對(duì)焦
????????private?const?byte?FocusFar?=?0x80;//減小聚焦
????????#endregion

????????#region?鏡頭左右平移的速度
????????private?const?byte?PanSpeedMin?=?0x00;//停止
????????private?const?byte?PanSpeedMax?=?0xFF;//最高速
????????#endregion

????????#region?鏡頭上下移動(dòng)的速度
????????private?const?byte?TiltSpeedMin?=?0x00;//停止
????????private?const?byte?TiltSpeedMax?=?0x3F;//最高速
????????#endregion
????????#endregion

????????#region?云臺(tái)控制枚舉
????????public?enum?Switch?{?On?=?0x01?Off?=?0x02?}//雨刷控制
????????public?enum?Focus?{?Near?=?FocusNear?Far?=?FocusFar?}//聚焦控制
????????public?enum?Zoom?{?Wide?=?ZoomWide?Tele?=?ZoomTele?}//對(duì)焦控制
????????public?enum?Tilt?{?Up?=?TiltUp?Down?=?TiltDown?}//上下控制
????????public?enum?Pan?{?Left?=?PanLeft?Right?=?PanRight?}//左右控制
????????public?enum?Scan?{?Auto?Manual?}//自動(dòng)和手動(dòng)控制
????????public?enum?Iris?{?Open?=?IrisOpen?Close?=?IrisClose?}//光圈控制
????????#endregion

????????#region?云臺(tái)控制方法
????????//雨刷控制
????????public?byte[]?CameraSwitch(uint?deviceAddress?Switch?action)
????????{
????????????byte?m_action?=?CameraOnOff;
????????????if?(action?==?Switch.On)
????????????????m_action?=?CameraOnOff?+?Sense;
????????????return?Message.GetMessage(deviceAddress?m_action?0x00?0x00?0x00);
????????}
????????//光圈控制
????????public?byte[]?CameraIrisSwitch(uint?deviceAddress?Iris?action)
????????{
????????????return?Message.GetMessage(deviceAddress?(byte)action?0x00?0x0

評(píng)論

共有 條評(píng)論