Exemple #1
0
    def unpack_page(self, page, packed_data, conf_page):
        page_class = get_ses_page(page)
        data_class = get_ses_page_data(page)

        data = data_class(conf_page=conf_page)
        data.unpack(hex_to_bin(packed_data))
        return data
 def _create_value(self, page_code):
     from infi.asi.cdb.diagnostic.ses_pages import get_ses_page
     from infi.asi.coroutines.sync_adapter import sync_wait
     with self.device.asi_context() as asi:
         diagnostic_command = get_ses_page(page_code)(self.helper) if self.helper else get_ses_page(page_code)()
         return sync_wait(diagnostic_command.execute(asi))
 def _create_value(self, page_code):
     from infi.asi.cdb.diagnostic.ses_pages import get_ses_page
     from infi.asi.coroutines.sync_adapter import sync_wait
     with self.device.asi_context() as asi:
         diagnostic_command = get_ses_page(page_code)(self.helper) if self.helper else get_ses_page(page_code)()
         return sync_wait(diagnostic_command.execute(asi))