Beispiel #1
0
        private void StageRev(int page)
        {
            WagoIO.Instance.SetListTC(lst, page);

            T1.StageRev("АВАРИЯ^НОСИТЕЛЯ", new SolidColorBrush(Colors.Red), new SolidColorBrush(Colors.Silver));
            T2.StageRev("", new SolidColorBrush(Colors.Red), new SolidColorBrush(Colors.Silver));
            T3.StageRev("Р по^ПАДАЕТ", new SolidColorBrush(Colors.Red), new SolidColorBrush(Colors.Silver));
            T4.StageRev("СРАБОТАЛ^ТД", new SolidColorBrush(Colors.Red), new SolidColorBrush(Colors.Silver));
            T5.StageRev("", new SolidColorBrush(Colors.Red), new SolidColorBrush(Colors.Silver));
            T6.StageRev("ОТКАЗ^БВС", new SolidColorBrush(Colors.Red), new SolidColorBrush(Colors.Silver));
            T7.StageRev("Pса^ПАДАЕТ", new SolidColorBrush(Colors.Red), new SolidColorBrush(Colors.Silver));
            T8.StageRev("РАЗГЕРМ^СА", new SolidColorBrush(Colors.Red), new SolidColorBrush(Colors.Silver));
            T9.StageRev("РАЗГЕРМ^КЖО", new SolidColorBrush(Colors.Red), new SolidColorBrush(Colors.Silver));
            T10.StageRev("Р400^мм рт ст", new SolidColorBrush(Colors.Red), new SolidColorBrush(Colors.Silver));
            T11.StageRev("СОСТАВ^ВОЗДУХА", new SolidColorBrush(Colors.Red), new SolidColorBrush(Colors.Silver));
            T12.StageRev("РАЗГЕРМ^КНР", new SolidColorBrush(Colors.Red), new SolidColorBrush(Colors.Silver));
            T13.StageRev("PАЗГЕРМ^ПОДГОТ", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));
            T14.StageRev("РАЗДЕЛЕН^по ГЦ", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));
            T15.StageRev("ОТКРЫТ^КСД БО", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));
            T16.StageRev("АВАРИЯ^ЦВМ", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));
            T17.StageRev("ПРОГР^РАЗДЕЛЕН", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));
            T18.StageRev("ТД^ПОДКЛ", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));
            T19.StageRev("ПРИЗНАК^СПУСК", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));
            T20.StageRev("СГ^РАЗАРР", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));
            T21.StageRev("РАБОТА^ДПО", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));
            T22.StageRev("СПУСК^ПО ГЦ", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));
            T23.StageRev("ВЫБОР^ДПО", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));
            T24.StageRev("РАБОТА^СКД", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));
            Block1 = "TC-1";
            Block2 = "TC-2";
            Block3 = "TC-3";
            Block4 = "TC-4";

            if (page == 2)
            {
                T1.StageRev("БС", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));
                T2.StageRev("БСР", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));
                T3.StageRev("закрутка^СА", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));
                T4.StageRev("ВЫЗОВ НА^СВЯЗЬ", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));
                T5.StageRev("разреш^РРСТ", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));
                T6.StageRev("U мало", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));

                T7.StageRev("ввод^ЗСП", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));
                T8.StageRev("отказ^очист СА", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));
                T9.StageRev("ПОСАДКА", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));
                T10.StageRev("РБ^подкл", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));
                T11.StageRev("отказ^очист БО", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));
                T12.StageRev("останов^КС-020", new SolidColorBrush(Colors.Yellow), new SolidColorBrush(Colors.Silver));

                T13.StageRev("БВC^готов", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));
                T14.StageRev("ОСК", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));
                T15.StageRev("ГСО", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));
                T16.StageRev("2 СЕКЦИЯ^НАДДУВА", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));
                T17.StageRev("2 СЕКЦИЯ^КДУ", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));
                T18.StageRev("СА-БО^люк откр", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));

                T19.StageRev("РО АК", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));
                T20.StageRev("ввод^ОСП", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));
                T21.StageRev("подача^O2", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));
                T22.StageRev("РУД", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));
                T23.StageRev("УКВ^передача", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));
                T24.StageRev("МЕХАН^СОЕДИН", new SolidColorBrush(Colors.Green), new SolidColorBrush(Colors.Silver));

                Block1 = "TC-5";
                Block2 = "TC-6";
                Block3 = "TC-7";
                Block4 = "TC-8";
            }
        }
Beispiel #2
0
        static T18 ParsingT18(string sBit)
        {
            T18 stt = new T18();

            stt.type     = Convert.ToUInt16(bin2int(sBit.Substring(0, 6)));
            stt.repeat   = Convert.ToUInt16(bin2int(sBit.Substring(6, 2)));
            stt.mmsi     = Convert.ToUInt32(bin2int(sBit.Substring(8, 30)));
            stt.speed    = (float)((bin2int(sBit.Substring(46, 10))) * 1.0 / 10);
            stt.accuracy = Convert.ToBoolean(bin2int(sBit.Substring(56, 1)));

            bool   west = Convert.ToBoolean(bin2int(sBit.Substring(57, 1)));
            UInt32 lon  = Convert.ToUInt32(bin2int(sBit.Substring(57, 28)));

            stt.lon = getPos(lon, west, true);

            bool   south = Convert.ToBoolean(bin2int(sBit.Substring(85, 1)));
            UInt32 lat   = Convert.ToUInt32(bin2int(sBit.Substring(85, 27)));

            stt.lat = getPos(lat, south, false);

            stt.course   = (bin2int(sBit.Substring(112, 12))) / 10;
            stt.heading  = Convert.ToUInt16(bin2int(sBit.Substring(124, 9)));
            stt.second   = Convert.ToUInt16(bin2int(sBit.Substring(133, 6)));
            stt.regional = Convert.ToUInt16(bin2int(sBit.Substring(139, 2)));

            stt.cs      = Convert.ToBoolean(bin2int(sBit.Substring(141, 1)));
            stt.display = Convert.ToBoolean(bin2int(sBit.Substring(142, 1)));
            stt.dsc     = Convert.ToBoolean(bin2int(sBit.Substring(143, 1)));
            stt.band    = Convert.ToBoolean(bin2int(sBit.Substring(144, 1)));
            stt.msg22   = Convert.ToBoolean(bin2int(sBit.Substring(145, 1)));
            stt.assign  = Convert.ToBoolean(bin2int(sBit.Substring(146, 1)));

            stt.raim  = Convert.ToBoolean(bin2int(sBit.Substring(147, 1)));
            stt.radio = Convert.ToUInt32(bin2int(sBit.Substring(148, 19)));

                        #if DISP_DEBUG
            Console.WriteLine("tip: {0}", stt.type);
            Console.WriteLine("rep: {0}", stt.repeat);
            Console.WriteLine("mms: {0} ", stt.mmsi);
            Console.WriteLine("spe: {0} ", stt.speed);
            Console.WriteLine("acc: {0} ", stt.accuracy);
            Console.WriteLine("lon: {0} ", stt.lon);
            Console.WriteLine("lat: {0} ", stt.lat);
            Console.WriteLine("cou: {0} ", stt.course);
            Console.WriteLine("hea: {0} ", stt.heading);
            Console.WriteLine("sec: {0} ", stt.second);
            Console.WriteLine("reg: {0} ", stt.regional);

            Console.WriteLine("csu: {0} ", stt.cs);
            Console.WriteLine("dis: {0} ", stt.display);
            Console.WriteLine("dsc: {0} ", stt.dsc);
            Console.WriteLine("ban: {0} ", stt.band);
            Console.WriteLine("msg: {0} ", stt.msg22);
            Console.WriteLine("ass: {0} ", stt.assign);

            Console.WriteLine("rai: {0} ", stt.raim);
            Console.WriteLine("rad: {0} ", stt.radio);
                        #endif

            return(stt);
        }
Beispiel #3
0
 static bool Do18(T18 t) {
   Nullable<T18> n = new Nullable<T18>(t);
   return Ensure(n.HasValue && n.Value == t);
 }