diff --git a/src/parameter_tree.cpp b/src/parameter_tree.cpp index 82e72095d33ff69282142af84d88dc11b76eb44f..93c4b6c9d09018b4f9fd391ca1851706da422101 100644 --- a/src/parameter_tree.cpp +++ b/src/parameter_tree.cpp @@ -32,4 +32,8 @@ ParameterTreeMsg ParameterTree::getParameterTree() const { return parameter_tree_msg_; } +bool ParameterTree::has(const std::string& parameter_path) const { + return parameter_map_.find(parameter_path) != parameter_map_.end(); +} + } // namespace mcx_cpp \ No newline at end of file diff --git a/src/parameter_tree.h b/src/parameter_tree.h index 80995681924b3a396be1fb15bfa3ff05d941e8f5..33871388fdcf8cf26fc1d16322f9160e68bc7468 100644 --- a/src/parameter_tree.h +++ b/src/parameter_tree.h @@ -67,6 +67,8 @@ public: ParameterTreeMsg getParameterTree() const; + bool has(const std::string& parameter_path) const; + private: ParameterTreeMsg parameter_tree_msg_{McxStatus{StatusCode::OK, McxStatus::NO_ERROR}}; diff --git a/test/api/basic_api_test.cpp b/test/api/basic_api_test.cpp index f5586dcb11260df6d190506c415222046f6040dd..17f1fa7307f944a5c946b59b0c72e9fce3764a31 100644 --- a/test/api/basic_api_test.cpp +++ b/test/api/basic_api_test.cpp @@ -54,7 +54,7 @@ int main(int argc, char* argv[]) { clog << "Motorcortex C++ library version: " << mcx_cpp::version() << endl; // setting url - std::string url = "ws://127.0.0.1"; + std::string url = "ws://192.168.2.100"; if (argc > 1) { url = std::string(argv[1]); }