/// <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>(); }
/// <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; } }
public WeightController(WeighingApparatus pWeighingApparatus) { _curWeightCfg = pWeighingApparatus; _canRunThreadWeight = false; _comData = new List <byte>(); }