Пример #1
0
 def send_download_section(self, image_inst_id, section_num, data, size=DEFAULT_OMCI_DOWNLOAD_SECTION_SIZE, timeout=0, high_priority=False):
     """
     # timeout=0 indicates no repons needed
     """
     # self.log.debug("send_download_section", instance_id=image_inst_id, section=section_num, timeout=timeout)
     if timeout > 0:
         frame = SoftwareImageFrame(image_inst_id).download_section(True, section_num, data)
     else:
         frame = SoftwareImageFrame(image_inst_id).download_section(False, section_num, data)
     return self.send(frame, timeout, high_priority=high_priority)
Пример #2
0
 def send_active_image(self,
                       image_inst_id,
                       flag=0,
                       timeout=DEFAULT_OMCI_TIMEOUT,
                       high_priority=False):
     frame = SoftwareImageFrame(image_inst_id).activate_image(flag)
     return self.send(frame, timeout, high_priority=high_priority)
Пример #3
0
 def send_end_software_download(self,
                                image_inst_id,
                                crc32,
                                image_size,
                                timeout=DEFAULT_OMCI_TIMEOUT):
     frame = SoftwareImageFrame(image_inst_id).end_software_download(
         crc32, image_size)
     return self.send(frame, timeout)
Пример #4
0
 def send_start_software_download(self,
                                  image_inst_id,
                                  image_size,
                                  window_size,
                                  timeout=DEFAULT_OMCI_TIMEOUT):
     frame = SoftwareImageFrame(image_inst_id).start_software_download(
         image_size, window_size - 1)
     return self.send(frame, timeout, 3)
Пример #5
0
 def send_commit_image(self, image_inst_id, timeout=DEFAULT_OMCI_TIMEOUT, high_priority=False):
     frame = SoftwareImageFrame(image_inst_id).commit_image()
     return self.send(frame, timeout, high_priority=high_priority)
Пример #6
0
 def send_commit_image(self, image_inst_id, timeout=DEFAULT_OMCI_TIMEOUT):
     frame = SoftwareImageFrame(image_inst_id).commit_image()
     return self.send(frame, timeout)
Пример #7
0
 def send_active_image(self,
                       image_inst_id,
                       flag=0,
                       timeout=DEFAULT_OMCI_TIMEOUT):
     frame = SoftwareImageFrame(image_inst_id).activate_image(flag)
     return self.send(frame, timeout)