Exemple #1
0
 def _read_pload1(self, data: bytes, n: int) -> int:
     """
     PLOAD1(6909, 69, 198) - the marker for Record 17
     """
     ntotal = 32 * self.factor  # 8*4
     s = Struct(mapfmt(self._endian + b'4i4f', self.size))
     nentries = (len(data) - n) // ntotal
     for unused_i in range(nentries):
         edata = data[n:n + ntotal]
         out = s.unpack(edata)
         if self.is_debug_file:
             self.binary_debug.write('  PLOAD1=%s\n' % str(out))
         #(sid, eid, load_type, scale, x1, p1, x2, p2) = out
         load = PLOAD1.add_op2_data(out)
         self._add_load_object(load)
         n += ntotal
     self.card_count['PLOAD1'] = nentries
     return n
Exemple #2
0
 def _read_pload1(self, data, n):
     """
     PLOAD1(????) - the marker for Record 17
     """
     ntotal = 32  # 8*4
     s = Struct(b(self._endian + '4i4f'))
     nentries = (len(data) - n) // ntotal
     for i in range(nentries):
         edata = data[n:n + 32]
         out = s.unpack(edata)
         if self.is_debug_file:
             self.binary_debug.write('  PLOAD1=%s\n' % str(out))
         (sid, eid, load_type, scale, x1, p1, x2, p2) = out
         load = PLOAD1.add_op2_data(out)
         self._add_load_object(load)
         n += 32
     self.card_count['PLOAD1'] = nentries
     return n
Exemple #3
0
 def _read_pload1(self, data, n):
     """
     PLOAD1(????) - the marker for Record 17
     """
     ntotal = 32  # 8*4
     s = Struct(b(self._endian + '4i4f'))
     nentries = (len(data) - n) // ntotal
     for i in range(nentries):
         edata = data[n:n + 32]
         out = s.unpack(edata)
         if self.is_debug_file:
             self.binary_debug.write('  PLOAD1=%s\n' % str(out))
         (sid, eid, Type, scale, x1, p1, x2, p2) = out
         #print("PLOAD1 = ", out)
         load = PLOAD1.add_op2_data(out)
         self._add_load_object(load)
         n += 32
     self.card_count['PLOAD1'] = nentries
     return n