//constructor public ControlSystem() : base() { string DeviceType = this.ControllerPrompt; if (DeviceType != "CP3" && DeviceType != "CP3N") { ErrorLog.Error("This program is for a CP3 or CP3N Control System"); ErrorLog.Error("Terminating Execution"); throw new NotSupportedException(); } try { #region Onboard Devices //CP3 onboard devices //Slot-02.Slot2.1 Ethernet_Information = AdapterInformation.GetAdapterInformation(); //Slot-03.Slot-01 Com01 = new TwoWaySerialDriver(this.ComPorts[1]); //Slot-03.Slot-02 Com02 = new RS232OnlyTwoWaySerialDriver(this.ComPorts[2]); //Slot-03.Slot-03 Com03 = new RS232OnlyTwoWaySerialDriver(this.ComPorts[3]); //Slot-04 C2I_CP3_IO8 = IOs8AnalogInputCard.GetIO8AnalogInputCard(VersiPorts); //Slot-05 C2I_CP3_RY8 = Relays8Card.GetRelay8Card(RelayPorts); //Slot-06 Port-01 IR1 = this.IROutputPorts[1]; //Slot-06 Port-02 IR2 = this.IROutputPorts[2]; //Slot-07 C2I_CP3_SYSTEMMONITOR = System_Monitor.GetSystemMonitor(); //Slot-07.Slot-01 C2I_CP3_SYSTEMCONTROL = System_Control.GetSystemControl(); //Slot-7.Slot-02 C2I_CP3_SYSTEMINFORMATION = System_Information.GetSystemInformation(); //Slot-10.Slot-01 C2I_USB_HID = new USBPort(UsbHids[1]); #endregion //Single Port examples: //IOPort8 = new IOPort(VersiPorts[8]); //Relay8 = new SingleRelay(RelayPorts[8]); Thread.MaxNumberOfUserThreads = 20; } catch (Exception e) { ErrorLog.Error("Error in the constructor: {0}", e.Message); } }
public ControlSystem() : base() { TestControlSystemType.isDMPS4K150C(this, "This program is for a DMPS4K150 Control System"); try { Thread.MaxNumberOfUserThreads = 20; #region Assigning SIMPL like classes //This clases are created to mimic the modules find in SIMPL //Slot-01 Com01 = new DMPS3TwoWaySerialDriver(this.ComPorts[1]); //Slot-02 IRIn1 = this.IROutputPorts[1]; //Slot-03 Digtal_Inputs = DigitalInputs2Card.GetSlot2DigitalInputs(this.DigitalInputPorts); //Slot-04 Relays = Relays2Card.GetRelay2Card(this.RelayPorts); //Slot-07.Slot01 Ethernet_Information = AdapterInformation.GetAdapterInformation(); //Slot-08.Slot-01 DeviceControl = DMPS4K150C_DeviceControl.GetDMPS4K150C_DeviceControl(this); //Slot-08.Slot-02 AVControl = DMPS4K150C_AVControl.GetDMPS4K150C_AVControl(this); //Slot-08.Slot-02.Slot-01.Slot-01 Mic1 = DMPS4K150C_Mic1.GetDMPS4K150C_Mic(this); //Slot-08.Slot-02.Slot-02.Slot-01 VGA1 = DMPS4K150C_VGA_Input.GetVGAInput(this, eDmps34K150CInputs.Vga1); //Slot-08.Slot-02.Slot-02.Slot-02 VGA2 = DMPS4K150C_VGA_Input.GetVGAInput(this, eDmps34K150CInputs.Vga2); //Slot-08.Slot-02.Slot-02.Slot-03 VGA3 = DMPS4K150C_VGA_Input.GetVGAInput(this, eDmps34K150CInputs.Vga3); //Slot-08.Slot-02.Slot-02.Slot-04 VGA4 = DMPS4K150C_VGA_Input.GetVGAInput(this, eDmps34K150CInputs.Vga4); //Slot-08.Slot-02.Slot-02.Slot-05 HDMI1 = DMPS4K150C_HDMI_Input.GetHDMIInput(this, eDmps34K150CInputs.Hdmi1); //Slot-08.Slot-02.Slot-02.Slot-06 HDMI2 = DMPS4K150C_HDMI_Input.GetHDMIInput(this, eDmps34K150CInputs.Hdmi2); //Slot-08.Slot-02.Slot-02.Slot-07 HDMI3 = DMPS4K150C_HDMI_Input.GetHDMIInput(this, eDmps34K150CInputs.Hdmi3); //Slot-08.Slot-02.Slot-02.Slot-08 HDMI4 = DMPS4K150C_HDMI_Input.GetHDMIInput(this, eDmps34K150CInputs.Hdmi4); //Slot-08.Slot-02.Slot-02.Slot-09 DM1 = DMPS4K150C_DM_Input.GetDMInput(this, eDmps34K150CInputs.Dm1); //Slot-08.Slot-02.Slot-02.Slot-10 DM2 = DMPS4K150C_DM_Input.GetDMInput(this, eDmps34K150CInputs.Dm2); //Slot-08.Slot-02.Slot-03.Slot-01 AnalogAudioOutput = DMPS4K150C_AnalogAudioOutput.GetDMPS4K150C_Mic(this); //Slot-08.Slot-02.Slot-03.Slot-02 DM1Out = DMPS4K150C_DM_Output.GetDMOutput(this, eDmps34K150COutputs.DmHdmiAnalogOutput); //Slot-09.Slot-01 TT_1XX = new ConnectItDevice(new Tt1xx(this, 1)); //Slot-11.Slot-01 C2I_USB_HID1 = new USBPort(this.UsbHids[1]); //Slot-11.Slot-02 C2I_USB_HID2 = new USBPort(this.UsbHids[2]); //Slot-11.Slot-03 C2I_USB_HID3 = new USBPort(this.UsbHids[3]); //Slot-11.Slot-04 C2I_USB_HID4 = new USBPort(this.UsbHids[4]); //Slot-12 System_Monitor = System_Monitor.GetSystemMonitor(); //Slot-12.Slot-01 System_Control = System_Control.GetSystemControl(); //Slot-12.Slot-02 SystemInformation = System_Information.GetSystemInformation(); #endregion #region Enpoints var DMTransmitter1 = this.SwitcherInputs[(uint)eDmps34K150CInputs.Dm1] as DMInput; Transmitter1 = new DM_TX_4K_100_C_1G(DMTransmitter1); var DMReciver = this.SwitcherOutputs[(uint)eDmps34K150COutputs.DmHdmiAnalogOutput] as DMOutput; Receiver1 = new DM_RMC_4K_100_C_1G(DMReciver); #endregion } catch (Exception e) { ErrorLog.Error("Error in the constructor: {0}", e.Message); } }