Esempio n. 1
0
        public BsSmRequest32DataSimple(
            int temperatureInsideTheCabin,
            int temperatureOutdoor,
            int fanSpeed,
            bool isTunelModeOn,
            bool isWarmFloorOn,
            ClimaticSystemWorkMode currentClimaticWorkMode,
            int fault1,
            int fault2,
            int fault3,
            int fault4,
            int fault5)
        {
            TemperatureInsideTheCabin = temperatureInsideTheCabin;
            TemperatureOutdoor        = temperatureOutdoor;
            FanSpeed                = fanSpeed;
            IsTunelModeOn           = isTunelModeOn;
            IsWarmFloorOn           = isWarmFloorOn;
            CurrentClimaticWorkMode = currentClimaticWorkMode;

            Fault1 = fault1;
            Fault2 = fault2;
            Fault3 = fault3;
            Fault4 = fault4;
            Fault5 = fault5;


            // TODO:  see http://stackoverflow.com/questions/1681406/wpf-databinding-watch-for-thrown-exceptions
        }
        public static string ToText(this ClimaticSystemWorkMode value)
        {
            switch (value)
            {
            case ClimaticSystemWorkMode.Off:
                return("Выключено");

            case ClimaticSystemWorkMode.On:
                return("Включено");

            case ClimaticSystemWorkMode.Reserved:
                return("Резерв");

            case ClimaticSystemWorkMode.DowntimeWhileOn:
                return("Отстой во включённом состоянии");

            case ClimaticSystemWorkMode.Maintenance:
                return("Техобслуживание");

            case ClimaticSystemWorkMode.Washing:
                return("Мойка");

            case ClimaticSystemWorkMode.EmergencyVenting:
                return("Аварийная вентиляция");

            case ClimaticSystemWorkMode.EmergencyHeating:
                return("Аварийное отопление");

            case ClimaticSystemWorkMode.Test:
                return("Тестирование (запуск системы)");

            case ClimaticSystemWorkMode.Unknown:
                return("Неизвестно");

            default:
                throw new Exception("Cannot cast such " + typeof(ClimaticSystemWorkMode).FullName + " to string");
            }
        }
 public BsSmAndKsm1DataCommand32ReplySimple(DateTime astronomicTime
                                            , uint delayedStartTime
                                            , int temperatureOutdoor
                                            , int carType
                                            , bool doorsAreOpen
                                            , int reserve13D5D7
                                            , int targetTemperatureInterior
                                            , ClimaticSystemWorkMode climaticSystemWorkmode14D4D7
                                            , IBsSmWorkMode workModeAndCompressorSwitch
                                            , int allowedPowerConsuptionBy380Vline
                                            , int reserve17, int reserve18
                                            , IBsSmAndKsm1DataCommand32Request ksm2Request
                                            , IBsSmState contract
                                            , int bsSmVersionNumber
                                            , int reserve43
                                            , int reserve44
                                            , int reserve45)
 {
     AstronomicTime                   = astronomicTime;
     DelayedStartTime                 = delayedStartTime;
     TemperatureOutdoor               = temperatureOutdoor;
     CarType                          = carType;
     DoorsAreOpen                     = doorsAreOpen;
     Reserve13D5D7                    = reserve13D5D7;
     TargetTemperatureInterior        = targetTemperatureInterior;
     ClimaticSystemWorkmode14D4D7     = climaticSystemWorkmode14D4D7;
     WorkModeAndCompressorSwitch      = workModeAndCompressorSwitch;
     AllowedPowerConsuptionBy380Vline = allowedPowerConsuptionBy380Vline;
     Reserve17                        = reserve17;
     Reserve18                        = reserve18;
     Ksm2Request                      = ksm2Request;
     BsSmState                        = contract;
     BsSmVersionNumber                = bsSmVersionNumber;
     Reserve43                        = reserve43;
     Reserve44                        = reserve44;
     Reserve45                        = reserve45;
 }
 public WorkModeInRequest2Simple(ClimaticSystemWorkMode climaticSystemWorkmode, bool slaveRegulatorOnByMaster)
 {
     ClimaticSystemWorkmode   = climaticSystemWorkmode;
     SlaveRegulatorOnByMaster = slaveRegulatorOnByMaster;
 }