def __init__(self, clink=None):
        """Init the communication class by starting to communicate with the
        link given. clink is the link address used after resetting to the
        bootloader.

        The device is actually considered in firmware mode.
        """
        self.clink = clink
        self.in_loader = False

        self.page_size = 0
        self.buffer_pages = 0
        self.flash_pages = 0
        self.start_page = 0
        self.cpuid = 'N/A'
        self.error_code = 0
        self.protocol_version = 0

        # Outgoing callbacks for progress
        # int
        self.progress_cb = None
        # msg
        self.error_cb = None
        # bool
        self.in_bootloader_cb = None
        # Target
        self.dev_info_cb = None

        # self.dev_info_cb.add_callback(self._dev_info)
        # self.in_bootloader_cb.add_callback(self._bootloader_info)

        self._boot_plat = None

        self._cload = Cloader(clink,
                              info_cb=self.dev_info_cb,
                              in_boot_cb=self.in_bootloader_cb)
def __init__ ( self , clink = None ) : self . clink = clink self . in_loader = False self . page_size = 0 self . buffer_pages = 0 self . flash_pages = 0 self . start_page = 0 self . cpuid = 'N/A' self . error_code = 0 self . protocol_version = 0 self . progress_cb = None self . error_cb = None self . in_bootloader_cb = None self . dev_info_cb = None self . _boot_plat = None self . _cload = Cloader ( clink , info_cb = self . dev_info_cb , in_boot_cb = self . in_bootloader_cb )
Init the communication class by starting to communicate with the
        link given. clink is the link address used after resetting to the
        bootloader.

        The device is actually considered in firmware mode.