ygw::nodes::shellcmd

Struct ShellCmdNode

Source
pub struct ShellCmdNode { /* private fields */ }

Implementations§

Source§

impl ShellCmdNode

Source

pub async fn new(name: &str, commands: Vec<ShellCmd>) -> Result<Self>

Source

pub async fn register_cmds( &self, addr: Addr, tx: &Sender<YgwMessage>, ) -> Result<()>

Source

pub async fn register_params( &self, addr: Addr, tx: &Sender<YgwMessage>, ) -> Result<()>

Source

pub async fn execute_cmd( &self, addr: Addr, pc: PreparedCommand, tx: &Sender<YgwMessage>, seq_num: u32, ) -> Result<(usize, usize, usize, usize)>

Trait Implementations§

Source§

impl YgwNode for ShellCmdNode

Source§

fn properties(&self) -> &YgwLinkNodeProperties

the properties of the node - will be communicated to Yamcs
Source§

fn run<'async_trait>( self: Box<Self>, node_id: u32, tx: Sender<YgwMessage>, rx: Receiver<YgwMessage>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,

method called by the ygw server to run the node tx and rx are used to communicate between the node and the server the node_id is the id allocated to this node, it has to be used for all the messages sent to the server
the list of sub links - will also be communicated to Yamcs

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.