Beispiel #1
0
        /// <summary>
        /// 接收: 读取采集器工作参数
        /// </summary>
        /// <param name="pkgData"></param>
        void ReceiveCollectorParam(DataPackage pkgData)
        {
            var item = new CollectorParamItem();

            using (MemoryStream ms = new MemoryStream(pkgData.PureData))
            {
                using (BinaryReader br = new BinaryReader(ms))
                {
                    br.ReadByte();
                    item.Para1 = br.ReadByte();
                    item.Para2 = br.ReadByte();
                    item.Para3 = br.ReadByte();
                    item.Para4 = br.ReadByte();
                    item.Para5 = br.ReadByte();
                    item.Para6 = br.ReadByte();
                    item.Para7 = br.ReadByte();
                    item.Para8 = br.ReadByte();
                    item.Para9 = br.ReadByte();

                    item.IPara1 = br.ReadByte();
                    item.IPara2 = br.ReadByte();
                    item.IPara3 = br.ReadByte();

                    item.PPara1 = br.ReadByte();
                    item.PPara2 = br.ReadByte();
                    item.PPara3 = br.ReadByte();

                    item.HPara1 = br.ReadByte();
                    item.HPara2 = br.ReadByte();
                    item.HPara3 = br.ReadByte();
                    item.HPara4 = br.ReadByte();
                    item.HPara5 = br.ReadByte();

                }
            }

            OnDataChangeAction(pkgData, item);
        }
Beispiel #2
0
 /// <summary>
 /// 配置采集器工作参数
 /// </summary>
 public void SetCollectorParameter(CollectorParamItem value)
 {
     runMode = RunMode.Monitor;
     var handler = monitorHandlerMan.dataHandlerDict[HCCommand.EXTEND_COMMAND] as ExtendHandler;
     if (handler != null)
     {
         handler.SetCollectorParameter(value);
     }
 }
Beispiel #3
0
 /// <summary>
 /// 配置采集器工作参数
 /// </summary>
 public void SetCollectorParameter(CollectorParamItem value)
 {
     Set(HCCommand.EX_COLLECTOR_PARAMETER_SET, value.ToBuffer());
 }