Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
1.1 kB
1
Indexable
Never
elif protocol == "modbuscsiser":
                    formatted_node = SEREntry.format_meter_node(node)
                    print("SER return:", formatted_node)
                    for device in self.devices[:]:
                        print("devices :", device)
                        if isinstance(device, ModbusEntry) \
                            and device.ip_address == formatted_node.ip_address \
                                and device.port == formatted_node.port:
                            self.devices.remove(device)
                elif protocol == "modbustcp":
                    print("Inside modbus check:", protocol)
                    formatted_node = ModbusEntry.format_meter_node(node)
                    print("Modbus return:", formatted_node)
                    for device in self.devices[:]:
                        print("devices :", device)
                        if isinstance(device, SEREntry) \
                            and device.ip_address == formatted_node.ip_address \
                                and device.port == formatted_node.port:
                            flag = 1
Leave a Comment