예제 #1
0
        /// <summary>
        /// Модуль коммуникации
        /// </summary>
        /// <param name="rtuSet">Настройки физического уровня Modbus RTU</param>
        /// <param name="tcpSet">Настройки физического уровня Modbus TCP</param>
        public ModuleCommunication(SettingsHW_RTU rtuSet, SettingsHW_TCP tcpSet)
        {
            this.TypeModbus = 1;
            this.TypeInterfaceModbus = 0x03;

            if (rtuSet != null)
                this.SettingsRTU = rtuSet;
            else
                this.SettingsRTU = new SettingsHW_RTU();

            if (tcpSet != null)
                this.SettingsTCP = tcpSet;
            else
                this.SettingsTCP = new SettingsHW_TCP();

            this.InitModbus();
        }
예제 #2
0
 public SettingsCommunicationView(SettingsHW_RTU rtu, SettingsHW_TCP tcp)
 {
     this.RTU_Settings = rtu;
     this.TCP_Settings = tcp;
 }