Class EDPSimple

Inheritance Relationships

Base Type

  • public eprosima::fastrtps::rtps::EDP (Class EDP)

Class Documentation

class EDPSimple : public eprosima::fastrtps::rtps::EDP

Class EDPSimple, implements the Simple Endpoint Discovery Protocol defined in the RTPS specification. Inherits from EDP class.

Public Types

typedef std::set<InstanceHandle_t> key_list

Public Functions

EDPSimple(PDP *p, RTPSParticipantImpl *part)

Constructor.

Parameters:
  • p – Pointer to the PDP

  • part – Pointer to the RTPSParticipantImpl

virtual ~EDPSimple()
virtual bool initEDP(BuiltinAttributes &attributes) override

Initialization method.

Parameters:

attributes – Reference to the DiscoveryAttributes.

Returns:

True if correct.

virtual void assignRemoteEndpoints(const ParticipantProxyData &pdata, bool assign_secure_endpoints) override

This method assigns the remote builtin endpoints that the remote RTPSParticipant indicates is using to our local builtin endpoints.

Parameters:
  • pdata – Pointer to the RTPSParticipantProxyData object.

  • assign_secure_endpoints – Whether to try assigning secure endpoints

virtual void removeRemoteEndpoints(ParticipantProxyData *pdata) override

Remove remote endpoints from the endpoint discovery protocol

Parameters:

pdata – Pointer to the ParticipantProxyData to remove

virtual bool areRemoteEndpointsMatched(const ParticipantProxyData *pdata) override

Verify whether the given participant EDP endpoints are matched with us.

virtual bool processLocalReaderProxyData(RTPSReader *reader, ReaderProxyData *rdata) override

This method generates the corresponding change in the subscription writer and send it to all known remote endpoints.

Parameters:
  • reader – Pointer to the Reader object.

  • rdata – Pointer to the ReaderProxyData object.

Returns:

true if correct.

virtual bool processLocalWriterProxyData(RTPSWriter *writer, WriterProxyData *wdata) override

This method generates the corresponding change in the publciations writer and send it to all known remote endpoints.

Parameters:
  • writer – Pointer to the Writer object.

  • wdata – Pointer to the WriterProxyData object.

Returns:

true if correct.

virtual bool removeLocalReader(RTPSReader *R) override

This methods generates the change disposing of the local Reader and calls the unpairing and removal methods of the base class.

Parameters:

R – Pointer to the RTPSReader object.

Returns:

True if correct.

virtual bool removeLocalWriter(RTPSWriter *W) override

This methods generates the change disposing of the local Writer and calls the unpairing and removal methods of the base class.

Parameters:

W – Pointer to the RTPSWriter object.

Returns:

True if correct.

Public Members

BuiltinAttributes m_discovery

Discovery attributes.

t_p_StatefulWriter publications_writer_

Pointer to the Publications Writer (only created if indicated in the DiscoveryAtributes).

t_p_StatefulWriter subscriptions_writer_

Pointer to the Subscriptions Writer (only created if indicated in the DiscoveryAtributes).

t_p_StatefulReader publications_reader_

Pointer to the Publications Reader (only created if indicated in the DiscoveryAtributes).

t_p_StatefulReader subscriptions_reader_

Pointer to the Subscriptions Reader (only created if indicated in the DiscoveryAtributes).

EDPListener *publications_listener_

Pointer to the listener associated with PubReader and PubWriter.

EDPListener *subscriptions_listener_

Pointer to the listener associated with SubReader and SubWriter.

Protected Functions

virtual void set_builtin_reader_history_attributes(HistoryAttributes &attributes)

Initialization of history attributes for EDP built-in readers

Parameters:

attributes[out] History attributes to initialize

virtual void set_builtin_writer_history_attributes(HistoryAttributes &attributes)

Initialization of history attributes for EDP built-in writers

Parameters:

attributes[out] History attributes to initialize

virtual void set_builtin_reader_attributes(ReaderAttributes &attributes)

Initialization of reader attributes for EDP built-in readers

Parameters:

attributes[out] Reader attributes to initialize

virtual void set_builtin_writer_attributes(WriterAttributes &attributes)

Initialization of writer attributes for EDP built-in writers

Parameters:

attributes[out] Writer attributes to initialize

virtual bool createSEDPEndpoints()

Create local SEDP Endpoints based on the DiscoveryAttributes.

Returns:

True if correct.

bool serialize_writer_proxy_data(const WriterProxyData &data, const t_p_StatefulWriter &writer, bool remove_same_instance, CacheChange_t **created_change)

Create a cache change on a builtin writer and serialize a WriterProxyData on it.

Parameters:
  • data[in] The WriterProxyData object to be serialized.

  • writer[in] The writer,history pair where the change should be added.

  • remove_same_instance[in] Should previous changes with same key be removed?

  • created_change[out] Where the pointer to the created change should be returned.

Returns:

false if data could not be serialized into the created change.

bool serialize_reader_proxy_data(const ReaderProxyData &data, const t_p_StatefulWriter &writer, bool remove_same_instance, CacheChange_t **created_change)

Create a cache change on a builtin writer and serialize a ReaderProxyData on it.

Parameters:
  • data[in] The ReaderProxyData object to be serialized.

  • writer[in] The writer,history pair where the change should be added.

  • remove_same_instance[in] Should previous changes with same key be removed?

  • created_change[out] Where the pointer to the created change should be returned.

Returns:

false if data could not be serialized into the created change.

void processPersistentData(t_p_StatefulReader &reader, t_p_StatefulWriter &writer, key_list &demises)

Process the info recorded in the persistence database.

t_p_StatefulWriter get_builtin_writer_history_pair_by_entity(const EntityId_t &entity_id)

Get a pointer pair of the corresponding writer builtin endpoint for the entity_id

Parameters:

entity_id[in] The entity_id to obtain the pair from.

Returns:

A pair of nullptrs if operation was unsuccessful

t_p_StatefulReader get_builtin_reader_history_pair_by_entity(const EntityId_t &entity_id)

Get a pointer pair of the corresponding reader builtin endpoint for the entity_id. If a builtin writer Entity is passed, the equivalent reader entity builtin is returned.

Parameters:

entity_id[in] The entity_id to obtain the pair from.

Returns:

A pair of nullptrs if operation was unsuccessful

Protected Attributes

std::shared_ptr<ITopicPayloadPool> pub_writer_payload_pool_
std::shared_ptr<ITopicPayloadPool> pub_reader_payload_pool_
std::shared_ptr<ITopicPayloadPool> sub_writer_payload_pool_
std::shared_ptr<ITopicPayloadPool> sub_reader_payload_pool_