Skip to main content

ImgMgmtErrCode

Enum ImgMgmtErrCode 

Source
#[repr(i32)]
pub enum ImgMgmtErrCode {
Show 35 variants IMG_MGMT_ERR_OK = 0, IMG_MGMT_ERR_UNKNOWN = 1, IMG_MGMT_ERR_FLASH_CONFIG_QUERY_FAIL = 2, IMG_MGMT_ERR_NO_IMAGE = 3, IMG_MGMT_ERR_NO_TLVS = 4, IMG_MGMT_ERR_INVALID_TLV = 5, IMG_MGMT_ERR_TLV_MULTIPLE_HASHES_FOUND = 6, IMG_MGMT_ERR_TLV_INVALID_SIZE = 7, IMG_MGMT_ERR_HASH_NOT_FOUND = 8, IMG_MGMT_ERR_NO_FREE_SLOT = 9, IMG_MGMT_ERR_FLASH_OPEN_FAILED = 10, IMG_MGMT_ERR_FLASH_READ_FAILED = 11, IMG_MGMT_ERR_FLASH_WRITE_FAILED = 12, IMG_MGMT_ERR_FLASH_ERASE_FAILED = 13, IMG_MGMT_ERR_INVALID_SLOT = 14, IMG_MGMT_ERR_NO_FREE_MEMORY = 15, IMG_MGMT_ERR_FLASH_CONTEXT_ALREADY_SET = 16, IMG_MGMT_ERR_FLASH_CONTEXT_NOT_SET = 17, IMG_MGMT_ERR_FLASH_AREA_DEVICE_NULL = 18, IMG_MGMT_ERR_INVALID_PAGE_OFFSET = 19, IMG_MGMT_ERR_INVALID_OFFSET = 20, IMG_MGMT_ERR_INVALID_LENGTH = 21, IMG_MGMT_ERR_INVALID_IMAGE_HEADER = 22, IMG_MGMT_ERR_INVALID_IMAGE_HEADER_MAGIC = 23, IMG_MGMT_ERR_INVALID_HASH = 24, IMG_MGMT_ERR_INVALID_FLASH_ADDRESS = 25, IMG_MGMT_ERR_VERSION_GET_FAILED = 26, IMG_MGMT_ERR_CURRENT_VERSION_IS_NEWER = 27, IMG_MGMT_ERR_IMAGE_ALREADY_PENDING = 28, IMG_MGMT_ERR_INVALID_IMAGE_VECTOR_TABLE = 29, IMG_MGMT_ERR_INVALID_IMAGE_TOO_LARGE = 30, IMG_MGMT_ERR_INVALID_IMAGE_DATA_OVERRUN = 31, IMG_MGMT_ERR_IMAGE_CONFIRMATION_DENIED = 32, IMG_MGMT_ERR_IMAGE_SETTING_TEST_TO_ACTIVE_DENIED = 33, IMG_MGMT_ERR_ACTIVE_SLOT_NOT_KNOWN = 34,
}
Expand description

See enum img_mgmt_err_code_t.

Variants§

§

IMG_MGMT_ERR_OK = 0

No error, this is implied if there is no ret value in the response

§

IMG_MGMT_ERR_UNKNOWN = 1

Unknown error occurred.

§

IMG_MGMT_ERR_FLASH_CONFIG_QUERY_FAIL = 2

Failed to query flash area configuration.

§

IMG_MGMT_ERR_NO_IMAGE = 3

There is no image in the slot.

§

IMG_MGMT_ERR_NO_TLVS = 4

The image in the slot has no TLVs (tag, length, value).

§

IMG_MGMT_ERR_INVALID_TLV = 5

The image in the slot has an invalid TLV type and/or length.

§

IMG_MGMT_ERR_TLV_MULTIPLE_HASHES_FOUND = 6

The image in the slot has multiple hash TLVs, which is invalid.

§

IMG_MGMT_ERR_TLV_INVALID_SIZE = 7

The image in the slot has an invalid TLV size.

§

IMG_MGMT_ERR_HASH_NOT_FOUND = 8

The image in the slot does not have a hash TLV, which is required.

§

IMG_MGMT_ERR_NO_FREE_SLOT = 9

There is no free slot to place the image.

§

IMG_MGMT_ERR_FLASH_OPEN_FAILED = 10

Flash area opening failed.

§

IMG_MGMT_ERR_FLASH_READ_FAILED = 11

Flash area reading failed.

§

IMG_MGMT_ERR_FLASH_WRITE_FAILED = 12

Flash area writing failed.

§

IMG_MGMT_ERR_FLASH_ERASE_FAILED = 13

Flash area erase failed.

§

IMG_MGMT_ERR_INVALID_SLOT = 14

The provided slot is not valid.

§

IMG_MGMT_ERR_NO_FREE_MEMORY = 15

Insufficient heap memory (malloc failed).

§

IMG_MGMT_ERR_FLASH_CONTEXT_ALREADY_SET = 16

The flash context is already set.

§

IMG_MGMT_ERR_FLASH_CONTEXT_NOT_SET = 17

The flash context is not set.

§

IMG_MGMT_ERR_FLASH_AREA_DEVICE_NULL = 18

The device for the flash area is NULL.

§

IMG_MGMT_ERR_INVALID_PAGE_OFFSET = 19

The offset for a page number is invalid.

§

IMG_MGMT_ERR_INVALID_OFFSET = 20

The offset parameter was not provided and is required.

§

IMG_MGMT_ERR_INVALID_LENGTH = 21

The length parameter was not provided and is required.

§

IMG_MGMT_ERR_INVALID_IMAGE_HEADER = 22

The image length is smaller than the size of an image header.

§

IMG_MGMT_ERR_INVALID_IMAGE_HEADER_MAGIC = 23

The image header magic value does not match the expected value.

§

IMG_MGMT_ERR_INVALID_HASH = 24

The hash parameter provided is not valid.

§

IMG_MGMT_ERR_INVALID_FLASH_ADDRESS = 25

The image load address does not match the address of the flash area.

§

IMG_MGMT_ERR_VERSION_GET_FAILED = 26

Failed to get version of currently running application.

§

IMG_MGMT_ERR_CURRENT_VERSION_IS_NEWER = 27

The currently running application is newer than the version being uploaded.

§

IMG_MGMT_ERR_IMAGE_ALREADY_PENDING = 28

There is already an image operating pending.

§

IMG_MGMT_ERR_INVALID_IMAGE_VECTOR_TABLE = 29

The image vector table is invalid.

§

IMG_MGMT_ERR_INVALID_IMAGE_TOO_LARGE = 30

The image it too large to fit.

§

IMG_MGMT_ERR_INVALID_IMAGE_DATA_OVERRUN = 31

The amount of data sent is larger than the provided image size.

§

IMG_MGMT_ERR_IMAGE_CONFIRMATION_DENIED = 32

Confirmation of image has been denied

§

IMG_MGMT_ERR_IMAGE_SETTING_TEST_TO_ACTIVE_DENIED = 33

Setting test to active slot is not allowed

§

IMG_MGMT_ERR_ACTIVE_SLOT_NOT_KNOWN = 34

Current active slot for image cannot be determined

Implementations§

Source§

impl ImgMgmtErrCode

Source

pub const fn from_repr(discriminant: i32) -> Option<ImgMgmtErrCode>

Try to create Self from the raw representation

Trait Implementations§

Source§

impl Clone for ImgMgmtErrCode

Source§

fn clone(&self) -> ImgMgmtErrCode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ImgMgmtErrCode

Source§

impl Debug for ImgMgmtErrCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ImgMgmtErrCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for ImgMgmtErrCode

Source§

impl PartialEq for ImgMgmtErrCode

Source§

fn eq(&self, other: &ImgMgmtErrCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ImgMgmtErrCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit #126799)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Is for T
where T: ?Sized,

Source§

type EqTo = T

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.