Example #1
0
 private void OnCmdInitialize()
 {
     _powerConfig.Clear();
     if (MonitorAllConfig.Instance().PeripheralCfgDICDic == null)
     {
         return;
     }
     foreach (KeyValuePair <string, string> keyvalue in MonitorAllConfig.Instance().PeripheralCfgDICDic)
     {
         _powerConfig.Add(new PowerControlData()
         {
             Key   = CommandTextParser.GetDeJsonSerialization <FunctionCardRoadInfo>(keyvalue.Key),
             Value = keyvalue.Value
         });
     }
 }
        private void SensorCallBack(TransferParams param, object userToken)
        {
            Action action = new Action(() =>
            {
                try
                {
                    ExecSensorData(CommandTextParser.GetDeJsonSerialization <PeripheralsLocateInfo>(param.Content));
                }
                catch (Exception ex)
                {
                    _fLogService.Error("ExistCatch:Auto Sensor CallBack Error:" + ex.ToString());
                }
                finally
                {
                    _autoReadEvent.Set();
                }
            });

            action.BeginInvoke(null, null);
        }