示例#1
0
        public bool ClearAllRules(string dev_IP)
        {
            DeviceForm devform = new DeviceForm(dev_IP, 22222);

            IConfigRules configDevice = new ConfigRules(devform);

            return(configDevice.ClearAllRules());
        }
示例#2
0
        public bool ChangeWhiteLists(string dst_IP, string src_IP, string dev_IP, string dst_port, string src_port, bool log_record, bool add_delete)
        {
            WhiteLists lists = new WhiteLists();

            lists.setIPAndPort(dst_IP, src_IP, dst_port, src_port);

            DeviceForm   devform      = new DeviceForm(dev_IP, 22222);
            IConfigRules configDevice = new ConfigRules(devform);

            return(configDevice.ConfigWhiteLists(lists, add_delete));
        }
示例#3
0
        public bool ChangeOPCRules(string dst_IP, string src_IP, string dev_IP, bool log_record, bool add_delete)
        {
            OPCRulesForm orf = new OPCRulesForm();

            orf.setDst_IPAndSrc_IP(dst_IP, src_IP);

            DeviceForm devform = new DeviceForm(dev_IP, 22222);

            IConfigRules configDevice = new ConfigRules(devform);

            return(configDevice.ConfigOPCRules(orf, add_delete));
        }
示例#4
0
        public bool ChangeModbusTcpRules(string dst_IP, string src_IP, string min_addr, string max_addr, int func, int Min_data, int Max_data, string dev_IP, bool log_record, bool add_delete)
        {
            ModbusTcpRulesForm mtrf = new ModbusTcpRulesForm();

            mtrf.setIP_Addr_Funcode(dst_IP, src_IP, min_addr, max_addr, func, Min_data, Max_data);

            DeviceForm devform = new DeviceForm(dev_IP, 22222);

            IConfigRules configDevice = new ConfigRules(devform);

            return(configDevice.ConfigModbusTcpRules(mtrf, add_delete));
        }