RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
ddsCommon.hpp
Go to the documentation of this file.
1
14#ifndef RTCTK_COMPONENTFRAMEWORK_DDSCOMMON_HPP
15#define RTCTK_COMPONENTFRAMEWORK_DDSCOMMON_HPP
16
17#include <agnostictopicifPubSubTypes.hpp>
18
19#include <fastdds/dds/publisher/DataWriter.hpp>
20#include <fastdds/dds/publisher/Publisher.hpp>
21#include <fastdds/dds/publisher/PublisherListener.hpp>
22
23#include <fastdds/dds/subscriber/DataReader.hpp>
24#include <fastdds/dds/subscriber/DataReaderListener.hpp>
25#include <fastdds/dds/subscriber/Subscriber.hpp>
26#include <fastdds/dds/subscriber/SubscriberListener.hpp>
27
28#include <fastdds/dds/core/LoanableSequence.hpp>
29#include <fastdds/dds/core/Types.hpp>
30#include <fastdds/dds/domain/DomainParticipant.hpp>
31#include <fastdds/dds/domain/DomainParticipantFactory.hpp>
32
33#include <fastdds/dds/core/condition/WaitSet.hpp>
34#include <fastdds/dds/core/status/StatusMask.hpp>
35
36#include <fastdds/dds/domain/qos/DomainParticipantFactoryQos.hpp>
37
38#include <fastdds/rtps/transport/UDPv4TransportDescriptor.hpp>
39
41using namespace eprosima::fastdds::dds;
42
43FASTDDS_SEQUENCE(AgnosticTopicSeq, AgnosticTopic);
44
45// Compile-time check to ensure that type of sample_id defined in IDL results in uint32_t.
46// Suppressing the cppcheck warning because it looks like the tool's parsing is broken.
47// cppcheck-suppress preprocessorErrorDirective
48static_assert(
49 std::is_same_v<std::decay_t<decltype(std::declval<AgnosticTopic>().sample_id())>, uint32_t>,
50 "AgnosticTopic::sample_id has wrong type!");
51
52FASTDDS_SEQUENCE(SampleInfoSeq, SampleInfo);
53
54std::string RetcodeToString(ReturnCode_t retcode);
55
56const char* GetTopicName(const DataWriter* writer);
57const char* GetTopicName(const DataReader* reader);
58} // namespace rtctk::componentFramework
59
60#endif // RTCTK_COMPONENTFRAMEWORK_DDSCOMMON_HPP
Definition commandReplier.cpp:21
std::string RetcodeToString(ReturnCode_t retcode)
Definition ddsCommon.cpp:16
const char * GetTopicName(const DataWriter *writer)
Definition ddsCommon.cpp:20
FASTDDS_SEQUENCE(AgnosticTopicSeq, AgnosticTopic)