Skip to content

Commit 514f260

Browse files
committed
rmw_get_topic_endpoint_info doesn't exist on Dashing (#91)
* rmw_get_topic_endpoint_info doesn't exist on Dashing Signed-off-by: Erik Boasson <[email protected]> * get_topic_endpoint_info got added in RMW 0.8.2 Signed-off-by: Erik Boasson <[email protected]>
1 parent 4fadf25 commit 514f260

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright 2019 ADLINK Technology
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
#ifndef RMW_CYCLONEDDS_CPP__RMW_VERSION_TEST_HPP_
15+
#define RMW_CYCLONEDDS_CPP__RMW_VERSION_TEST_HPP_
16+
17+
/* True if the version of RMW is at least major.minor.patch */
18+
#define RMW_VERSION_GTE(major, minor, patch) ( \
19+
major < RMW_VERSION_MAJOR || ( \
20+
major == RMW_VERSION_MAJOR && ( \
21+
minor < RMW_VERSION_MINOR || ( \
22+
minor == RMW_VERSION_MINOR && patch <= RMW_VERSION_PATCH))))
23+
24+
#endif // RMW_CYCLONEDDS_CPP__RMW_VERSION_TEST_HPP_

rmw_cyclonedds_cpp/src/rmw_get_topic_endpoint_info.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#include "rmw_cyclonedds_cpp/rmw_version_test.hpp"
16+
17+
#if RMW_VERSION_GTE(0, 8, 2)
18+
1519
#include "rmw/error_handling.h"
1620
#include "rmw/get_topic_endpoint_info.h"
1721
#include "rmw/topic_endpoint_info_array.h"
@@ -40,3 +44,5 @@ rmw_get_subscriptions_info_by_topic(
4044
return RMW_RET_UNSUPPORTED;
4145
}
4246
} // extern "C"
47+
48+
#endif

rmw_cyclonedds_cpp/src/rmw_node.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646

4747
#include "TypeSupport2.hpp"
4848

49+
#include "rmw_cyclonedds_cpp/rmw_version_test.hpp"
4950
#include "rmw_cyclonedds_cpp/MessageTypeSupport.hpp"
5051
#include "rmw_cyclonedds_cpp/ServiceTypeSupport.hpp"
5152

@@ -66,13 +67,6 @@
6667
#define MULTIDOMAIN 0
6768
#endif
6869

69-
/* True if the version of RMW is at least major.minor.patch */
70-
#define RMW_VERSION_GTE(major, minor, patch) ( \
71-
major < RMW_VERSION_MAJOR || ( \
72-
major == RMW_VERSION_MAJOR && ( \
73-
minor < RMW_VERSION_MINOR || ( \
74-
minor == RMW_VERSION_MINOR && patch <= RMW_VERSION_PATCH))))
75-
7670
#if RMW_VERSION_GTE(0, 8, 1) && MULTIDOMAIN
7771
#define SUPPORT_LOCALHOST 1
7872
#else

0 commit comments

Comments
 (0)