Skip to content

Commit

Permalink
Added some documentation to the newly added functions
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Jun 27, 2023
1 parent d254e2e commit ca05f77
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions controller_manager/src/controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@ bool command_interface_is_reference_interface_of_controller(
return true;
}

/**
* A method to retrieve the names of all it's following controllers given a controller name
* For instance, for the following case
* A -> B -> C -> D
* When called with B, returns C and D
* @param controller_name - Name of the controller for checking the tree
* \param[in] controllers list of controllers to compare their names to interface's prefix.
* @return list of controllers that are following the given controller in a chain. If none, return
* empty.
*/
std::vector<std::string> get_following_controller_names(
const std::string controller_name,
const std::vector<controller_manager::ControllerSpec> & controllers)
Expand Down Expand Up @@ -161,6 +171,16 @@ std::vector<std::string> get_following_controller_names(
return following_controllers;
}

/**
* A method to retrieve the names of all it's preceding controllers given a controller name
* For instance, for the following case
* A -> B -> C -> D
* When called with C, returns A and B
* @param controller_name - Name of the controller for checking the tree
* \param[in] controllers list of controllers to compare their names to interface's prefix.
* @return list of controllers that are preceding the given controller in a chain. If none, return
* empty.
*/
std::vector<std::string> get_preceding_controller_names(
const std::string controller_name,
const std::vector<controller_manager::ControllerSpec> & controllers)
Expand Down

0 comments on commit ca05f77

Please sign in to comment.