def _read_pload2(self, data, n): """ PLOAD2(6802,68,199) - the marker for Record 18 """ ntotal = 12 # 3*4 nentries = (len(data) - n) // ntotal for i in range(nentries): edata = data[n:n + 12] out = unpack('ifi', edata) if self.is_debug_file: self.binary_debug.write(' PLOAD2=%s\n' % str(out)) (sid, p, eid) = out load = PLOAD2.add_op2_data(out) self._add_load_object(load) n += 12 self.card_count['PLOAD2'] = nentries return n
def _read_pload2(self, data: bytes, n: int) -> int: """ PLOAD2(6802,68,199) - the marker for Record 18 """ ntotal = 12 # 3*4 nentries = (len(data) - n) // ntotal struct_ifi = Struct(self._endian + b'ifi') for unused_i in range(nentries): edata = data[n:n + 12] out = struct_ifi.unpack(edata) if self.is_debug_file: self.binary_debug.write(' PLOAD2=%s\n' % str(out)) #(sid, p, eid) = out load = PLOAD2.add_op2_data(out) self._add_load_object(load) n += 12 self.card_count['PLOAD2'] = nentries return n