Ejemplo n.º 1
0
 /// <summary>
 /// 配置振动采集策略
 /// </summary>
 public void SetCollectorVibration(CollectorVibrationItem value)
 {
     //var value = curVibrationItem;
     Set(HCCommand.EX_VIBRATION_PARAMETER_SET, value.ToBuffer());
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 配置振动采集策略
 /// </summary>
 public void SetCollectorVibration(CollectorVibrationItem value)
 {
     runMode = RunMode.Monitor;
     var handler = monitorHandlerMan.dataHandlerDict[HCCommand.EXTEND_COMMAND] as ExtendHandler;
     if (handler != null)
     {
         handler.SetCollectorVibration(value);
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 接收: 读取振动采集策略
        /// </summary>
        /// <param name="pkgData"></param>
        void ReceiveVibrationParam(DataPackage pkgData)
        {
            var item = new CollectorVibrationItem();

            using (MemoryStream ms = new MemoryStream(pkgData.PureData))
            {
                using (BinaryReader br = new BinaryReader(ms))
                {
                    br.ReadByte();
                    item.TL_TYPE = br.ReadByte();
                    item.CTL_MODE = br.ReadByte();
                    item.Time.Buffer = br.ReadBytes(7);

                    item.TimeLong = br.ReadUInt16();
                    item.DataNum = br.ReadByte();

                }
            }

            //curVibrationItem = item;
            OnDataChangeAction(pkgData, item);
        }