Example #1
0
    def func_burn_fac_app_with_new_equLabel(self, imageFile, newEquLabel):
        res = {}
        #Update image burn
        objBat = ModFmptIhuCon.ClassBatchOpr()
        callRes = objBat.FuncBat_burn_fac_app1_app2_load(imageFile)
        if (callRes['res'] < 0):
            res['string'] = 'Exec err - func_burn_fac_app_with_new_equLabel failure' + callRes[
                'string']
            res['res'] = callRes['res']
            return res

        #Update equipment label
        try:
            res['res'] = 0
            objCon = ModFmptIhuCon.ClassConnProc()
            callRes = objCon.FuncWriteRegister(
                ModFmptCom.GL_FMPT_BOOT_CFG_ENG_ADDR['equLable'][0],
                ModFmptCom.GL_FMPT_BOOT_CFG_ENG_ADDR['equLable'][1],
                newEquLabel, ModFmptCom.GL_FMPT_bootcfg_equlabel)
            if (callRes['res'] < 0):
                res['string'] = 'Exec err - func_burn_fac_app_with_new_equLabel failure'
                res['res'] = callRes['res']
            else:
                res['res'] = 1
                res['string'] = 'Exec Res - func_burn_fac_app_with_new_equLabel' + callRes[
                    'string']
        except Exception as err:
            print("Exec Err: func_burn_fac_app_with_new_equLabel!" + str(err))
            return ("Exec Err: func_burn_fac_app_with_new_equLabel!" +
                    str(err))
        finally:
            return res
Example #2
0
 def func_app2_file_update(self, app2File):
     try:
         objBat = ModFmptIhuCon.ClassBatchOpr()
         res = {}
         callRes = objBat.FuncBat_app2_load(app2File)
         if (callRes['res'] < 0):
             res['string'] = 'Exec err - func_app2_file_update failure' + callRes[
                 'string']
             res['res'] = callRes['res']
         else:
             res['res'] = 1
             res['string'] = 'Exec Res - func_app2_file_update' + callRes[
                 'string']
     except Exception as err:
         print("Exec Err: func_app2_file_update!" + str(err))
         return ("Exec Err: func_app2_file_update!" + str(err))
     finally:
         return res
Example #3
0
 def func_burn_bc_fac_app(self, imageFile):
     try:
         objBat = ModFmptIhuCon.ClassBatchOpr()
         res = {}
         callRes = objBat.FuncBat_burn_bootcfg_fac_app1_app2_load(imageFile)
         if (callRes['res'] < 0):
             res['string'] = 'Exec err - func_burn_bc_fac_app failure' + callRes[
                 'string']
             res['res'] = callRes['res']
         else:
             res['res'] = 1
             res['string'] = 'Exec Res - func_burn_bc_fac_app' + callRes[
                 'string']
     except Exception as err:
         print("Exec Err: func_burn_bc_fac_app!" + str(err))
         return ("Exec Err: func_burn_bc_fac_app!" + str(err))
     finally:
         return res
Example #4
0
 def func_file_image_load_into_flash(self, imageName):
     try:
         objBat = ModFmptIhuCon.ClassBatchOpr()
         res = {}
         callRes = objBat.FuncBat_load_image_to_flash(imageName)
         if (callRes['res'] < 0):
             res['string'] = 'Exec err - func_file_image_load_into_flash failure' + callRes[
                 'string']
             res['res'] = callRes['res']
         else:
             res['res'] = 1
             res['string'] = 'Exec Res - func_file_image_load_into_flash' + callRes[
                 'string']
     except Exception as err:
         print("Exec Err: func_file_image_load_into_flash!" + str(err))
         return ("Exec Err: func_file_image_load_into_flash!" + str(err))
     finally:
         return res