/// <summary> /// Вычисляет текущее значение параметра Расход на входе /// </summary> /// <param name="v1">Расход на входе Датчик</param> /// <param name="v2">Расход на входе по Ходам Насоса</param> public void Calculate(P0010 v1, P0113 v2) { if (slim.TryEnterWriteLock(300)) { try { switch (_source) { case SourceFlow.Moving: _value = v2.Value; break; case SourceFlow.Pump: _value = v1.Value; break; default: break; } } finally { slim.ExitWriteLock(); } } }
/// <summary> /// Инициализирует новый экземпляр класса /// </summary> public Technology() { c_slim = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion); cal_slim = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion); p1 = new SGT.P0001(Guid.Empty); p2 = new SGT.P0002(Guid.Empty); p3 = new SGT.P0003(Guid.Empty); p4 = new SGT.P0004(Guid.Empty); p5 = new SGT.P0005(Guid.Empty); p6 = new SGT.P0006(Guid.Empty); p6_1 = new SGT.P06_1(Guid.Empty); p6_2 = new SGT.P06_2(Guid.Empty); p6_3 = new SGT.P06_3(Guid.Empty); p6_4 = new SGT.P06_4(Guid.Empty); p6_5 = new SGT.P06_5(Guid.Empty); p6_6 = new SGT.P06_6(Guid.Empty); p6_7 = new SGT.P06_7(Guid.Empty); p6_8 = new SGT.P06_8(Guid.Empty); p6_9 = new SGT.P06_9(Guid.Empty); p7 = new SGT.P0007(Guid.Empty); p7_1 = new SGT.P07_1(Guid.Empty); p7_2 = new SGT.P07_2(Guid.Empty); p7_3 = new SGT.P07_3(Guid.Empty); p7_4 = new SGT.P07_4(Guid.Empty); p7_5 = new SGT.P07_5(Guid.Empty); p7_6 = new SGT.P07_6(Guid.Empty); p7_7 = new SGT.P07_7(Guid.Empty); p7_8 = new SGT.P07_8(Guid.Empty); p7_9 = new SGT.P07_9(Guid.Empty); p7_10 = new SGT.P7_10(Guid.Empty); p7_11 = new SGT.P7_11(Guid.Empty); p7_12 = new SGT.P7_12(Guid.Empty); p7_13 = new SGT.P7_13(Guid.Empty); p8 = new SGT.P0008(Guid.Empty); p8_1 = new SGT.P08_1(Guid.Empty); p9 = new SGT.P0009(Guid.Empty); p9_1 = new SGT.P09_1(Guid.Empty); p9_2 = new SGT.P09_2(Guid.Empty); p9_3 = new SGT.P09_3(Guid.Empty); p9_4 = new SGT.P09_4(Guid.Empty); p9_5 = new SGT.P09_5(Guid.Empty); p9_6 = new SGT.P09_6(Guid.Empty); p9_7 = new SGT.P09_7(Guid.Empty); p9_8 = new SGT.P09_8(Guid.Empty); p9_9 = new SGT.P09_9(Guid.Empty); p9_10 = new SGT.P9_10(Guid.Empty); p9_11 = new SGT.P9_11(Guid.Empty); p9_12 = new SGT.P9_12(Guid.Empty); p9_13 = new SGT.P9_13(Guid.Empty); p10 = new P0010(Guid.Empty); p11 = new P0011(Guid.Empty); p11_1 = new P11_1(Guid.Empty); p12 = new P0012(Guid.Empty); p13 = new P0013(Guid.Empty); p14 = new P0014(Guid.Empty); p14_1 = new P14_1(Guid.Empty); p15 = new P0015(Guid.Empty); p16 = new P0016(Guid.Empty); p17 = new P0017(Guid.Empty); p18 = new P0018(Guid.Empty); p101 = new P0101(Guid.Empty); p102 = new P0102(Guid.Empty); p103 = new P0103(Guid.Empty); p104 = new P0104(Guid.Empty); p105 = new P0105(Guid.Empty); p106 = new P0106(Guid.Empty); p107 = new P0107(Guid.Empty); p108 = new P0108(Guid.Empty); p109 = new P0109(Guid.Empty); p110 = new P0110(Guid.Empty); p112 = new P0112(Guid.Empty); p113 = new P0113(Guid.Empty); p114 = new P0114(Guid.Empty); p116 = new P0116(Guid.Empty); p117 = new P0117(Guid.Empty); p118 = new P0118(Guid.Empty); p200 = new P0200(Guid.Empty); p201 = new P0201(Guid.Empty); p202 = new P0202(Guid.Empty); p203 = new P0203(Guid.Empty); p204 = new P0204(Guid.Empty); p205 = new P0205(Guid.Empty); p206 = new P0206(Guid.Empty); p207 = new P0207(Guid.Empty); p208 = new P0208(Guid.Empty); p209 = new P0209(Guid.Empty); p210 = new P0210(Guid.Empty); p211 = new P0211(Guid.Empty); p212 = new P0212(Guid.Empty); p213 = new P0213(Guid.Empty); currentTime = DateTime.MinValue; driller_console = -1; driller_console_weight_column = -1; }