Skip to content

Commit

Permalink
Merged in connection_validator (pull request osrf#436)
Browse files Browse the repository at this point in the history
Connection validator

Approved-by: Michael Carroll <michael@openrobotics.org>
  • Loading branch information
nkoenig committed Apr 6, 2020
2 parents 108a603 + 9108050 commit dd2d147
Show file tree
Hide file tree
Showing 9 changed files with 1,308 additions and 0 deletions.
22 changes: 22 additions & 0 deletions subt_ign/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,28 @@ install(TARGETS ${artifact_validator_name}
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)

set(connection_validator_name ConnectionValidator)
add_library(${connection_validator_name} SHARED
src/ConnectionValidator.cc
src/ConnectionValidatorPrivate.cc
src/SimpleDOTParser.cc)
target_link_libraries(${connection_validator_name}
PRIVATE
ignition-gazebo${IGN_GAZEBO_VER}::core
ignition-common3::ignition-common3
ignition-launch1::ignition-launch1
ignition-math6::ignition-math6
ignition-msgs4::ignition-msgs4
ignition-plugin1::loader
ignition-transport7::ignition-transport7
${catkin_LIBRARIES}
${protobuf_lib_name}
)
install(TARGETS ${connection_validator_name}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)

# Create the libCommsBrokerPlugin.so library.
set(comms_broker_plugin_name CommsBrokerPlugin)
add_library(${comms_broker_plugin_name}
Expand Down
55 changes: 55 additions & 0 deletions subt_ign/include/subt_ign/ConnectionValidator.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* Copyright (C) 2020 Open Source Robotics Foundation
*
* 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 SUBT_IGN_CONNECTIONVALIDATOR_HH_
#define SUBT_IGN_CONNECTIONVALIDATOR_HH_

#include <memory>

#include <ignition/gazebo/System.hh>

namespace subt
{
class ConnectionValidatorPrivate;

class ConnectionValidator:
public ignition::gazebo::System,
public ignition::gazebo::ISystemConfigure,
public ignition::gazebo::ISystemPostUpdate
{
/// \brief Constructor
public: ConnectionValidator();

/// \brief Destructor
public: ~ConnectionValidator();

// Documentation inherited
public: void Configure(const ignition::gazebo::Entity &_entity,
const std::shared_ptr<const sdf::Element> &_sdf,
ignition::gazebo::EntityComponentManager &_ecm,
ignition::gazebo::EventManager &_eventMgr) override;

// Documentation inherited
public: void PostUpdate(const ignition::gazebo::UpdateInfo &_info,
const ignition::gazebo::EntityComponentManager &_ecm) override;

/// \brief Private data pointer.
private: std::unique_ptr<ConnectionValidatorPrivate> dataPtr;
};
}

#endif // SUBT_IGN_CONNECTIONVALIDATOR_HH_
Loading

0 comments on commit dd2d147

Please sign in to comment.