Skip to content

Fault service interface

functionC++ROS
obtain log information

Obtain Log Information

C++ Interface

rcClientInterfaceLogUpdateintroduction

cpp
/**
* @brief Get robot log information.
*
* This function is used to get the robot's log messages.
*
* @param log_list A vector of strings holding log messages.
* @return bool Returns `true` for successful retrieval, `false` for failed retrieval.
*/
bool rcClientInterfaceLogUpdate(std::vector<std::string> &log_list);

use Case

cpp
std::vector<std::string> log_list;
bool success = rcClientInterfaceLogUpdate(log_list);
if (success) {
    std::cout << "Log Update Successful." << std::endl;
    // Output or process log_list data
} else {
    std::cout << "Failed to Update Log." << std::endl;
}

precautions

  • log_listmust point to a valid std::vector<std::string>