예제 #1
0
        internal IOCommutation(IOAdapter Adapter, BroadcastCommunication Communication, bool CommutationEmulation, int CommutationNode, bool Type6, ComplexParts ID)
        {
            m_ID                     = ID;
            m_IOAdapter              = Adapter;
            m_Communication          = Communication;
            m_IsCommutationEmulation = CommutationEmulation;

            //читаем из файла конфигурации тип установленной системы безопасности
            if (m_ID == ComplexParts.Commutation)
            {
                m_SafetyType = ReadSafetyTypeFromConfig();

                if (m_SafetyType == ComplexSafety.Optical)
                {
                    //если это оптическая шторка - создаём поток, который будет опрашивать её состояние
                    m_CheckSafetyThread = new ThreadService();
                    m_CheckSafetyThread.FinishedHandler += CheckSafetyThread_FinishedHandler;
                }
            }

            m_Node  = (ushort)CommutationNode;
            m_Type6 = Type6;

            SystemHost.Journal.AppendLog(m_ID, LogMessageType.Info, String.Format("Commutation created. Emulation mode: {0}", m_IsCommutationEmulation));
        }
예제 #2
0
 internal IOQrrTq(IOAdapter Adapter, BroadcastCommunication Communication)
 {
     m_IOAdapter       = Adapter;
     m_Communication   = Communication;
     m_Node            = (ushort)Settings.Default.QrrTqNode;
     m_IsEmulationHard = Settings.Default.QrrTqEmulation;
     m_NeedReadGraf    = Settings.Default.QrrTqReadGraf;
 }
예제 #3
0
        internal IOATU(IOAdapter Adapter, BroadcastCommunication Communication)
        {
            m_IOAdapter          = Adapter;
            m_Communication      = Communication;
            m_IsATUEmulationHard = Settings.Default.ATUEmulation;
            m_IsATUEmulation     = m_IsATUEmulationHard;

            m_Node   = (ushort)Settings.Default.ATUNode;
            m_Result = new Types.ATU.TestResults();

            SystemHost.Journal.AppendLog(ComplexParts.ATU, LogMessageType.Info, String.Format("ATU created. Emulation mode: {0}", Settings.Default.ATUEmulation));
        }
예제 #4
0
파일: IOTOU.cs 프로젝트: lardc/mme_software
        internal IOTOU(IOAdapter Adapter, BroadcastCommunication Communication)
        {
            _IOAdapter     = Adapter;
            _Communication = Communication;
            //Устанавливаем режим эмуляции
            _IsTOUEmulation = _IsTOUEmulationHard = Settings.Default.TOUEmulation;
            ///////////////////////////////////////////////////////////
            _Node   = (ushort)Settings.Default.TOUNode;
            _Result = new TestResults();

            SystemHost.Journal.AppendLog(ComplexParts.TOU, LogMessageType.Info,
                                         String.Format("TOU created. Emulation mode: {0}", _IsTOUEmulation));
        }
예제 #5
0
        internal IOStLs(IOAdapter Adapter, BroadcastCommunication Communication)
        {
            m_IOAdapter         = Adapter;
            m_Communication     = Communication;
            m_IsSLEmulationHard = Settings.Default.SLEmulation;
            m_IsSLEmulation     = m_IsSLEmulationHard;
            m_ReadGraph         = Settings.Default.SLReadGraph;

            m_Node   = (ushort)Settings.Default.SLNode;
            m_Result = new Types.VTM.TestResults();

            SystemHost.Journal.AppendLog(ComplexParts.SL, LogMessageType.Info,
                                         String.Format("VTM created. Emulation mode: {0}", m_IsSLEmulation));
        }
예제 #6
0
        internal IoSctu(IOAdapter ioAdapter, BroadcastCommunication broadcastCommunication)
        {
            _ioAdapter = ioAdapter;
            _broadcastCommunication   = broadcastCommunication;
            _isSctuEmulationHard      = Settings.Default.SctuEmulation;
            _isNeedSctuInitialization = Settings.Default.NeedSCTUInitialization;
            _isSctuEmulation          = _isSctuEmulationHard;
            _ReadGraph   = Settings.Default.SCTUReadGraph;
            _node        = (ushort)Settings.Default.SctuNode;
            _testResults = new SctuTestResults();
            _WorkplaceActivationStatusRegisterValueEmulation = 0;
            _UseAnotherControlUnitBoard  = Settings.Default.UseAnotherControlUnitBoard;
            _ThisControlUnitBoardNode    = ThisControlUnitBoardNode();
            _AnotherControlUnitBoardNode = AnotherControlUnitBoardNode();

            SystemHost.Journal.AppendLog(ComplexParts.Sctu, LogMessageType.Info, String.Format("Sctu created. Emulation mode: {0}", Settings.Default.SctuEmulation));
        }
예제 #7
0
        internal IOGateway(IOAdapter Adapter, BroadcastCommunication Communication)
        {
            m_IOAdapter          = Adapter;
            m_Communication      = Communication;
            m_IsGatewayEmulation = Settings.Default.GatewayEmulation;
            m_Node = (ushort)Settings.Default.GatewayNode;

            if (!Enum.TryParse(Settings.Default.SafetyType, out m_SafetyType))
            {
                SystemHost.Journal.AppendLog(ComplexParts.Gateway, LogMessageType.Error, String.Format("Unrecognised value on config parameter '{0}' ", "SafetyType"));
            }

            m_Thread = new ThreadService();
            m_Thread.FinishedHandler += Thread_FinishedHandler;

            SystemHost.Journal.AppendLog(ComplexParts.Gateway, LogMessageType.Info,
                                         String.Format("Gateway created. Emulation mode: {0}", m_IsGatewayEmulation));
        }
예제 #8
0
        internal IOClamping(IOAdapter Adapter, BroadcastCommunication Communication)
        {
            m_IOAdapter     = Adapter;
            m_Communication = Communication;

            m_Thread = new ThreadService();
            m_Thread.FinishedHandler += Thread_FinishedHandler;

            m_IsClampingEmulationHard = Settings.Default.ClampingSystemEmulation;
            m_IsClampingEmulation     = m_IsClampingEmulationHard;

            _defaultForce  = Settings.Default.DefaultForce;
            _longTimeForce = Settings.Default.LongTimeForce;
            _defaultHeight = 0;

            m_Node = (ushort)Settings.Default.ClampingSystemNode;
            SystemHost.Journal.AppendLog(ComplexParts.Clamping, LogMessageType.Info, String.Format("Clamping created. Emulation mode: {0}", m_IsClampingEmulation));
        }