Firmware flash

Overview

APIs are for firmware update More…

// global functions

XPUM_API xpum_result_t xpumRunFirmwareFlash(
    xpum_device_id_t deviceId,
    xpum_firmware_flash_job* job,
    const char* username,
    const char* password
    );

XPUM_API xpum_result_t xpumRunFirmwareFlashEx(
    xpum_device_id_t deviceId,
    xpum_firmware_flash_job* job,
    const char* username,
    const char* password,
    bool force
    );

XPUM_API xpum_result_t xpumGetFirmwareFlashResult(
    xpum_device_id_t deviceId,
    xpum_firmware_type_t firmwareType,
    xpum_firmware_flash_task_result_t* result
    );

XPUM_API xpum_result_t xpumGetFirmwareFlashErrorMsg(char* buffer, int* count);

Detailed Documentation

APIs are for firmware update

Global Functions

XPUM_API xpum_result_t xpumRunFirmwareFlash(
    xpum_device_id_t deviceId,
    xpum_firmware_flash_job* job,
    const char* username,
    const char* password
    )

Run firmware flashing by device.

This function will return immediately. To query the firmware flash job status, call xpumGetFirmwareFlashResult

Support Platform: Linux, Windows

Parameters:

deviceId

IN: Device id

job

IN: The job description for firmware flash

username

IN: Username used for authentication

password

IN: Password used for authentication

Returns:

xpum_result_t

XPUM_API xpum_result_t xpumRunFirmwareFlashEx(
    xpum_device_id_t deviceId,
    xpum_firmware_flash_job* job,
    const char* username,
    const char* password,
    bool force
    )

Run firmware flashing by device.

This function will return immediately. To query the firmware flash job status, call xpumGetFirmwareFlashResult

Support Platform: Linux, Windows

Parameters:

deviceId

IN: Device id

job

IN: The job description for firmware flash

username

IN: Username used for authentication

password

IN: Password used for authentication

force

IN: Force to flash firmware or not

Returns:

xpum_result_t

XPUM_API xpum_result_t xpumGetFirmwareFlashResult(
    xpum_device_id_t deviceId,
    xpum_firmware_type_t firmwareType,
    xpum_firmware_flash_task_result_t* result
    )

Get the status of firmware flash job.

This function will return immediately. Caller may have to call this function multiple times until result indicates firmware flash job is finished.

Support Platform: Linux, Windows

Parameters:

deviceId

IN: Device id

firmwareType

IN: The firmware type to query status

result

OUT: The result of the job

Returns:

XPUM_API xpum_result_t xpumGetFirmwareFlashErrorMsg(char* buffer, int* count)

Get error message when fail to flash firmware.

Support Platform: Linux, Windows

Parameters:

buffer

IN/OUT: The buffer to store error message

count

IN/OUT: When buffer is NULL, count will be filled with the length of buffer needed, and return. When buffer is not NULL, count denotes the length of buffer, count should be equal to or larger than needed length, if not, it will return XPUM_BUFFER_TOO_SMALL; if return successfully, the error message will be stored in buffer

Returns:

xpum_result_t