Skip to main content

ChildTask

Struct ChildTask 

Source
pub struct ChildTask { /* private fields */ }
Expand description

A handle to a cFE child task.

This is a wrapper around a CFE-level task ID that will automatically call CFE_ES_DeleteChildTask when it goes out of scope, preventing resource leaks. It must not be used for an Application’s Main Task.

Implementations§

Source§

impl ChildTask

Source

pub fn new( name: &str, entry_point: TaskEntryPoint, stack_ptr: *mut (), stack_size: usize, priority: u16, flags: TaskFlags, ) -> Result<Self>

Creates a new cFE child task and starts it running.

The new task is owned by the calling Application. The stack for the task can be provided or allocated from the system memory heap.

§Arguments
  • name: A unique string to identify the task.
  • entry_point: The function that the new task will execute. This must be a free function with extern "C" linkage.
  • stack_ptr: A pointer to the task’s stack, or core::ptr::null_mut() to have cFE allocate it.
  • stack_size: The size of the stack to allocate for the new task.
  • priority: The priority of the new task (0=highest, 255=lowest).
  • flags: Task creation flags (e.g. TaskFlags::FP_ENABLED).
Source

pub fn id(&self) -> TaskId

Returns the underlying TaskId for this child task.

Trait Implementations§

Source§

impl Debug for ChildTask

Source§

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

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

impl Drop for ChildTask

Source§

fn drop(&mut self)

Deletes the cFE child task when the ChildTask object goes out of scope.

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