Trait r2r::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§