Skip to content

Commit

Permalink
Adapted to Fast RTPS 1.7.0 Release.
Browse files Browse the repository at this point in the history
  • Loading branch information
julianbermudez committed Dec 20, 2018
1 parent 1c2b546 commit c61755d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
3 changes: 1 addition & 2 deletions include/uxr/agent/participant/Participant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class Participant;
}
}

#include <fastrtps/participant/ParticipantDiscoveryInfo.h>
#include <fastrtps/participant/ParticipantListener.h>

namespace eprosima {
Expand All @@ -49,7 +48,7 @@ class Participant : public XRCEObject, public fastrtps::ParticipantListener
bool matched(const dds::xrce::ObjectVariant& new_object_rep) const override;

private:
void onParticipantDiscovery(fastrtps::Participant* p, fastrtps::ParticipantDiscoveryInfo info) override;
void onParticipantDiscovery(fastrtps::Participant* p, fastrtps::ParticipantDiscoveryInfo&& info) override;
fastrtps::Participant* rtps_participant_ = nullptr;
std::unordered_map<std::string, dds::xrce::ObjectId> registered_topics_;
std::set<dds::xrce::ObjectId> tied_objects_;
Expand Down
12 changes: 6 additions & 6 deletions include/uxr/agent/types/TopicPubSubType.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ class TopicPubSubType: public TopicDataType

explicit TopicPubSubType(bool with_key);
virtual ~TopicPubSubType() override = default;
bool serialize(void* data, rtps::SerializedPayload_t* payload);
bool deserialize(rtps::SerializedPayload_t* payload, void* data);
std::function<uint32_t()> getSerializedSizeProvider(void* data);
bool getKey(void* data, rtps::InstanceHandle_t* ihandle);
void* createData();
void deleteData(void* data);
bool serialize(void* data, rtps::SerializedPayload_t* payload) override;
bool deserialize(rtps::SerializedPayload_t* payload, void* data) override;
std::function<uint32_t()> getSerializedSizeProvider(void* data) override;
bool getKey(void* data, rtps::InstanceHandle_t* ihandle, bool force_md5 = false) override;
void* createData() override;
void deleteData(void* data) override;
};

} // namespace uxr
Expand Down
9 changes: 5 additions & 4 deletions src/cpp/participant/Participant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,16 @@ void Participant::release(ObjectContainer& root_objects)
}
}

void Participant::onParticipantDiscovery(eprosima::fastrtps::Participant*, eprosima::fastrtps::ParticipantDiscoveryInfo info)
void Participant::onParticipantDiscovery(eprosima::fastrtps::Participant*,
fastrtps::rtps::ParticipantDiscoveryInfo&& info)
{
if(info.rtps.m_status == eprosima::fastrtps::rtps::DISCOVERED_RTPSPARTICIPANT)
if(info.status == eprosima::fastrtps::rtps::ParticipantDiscoveryInfo::DISCOVERED_PARTICIPANT)
{
std::cout << "RTPS Participant matched " << info.rtps.m_guid << std::endl;
std::cout << "RTPS Participant matched " << info.info.m_guid << std::endl;
}
else
{
std::cout << "RTPS Participant unmatched " << info.rtps.m_guid << std::endl;
std::cout << "RTPS Participant unmatched " << info.info.m_guid << std::endl;
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/cpp/types/TopicPubSubType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ void TopicPubSubType::deleteData(void* data) {
delete((std::vector<unsigned char>*)data);
}

bool TopicPubSubType::getKey(void *data, rtps::InstanceHandle_t* handle)
bool TopicPubSubType::getKey(void *data, rtps::InstanceHandle_t* handle, bool force_md5)
{
// TODO.
(void) data;
(void) handle;
(void) force_md5;
return m_isGetKeyDefined;
}

Expand Down
2 changes: 1 addition & 1 deletion thirdparty/fastrtps

0 comments on commit c61755d

Please sign in to comment.