[][src]Enum kernel::tbfheader::TbfHeader

pub(crate) enum TbfHeader {
    Padding(&'static TbfHeaderV2Base),

Type that represents the fields of the Tock Binary Format header.

This specifies the locations of the different code and memory sections in the tock binary, as well as other information about the application. The kernel can also use this header to keep persistent state about the application.


Padding(&'static TbfHeaderV2Base)


impl TbfHeader[src]

pub(crate) fn is_app(&self) -> bool[src]

Return whether this is an app or just padding between apps.

pub(crate) fn enabled(&self) -> bool[src]

Return whether the application is enabled or not. Disabled applications are not started by the kernel.

pub(crate) fn get_total_size(&self) -> u32[src]

Get the total size in flash of this app or padding.

pub(crate) fn get_minimum_app_ram_size(&self) -> u32[src]

Add up all of the relevant fields in header version 1, or just used the app provided value in version 2 to get the total amount of RAM that is needed for this app.

pub(crate) fn get_protected_size(&self) -> u32[src]

Get the number of bytes from the start of the app's region in flash that is for kernel use only. The app cannot write this region.

pub(crate) fn get_init_function_offset(&self) -> u32[src]

Get the offset from the beginning of the app's flash region where the app should start executing.

pub(crate) fn get_package_name(&self) -> &'static str[src]

Get the name of the app.

pub(crate) fn number_writeable_flash_regions(&self) -> usize[src]

Get the number of flash regions this app has specified in its header.

pub(crate) fn get_writeable_flash_region(&self, index: usize) -> (u32, u32)[src]

Get the offset and size of a given flash region.

Trait Implementations

impl Debug for TbfHeader[src]

Auto Trait Implementations

impl Unpin for TbfHeader

impl Send for TbfHeader

impl Sync for TbfHeader

Blanket Implementations

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

The type returned in the event of a conversion error.

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

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

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