123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- #ifndef _FASTDDS_WRITERATTRIBUTES_H_
- #define _FASTDDS_WRITERATTRIBUTES_H_
- #include <fastdds/rtps/common/Time_t.h>
- #include <fastdds/rtps/common/Guid.h>
- #include <fastdds/rtps/flowcontrol/ThroughputControllerDescriptor.h>
- #include <fastdds/rtps/attributes/EndpointAttributes.h>
- #include <fastrtps/utils/collections/ResourceLimitedContainerConfig.hpp>
- #include <fastrtps/qos/QosPolicies.h>
- #include <functional>
- namespace eprosima {
- namespace fastrtps {
- namespace rtps {
- class ReaderProxyData;
- typedef enum RTPSWriterPublishMode : octet
- {
- SYNCHRONOUS_WRITER,
- ASYNCHRONOUS_WRITER
- } RTPSWriterPublishMode;
- struct WriterTimes
- {
-
- Duration_t initialHeartbeatDelay;
-
- Duration_t heartbeatPeriod;
-
- Duration_t nackResponseDelay;
-
- Duration_t nackSupressionDuration;
- WriterTimes()
- {
-
- initialHeartbeatDelay.nanosec = 12 * 1000 * 1000;
- heartbeatPeriod.seconds = 3;
-
- nackResponseDelay.nanosec = 5 * 1000 * 1000;
- }
- virtual ~WriterTimes()
- {
- }
- bool operator ==(
- const WriterTimes& b) const
- {
- return (this->initialHeartbeatDelay == b.initialHeartbeatDelay) &&
- (this->heartbeatPeriod == b.heartbeatPeriod) &&
- (this->nackResponseDelay == b.nackResponseDelay) &&
- (this->nackSupressionDuration == b.nackSupressionDuration);
- }
- };
- class WriterAttributes
- {
- public:
- WriterAttributes()
- : liveliness_kind(AUTOMATIC_LIVELINESS_QOS)
- , liveliness_lease_duration(TIME_T_INFINITE_SECONDS, TIME_T_INFINITE_NANOSECONDS)
- , liveliness_announcement_period(TIME_T_INFINITE_SECONDS, TIME_T_INFINITE_NANOSECONDS)
- , mode(SYNCHRONOUS_WRITER)
- , disable_heartbeat_piggyback(false)
- , disable_positive_acks(false)
- , keep_duration(TIME_T_INFINITE_SECONDS, TIME_T_INFINITE_NANOSECONDS)
- {
- endpoint.endpointKind = WRITER;
- endpoint.durabilityKind = TRANSIENT_LOCAL;
- endpoint.reliabilityKind = RELIABLE;
- }
- virtual ~WriterAttributes()
- {
- }
-
- EndpointAttributes endpoint;
-
- WriterTimes times;
-
- fastrtps::LivelinessQosPolicyKind liveliness_kind;
-
- Duration_t liveliness_lease_duration;
-
- Duration_t liveliness_announcement_period;
-
- RTPSWriterPublishMode mode;
-
- ThroughputControllerDescriptor throughputController;
-
- bool disable_heartbeat_piggyback;
-
- ResourceLimitedContainerConfig matched_readers_allocation;
-
- bool disable_positive_acks;
-
- Duration_t keep_duration;
- };
- }
- }
- }
- #endif
|