Skip to content

System Information Service Interface

functionC++ROS
get the version number of the motion control software
Get the name of the currently controlled robot

Get the version number of the motion control software

C ++ interface

rcClientInterfaceGetMcVersionintroduction

cpp
/**
* @brief Get the version number of the motion controller motion software.
*
* This function is used to get the software version number of the specified motion controller.
*
* @param index The index of the specified motion controller.
* @return std::string Returns the software version number of the motion controller.
*/
std::string rcClientInterfaceGetMcVersion(const int& index);

use Case

cpp
int mc_index = 0;
std::string mc_version = rcClientInterfaceGetMcVersion(mc_index);
std::cout << "Motion Controller Version: " << mc_version << std::endl;

Get the name of the currently controlled robot

C++ interface

rcClientInterfaceGetRobotNameintroduction

cpp
/**
* @brief Get the name of the current controlled robot.
*
* This function is used to get the name of the robot controlled by the specified robot controller.
*
* @param index The index of the specified robot controller.
* @return std::string Returns the name of the robot.
*/
std::string rcClientInterfaceGetRobotName(const int& index);

use Case

cpp
int robot_index = 0;
std::string robot_name = rcClientInterfaceGetRobotName(robot_index);
std::cout << "Robot Name: " << robot_name << std::endl;