Functions
ronex Namespace Reference

Functions

static bool check_bit (uint16_t data, size_t index)
static std::string get_ronex_devices_string (int ronex_parameter_id, std::string part)
static int get_ronex_param_id (std::string ronex_id)
static void set_bit (uint32_t &data, size_t index, bool value)
static void set_bit (uint16_t &data, size_t index, bool value)

Function Documentation

static bool ronex::check_bit ( uint16_t  data,
size_t  index 
) [inline, static]

Checks if the bit is set for the given index.

Parameters:
dataThe var containing the different bits.
indexThe index for which we're checking the bit.
Returns:
true if bit at index is set in data.

Definition at line 43 of file sr_ronex_utilities.hpp.

static std::string ronex::get_ronex_devices_string ( int  ronex_parameter_id,
std::string  part 
) [inline, static]

Construct a string for e.g., ros::param::get as the key.

Parameters:
ronex_parameter_idPart of the key (e.g., 2).
partPart of the key (e.g., "product_name").
Returns:
The key (e.g., "/ronex/devices/2/product_name").

Definition at line 138 of file sr_ronex_utilities.hpp.

static int ronex::get_ronex_param_id ( std::string  ronex_id) [inline, static]

Checks the ronexes already present on the parameter server and returns an id on which the given ronex is stored on the parameter server.

The parameter server contains: /ronex/0/product_id = "0x200001" /ronex/0/produc_name = "general_io" /ronex/0/ronex_id = "my_beautiful_ronex" or serial if no alias /ronex/0/path = "/ronex/general_io/my_beautiful_ronex" /ronex/0/serial = "1234"

/ronex/1/...

Parameters:
ronex_idEither the alias or the serial number if no alias is specified. If empty string given, then returns the first available id.
Returns:
the index of the ronex in the parameter server. -1 if not found. or the next free index if ronex_id == ""

Definition at line 97 of file sr_ronex_utilities.hpp.

static void ronex::set_bit ( uint32_t &  data,
size_t  index,
bool  value 
) [inline, static]

Sets the given bit to the given value.

Parameters:
dataThe var containing the different bits.
indexThe index for which we're setting the bit.
valueThe value we want the bit to take

Definition at line 56 of file sr_ronex_utilities.hpp.

static void ronex::set_bit ( uint16_t &  data,
size_t  index,
bool  value 
) [inline, static]

Sets the given bit to the given value.

Parameters:
dataThe var containing the different bits.
indexThe index for which we're setting the bit.
valueThe value we want the bit to take

Definition at line 71 of file sr_ronex_utilities.hpp.



sr_ronex_utilities
Author(s): Ugo Cupcic, Toni Oliver, Mark Pitchless
autogenerated on Thu Jun 6 2019 21:21:58