def __init__(self,address, ordinal): agent.Agent.__init__(self,signature=version,names='pico manager',protocols='has_subsys',ordinal=ordinal) self.domain = piw.clockdomain_ctl() self.domain.set_source(piw.makestring('*', 0L)) self.load_enumerator = picross.enumerator(ezload.vendor,ezload.product,picross.make_string_functor(self.download_keyboard)) self.load_enumerator2 = picross.enumerator(ezload.new_vendor,ezload.new_product,picross.make_string_functor(self.download_keyboard)) self.add_enumerator = picross.enumerator(0x2139,0x0101,picross.make_string_functor(utils.make_locked_callable(self.add_keyboard)))
def __init__(self, address, ordinal): agent.Agent.__init__(self, signature=version, names='alpha manager', protocols='has_subsys', ordinal=ordinal) self.domain = piw.clockdomain_ctl() self.domain.set_source(piw.makestring('*', 0L)) self.__thing = piw.thing() piw.tsd_thing(self.__thing) self.__thing.set_slow_dequeue_handler(utils.changify(self.__dequeue)) self.__base = dict() self.__enum = [] lsf = lambda c: picross.make_string_functor( utils.make_locked_callable(c)) self.__enum.append( picross.enumerator(0xbeca, 0x0102, lsf(self.add_alpha2keyboard))) self.__enum.append( picross.enumerator(0xbeca, 0x0103, lsf(self.add_taukeyboard))) self.__enum.append( picross.enumerator(0x2139, 0x0002, lsf(self.download_base_station))) self.__enum.append( picross.enumerator(0x2139, 0x0003, lsf(self.download_psu))) self.__enum.append( picross.enumerator(0x2139, 0x0104, lsf(self.add_base_station), lsf(self.del_base_station))) self.__enum.append( picross.enumerator(0x2139, 0x0105, lsf(self.add_base_station), lsf(self.del_base_station)))