#! /usr/bin/python3 from solo.patch import patch class hetept95(patch): def assemble(self, **aa): if self.config is None: raise ValueError("Please provide a config=") self.scratch(subversion=5) self.l3 = self.config.nominal.l3 self.l3_code = [(a,d) for a,d in self.l3.l3_code if a < 0x300] self.l3.l3_code = self.l3_code def send(self, msg): self.send_stop_l3(msg) self.send_scratch(msg) self.send_l3(msg, self.l3, init=True, pad=True, fill=False) self.send_start_l3(msg) self.send_ping(msg) def main(self, fmts=["xml", "msg"]): for fmt in fmts: fn = "hetept%s_v0009_patch5.%s" % (self.config.unit[-1], fmt) self.emit(f=fn, fmt=fmt) import solo.hetept.config patch1 = hetept95(name="fm1", config=solo.hetept.config.fm1(config_page=0x10000)) patch2 = hetept95(name="fm2", config=solo.hetept.config.fm2(config_page=0x10000)) def main(): patch1.main()