Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

add rmw_get_encoding_identifier #241

Merged
merged 3 commits into from
Jul 27, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rmw_opensplice_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ add_library(rmw_opensplice_cpp SHARED
src/rmw_client.cpp
src/rmw_compare_gids_equal.cpp
src/rmw_count.cpp
src/rmw_get_encoding_identifier.cpp
src/rmw_get_gid_for_publisher.cpp
src/rmw_get_implementation_identifier.cpp
src/rmw_guard_condition.cpp
Expand Down
1 change: 1 addition & 0 deletions rmw_opensplice_cpp/src/identifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
#include "identifier.hpp"

const char * opensplice_cpp_identifier = "rmw_opensplice_cpp";
const char * opensplice_cpp_encoding_identifier = "cdr";
1 change: 1 addition & 0 deletions rmw_opensplice_cpp/src/identifier.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
#define IDENTIFIER_HPP_

extern const char * opensplice_cpp_identifier;
extern const char * opensplice_cpp_encoding_identifier;

#endif // IDENTIFIER_HPP_
27 changes: 27 additions & 0 deletions rmw_opensplice_cpp/src/rmw_get_encoding_identifier.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "rmw/rmw.h"

#include "identifier.hpp"

// The extern "C" here enforces that overloading is not used.
extern "C"
{
const char *
rmw_get_encoding_identifier()
{
return opensplice_cpp_encoding_identifier;
}
} // extern "C"