def analyse(self): Pm3Reader.analyse(self) self._generate_bitstream() self.sof = self._find_start_of_frames() self.cards = self._parse_start_of_frames() for card in self.cards: print self._card_info(card)
def plot(self): if len(self.cards) > 0: self.plotter.title('Waveform for HID prox card %s' % self._card_info(self.cards[0])) else: self.plotter.title('Waveform for unknown HID prox card') self.plotter('set style rectangle back fillcolor rgb "#FFA500" fs solid 0.20 noborder') laststream = {} for stream in self.bitstream: if laststream != stream and self._plot_stream(stream): self._plot_stream(stream) laststream = stream for frame in self.sof: self._plot_sof(frame) Pm3Reader.plot(self)
def __init__(self, filename): self.bitstream = [] self.sof = [] Pm3Reader.__init__(self, filename)