Ejemplo n.º 1
0
 def _read_temp(self, data, n):
     """
     TEMP(5701,57,27) - the marker for Record 32
     .. warning:: buggy
     """
     ntotal = 12  # 3*4
     nentries = (len(data) - n) // ntotal
     for i in range(nentries):
         edata = data[n:n + 12]
         out = unpack('iif', edata)
         if self.is_debug_file:
             self.binary_debug.write('  TEMP=%s\n' % str(out))
         (sid, g, T) = out
         if g < 10000000:
             load = TEMP.add_op2_data(out)
             self._add_thermal_load_object(load)
         else:
             self.log.debug('TEMP = %s' % (out))
         n += 12
     self.card_count['TEMP'] = nentries
     return n
Ejemplo n.º 2
0
 def _read_temp(self, data, n):
     """
     TEMP(5701,57,27) - the marker for Record 32
     .. warning:: buggy
     """
     ntotal = 12  # 3*4
     nentries = (len(data) - n) // ntotal
     for i in range(nentries):
         edata = data[n:n + 12]
         out = unpack('iif', edata)
         if self.is_debug_file:
             self.binary_debug.write('  TEMP=%s\n' % str(out))
         (sid, g, T) = out
         if g < 10000000:
             load = TEMP.add_op2_data(out)
             self.add_thermal_load(load)
         else:
             self.log.debug('TEMP = %s' % (out))
         n += 12
     self.card_count['TEMP'] = nentries
     return n
Ejemplo n.º 3
0
 def _read_temp(self, data: bytes, n: int) -> int:
     """
     TEMP(5701,57,27) - the marker for Record 32
     .. warning:: buggy
     """
     ntotal = 12 * self.factor  # 3*4
     nentries = (len(data) - n) // ntotal
     struct_2if = Struct(mapfmt(self._endian + b'iif', self.size))
     for unused_i in range(nentries):
         edata = data[n:n + ntotal]
         out = struct_2if.unpack(edata)
         if self.is_debug_file:
             self.binary_debug.write('  TEMP=%s\n' % str(out))
         (sid, g, T) = out
         if g < 10000000:
             load = TEMP.add_op2_data(out)
             self._add_thermal_load_object(load)
         else:
             self.log.debug('TEMP = %s' % (out))
         n += ntotal
     self.card_count['TEMP'] = nentries
     return n