示例#1
0
        public override bool SetDecodeInfo(ref PTZ.DecoderInfo decoderInfo)
        {
            HKDevice.DecoderInfo di = new HKDevice.DecoderInfo();

            di.dwBaudRate      = (HKDevice.BaudRate)((int)decoderInfo.BaudRate);
            di.byDataBit       = (HKDevice.DataBit)((int)decoderInfo.DataBit);
            di.byStopBit       = (HKDevice.StopBit)((int)decoderInfo.StopBit);
            di.byParity        = (HKDevice.Parity)((int)decoderInfo.Parity);
            di.byFlowcontrol   = (HKDevice.FlowControl)((int)decoderInfo.Flowcontrol);
            di.wDecoderType    = (HKDevice.DecoderType)((int)decoderInfo.DecoderType);
            di.wDecoderAddress = (short)decoderInfo.DecoderAddress;

            if (mDevice.SetDecodeInfo(Channel, ref di))
            {
                decoderInfo.BaudRate       = (PTZ.TBaudRate)((int)di.dwBaudRate);
                decoderInfo.DataBit        = (PTZ.TDataBit)((int)di.byDataBit);
                decoderInfo.StopBit        = (PTZ.TStopBit)((int)di.byStopBit);
                decoderInfo.Parity         = (PTZ.TParity)((int)di.byParity);
                decoderInfo.Flowcontrol    = (PTZ.TFlowControl)((int)di.byFlowcontrol);
                decoderInfo.DecoderType    = (PTZ.TDecoderType)((int)di.wDecoderType);
                decoderInfo.DecoderAddress = (ushort)di.wDecoderAddress;

                return(true);
            }
            return(false);
        }
示例#2
0
文件: PTZCtrl.cs 项目: ewin66/Monitor
 public virtual bool SetDecodeInfo(ref DecoderInfo decoderInfo)
 {
     return(false);
 }