Program Listing for File PDPSimple.h

Return to documentation for file (/tmp/ws/src/fastrtps/include/fastdds/rtps/builtin/discovery/participant/PDPSimple.h)

// 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_BUILTIN_DISCOVERY_PARTICIPANT_PDPSIMPLE_H_
#define _FASTDDS_RTPS_BUILTIN_DISCOVERY_PARTICIPANT_PDPSIMPLE_H_
#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC

#include <fastdds/rtps/builtin/discovery/participant/PDP.h>

namespace eprosima {
namespace fastrtps {
namespace rtps {

class StatelessWriter;
class StatelessReader;

class PDPSimple : public PDP
{
public:

    PDPSimple(
            BuiltinProtocols* builtin,
            const RTPSParticipantAllocationAttributes& allocation);

    virtual ~PDPSimple();

    bool init(RTPSParticipantImpl* part) override;

    ParticipantProxyData* createParticipantProxyData(
        const ParticipantProxyData& p,
        const GUID_t& writer_guid) override;

    bool updateInfoMatchesEDP() override;

    void announceParticipantState(
        bool new_change,
        bool dispose = false,
        WriteParams& wparams = WriteParams::WRITE_PARAM_DEFAULT) override;

    void assignRemoteEndpoints(ParticipantProxyData* pdata) override;

    void removeRemoteEndpoints(ParticipantProxyData * pdata) override;

    void notifyAboveRemoteEndpoints(const ParticipantProxyData& pdata) override;

    bool newRemoteEndpointStaticallyDiscovered(
            const GUID_t& pguid,
            int16_t userDefinedId,
            EndpointKind_t kind);


private:

    void initializeParticipantProxyData(ParticipantProxyData* participant_data) override;

    bool createPDPEndpoints() override;

};

} /* namespace rtps */
} /* namespace fastrtps */
} /* namespace eprosima */

#endif
#endif //_FASTDDS_RTPS_BUILTIN_DISCOVERY_PARTICIPANT_PDPSIMPLE_H_