17.2.8.3. RTPSParticipantListener¶
-
class RTPSParticipantListener¶
Class RTPSParticipantListener with virtual method that the user can overload to respond to certain events.
Public Functions
-
inline virtual void onParticipantDiscovery(RTPSParticipant *participant, ParticipantDiscoveryInfo &&info)¶
This method is called when a new Participant is discovered, or a previously discovered participant changes its QOS or is removed.
- Parameters
participant – [out] Pointer to the Participant which discovered the remote participant.
info – [out] Remote participant information. User can take ownership of the object.
-
inline virtual void onParticipantDiscovery(RTPSParticipant *participant, ParticipantDiscoveryInfo &&info, bool &should_be_ignored)¶
This method is called when a new Participant is discovered, or a previously discovered participant changes its QOS or is removed.
- Parameters
participant – [out] Pointer to the Participant which discovered the remote participant.
info – [out] Remote participant information. User can take ownership of the object.
should_be_ignored – [out] Flag to indicate the library to automatically ignore the discovered Participant.
-
inline virtual void onReaderDiscovery(RTPSParticipant *participant, ReaderDiscoveryInfo &&info)¶
This method is called when a new Reader is discovered, or a previously discovered reader changes its QOS or is removed.
- Parameters
participant – [out] Pointer to the Participant which discovered the remote reader.
info – [out] Remote reader information. User can take ownership of the object.
-
inline virtual void onReaderDiscovery(RTPSParticipant *participant, ReaderDiscoveryInfo &&info, bool &should_be_ignored)¶
This method is called when a new Reader is discovered, or a previously discovered reader changes its QOS or is removed.
- Parameters
participant – [out] Pointer to the Participant which discovered the remote reader.
info – [out] Remote reader information. User can take ownership of the object.
should_be_ignored – [out] Flag to indicate the library to automatically ignore the discovered Reader.
-
inline virtual void onWriterDiscovery(RTPSParticipant *participant, WriterDiscoveryInfo &&info)¶
This method is called when a new Writer is discovered, or a previously discovered writer changes its QOS or is removed.
- Parameters
participant – [out] Pointer to the Participant which discovered the remote writer.
info – [out] Remote writer information. User can take ownership of the object.
-
inline virtual void onWriterDiscovery(RTPSParticipant *participant, WriterDiscoveryInfo &&info, bool &should_be_ignored)¶
This method is called when a new Writer is discovered, or a previously discovered writer changes its QOS or is removed.
- Parameters
participant – [out] Pointer to the Participant which discovered the remote writer.
info – [out] Remote writer information. User can take ownership of the object.
should_be_ignored – [out] Flag to indicate the library to automatically ignore the discovered Writer.
-
inline virtual void on_type_discovery(RTPSParticipant *participant, const SampleIdentity &request_sample_id, const string_255 &topic, const types::TypeIdentifier *identifier, const types::TypeObject *object, types::DynamicType_ptr dyn_type)¶
This method is called when a participant discovers a new Type The ownership of all object belongs to the caller so if needs to be used after the method ends, a full copy should be perform (except for dyn_type due to its shared_ptr nature.
The field “topic” it is only available if the type was discovered using “Discovery-Time Data Typing”, in which case the field request_sample_id will contain INVALID_SAMPLE_IDENTITY. If the type was discovered using TypeLookup Service then “topic” will be empty, but will have the request_sample_id of the petition that caused the discovery. For example: fastrtps::types::TypeIdentifier new_type_id = *identifier;
-
inline virtual void on_type_dependencies_reply(RTPSParticipant *participant, const SampleIdentity &request_sample_id, const types::TypeIdentifierWithSizeSeq &dependencies)¶
This method is called when the typelookup client received a reply to a getTypeDependencies request.
The user may want to retrieve these new types using the getTypes request and create a new DynamicType using the retrieved TypeObject.
-
inline virtual void on_type_information_received(RTPSParticipant *participant, const string_255 &topic_name, const string_255 &type_name, const types::TypeInformation &type_information)¶
This method is called when a participant receives a TypeInformation while discovering another participant.
-
inline virtual void onParticipantDiscovery(RTPSParticipant *participant, ParticipantDiscoveryInfo &&info)¶