コード例 #1
0
ファイル: MessageType.py プロジェクト: happytm/urh
 def add_label(self, lbl: ProtocolLabel, allow_overlapping=True):
     if allow_overlapping or not any(lbl.overlaps_with(l) for l in self):
         added = self.add_protocol_label(lbl.start,
                                         lbl.end - 1,
                                         name=lbl.name,
                                         color_ind=lbl.color_index)
         added.display_format_index = lbl.display_format_index
         added.display_bit_order_index = lbl.display_bit_order_index
コード例 #2
0
ファイル: MessageType.py プロジェクト: zjywlive/urh
 def add_label(self, lbl: ProtocolLabel, allow_overlapping=True):
     if allow_overlapping or not any(lbl.overlaps_with(l) for l in self):
         added = self.add_protocol_label(lbl.start,
                                         lbl.end - 1,
                                         name=lbl.name,
                                         color_ind=lbl.color_index,
                                         type=lbl.field_type)
         added.display_format_index = lbl.display_format_index
         added.display_bit_order_index = lbl.display_bit_order_index
         if isinstance(lbl, ChecksumLabel) and isinstance(
                 added, ChecksumLabel):
             added.data_ranges = copy.copy(lbl.data_ranges)
             added.category = copy.copy(lbl.category)
             added.checksum = copy.copy(lbl.checksum)
コード例 #3
0
ファイル: MessageType.py プロジェクト: 18811708533/urh
 def add_label(self, lbl: ProtocolLabel, allow_overlapping=True):
     if allow_overlapping or not any(lbl.overlaps_with(l) for l in self):
         self.add_protocol_label(lbl.start,
                                 lbl.end - 1,
                                 name=lbl.name,
                                 color_ind=lbl.color_index)
コード例 #4
0
ファイル: MessageType.py プロジェクト: jopohl/urh
 def add_label(self, lbl: ProtocolLabel, allow_overlapping=True):
     if allow_overlapping or not any(lbl.overlaps_with(l) for l in self):
         added = self.add_protocol_label(lbl.start, lbl.end - 1, name=lbl.name, color_ind=lbl.color_index)
         added.display_format_index = lbl.display_format_index
         added.display_bit_order_index = lbl.display_bit_order_index