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

Remove references to hardware_interface/visibility_control.h #115

Merged
merged 1 commit into from
Jan 8, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "hardware_interface/hardware_info.hpp"
#include "hardware_interface/system_interface.hpp"
#include "hardware_interface/types/hardware_interface_return_values.hpp"
#include "hardware_interface/visibility_control.h"
#include "rclcpp/macros.hpp"

#include "rclcpp/rclcpp.hpp"
Expand All @@ -20,6 +19,7 @@

#include "clearpath_hardware_interfaces/a200/horizon_legacy/horizon_legacy_wrapper.h"
#include "clearpath_hardware_interfaces/a200/status.hpp"
#include "clearpath_hardware_interfaces/visibility_control.h"

#include "clearpath_platform_msgs/msg/power.hpp"
#include "clearpath_platform_msgs/msg/status.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
#include "hardware_interface/hardware_info.hpp"
#include "hardware_interface/system_interface.hpp"
#include "hardware_interface/types/hardware_interface_return_values.hpp"
#include "hardware_interface/visibility_control.h"

#include "clearpath_hardware_interfaces/diff_drive/hardware_interface.hpp"
#include "clearpath_hardware_interfaces/visibility_control.h"


namespace clearpath_hardware_interfaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
#include "hardware_interface/system_interface.hpp"
#include "hardware_interface/types/hardware_interface_return_values.hpp"
#include "hardware_interface/types/hardware_interface_type_values.hpp"
#include "hardware_interface/visibility_control.h"

#include "clearpath_hardware_interfaces/lynx/hardware_interface.hpp"
#include "clearpath_hardware_interfaces/visibility_control.h"


namespace clearpath_hardware_interfaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
#include "hardware_interface/system_interface.hpp"
#include "hardware_interface/types/hardware_interface_return_values.hpp"
#include "hardware_interface/types/hardware_interface_type_values.hpp"
#include "hardware_interface/visibility_control.h"

#include "clearpath_hardware_interfaces/puma/hardware_interface.hpp"
#include "clearpath_hardware_interfaces/visibility_control.h"


namespace clearpath_hardware_interfaces
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright 2017 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 HARDWARE_INTERFACE__VISIBILITY_CONTROL_H_
#define HARDWARE_INTERFACE__VISIBILITY_CONTROL_H_

// This logic was borrowed (then namespaced) from the examples on the gcc wiki:
// https://gcc.gnu.org/wiki/Visibility

#if defined _WIN32 || defined __CYGWIN__
#ifdef __GNUC__
#define HARDWARE_INTERFACE_EXPORT __attribute__((dllexport))
#define HARDWARE_INTERFACE_IMPORT __attribute__((dllimport))
#else
#define HARDWARE_INTERFACE_EXPORT __declspec(dllexport)
#define HARDWARE_INTERFACE_IMPORT __declspec(dllimport)
#endif
#ifdef HARDWARE_INTERFACE_BUILDING_DLL
#define HARDWARE_INTERFACE_PUBLIC HARDWARE_INTERFACE_EXPORT
#else
#define HARDWARE_INTERFACE_PUBLIC HARDWARE_INTERFACE_IMPORT
#endif
#define HARDWARE_INTERFACE_PUBLIC_TYPE HARDWARE_INTERFACE_PUBLIC
#define HARDWARE_INTERFACE_LOCAL
#else
#define HARDWARE_INTERFACE_EXPORT __attribute__((visibility("default")))
#define HARDWARE_INTERFACE_IMPORT
#if __GNUC__ >= 4
#define HARDWARE_INTERFACE_PUBLIC __attribute__((visibility("default")))
#define HARDWARE_INTERFACE_LOCAL __attribute__((visibility("hidden")))
#else
#define HARDWARE_INTERFACE_PUBLIC
#define HARDWARE_INTERFACE_LOCAL
#endif
#define HARDWARE_INTERFACE_PUBLIC_TYPE
#endif

#endif // HARDWARE_INTERFACE__VISIBILITY_CONTROL_H_
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
#include "hardware_interface/hardware_info.hpp"
#include "hardware_interface/system_interface.hpp"
#include "hardware_interface/types/hardware_interface_return_values.hpp"
#include "hardware_interface/visibility_control.h"

#include "clearpath_hardware_interfaces/w200/hardware_interface.hpp"
#include "clearpath_hardware_interfaces/visibility_control.h"


namespace clearpath_hardware_interfaces
Expand Down
Loading