Skip to content

Commit

Permalink
Add ignored API defs
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaRU committed Jan 23, 2024
1 parent e745f88 commit c6a2470
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/FastRTPSSwift/FastRTPSNotifications.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ extension RTPSReaderWriterNotification: CustomStringConvertible {
case .discoveredWriter : return "discoveredWriter"
case .changedQosWriter : return "changedQosWriter"
case .removedWriter : return "removedWriter"
case .ignoredReader : return "ignoredReader"
case .ignoredWriter : return "ignoredWriter"
}
}
}
Expand All @@ -39,6 +41,7 @@ extension RTPSParticipantNotification: CustomStringConvertible {
case .changedQosParticipant : return "changedQosParticipant"
case .removedParticipant : return "removedParticipant"
case .droppedParticipant : return "droppedParticipant"
case .ignoredParticipant : return "ignoredParticipant"
}
}
}
16 changes: 16 additions & 0 deletions Sources/FastRTPSWrapper/BridgedParticipantListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <fastrtps/rtps/common/Locator.h>
#include <fastrtps/utils/IPLocator.h>
#include <memory.h>
#include "FastRTPSDefs.h"

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;
Expand All @@ -31,6 +32,11 @@ void BridgedParticipantListener::onReaderDiscovery(RTPSParticipant *participant,
case ReaderDiscoveryInfo::REMOVED_READER:
container.discoveryReaderWriterCallback(container.listnerObject, RTPSReaderWriterNotificationRemovedReader, topicName, typeName, nullptr);
break;
#if FASTDDS_VERSION >= 21000
case ReaderDiscoveryInfo::IGNORED_READER:
container.discoveryReaderWriterCallback(container.listnerObject, RTPSReaderWriterNotificationIgnoredReader, topicName, typeName, nullptr);
break;
#endif
}
}

Expand All @@ -52,6 +58,11 @@ void BridgedParticipantListener::onWriterDiscovery(RTPSParticipant *participant,
case WriterDiscoveryInfo::REMOVED_WRITER:
container.discoveryReaderWriterCallback(container.listnerObject, RTPSReaderWriterNotificationRemovedWriter, topicName, typeName, nullptr);
break;
#if FASTDDS_VERSION >= 21000
case WriterDiscoveryInfo::IGNORED_WRITER:
container.discoveryReaderWriterCallback(container.listnerObject, RTPSReaderWriterNotificationIgnoredWriter, topicName, typeName, nullptr);
break;
#endif
}

}
Expand Down Expand Up @@ -91,6 +102,11 @@ void BridgedParticipantListener::onParticipantDiscovery(RTPSParticipant *partici
case ParticipantDiscoveryInfo::CHANGED_QOS_PARTICIPANT:
container.discoveryParticipantCallback(container.listnerObject, RTPSParticipantNotificationChangedQosParticipant, info.info.m_participantName, nullptr, nullptr);
break;
#if FASTDDS_VERSION >= 21000
case ParticipantDiscoveryInfo::IGNORED_PARTICIPANT:
container.discoveryParticipantCallback(container.listnerObject, RTPSParticipantNotificationIgnoredParticipant, info.info.m_participantName, nullptr, nullptr);
break;
#endif
}
}

Expand Down
12 changes: 12 additions & 0 deletions Sources/FastRTPSWrapper/FastRTPSDefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// FastRTPSDefs.h
//
//
// Created by Dmitriy Borovikov on 22.01.2024.
//

#pragma once

#define FASTDDS_VERSION (FASTRTPS_VERSION_MAJOR * 10000 \
+ FASTRTPS_VERSION_MINOR * 100 \
+ FASTRTPS_VERSION_MICRO)
3 changes: 3 additions & 0 deletions Sources/FastRTPSWrapper/include/FastRTPSDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,15 @@ typedef NS_CLOSED_ENUM(uint32_t, RTPSReaderWriterNotification) {
RTPSReaderWriterNotificationDiscoveredWriter,
RTPSReaderWriterNotificationChangedQosWriter,
RTPSReaderWriterNotificationRemovedWriter,
RTPSReaderWriterNotificationIgnoredReader,
RTPSReaderWriterNotificationIgnoredWriter,
};
typedef NS_CLOSED_ENUM(uint32_t, RTPSParticipantNotification) {
RTPSParticipantNotificationDiscoveredParticipant = 0,
RTPSParticipantNotificationChangedQosParticipant,
RTPSParticipantNotificationRemovedParticipant,
RTPSParticipantNotificationDroppedParticipant,
RTPSParticipantNotificationIgnoredParticipant,
};

typedef NS_CLOSED_ENUM(uint32_t, FastRTPSLogLevel) {
Expand Down

0 comments on commit c6a2470

Please sign in to comment.