@@ -68,30 +68,33 @@ class Participant {
68
68
// ! Not-thread-safe function to add a writer
69
69
Writer *addWriter (Writer *writer);
70
70
bool isWritersFull ();
71
+ bool deleteWriter (Writer *writer);
71
72
72
73
// ! Not-thread-safe function to add a reader
73
74
Reader *addReader (Reader *reader);
74
75
bool isReadersFull ();
76
+ bool deleteReader (Reader *reader);
75
77
76
78
// ! (Probably) Thread safe if writers cannot be removed
77
- Writer *getWriter (EntityId_t id) const ;
78
- Writer *getMatchingWriter (const TopicData &topicData) const ;
79
- Writer *getMatchingWriter (const TopicDataCompressed &topicData) const ;
79
+ Writer *getWriter (EntityId_t id);
80
+ Writer *getMatchingWriter (const TopicData &topicData);
81
+ Writer *getMatchingWriter (const TopicDataCompressed &topicData);
80
82
81
83
// ! (Probably) Thread safe if readers cannot be removed
82
- Reader *getReader (EntityId_t id) const ;
83
- Reader *getReaderByWriterId (const Guid_t &guid) const ;
84
- Reader *getMatchingReader (const TopicData &topicData) const ;
85
- Reader *getMatchingReader (const TopicDataCompressed &topicData) const ;
84
+ Reader *getReader (EntityId_t id);
85
+ Reader *getReaderByWriterId (const Guid_t &guid);
86
+ Reader *getMatchingReader (const TopicData &topicData);
87
+ Reader *getMatchingReader (const TopicDataCompressed &topicData);
86
88
87
89
bool addNewRemoteParticipant (const ParticipantProxyData &remotePart);
88
90
bool removeRemoteParticipant (const GuidPrefix_t &prefix);
89
- void removeAllEntitiesOfParticipant (const GuidPrefix_t &prefix);
91
+ void removeAllProxiesOfParticipant (const GuidPrefix_t &prefix);
92
+ void removeProxyFromAllEndpoints (const Guid_t &guid);
93
+
90
94
const ParticipantProxyData *findRemoteParticipant (const GuidPrefix_t &prefix);
91
95
void refreshRemoteParticipantLiveliness (const GuidPrefix_t &prefix);
92
96
uint32_t getRemoteParticipantCount ();
93
97
MessageReceiver *getMessageReceiver ();
94
- void addHeartbeat (GuidPrefix_t sourceGuidPrefix);
95
98
bool checkAndResetHeartbeats ();
96
99
97
100
bool hasReaderWithMulticastLocator (ip4_addr_t address);
@@ -100,16 +103,17 @@ class Participant {
100
103
void newMessage (const uint8_t *data, DataSize_t size);
101
104
102
105
SPDPAgent &getSPDPAgent ();
106
+ void printInfo ();
103
107
104
108
private:
105
109
friend class SizeInspector ;
106
110
MessageReceiver m_receiver;
107
111
bool m_hasBuilInEndpoints = false ;
108
112
std::array<uint8_t , 3 > m_nextUserEntityId{{0 , 0 , 1 }};
109
- std::array<Writer *, Config::NUM_WRITERS_PER_PARTICIPANT> m_writers{};
110
- uint8_t m_numWriters = 0 ;
111
- std::array<Reader *, Config::NUM_READERS_PER_PARTICIPANT> m_readers{};
112
- uint8_t m_numReaders = 0 ;
113
+ std::array<Writer *, Config::NUM_WRITERS_PER_PARTICIPANT> m_writers = {
114
+ nullptr } ;
115
+ std::array<Reader *, Config::NUM_READERS_PER_PARTICIPANT> m_readers = {
116
+ nullptr } ;
113
117
114
118
sys_mutex_t m_mutex;
115
119
MemoryPool<ParticipantProxyData, Config::SPDP_MAX_NUMBER_FOUND_PARTICIPANTS>
0 commit comments