-
Notifications
You must be signed in to change notification settings - Fork 775
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
- Loading branch information
Showing
15 changed files
with
389 additions
and
89 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
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
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
64 changes: 64 additions & 0 deletions
64
src/cpp/rtps/builtin/discovery/participant/PDPClientListener.cpp
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,64 @@ | ||
// Copyright 2024 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 PDPClientListener.cpp | ||
* | ||
*/ | ||
|
||
#include <rtps/builtin/discovery/participant/PDPClientListener.hpp> | ||
|
||
#include <mutex> | ||
|
||
#include <fastdds/core/policy/ParameterList.hpp> | ||
#include <fastdds/dds/log/Log.hpp> | ||
#include <fastdds/rtps/history/ReaderHistory.h> | ||
#include <fastdds/rtps/participant/ParticipantDiscoveryInfo.h> | ||
#include <fastdds/rtps/participant/RTPSParticipantListener.h> | ||
#include <fastdds/rtps/reader/RTPSReader.h> | ||
|
||
#include <rtps/builtin/discovery/endpoint/EDP.h> | ||
#include <rtps/builtin/discovery/participant/PDP.h> | ||
#include <rtps/builtin/discovery/participant/PDPEndpoints.hpp> | ||
#include <rtps/network/utils/external_locators.hpp> | ||
#include <rtps/participant/RTPSParticipantImpl.h> | ||
#include <rtps/resources/TimedEvent.h> | ||
|
||
using ParameterList = eprosima::fastdds::dds::ParameterList; | ||
|
||
namespace eprosima { | ||
namespace fastrtps { | ||
namespace rtps { | ||
|
||
PDPClientListener::PDPClientListener( | ||
PDP* parent_pdp) | ||
: PDPListener(parent_pdp) | ||
{ | ||
} | ||
|
||
bool PDPClientListener::check_discovery_conditions( | ||
ParticipantProxyData& /* participant_data */, | ||
void* /* extra data*/) | ||
{ | ||
/* Do not check PID_VENDOR_ID */ | ||
// In Discovery Server we don't impose | ||
// domain ids to be the same | ||
/* Do not check PID_DOMAIN_ID */ | ||
/* Do not check PARTICIPANT_TYPE */ | ||
return true; | ||
} | ||
|
||
} /* namespace rtps */ | ||
} /* namespace fastrtps */ | ||
} /* namespace eprosima */ |
62 changes: 62 additions & 0 deletions
62
src/cpp/rtps/builtin/discovery/participant/PDPClientListener.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,62 @@ | ||
// Copyright 2024 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 PDPClientListener.h | ||
* | ||
*/ | ||
|
||
#ifndef _FASTDDS_RTPS_PDPCLIENTLISTENER_H_ | ||
#define _FASTDDS_RTPS_PDPCLIENTLISTENER_H_ | ||
#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC | ||
|
||
#include <rtps/builtin/discovery/participant/PDPListener.h> | ||
|
||
namespace eprosima { | ||
namespace fastrtps { | ||
namespace rtps { | ||
|
||
/** | ||
* Class PDPClientListener used by a PDP discovery client. | ||
* This class is implemented in order to use the same structure than with any other RTPSReader. | ||
* @ingroup DISCOVERY_MODULE | ||
*/ | ||
class PDPClientListener : public PDPListener | ||
{ | ||
|
||
public: | ||
|
||
/** | ||
* @param parent Pointer to object creating this object | ||
*/ | ||
PDPClientListener( | ||
PDP* parent); | ||
|
||
virtual ~PDPClientListener() override = default; | ||
|
||
protected: | ||
|
||
bool check_discovery_conditions( | ||
ParticipantProxyData& pdata, | ||
void* extra_data) override; | ||
|
||
}; | ||
|
||
|
||
} /* namespace rtps */ | ||
} /* namespace fastrtps */ | ||
} /* namespace eprosima */ | ||
|
||
#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC | ||
#endif /* _FASTDDS_RTPS_PDPCLIENTLISTENER_H_ */ |
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.