Trait rustfbp::component::ComponentConnect
[−]
[src]
pub trait ComponentConnect: Send { fn connect(&mut self, port_out: String, send: Box<Any + Send + 'static>, dest: String, sched: Sender<CompMsg>); fn add_output_selection(&mut self, port: String, selection: String); fn connect_array(&mut self, port: String, selection: String, send: Box<Any + Send + 'static>, dest: String, sched: Sender<CompMsg>); fn disconnect(&mut self, port: String); fn disconnect_array(&mut self, port: String, selection: String); fn add_selection_receiver(&mut self, port: String, selection: String, rec: Box<Any + Send + 'static>); fn set_receiver(&mut self, port: String, rec: Box<Any + Send + 'static>); fn get_receiver_outputport(self: Box<Self>) -> (HashMap<String, Box<Any + Send + 'static>>, HashMap<String, HashMap<String, Box<Any + Send + 'static>>>, HashMap<String, Option<Box<Any + Send + 'static>>>, HashMap<String, HashMap<String, Option<Box<Any + Send + 'static>>>>); fn is_ips(&self) -> bool; fn is_input_ports(&self) -> bool; }
Allows to manage the simple and array output port
Required Methods
fn connect(&mut self, port_out: String, send: Box<Any + Send + 'static>, dest: String, sched: Sender<CompMsg>)
Connects the output port "port" with a specific SyncSender
Example
component.connect("output", a_sync_sender);
fn add_output_selection(&mut self, port: String, selection: String)
Create a selection "selection" for the array output port "port"
Example
component.add_output_selection("output", "1");
fn connect_array(&mut self, port: String, selection: String, send: Box<Any + Send + 'static>, dest: String, sched: Sender<CompMsg>)
Connects the selection "selection" of the array output port "port" with a specific SyncSender
Example
component.connect_array("output", "1", a_sync_sender);
fn disconnect(&mut self, port: String)
Disconnect the output port "port"
fn disconnect_array(&mut self, port: String, selection: String)
Disconnect the selection "selection" of the output array port "port"
fn add_selection_receiver(&mut self, port: String, selection: String, rec: Box<Any + Send + 'static>)
Add a Receiver for the selection "selection" of the array input port "port"
Example
component.add_selection_receiver("numbers", "1", a_receiver);
fn set_receiver(&mut self, port: String, rec: Box<Any + Send + 'static>)
fn get_receiver_outputport(self: Box<Self>) -> (HashMap<String, Box<Any + Send + 'static>>, HashMap<String, HashMap<String, Box<Any + Send + 'static>>>, HashMap<String, Option<Box<Any + Send + 'static>>>, HashMap<String, HashMap<String, Option<Box<Any + Send + 'static>>>>)
fn is_ips(&self) -> bool
Return true if there is at least one IP in at least one input ports
fn is_input_ports(&self) -> bool
Return true if there is at least one input ports (simple or array)