forked from eclipse-iceoryx/iceoryx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iox-eclipse-iceoryx#32 merging with master and reverting PROJECT_PREF…
…IX to not use iceoryx Signed-off-by: Christian Eltzschig <[email protected]>
- Loading branch information
Showing
51 changed files
with
1,973 additions
and
950 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
34 changes: 34 additions & 0 deletions
34
iceoryx_dds/include/iceoryx_dds/dds/cyclone_data_reader.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. | ||
// | ||
// 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 IOX_DDS_DDS_CYCLONE_DATA_READER_HPP | ||
#define IOX_DDS_DDS_CYCLONE_DATA_READER_HPP | ||
|
||
#include "iceoryx_dds/dds/data_reader.hpp" | ||
|
||
namespace iox | ||
{ | ||
namespace dds | ||
{ | ||
/// @note Implementation coming soon. | ||
class CycloneDataReader : DataReader<CycloneDataReader> | ||
{ | ||
public: | ||
CycloneDataReader(IdString serviceId, IdString instanceId, IdString eventId) noexcept; | ||
}; | ||
|
||
} // namespace dds | ||
} // namespace iox | ||
|
||
#endif // IOX_DDS_DDS_CYCLONE_DATA_READER_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. | ||
// | ||
// 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 IOX_DDS_DDS_DATA_READER_HPP | ||
#define IOX_DDS_DDS_DATA_READER_HPP | ||
|
||
#include "iceoryx_utils/cxx/string.hpp" | ||
|
||
namespace iox | ||
{ | ||
namespace dds | ||
{ | ||
using IdString = iox::cxx::string<100u>; | ||
|
||
/// @note Implementation coming soon. | ||
template <typename Impl> | ||
class DataReader | ||
{ | ||
}; | ||
} // namespace dds | ||
} // namespace iox | ||
|
||
#endif // IOX_DDS_DDS_DATA_READER_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. | ||
// | ||
// 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 IOX_DDS_DDS_CONFIG_HPP | ||
#define IOX_DDS_DDS_CONFIG_HPP | ||
|
||
#include "iceoryx_posh/iceoryx_posh_types.hpp" | ||
|
||
namespace iox | ||
{ | ||
namespace dds | ||
{ | ||
static constexpr units::Duration DISCOVERY_PERIOD = 1000_ms; | ||
static constexpr units::Duration FORWARDING_PERIOD = 50_ms; | ||
static constexpr uint32_t SUBSCRIBER_CACHE_SIZE = 128u; | ||
static constexpr uint32_t MAX_CHANNEL_NUMBER = iox::MAX_PORT_NUMBER; | ||
|
||
} // namespace dds | ||
} // namespace iox | ||
|
||
#endif // IOX_DDS_DDS_CONFIG_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. | ||
// | ||
// 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 IOX_DDS_GATEWAY_CHANNEL_HPP | ||
#define IOX_DDS_GATEWAY_CHANNEL_HPP | ||
|
||
#include "iceoryx_dds/dds/dds_config.hpp" | ||
#include "iceoryx_posh/capro/service_description.hpp" | ||
#include "iceoryx_utils/cxx/expected.hpp" | ||
#include "iceoryx_utils/internal/objectpool/objectpool.hpp" | ||
|
||
#include <memory> | ||
|
||
namespace iox | ||
{ | ||
namespace dds | ||
{ | ||
enum class ChannelError : uint8_t | ||
{ | ||
OBJECT_POOL_FULL | ||
}; | ||
|
||
/// | ||
/// @class Channel | ||
/// @brief A data structure representing a channel between Iceoryx and DDS. | ||
/// | ||
/// The class couples related iceoryx and dds entities that communicate with eachother to form the communication | ||
/// channel. | ||
/// For example: An Iceoryx subscriber and its corresponding DDS data writer, which communicate eachother to form | ||
/// an outbound communication channel. | ||
/// These entites are conceptualized as channel "Terminals". | ||
/// | ||
/// The structure holds pointers to the instances of the terminals. | ||
/// The terminals can be created and managed externally, in which case the structure only serves as a means of coupling | ||
/// the two. | ||
/// This can be achieved by simply calling the constructor with pointers to them. | ||
/// | ||
/// Alternatively, the class can manage the terminals internally in a static object pool, automatically | ||
/// cleaning them up when the channel is discarded. | ||
/// This can be achieved via the Channel::create method. | ||
/// | ||
template <typename IceoryxTerminal, typename DDSTerminal> | ||
class Channel | ||
{ | ||
using IceoryxTerminalPtr = std::shared_ptr<IceoryxTerminal>; | ||
using IceoryxTerminalPool = iox::cxx::ObjectPool<IceoryxTerminal, MAX_CHANNEL_NUMBER>; | ||
using DDSTerminalPtr = std::shared_ptr<DDSTerminal>; | ||
using DDSTerminalPool = iox::cxx::ObjectPool<DDSTerminal, MAX_CHANNEL_NUMBER>; | ||
|
||
public: | ||
Channel(const iox::capro::ServiceDescription& service, | ||
const IceoryxTerminalPtr iceoryxTerminal, | ||
const DDSTerminalPtr ddsTerminal) noexcept; | ||
constexpr bool operator==(const Channel<IceoryxTerminal, DDSTerminal>& rhs) const noexcept; | ||
|
||
static iox::cxx::expected<Channel, ChannelError> create(const iox::capro::ServiceDescription& service) noexcept; | ||
|
||
iox::capro::ServiceDescription getService() const noexcept; | ||
IceoryxTerminalPtr getIceoryxTerminal() const noexcept; | ||
DDSTerminalPtr getDDSTerminal() const noexcept; | ||
|
||
private: | ||
static IceoryxTerminalPool s_iceoryxTerminals; | ||
static DDSTerminalPool s_ddsTerminals; | ||
|
||
iox::capro::ServiceDescription m_service; | ||
IceoryxTerminalPtr m_iceoryxTerminal; | ||
DDSTerminalPtr m_ddsTerminal; | ||
}; | ||
|
||
} // namespace dds | ||
} // namespace iox | ||
|
||
#include "iceoryx_dds/internal/gateway/channel.inl" | ||
|
||
#endif // IOX_DDS_DDS_DDS_TYPES_HPP |
Oops, something went wrong.