コード例 #1
0
 /// <summary>
 ///     重量信号灯
 /// </summary>
 //private readonly Semaphore _weightSem = new Semaphore(1, 1);
 public WeightController(WeighingApparatus pWeighingApparatus)
 {
     //_log = pLog;
     //_log.Info("----------------------------衡器.托利多-------------------------------");
     _curWeightCfg = pWeighingApparatus;
     // _canRunThreadWeight = false;
     _comData = new List <byte>();
 }
コード例 #2
0
ファイル: WeightManager.cs プロジェクト: rcw0125/-
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="pConfigFile">配置文件</param>
        public WeightManager(string pConfigFile)
        {
            WeightDeviceLogger.Debug("--------------------------开始----------------------------");
            ConfigReader cfgReader = new ConfigReader(pConfigFile);

            try
            {
                _curWeightCfg = ConfigReader.ReadWeighingApparatusCfg();
                WeightDeviceLogger.Debug("读取衡器配置成功。");
            }
            catch (Exception ex)
            {
                WeightDeviceLogger.Error("读取衡器配置异常。", ex);
                throw ex;
            }
        }
コード例 #3
0
 public WeightController(WeighingApparatus pWeighingApparatus)
 {
     _curWeightCfg       = pWeighingApparatus;
     _canRunThreadWeight = false;
     _comData            = new List <byte>();
 }