-
Notifications
You must be signed in to change notification settings - Fork 765
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refs #16500. Modelling PDP <-> PDPEndpoints relationship. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Builtin endpoints constants moved to separate header. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Added BuiltinReader aggregate. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Added BuiltinWriter aggregate. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Added SimplePDPEndpoints container. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Refactor on PDPSimple. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Remove references to builtin endpoints on PDP. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Update PDPSimple to PDP refactor Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Improvements on PDP::initializeParticipantProxyData Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Added DiscoveryServerPDPEndpoints container. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Update PDPClient to PDP refactor Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Update PDPServer to PDP refactor Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Update EDPServer to PDP refactor. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Update PDPListener to PDP refactor. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Update PDPServerListener to PDP refactor. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Ensure endpoints are assigned before being used. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Fix warning. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Uncrustify Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #16500. Apply suggestion. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com> Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
- Loading branch information
1 parent
74b22c0
commit 6ea04c4
Showing
18 changed files
with
823 additions
and
291 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright 2022 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. | ||
|
||
/** | ||
* @file BuiltinEndpoints.hpp | ||
*/ | ||
|
||
#ifndef FASTDDS_RTPS_BUILTIN_DATA__BUILTINENDPOINTS_HPP | ||
#define FASTDDS_RTPS_BUILTIN_DATA__BUILTINENDPOINTS_HPP | ||
|
||
#define DISC_BUILTIN_ENDPOINT_PARTICIPANT_ANNOUNCER (0x00000001 << 0) | ||
#define DISC_BUILTIN_ENDPOINT_PARTICIPANT_DETECTOR (0x00000001 << 1) | ||
#define DISC_BUILTIN_ENDPOINT_PUBLICATION_ANNOUNCER (0x00000001 << 2) | ||
#define DISC_BUILTIN_ENDPOINT_PUBLICATION_DETECTOR (0x00000001 << 3) | ||
#define DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER (0x00000001 << 4) | ||
#define DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_DETECTOR (0x00000001 << 5) | ||
#define DISC_BUILTIN_ENDPOINT_PARTICIPANT_PROXY_ANNOUNCER (0x00000001 << 6) | ||
#define DISC_BUILTIN_ENDPOINT_PARTICIPANT_PROXY_DETECTOR (0x00000001 << 7) | ||
#define DISC_BUILTIN_ENDPOINT_PARTICIPANT_STATE_ANNOUNCER (0x00000001 << 8) | ||
#define DISC_BUILTIN_ENDPOINT_PARTICIPANT_STATE_DETECTOR (0x00000001 << 9) | ||
#define BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER (0x00000001 << 10) | ||
#define BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_READER (0x00000001 << 11) | ||
#define BUILTIN_ENDPOINT_TYPELOOKUP_SERVICE_REQUEST_DATA_WRITER (0x00000001 << 12) | ||
#define BUILTIN_ENDPOINT_TYPELOOKUP_SERVICE_REQUEST_DATA_READER (0x00000001 << 13) | ||
#define BUILTIN_ENDPOINT_TYPELOOKUP_SERVICE_REPLY_DATA_WRITER (0x00000001 << 14) | ||
#define BUILTIN_ENDPOINT_TYPELOOKUP_SERVICE_REPLY_DATA_READER (0x00000001 << 15) | ||
#define DISC_BUILTIN_ENDPOINT_PUBLICATION_SECURE_ANNOUNCER (0x00000001 << 16) | ||
#define DISC_BUILTIN_ENDPOINT_PUBLICATION_SECURE_DETECTOR (0x00000001 << 17) | ||
#define DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_SECURE_ANNOUNCER (0x00000001 << 18) | ||
#define DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_SECURE_DETECTOR (0x00000001 << 19) | ||
#define BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_SECURE_DATA_WRITER (0x00000001 << 20) | ||
#define BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_SECURE_DATA_READER (0x00000001 << 21) | ||
#define DISC_BUILTIN_ENDPOINT_PARTICIPANT_SECURE_ANNOUNCER (0x00000001 << 26) | ||
#define DISC_BUILTIN_ENDPOINT_PARTICIPANT_SECURE_DETECTOR (0x00000001 << 27) | ||
|
||
#endif // FASTDDS_RTPS_BUILTIN_DATA__BUILTINENDPOINTS_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
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,84 @@ | ||
// Copyright 2022 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. | ||
|
||
/** | ||
* @file BuiltinReader.hpp | ||
*/ | ||
|
||
#ifndef RTPS_BUILTIN__BUILTINREADER_HPP_ | ||
#define RTPS_BUILTIN__BUILTINREADER_HPP_ | ||
|
||
#include <memory> | ||
|
||
#include <fastdds/rtps/history/ReaderHistory.h> | ||
|
||
#include <rtps/history/ITopicPayloadPool.h> | ||
#include <rtps/history/PoolConfig.h> | ||
|
||
namespace eprosima { | ||
namespace fastdds { | ||
namespace rtps { | ||
|
||
/** | ||
* Keeps data of a builtin reader | ||
*/ | ||
template<typename TReader> | ||
struct BuiltinReader | ||
{ | ||
~BuiltinReader() | ||
{ | ||
release(); | ||
} | ||
|
||
void release() | ||
{ | ||
if (history_) | ||
{ | ||
auto cfg = fastrtps::rtps::PoolConfig::from_history_attributes(history_->m_att); | ||
history_.reset(); | ||
if (payload_pool_) | ||
{ | ||
payload_pool_->release_history(cfg, true); | ||
} | ||
} | ||
} | ||
|
||
void remove_from_history( | ||
const fastrtps::rtps::InstanceHandle_t& key) | ||
{ | ||
history_->getMutex()->lock(); | ||
for (auto it = history_->changesBegin(); it != history_->changesEnd(); ++it) | ||
{ | ||
if ((*it)->instanceHandle == key) | ||
{ | ||
history_->remove_change(*it); | ||
break; | ||
} | ||
} | ||
history_->getMutex()->unlock(); | ||
} | ||
|
||
//! Payload pool for the topic | ||
std::shared_ptr<fastrtps::rtps::ITopicPayloadPool> payload_pool_; | ||
//! History for the builtin reader | ||
std::unique_ptr<fastrtps::rtps::ReaderHistory> history_; | ||
//! Builtin RTPS reader | ||
TReader* reader_ = nullptr; | ||
}; | ||
|
||
} // namespace rtps | ||
} // namespace fastdds | ||
} // namespace eprosima | ||
|
||
#endif // RTPS_BUILTIN__BUILTINREADER_HPP_ |
Oops, something went wrong.