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