Ejemplo n.º 1
0
        public Freeze100Test(IWorker <Action> sharedTestsWorker, ICmdListener <IMukFanVaporizerDataReply03> evaporator03Listener, ICmdListener <IMukFlapWinterSummerReply03Telemetry> mukFlapWinterSummerReply03Listener, Timer sharedTestTimer, IParameterSetter parameterSetter)
        {
            _sharedTestsWorker = sharedTestsWorker;

            _evaporator03Listener = evaporator03Listener;
            _mukFlapWinterSummerReply03Listener = mukFlapWinterSummerReply03Listener;

            _sharedTestTimer = sharedTestTimer;
            _parameterSetter = parameterSetter;

            _sharedTestTimer.Elapsed += SharedTestTimerOnElapsed;

            _evaporator03Listener.DataReceived += Evaporator03ListenerOnDataReceived;

            _isTestCanceledSync = new object();
            _isTestCanceled     = false;

            _isTestRunningSync = new object();
            _isTestRunning     = false;

            _timeSync    = new object();
            _testTimeout = TimeSpan.FromSeconds(5.0);

            _lastReceivedDataSyncMukFanVaporizer03Reply = new object();
            _lastReceivedDataMukFanVaporizer03Reply     = null;

            _testCompleteSync = new object();
            _testComplete     = null;

            _progressChangedSync = new object();
            _progressChanged     = null;
        }
Ejemplo n.º 2
0
 private void Evaporator03ListenerOnDataReceived(IList <byte> bytes, IMukFanVaporizerDataReply03 data)
 {
     if (!IsTestCanceled)
     {
         lock (_lastReceivedDataSyncMukFanVaporizer03Reply) _lastReceivedDataMukFanVaporizer03Reply = data;
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// МУК вентилятора испарителя, MODBUS адрес = 3
        /// </summary>
        /// <param name="bytes"></param>
        /// <param name="data"></param>
        private void CmdListenerMukVaporizerReply03OnDataReceived(IList <byte> bytes, IMukFanVaporizerDataReply03 data)
        {
            _uiNotifier.Notify(() =>
            {
                MukInfo3      = IsFullVersion ? new TextFormatterIntegerDotted().Format(data.FirmwareBuildNumber) : OkLinkText;
                MukInfoColor3 = OkLinkColor;

                if (data.Diagnostic1Parsed.FanControllerLinkLost)
                {
                    EvaporatorFanControllerInfo      = NoLinkText;
                    EvaporatorFanControllerInfoColor = NoLinkColor;
                }
                else
                {
                    EvaporatorFanControllerInfo      = OkLinkText;
                    EvaporatorFanControllerInfoColor = OkLinkColor;
                }

                FanEvaporatorInfo = data.FanSpeed.ToString(CultureInfo.InvariantCulture);
                if (data.Diagnostic1.GetBit(4))
                {
                    FanEvaporatorColor = ErDiagColor;
                    FanEvaporatorInfo += ", неисправность";
                }
                else
                {
                    FanEvaporatorColor = OkDiagColor;
                    FanEvaporatorInfo += ", норма";
                }

                CalculatedTemperatureSetting = data.CalculatedTemperatureSetting.ToString("f2");
            });
        }