Program Listing for File Endpoint.hpp
↰ Return to documentation for file (include/fastdds/rtps/Endpoint.hpp
)
// Copyright 2016 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.
#ifndef FASTDDS_RTPS__ENDPOINT_HPP
#define FASTDDS_RTPS__ENDPOINT_HPP
#include <fastdds/rtps/attributes/EndpointAttributes.hpp>
#include <fastdds/rtps/common/Guid.hpp>
#include <fastdds/rtps/common/Locator.hpp>
#include <fastdds/rtps/common/Types.hpp>
#include <fastdds/rtps/history/IChangePool.hpp>
#include <fastdds/rtps/history/IPayloadPool.hpp>
#include <fastdds/utils/TimedMutex.hpp>
namespace eprosima {
namespace fastdds {
namespace rtps {
class RTPSParticipantImpl;
class ResourceEvent;
class Endpoint
{
friend class RTPSParticipantImpl;
protected:
Endpoint() = default;
Endpoint(
RTPSParticipantImpl* pimpl,
const GUID_t& guid,
const EndpointAttributes& att)
: mp_RTPSParticipant(pimpl)
, m_guid(guid)
, m_att(att)
{
}
virtual ~Endpoint()
{
}
public:
FASTDDS_EXPORTED_API inline const GUID_t& getGuid() const
{
return m_guid;
}
FASTDDS_EXPORTED_API inline RecursiveTimedMutex& getMutex()
{
return mp_mutex;
}
FASTDDS_EXPORTED_API inline EndpointAttributes& getAttributes()
{
return m_att;
}
#if HAVE_SECURITY
bool supports_rtps_protection()
{
return supports_rtps_protection_;
}
#endif // if HAVE_SECURITY
protected:
RTPSParticipantImpl* mp_RTPSParticipant;
const GUID_t m_guid;
EndpointAttributes m_att;
mutable RecursiveTimedMutex mp_mutex;
uint32_t fixed_payload_size_ = 0;
private:
Endpoint& operator =(
const Endpoint&) = delete;
#if HAVE_SECURITY
bool supports_rtps_protection_ = true;
#endif // if HAVE_SECURITY
};
} // namespace rtps
} // namespace rtps
} // namespace eprosima
#endif //FASTDDS_RTPS__ENDPOINT_HPP