-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add custom forwarding routes feature
Signed-off-by: Juan López Fernández <[email protected]>
- Loading branch information
1 parent
b7a0908
commit a655e48
Showing
12 changed files
with
596 additions
and
36 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
69 changes: 69 additions & 0 deletions
69
ddspipe_core/include/ddspipe_core/configuration/RoutesConfiguration.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,69 @@ | ||
// Copyright 2023 Proyectos y Sistemas de Mantenimiento SL (eProsima). | ||
// | ||
// 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. | ||
|
||
#pragma once | ||
|
||
#include <map> | ||
#include <set> | ||
|
||
#include <cpp_utils/Formatter.hpp> | ||
|
||
#include <ddspipe_core/configuration/IConfiguration.hpp> | ||
#include <ddspipe_core/types/participant/ParticipantId.hpp> | ||
|
||
#include <ddspipe_core/library/library_dll.h> | ||
|
||
namespace eprosima { | ||
namespace ddspipe { | ||
namespace core { | ||
|
||
// TODO | ||
struct RoutesConfiguration : public ddspipe::core::IConfiguration | ||
{ | ||
|
||
using RoutesMap = std::map<ddspipe::core::types::ParticipantId, std::set<ddspipe::core::types::ParticipantId>>; | ||
|
||
///////////////////////// | ||
// CONSTRUCTORS | ||
///////////////////////// | ||
|
||
DDSPIPE_CORE_DllAPI RoutesConfiguration() = default; | ||
|
||
///////////////////////// | ||
// METHODS | ||
///////////////////////// | ||
|
||
DDSPIPE_CORE_DllAPI virtual bool is_valid( | ||
utils::Formatter& error_msg) const noexcept override; | ||
|
||
DDSPIPE_CORE_DllAPI bool is_valid( | ||
utils::Formatter& error_msg, | ||
std::map<ddspipe::core::types::ParticipantId, bool> participant_ids) const noexcept; | ||
|
||
///////////////////////// | ||
// OPERATORS | ||
///////////////////////// | ||
|
||
DDSPIPE_CORE_DllAPI RoutesMap operator () () const; | ||
|
||
///////////////////////// | ||
// VARIABLES | ||
///////////////////////// | ||
|
||
RoutesMap routes {}; | ||
}; | ||
|
||
} /* namespace core */ | ||
} /* namespace ddspipe */ | ||
} /* namespace eprosima */ |
70 changes: 70 additions & 0 deletions
70
ddspipe_core/include/ddspipe_core/configuration/TopicRoutesConfiguration.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,70 @@ | ||
// Copyright 2023 Proyectos y Sistemas de Mantenimiento SL (eProsima). | ||
// | ||
// 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. | ||
|
||
#pragma once | ||
|
||
#include <set> | ||
|
||
#include <cpp_utils/Formatter.hpp> | ||
#include <cpp_utils/memory/Heritable.hpp> | ||
|
||
#include <ddspipe_core/configuration/IConfiguration.hpp> | ||
#include <ddspipe_core/configuration/RoutesConfiguration.hpp> | ||
#include <ddspipe_core/types/topic/dds/DistributedTopic.hpp> | ||
|
||
#include <ddspipe_core/library/library_dll.h> | ||
|
||
namespace eprosima { | ||
namespace ddspipe { | ||
namespace core { | ||
|
||
// TODO | ||
struct TopicRoutesConfiguration : public ddspipe::core::IConfiguration | ||
{ | ||
|
||
using TopicRoutesMap = std::map<utils::Heritable<ddspipe::core::types::DistributedTopic>, RoutesConfiguration>; | ||
|
||
///////////////////////// | ||
// CONSTRUCTORS | ||
///////////////////////// | ||
|
||
DDSPIPE_CORE_DllAPI TopicRoutesConfiguration() = default; | ||
|
||
///////////////////////// | ||
// METHODS | ||
///////////////////////// | ||
|
||
DDSPIPE_CORE_DllAPI virtual bool is_valid( | ||
utils::Formatter& error_msg) const noexcept override; | ||
|
||
DDSPIPE_CORE_DllAPI bool is_valid( | ||
utils::Formatter& error_msg, | ||
std::map<ddspipe::core::types::ParticipantId, bool> participant_ids) const noexcept; | ||
|
||
///////////////////////// | ||
// OPERATORS | ||
///////////////////////// | ||
|
||
DDSPIPE_CORE_DllAPI TopicRoutesMap operator () () const; | ||
|
||
///////////////////////// | ||
// VARIABLES | ||
///////////////////////// | ||
|
||
TopicRoutesMap topic_routes {}; | ||
}; | ||
|
||
} /* namespace core */ | ||
} /* namespace ddspipe */ | ||
} /* namespace eprosima */ |
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
Oops, something went wrong.