13#ifndef IOX2_BACKPRESSURE_HANDLER_HPP
14#define IOX2_BACKPRESSURE_HANDLER_HPP
26 -> iox2_backpressure_action_e;
30class BackpressureInfo {
32 iox2_backpressure_info_h_ref m_info;
34 explicit BackpressureInfo(iox2_backpressure_info_h_ref info)
39 iox2_callback_context callback_cxt)
40 -> iox2_backpressure_action_e;
43 "RawIdType capacity must match iox2_buffer_16_align_4_t capacity");
48 iox2_buffer_16_align_4_t buf;
49 iox2_backpressure_info_service_id(m_info, &buf);
54 iox2_buffer_16_align_4_t buf;
55 iox2_backpressure_info_receiver_port_id(m_info, &buf);
60 iox2_buffer_16_align_4_t buf;
61 iox2_backpressure_info_sender_port_id(m_info, &buf);
66 return iox2_backpressure_info_retries(m_info);
71 uint32_t nanoseconds = 0;
72 iox2_backpressure_info_elapsed_time(m_info, &seconds, &nanoseconds);
87 -> iox2_backpressure_action_e {
The info passed to the [BackpressureHandler].
auto retries() const -> uint64_t
Returns the number retries for the running delivery to the receiver port.
auto sender_port_id() const -> RawIdType
Returns the ReceiverPortId of the involved ports.
auto receiver_port_id() const -> RawIdType
Returns the ReceiverPortId of the involved ports.
auto service_id() const -> RawIdType
Returns the ServiceId of the involved ports.
auto elapsed_time() const -> bb::Duration
Returns the elapsed time since the initial retry.
static constexpr auto create_duration(SecondsT seconds, NanosecondsT nanoseconds) noexcept -> Duration
static constexpr auto capacity() noexcept -> SizeType
static constexpr auto from_range_unchecked(Iter it_begin, Sentinel it_end) -> bb::Optional< StaticVector >
detail::StaticFunction< Capacity, Signature > StaticFunction
A static memory replacement for std::function.
constexpr auto into(const SourceType value) noexcept -> typename detail::ExtractIntoType< DestinationType >::TargetType
Converts a value of type SourceType to a corresponding value of type DestinationType....
auto backpressure_handler_delegate(iox2_backpressure_info_h_ref info_handle, iox2_callback_context callback_cxt) -> iox2_backpressure_action_e
iox2::bb::StaticVector< uint8_t, UNIQUE_PORT_ID_LENGTH > RawIdType
iox2::bb::StaticFunction< BackpressureAction(const BackpressureInfo &)> BackpressureHandler
BackpressureAction
Defines the action that shall be take when data cannot be delivered.