kernel::dynamic_binary_storage

Struct SequentialDynamicBinaryStorage

Source
pub struct SequentialDynamicBinaryStorage<'a, 'b, C: Chip + 'static, D: ProcessStandardDebug + 'static, F: NonvolatileStorage<'b>> { /* private fields */ }
Expand description

Dynamic process loading machine.

Implementations§

Source§

impl<'a, 'b, C: Chip + 'static, D: ProcessStandardDebug + 'static, F: NonvolatileStorage<'b>> SequentialDynamicBinaryStorage<'a, 'b, C, D, F>

Source

pub fn new( flash_driver: &'b F, loader_driver: &'a SequentialProcessLoaderMachine<'a, C, D>, buffer: &'static mut [u8], ) -> Self

Trait Implementations§

Source§

impl<'b, C: Chip, D: ProcessStandardDebug, F: NonvolatileStorage<'b>> DeferredCallClient for SequentialDynamicBinaryStorage<'_, 'b, C, D, F>

Source§

fn handle_deferred_call(&self)

Software interrupt function that is called when the deferred call is triggered.
Source§

fn register(&'static self)

Source§

impl<'b, C: Chip + 'static, D: ProcessStandardDebug + 'static, F: NonvolatileStorage<'b>> DynamicBinaryStore for SequentialDynamicBinaryStorage<'_, 'b, C, D, F>

Storage interface exposed to the app_loader capsule

Source§

fn set_storage_client(&self, client: &'static dyn DynamicBinaryStoreClient)

Sets a client for the SequentialDynamicBinaryStore Object Read more
Source§

fn setup(&self, app_length: usize) -> Result<usize, ErrorCode>

Call to request flashing a new binary. Read more
Source§

fn write( &self, buffer: SubSliceMut<'static, u8>, offset: usize, ) -> Result<(), ErrorCode>

Instruct the kernel to write data to the flash. Read more
Source§

fn finalize(&self) -> Result<(), ErrorCode>

Signal to the kernel that the requesting process is done writing the new binary.
Source§

fn abort(&self) -> Result<(), ErrorCode>

Call to abort the setup/writing process.
Source§

impl<'b, C: Chip + 'static, D: ProcessStandardDebug + 'static, F: NonvolatileStorage<'b>> DynamicProcessLoad for SequentialDynamicBinaryStorage<'_, 'b, C, D, F>

Loading interface exposed to the app_loader capsule

Source§

fn set_load_client(&self, client: &'static dyn DynamicProcessLoadClient)

Sets a client for the SequentialDynamicProcessLoading Object Read more
Source§

fn load(&self) -> Result<(), ErrorCode>

Call to request kernel to load a new process.
Source§

impl<'b, C: Chip + 'static, D: ProcessStandardDebug + 'static, F: NonvolatileStorage<'b>> NonvolatileStorageClient for SequentialDynamicBinaryStorage<'_, 'b, C, D, F>

This is the callback client for the underlying physical storage driver.

Source§

fn read_done(&self, _buffer: &'static mut [u8], _length: usize)

read_done is called when the implementor is finished reading in to the buffer. The callback returns the buffer and the number of bytes that were actually read.
Source§

fn write_done(&self, buffer: &'static mut [u8], length: usize)

write_done is called when the implementor is finished writing from the buffer. The callback returns the buffer and the number of bytes that were actually written.
Source§

impl<'b, C: Chip + 'static, D: ProcessStandardDebug + 'static, F: NonvolatileStorage<'b>> ProcessLoadingAsyncClient for SequentialDynamicBinaryStorage<'_, 'b, C, D, F>

Callback client for the async process loader

Source§

fn process_loaded(&self, result: Result<(), ProcessLoadError>)

A process was successfully found in flash, checked, and loaded into a ProcessStandard object.
Source§

fn process_loading_finished(&self)

There are no more processes in flash to be loaded.

Auto Trait Implementations§

§

impl<'a, 'b, C, D, F> !Freeze for SequentialDynamicBinaryStorage<'a, 'b, C, D, F>

§

impl<'a, 'b, C, D, F> !RefUnwindSafe for SequentialDynamicBinaryStorage<'a, 'b, C, D, F>

§

impl<'a, 'b, C, D, F> !Send for SequentialDynamicBinaryStorage<'a, 'b, C, D, F>

§

impl<'a, 'b, C, D, F> !Sync for SequentialDynamicBinaryStorage<'a, 'b, C, D, F>

§

impl<'a, 'b, C, D, F> Unpin for SequentialDynamicBinaryStorage<'a, 'b, C, D, F>

§

impl<'a, 'b, C, D, F> !UnwindSafe for SequentialDynamicBinaryStorage<'a, 'b, C, D, F>

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<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, 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.