123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612 |
- #ifndef _FASTDDS_DOMAIN_PARTICIPANT_HPP_
- #define _FASTDDS_DOMAIN_PARTICIPANT_HPP_
- #include <fastdds/dds/topic/TypeSupport.hpp>
- #include <fastdds/dds/topic/Topic.hpp>
- #include <fastrtps/types/TypeIdentifier.h>
- #include <fastdds/rtps/common/Guid.h>
- #include <fastdds/rtps/common/SampleIdentity.h>
- #include <fastdds/rtps/attributes/RTPSParticipantAttributes.h>
- #include <fastrtps/types/TypesBase.h>
- #include <fastdds/dds/core/status/StatusMask.hpp>
- #include <fastdds/dds/core/Entity.hpp>
- #include <fastdds/dds/domain/qos/DomainParticipantQos.hpp>
- #include <utility>
- using eprosima::fastrtps::types::ReturnCode_t;
- namespace dds {
- namespace domain {
- class DomainParticipant;
- }
- }
- namespace eprosima {
- namespace fastrtps {
- namespace rtps {
- class ResourceEvent;
- }
- namespace types {
- class TypeInformation;
- }
- class ParticipantAttributes;
- class PublisherAttributes;
- class SubscriberAttributes;
- }
- namespace fastdds {
- namespace dds {
- class DomainParticipantImpl;
- class DomainParticipantListener;
- class Publisher;
- class PublisherQos;
- class PublisherListener;
- class Subscriber;
- class SubscriberQos;
- class SubscriberListener;
- class TopicQos;
- class DomainParticipant : public Entity
- {
- public:
-
- RTPS_DllAPI ReturnCode_t get_qos(
- DomainParticipantQos& qos) const;
-
- RTPS_DllAPI const DomainParticipantQos& get_qos() const;
-
- RTPS_DllAPI ReturnCode_t enable() override;
-
- RTPS_DllAPI ReturnCode_t set_qos(
- const DomainParticipantQos& qos) const;
-
- RTPS_DllAPI ReturnCode_t set_listener(
- DomainParticipantListener* listener);
-
- RTPS_DllAPI const DomainParticipantListener* get_listener() const;
-
- RTPS_DllAPI Publisher* create_publisher(
- const PublisherQos& qos,
- PublisherListener* listener = nullptr,
- const StatusMask& mask = StatusMask::all());
-
- RTPS_DllAPI Publisher* create_publisher_with_profile(
- const std::string& profile_name,
- PublisherListener* listener = nullptr,
- const StatusMask& mask = StatusMask::all());
-
- RTPS_DllAPI ReturnCode_t delete_publisher(
- Publisher* publisher);
-
- RTPS_DllAPI Subscriber* create_subscriber(
- const SubscriberQos& qos,
- SubscriberListener* listener = nullptr,
- const StatusMask& mask = StatusMask::all());
-
- RTPS_DllAPI Subscriber* create_subscriber_with_profile(
- const std::string& profile_name,
- SubscriberListener* listener = nullptr,
- const StatusMask& mask = StatusMask::all());
-
- RTPS_DllAPI ReturnCode_t delete_subscriber(
- Subscriber* subscriber);
-
- RTPS_DllAPI ReturnCode_t register_type(
- TypeSupport type,
- const std::string& type_name);
-
- RTPS_DllAPI ReturnCode_t register_type(
- TypeSupport type);
-
- RTPS_DllAPI ReturnCode_t unregister_type(
- const std::string& typeName);
-
- RTPS_DllAPI Topic* create_topic(
- const std::string& topic_name,
- const std::string& type_name,
- const TopicQos& qos,
- TopicListener* listener = nullptr,
- const StatusMask& mask = StatusMask::all());
-
- RTPS_DllAPI Topic* create_topic_with_profile(
- const std::string& topic_name,
- const std::string& type_name,
- const std::string& profile_name,
- TopicListener* listener = nullptr,
- const StatusMask& mask = StatusMask::all());
-
- RTPS_DllAPI ReturnCode_t delete_topic(
- Topic* topic);
-
- RTPS_DllAPI TopicDescription* lookup_topicdescription(
- const std::string& topic_name) const;
-
-
-
-
-
-
- RTPS_DllAPI DomainId_t get_domain_id() const;
-
-
- RTPS_DllAPI ReturnCode_t assert_liveliness();
-
- RTPS_DllAPI ReturnCode_t set_default_publisher_qos(
- const PublisherQos& qos);
-
- RTPS_DllAPI const PublisherQos& get_default_publisher_qos() const;
-
- RTPS_DllAPI ReturnCode_t get_default_publisher_qos(
- PublisherQos& qos) const;
-
- RTPS_DllAPI ReturnCode_t set_default_subscriber_qos(
- const SubscriberQos& qos);
-
- RTPS_DllAPI const SubscriberQos& get_default_subscriber_qos() const;
-
- RTPS_DllAPI ReturnCode_t get_default_subscriber_qos(
- SubscriberQos& qos) const;
-
- RTPS_DllAPI ReturnCode_t set_default_topic_qos(
- const TopicQos& qos);
-
- RTPS_DllAPI const TopicQos& get_default_topic_qos() const;
-
- RTPS_DllAPI ReturnCode_t get_default_topic_qos(
- TopicQos& qos) const;
-
-
-
-
-
- RTPS_DllAPI bool contains_entity(
- const fastrtps::rtps::InstanceHandle_t& handle,
- bool recursive = true) const;
-
- RTPS_DllAPI ReturnCode_t get_current_time(
- fastrtps::Time_t& current_time) const;
-
- RTPS_DllAPI TypeSupport find_type(
- const std::string& type_name) const;
-
- RTPS_DllAPI const fastrtps::rtps::InstanceHandle_t& get_instance_handle() const;
-
-
- RTPS_DllAPI const fastrtps::rtps::GUID_t& guid() const;
-
- RTPS_DllAPI std::vector<std::string> get_participant_names() const;
-
- RTPS_DllAPI bool new_remote_endpoint_discovered(
- const fastrtps::rtps::GUID_t& partguid,
- uint16_t userId,
- fastrtps::rtps::EndpointKind_t kind);
-
- RTPS_DllAPI fastrtps::rtps::ResourceEvent& get_resource_event() const;
-
- RTPS_DllAPI fastrtps::rtps::SampleIdentity get_type_dependencies(
- const fastrtps::types::TypeIdentifierSeq& in) const;
-
- RTPS_DllAPI fastrtps::rtps::SampleIdentity get_types(
- const fastrtps::types::TypeIdentifierSeq& in) const;
-
- RTPS_DllAPI ReturnCode_t register_remote_type(
- const fastrtps::types::TypeInformation& type_information,
- const std::string& type_name,
- std::function<void(const std::string& name, const fastrtps::types::DynamicType_ptr type)>& callback);
-
- RTPS_DllAPI virtual ~DomainParticipant();
-
- bool has_active_entities();
- private:
- RTPS_DllAPI DomainParticipant(
- const StatusMask& mask = StatusMask::all());
- RTPS_DllAPI DomainParticipant(
- DomainId_t domain_id,
- const DomainParticipantQos& qos,
- DomainParticipantListener* listener,
- const StatusMask& mask = StatusMask::all());
- DomainParticipantImpl* impl_;
- friend class DomainParticipantFactory;
- friend class DomainParticipantImpl;
- friend class ::dds::domain::DomainParticipant;
- };
- }
- }
- }
- #endif
|