|
49 | 49 | #include <rtps/builtin/discovery/participant/PDPEndpoints.hpp> |
50 | 50 | #include <rtps/builtin/discovery/participant/PDPListener.h> |
51 | 51 | #include <rtps/builtin/liveliness/WLP.hpp> |
| 52 | +#include <rtps/flowcontrol/FlowControllerFactory.hpp> |
52 | 53 | #include <rtps/history/TopicPayloadPoolRegistry.hpp> |
53 | 54 | #include <rtps/network/utils/external_locators.hpp> |
54 | 55 | #include <rtps/participant/RTPSParticipantImpl.hpp> |
@@ -1628,38 +1629,58 @@ static void set_builtin_endpoint_locators( |
1628 | 1629 | endpoint.ignore_non_matching_locators = pattr.ignore_non_matching_locators; |
1629 | 1630 | } |
1630 | 1631 |
|
1631 | | -ReaderAttributes PDP::create_builtin_reader_attributes() const |
| 1632 | +ReaderAttributes PDP::create_builtin_reader_attributes() |
1632 | 1633 | { |
1633 | 1634 | ReaderAttributes attributes; |
1634 | 1635 |
|
1635 | 1636 | const RTPSParticipantAttributes& pattr = getRTPSParticipant()->get_attributes(); |
1636 | 1637 | set_builtin_matched_allocation(attributes.matched_writers_allocation, pattr); |
1637 | | - set_builtin_endpoint_locators(attributes.endpoint, this, mp_builtin); |
1638 | 1638 |
|
1639 | 1639 | // Builtin endpoints are always reliable, transient local, keyed topics |
1640 | 1640 | attributes.endpoint.reliabilityKind = RELIABLE; |
1641 | 1641 | attributes.endpoint.durabilityKind = TRANSIENT_LOCAL; |
1642 | 1642 | attributes.endpoint.topicKind = WITH_KEY; |
1643 | 1643 |
|
| 1644 | + attributes.endpoint.endpointKind = READER; |
| 1645 | + |
1644 | 1646 | // Built-in readers never expect inline qos |
1645 | 1647 | attributes.expects_inline_qos = false; |
1646 | 1648 |
|
| 1649 | + attributes.times.heartbeat_response_delay = pdp_heartbeat_response_delay; |
| 1650 | + |
| 1651 | + set_builtin_endpoint_locators(attributes.endpoint, this, mp_builtin); |
| 1652 | + |
1647 | 1653 | return attributes; |
1648 | 1654 | } |
1649 | 1655 |
|
1650 | | -WriterAttributes PDP::create_builtin_writer_attributes() const |
| 1656 | +WriterAttributes PDP::create_builtin_writer_attributes() |
1651 | 1657 | { |
1652 | 1658 | WriterAttributes attributes; |
1653 | 1659 |
|
1654 | 1660 | const RTPSParticipantAttributes& pattr = getRTPSParticipant()->get_attributes(); |
1655 | 1661 | set_builtin_matched_allocation(attributes.matched_readers_allocation, pattr); |
1656 | | - set_builtin_endpoint_locators(attributes.endpoint, this, mp_builtin); |
1657 | 1662 |
|
1658 | 1663 | // Builtin endpoints are always reliable, transient local, keyed topics |
1659 | 1664 | attributes.endpoint.reliabilityKind = RELIABLE; |
1660 | 1665 | attributes.endpoint.durabilityKind = TRANSIENT_LOCAL; |
1661 | 1666 | attributes.endpoint.topicKind = WITH_KEY; |
1662 | 1667 |
|
| 1668 | + attributes.endpoint.endpointKind = WRITER; |
| 1669 | + |
| 1670 | + // We assume that if we have at least one flow controller defined, we use async flow controller |
| 1671 | + if (!pattr.flow_controllers.empty()) |
| 1672 | + { |
| 1673 | + attributes.mode = ASYNCHRONOUS_WRITER; |
| 1674 | + attributes.flow_controller_name = (pattr.builtin.flow_controller_name != |
| 1675 | + "") ? pattr.builtin.flow_controller_name : fastdds::rtps::async_flow_controller_name; |
| 1676 | + } |
| 1677 | + |
| 1678 | + attributes.times.heartbeat_period = pdp_heartbeat_period; |
| 1679 | + attributes.times.nack_response_delay = pdp_nack_response_delay; |
| 1680 | + attributes.times.nack_supression_duration = pdp_nack_supression_duration; |
| 1681 | + |
| 1682 | + set_builtin_endpoint_locators(attributes.endpoint, this, mp_builtin); |
| 1683 | + |
1663 | 1684 | return attributes; |
1664 | 1685 | } |
1665 | 1686 |
|
|
0 commit comments