Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rmw_get_encoding_identifier #215

Merged
merged 4 commits into from
Jul 27, 2018
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions rmw_fastrtps_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ add_library(rmw_fastrtps_cpp
src/rmw_count.cpp
src/rmw_get_gid_for_publisher.cpp
src/rmw_get_implementation_identifier.cpp
src/rmw_get_serialization_format.cpp
src/rmw_guard_condition.cpp
src/rmw_init.cpp
src/rmw_node.cpp
Expand All @@ -75,6 +76,7 @@ add_library(rmw_fastrtps_cpp
src/rmw_trigger_guard_condition.cpp
src/rmw_wait.cpp
src/rmw_wait_set.cpp
src/serialization_format.cpp
src/type_support_common.cpp
)
target_link_libraries(rmw_fastrtps_cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// 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.

#ifndef RMW_FASTRTPS_CPP__SERIALIZATION_FORMAT_HPP_
#define RMW_FASTRTPS_CPP__SERIALIZATION_FORMAT_HPP_

extern const char * const eprosima_fastrtps_serialization_format;

#endif // RMW_FASTRTPS_CPP__SERIALIZATION_FORMAT_HPP_
26 changes: 26 additions & 0 deletions rmw_fastrtps_cpp/src/rmw_get_serialization_format.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// 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 "rmw_fastrtps_cpp/serialization_format.hpp"

extern "C"
{
const char *
rmw_get_serialization_format()
{
return eprosima_fastrtps_serialization_format;
}
} // extern "C"
17 changes: 17 additions & 0 deletions rmw_fastrtps_cpp/src/serialization_format.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// 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_fastrtps_cpp/serialization_format.hpp"

const char * const eprosima_fastrtps_serialization_format = "cdr";
2 changes: 2 additions & 0 deletions rmw_fastrtps_dynamic_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ add_library(rmw_fastrtps_dynamic_cpp
src/rmw_count.cpp
src/rmw_get_gid_for_publisher.cpp
src/rmw_get_implementation_identifier.cpp
src/rmw_get_serialization_format.cpp
src/rmw_guard_condition.cpp
src/rmw_init.cpp
src/rmw_node.cpp
Expand All @@ -77,6 +78,7 @@ add_library(rmw_fastrtps_dynamic_cpp
src/rmw_wait.cpp
src/rmw_wait_set.cpp
src/type_support_common.cpp
src/serialization_format.cpp
)
target_link_libraries(rmw_fastrtps_dynamic_cpp
fastcdr fastrtps)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// 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.

#ifndef RMW_FASTRTPS_DYNAMIC_CPP__SERIALIZATION_FORMAT_HPP_
#define RMW_FASTRTPS_DYNAMIC_CPP__SERIALIZATION_FORMAT_HPP_

extern const char * const eprosima_fastrtps_dynamic_serialization_format;

#endif // RMW_FASTRTPS_DYNAMIC_CPP__SERIALIZATION_FORMAT_HPP_
26 changes: 26 additions & 0 deletions rmw_fastrtps_dynamic_cpp/src/rmw_get_serialization_format.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// 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 "rmw_fastrtps_dynamic_cpp/serialization_format.hpp"

extern "C"
{
const char *
rmw_get_serialization_format()
{
return eprosima_fastrtps_dynamic_serialization_format;
}
} // extern "C"
17 changes: 17 additions & 0 deletions rmw_fastrtps_dynamic_cpp/src/serialization_format.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// 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_fastrtps_dynamic_cpp/serialization_format.hpp"

const char * const eprosima_fastrtps_dynamic_serialization_format = "cdr";