Program Listing for File Publisher.h
↰ Return to documentation for file (/tmp/ws/src/fastrtps/include/fastrtps/publisher/Publisher.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 PUBLISHER_H_
#define PUBLISHER_H_
#include <fastrtps/fastrtps_dll.h>
#include <fastdds/rtps/common/Guid.h>
#include <fastdds/rtps/common/Time_t.h>
#include <fastrtps/attributes/PublisherAttributes.h>
#include <fastrtps/qos/DeadlineMissedStatus.h>
#include <fastrtps/qos/LivelinessLostStatus.h>
namespace eprosima {
namespace fastrtps {
namespace rtps {
struct GUID_t;
class WriteParams;
class RTPSParticipant;
} // namespace rtps
class Participant;
class PublisherImpl;
class RTPS_DllAPI Publisher
{
friend class PublisherImpl;
virtual ~Publisher();
public:
Publisher(
PublisherImpl* pimpl);
bool write(
void* sample);
bool write(
void* sample,
rtps::WriteParams& wparams);
fastrtps::rtps::InstanceHandle_t register_instance(
void* instance);
bool dispose(
void* data,
const rtps::InstanceHandle_t& handle);
bool unregister_instance(
void* instance,
const rtps::InstanceHandle_t& handle);
bool removeAllChange(
size_t* removed = nullptr);
bool wait_for_all_acked(
const Duration_t& max_wait);
const rtps::GUID_t& getGuid();
const PublisherAttributes& getAttributes() const;
bool updateAttributes(
const PublisherAttributes& att);
void get_offered_deadline_missed_status(
OfferedDeadlineMissedStatus& status);
void assert_liveliness();
void get_liveliness_lost_status(
LivelinessLostStatus& status);
void get_sending_locators(
rtps::LocatorList_t& locators) const;
private:
PublisherImpl* mp_impl;
};
} /* namespace fastrtps */
} /* namespace eprosima */
#endif /* PUBLISHER_H_ */