Skip to main content

UpgradeErrorTypeEnum

enum class UpgradeErrorTypeEnum

Description: Response result enumeration

    enum class UpgradeErrorTypeEnum(var value: Int) {
/**
* unknown mistake
*/
CODE_UNKNOWN(-100),

/**
* parsing failed
*/
PROTO_RESPONSE_PARSE_ERROR(-1),

/**
* The returned data is empty
*/
PROTO_RESPONSE_EMPTY_DATA(-2),

/**
* Response timed out
*/
PROTO_RESPONSE_TIMEOUT(-3),

/**
* Response code error
*/
RESPONSE_CODE_ERROR(-4),

/**
* Device not connected
*/
DEVICE_DISCONNECTED(-5),

/**
* Repeat request
*/
REPEAT_REQUEST(-6),
/**
* no error
*/
UPGRADE_ERR_NONE(0),

/**
* in flight
*/
UPGRADE_ERR_FLY (1),

/**
* in upgrading
*/
UPGRADE_ERR_BUSY (2),

/**
* MD5 error
*/
UPGRADE_ERR_MD5 (3),

/**
* file not exist
*/
UPGRADE_ERR_EXIST (4),

/**
* low battery
*/
UPGRADE_ERR_LOBAT (5),

/**
* model not match
*/
UPGRADE_ERR_MODEL (6),

/**
* no enough space to upgrade
*/
UPGRADE_ERR_SPACE (7),

/**
* error header of pkg, like crc error
*/
UPGRADE_ERR_HEAD (8),

/**
* error signature, untrusted firmware
*/
UPGRADE_ERR_SIGN (9),

/**
* error firmware size, not match header
*/
UPGRADE_ERR_SIZE (10),

/**
* package error
*/
UPGRADE_ERR_PACKAGE (11),

/**
* error major version, not match firmware
*/
UPGRADE_ERR_VERSION (12),

/**
* lower than the current version, need force flag
*/
UPGRADE_ERR_LVERSION (13),

/**
* refuse upgrade request, errDesc for more details
*/
UPGRADE_ERR_REFUSE (14),

/**
* special error of every pkg, use errDesc for details
*/
UPGRADE_ERR_SPECIAL (15);
}