def _read_tempd(self, data, n): """ TEMPD(5641,65,98) - the marker for Record 33 .. todo:: add object """ ntotal = 8 # 2*4 nentries = (len(data) - n) // ntotal for i in range(nentries): edata = data[n:n + ntotal] out = unpack('if', edata) if self.is_debug_file: self.binary_debug.write(' TEMPD=%s\n' % str(out)) (sid, T) = out load = TEMPD.add_op2_data(out) #self.add_thermal_load(load) n += ntotal self.card_count['TEMPD'] = nentries return n
def _read_tempd(self, data, n): """ TEMPD(5641,65,98) - the marker for Record 33 .. todo:: add object """ ntotal = 8 # 2*4 nentries = (len(data) - n) // ntotal for i in range(nentries): edata = data[n:n + ntotal] out = unpack('if', edata) if self.is_debug_file: self.binary_debug.write(' TEMPD=%s\n' % str(out)) (sid, T) = out load = TEMPD.add_op2_data(out) #self.add_thermal_load(load) n += ntotal self.card_count['TEMPD'] = nentries return n
def _read_tempd(self, data: bytes, n: int) -> int: """ TEMPD(5641,65,98) - the marker for Record 33 .. todo:: add object """ ntotal = 8 * self.factor # 2*4 nentries = (len(data) - n) // ntotal struct_if = Struct(mapfmt(self._endian + b'if', self.size)) for unused_i in range(nentries): edata = data[n:n + ntotal] out = struct_if.unpack(edata) if self.is_debug_file: self.binary_debug.write(' TEMPD=%s\n' % str(out)) #(sid, T) = out load = TEMPD.add_op2_data(out) self._add_tempd_object(load) n += ntotal self.card_count['TEMPD'] = nentries return n