@@ -348,6 +348,7 @@ Napi::Value CountSubscribers(const Napi::CallbackInfo& info) {
348348 return Napi::Number::New (env, static_cast <int32_t >(count));
349349}
350350
351+ #if ROS_VERSION > 2205 // 2205 == Humble
351352Napi::Value CountClients (const Napi::CallbackInfo& info) {
352353 Napi::Env env = info.Env ();
353354
@@ -377,6 +378,7 @@ Napi::Value CountServices(const Napi::CallbackInfo& info) {
377378
378379 return Napi::Number::New (env, count);
379380}
381+ #endif
380382
381383Napi::Value GetNodeNames (const Napi::CallbackInfo& info) {
382384 Napi::Env env = info.Env ();
@@ -432,8 +434,10 @@ Napi::Object InitNodeBindings(Napi::Env env, Napi::Object exports) {
432434 Napi::Function::New (env, ActionGetNamesAndTypes));
433435 exports.Set (" countPublishers" , Napi::Function::New (env, CountPublishers));
434436 exports.Set (" countSubscribers" , Napi::Function::New (env, CountSubscribers));
437+ #if ROS_VERSION > 2205 // 2205 == Humble
435438 exports.Set (" countClients" , Napi::Function::New (env, CountClients));
436439 exports.Set (" countServices" , Napi::Function::New (env, CountServices));
440+ #endif
437441 exports.Set (" getNodeNames" , Napi::Function::New (env, GetNodeNames));
438442 return exports;
439443}
0 commit comments