def readTEMPD(self, data): """ TEMPD(5641,65,98) - the marker for Record 33 .. todo:: add object """ #print "reading TEMPD" n = 0 nEntries = len(data) // 8 # 2*4 for i in range(nEntries): eData = data[n:n + 8] out = unpack('if', eData) (sid, T) = out load = TEMPD(None, out) #self.add_thermal_load(load) n += 8 data = data[n:]
def _readTEMPD(self, data, n): """ TEMPD(5641,65,98) - the marker for Record 33 .. todo:: add object """ #print "reading TEMPD" ntotal = 8 # 2*4 nEntries = (len(data) - n) // ntotal for i in xrange(nEntries): eData = data[n:n + 8] out = unpack('if', eData) (sid, T) = out load = TEMPD(None, out) #self.add_thermal_load(load) n += 8 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