r2r

Trait RosParams

Source
pub trait RosParams {
    // Required methods
    fn register_parameters(
        &mut self,
        prefix: &str,
        param: Option<Parameter>,
        params: &mut IndexMap<String, Parameter>,
    ) -> Result<()>;
    fn get_parameter(&mut self, param_name: &str) -> Result<ParameterValue>;
    fn set_parameter(
        &mut self,
        param_name: &str,
        param_val: &ParameterValue,
    ) -> Result<()>;
}
Expand description

Trait for use it with Node::make_derived_parameter_handler().

The trait is usually derived with r2r_macros::RosParams. See parameters_derive.rs example.

Required Methods§

Source

fn register_parameters( &mut self, prefix: &str, param: Option<Parameter>, params: &mut IndexMap<String, Parameter>, ) -> Result<()>

Source

fn get_parameter(&mut self, param_name: &str) -> Result<ParameterValue>

Source

fn set_parameter( &mut self, param_name: &str, param_val: &ParameterValue, ) -> Result<()>

Implementations on Foreign Types§

Source§

impl RosParams for bool

Source§

fn register_parameters( &mut self, prefix: &str, param: Option<Parameter>, params: &mut IndexMap<String, Parameter>, ) -> Result<()>

Source§

fn get_parameter(&mut self, param_name: &str) -> Result<ParameterValue>

Source§

fn set_parameter( &mut self, param_name: &str, param_val: &ParameterValue, ) -> Result<()>

Source§

impl RosParams for f32

Source§

fn register_parameters( &mut self, prefix: &str, param: Option<Parameter>, params: &mut IndexMap<String, Parameter>, ) -> Result<()>

Source§

fn get_parameter(&mut self, param_name: &str) -> Result<ParameterValue>

Source§

fn set_parameter( &mut self, param_name: &str, param_val: &ParameterValue, ) -> Result<()>

Source§

impl RosParams for f64

Source§

fn register_parameters( &mut self, prefix: &str, param: Option<Parameter>, params: &mut IndexMap<String, Parameter>, ) -> Result<()>

Source§

fn get_parameter(&mut self, param_name: &str) -> Result<ParameterValue>

Source§

fn set_parameter( &mut self, param_name: &str, param_val: &ParameterValue, ) -> Result<()>

Source§

impl RosParams for i8

Source§

fn register_parameters( &mut self, prefix: &str, param: Option<Parameter>, params: &mut IndexMap<String, Parameter>, ) -> Result<()>

Source§

fn get_parameter(&mut self, param_name: &str) -> Result<ParameterValue>

Source§

fn set_parameter( &mut self, param_name: &str, param_val: &ParameterValue, ) -> Result<()>

Source§

impl RosParams for i16

Source§

fn register_parameters( &mut self, prefix: &str, param: Option<Parameter>, params: &mut IndexMap<String, Parameter>, ) -> Result<()>

Source§

fn get_parameter(&mut self, param_name: &str) -> Result<ParameterValue>

Source§

fn set_parameter( &mut self, param_name: &str, param_val: &ParameterValue, ) -> Result<()>

Source§

impl RosParams for i32

Source§

fn register_parameters( &mut self, prefix: &str, param: Option<Parameter>, params: &mut IndexMap<String, Parameter>, ) -> Result<()>

Source§

fn get_parameter(&mut self, param_name: &str) -> Result<ParameterValue>

Source§

fn set_parameter( &mut self, param_name: &str, param_val: &ParameterValue, ) -> Result<()>

Source§

impl RosParams for i64

Source§

fn register_parameters( &mut self, prefix: &str, param: Option<Parameter>, params: &mut IndexMap<String, Parameter>, ) -> Result<()>

Source§

fn get_parameter(&mut self, param_name: &str) -> Result<ParameterValue>

Source§

fn set_parameter( &mut self, param_name: &str, param_val: &ParameterValue, ) -> Result<()>

Source§

impl RosParams for u8

Source§

fn register_parameters( &mut self, prefix: &str, param: Option<Parameter>, params: &mut IndexMap<String, Parameter>, ) -> Result<()>

Source§

fn get_parameter(&mut self, param_name: &str) -> Result<ParameterValue>

Source§

fn set_parameter( &mut self, param_name: &str, param_val: &ParameterValue, ) -> Result<()>

Source§

impl RosParams for u16

Source§

fn register_parameters( &mut self, prefix: &str, param: Option<Parameter>, params: &mut IndexMap<String, Parameter>, ) -> Result<()>

Source§

fn get_parameter(&mut self, param_name: &str) -> Result<ParameterValue>

Source§

fn set_parameter( &mut self, param_name: &str, param_val: &ParameterValue, ) -> Result<()>

Source§

impl RosParams for u32

Source§

fn register_parameters( &mut self, prefix: &str, param: Option<Parameter>, params: &mut IndexMap<String, Parameter>, ) -> Result<()>

Source§

fn get_parameter(&mut self, param_name: &str) -> Result<ParameterValue>

Source§

fn set_parameter( &mut self, param_name: &str, param_val: &ParameterValue, ) -> Result<()>

Source§

impl RosParams for String

Source§

fn register_parameters( &mut self, prefix: &str, param: Option<Parameter>, params: &mut IndexMap<String, Parameter>, ) -> Result<()>

Source§

fn get_parameter(&mut self, param_name: &str) -> Result<ParameterValue>

Source§

fn set_parameter( &mut self, param_name: &str, param_val: &ParameterValue, ) -> Result<()>

Implementors§