Code Duplication    Length = 8-8 lines in 3 locations

opcua/ua/uaprotocol_auto.py 3 locations

@@ 11923-11930 (lines=8) @@
11920
        self.MonitoredItemIds = []
11921
        self._freeze = True
11922
11923
    def to_binary(self):
11924
        packet = []
11925
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
11926
        packet.append(uabin.Primitives.UInt32.pack(self.MonitoringMode.value))
11927
        packet.append(uabin.Primitives.Int32.pack(len(self.MonitoredItemIds)))
11928
        for fieldname in self.MonitoredItemIds:
11929
            packet.append(uabin.Primitives.UInt32.pack(fieldname))
11930
        return b''.join(packet)
11931
11932
    @staticmethod
11933
    def from_binary(data):
@@ 11745-11752 (lines=8) @@
11742
        self.ItemsToModify = []
11743
        self._freeze = True
11744
11745
    def to_binary(self):
11746
        packet = []
11747
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
11748
        packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value))
11749
        packet.append(uabin.Primitives.Int32.pack(len(self.ItemsToModify)))
11750
        for fieldname in self.ItemsToModify:
11751
            packet.append(fieldname.to_binary())
11752
        return b''.join(packet)
11753
11754
    @staticmethod
11755
    def from_binary(data):
@@ 11467-11474 (lines=8) @@
11464
        self.ItemsToCreate = []
11465
        self._freeze = True
11466
11467
    def to_binary(self):
11468
        packet = []
11469
        packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId))
11470
        packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value))
11471
        packet.append(uabin.Primitives.Int32.pack(len(self.ItemsToCreate)))
11472
        for fieldname in self.ItemsToCreate:
11473
            packet.append(fieldname.to_binary())
11474
        return b''.join(packet)
11475
11476
    @staticmethod
11477
    def from_binary(data):