iceoryx2
C++ Language Bindings
Loading...
Searching...
No Matches
iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S > Class Template Reference

Builder to create new [MessagingPattern::PublishSubscribe] based [Service]s. More...

#include <service_builder_publish_subscribe.hpp>

Public Member Functions

auto payload_alignment (const uint64_t value) -> decltype(auto)
 
auto enable_safe_overflow (const bool value) -> decltype(auto)
 
auto subscriber_max_borrowed_samples (const uint64_t value) -> decltype(auto)
 
auto history_size (const uint64_t value) -> decltype(auto)
 
auto subscriber_max_buffer_size (const uint64_t value) -> decltype(auto)
 
auto max_subscribers (const uint64_t value) -> decltype(auto)
 
auto max_publishers (const uint64_t value) -> decltype(auto)
 
auto max_nodes (const uint64_t value) -> decltype(auto)
 
template<typename U = Payload, typename = std::enable_if_t<has_flatbuffer_marker<U>(), void>>
auto flatbuffer_schema_path (const bb::FilePath &value) &&-> ServiceBuilderPublishSubscribe< U, UserHeader, S > &&
 
template<typename NewHeader >
auto user_header () &&-> ServiceBuilderPublishSubscribe< Payload, NewHeader, S > &&
 Sets the user header type of the [Service].
 
auto resume_build () &-> ServiceBuilderPublishSubscribe< Payload, UserHeader, S > &&
 
auto open_or_create () &&-> bb::Expected< PortFactoryPublishSubscribe< S, Payload, UserHeader >, PublishSubscribeOpenOrCreateError >
 
auto open_or_create_with_attributes (const AttributeVerifier &required_attributes) &&-> bb::Expected< PortFactoryPublishSubscribe< S, Payload, UserHeader >, PublishSubscribeOpenOrCreateError >
 
auto open () &&-> bb::Expected< PortFactoryPublishSubscribe< S, Payload, UserHeader >, PublishSubscribeOpenError >
 Opens an existing [Service].
 
auto open_with_attributes (const AttributeVerifier &required_attributes) &&-> bb::Expected< PortFactoryPublishSubscribe< S, Payload, UserHeader >, PublishSubscribeOpenError >
 
auto create () &&-> bb::Expected< PortFactoryPublishSubscribe< S, Payload, UserHeader >, PublishSubscribeCreateError >
 Creates a new [Service].
 
auto create_with_attributes (const AttributeSpecifier &attributes) &&-> bb::Expected< PortFactoryPublishSubscribe< S, Payload, UserHeader >, PublishSubscribeCreateError >
 Creates a new [Service] with a set of attributes.
 

Friends

template<ServiceType >
class ServiceBuilder
 
template<typename P , typename U , ServiceType St>
auto set_payload_type_details (ServiceBuilderPublishSubscribe< P, U, St > &builder, const TypeDetail &value) -> std::enable_if_t< std::is_same< P, bb::Slice< CustomPayloadMarker > >::value >
 
template<typename P , typename U , ServiceType St>
auto set_user_header_type_details (ServiceBuilderPublishSubscribe< P, U, St > &builder, const TypeDetail &value) -> std::enable_if_t< std::is_same< U, CustomHeaderMarker >::value >
 

Detailed Description

template<typename Payload, typename UserHeader, ServiceType S>
class iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >

Builder to create new [MessagingPattern::PublishSubscribe] based [Service]s.

Definition at line 69 of file service_builder_publish_subscribe.hpp.

Member Function Documentation

◆ create()

template<typename Payload , typename UserHeader , ServiceType S>
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::create ( ) && -> bb::Expected<PortFactoryPublishSubscribe<S, Payload, UserHeader>, PublishSubscribeCreateError>
inline

Creates a new [Service].

Definition at line 422 of file service_builder_publish_subscribe.hpp.

References iox2::bb::err().

◆ create_with_attributes()

template<typename Payload , typename UserHeader , ServiceType S>
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::create_with_attributes ( const AttributeSpecifier attributes) && -> bb::Expected<PortFactoryPublishSubscribe<S, Payload, UserHeader>, PublishSubscribeCreateError>
inline

Creates a new [Service] with a set of attributes.

Definition at line 473 of file service_builder_publish_subscribe.hpp.

References iox2::bb::err().

◆ enable_safe_overflow()

template<typename Payload , typename UserHeader , ServiceType S>
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::enable_safe_overflow ( const bool  value) -> decltype(auto)

If the [Service] is created, defines the overflow behavior of the service. If an existing [Service] is opened it requires the service to have the defined overflow behavior.

◆ flatbuffer_schema_path()

template<typename Payload , typename UserHeader , ServiceType S>
template<typename U , typename >
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::flatbuffer_schema_path ( const bb::FilePath value) && -> ServiceBuilderPublishSubscribe<U, UserHeader, S>&&
inline

Sets the path to the flatbuffer schema file. If this is not explicitly defined, iceoryx2 will try to find the best fitting schema file in the configured filebuffer schema paths defined in the config.

Definition at line 364 of file service_builder_publish_subscribe.hpp.

◆ history_size()

template<typename Payload , typename UserHeader , ServiceType S>
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::history_size ( const uint64_t  value) -> decltype(auto)

If the [Service] is created it defines the maximum history size a [Subscriber] can request on connection. If an existing [Service] is opened it defines the minimum required.

◆ max_nodes()

template<typename Payload , typename UserHeader , ServiceType S>
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::max_nodes ( const uint64_t  value) -> decltype(auto)

If the [Service] is created it defines how many [Node]s shall be able to open it in parallel. If an existing [Service] is opened it defines how many [Node]s must be at least supported.

◆ max_publishers()

template<typename Payload , typename UserHeader , ServiceType S>
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::max_publishers ( const uint64_t  value) -> decltype(auto)

If the [Service] is created it defines how many [Publisher] shall be supported at most. If an existing [Service] is opened it defines how many [Publisher] must be at least supported.

◆ max_subscribers()

template<typename Payload , typename UserHeader , ServiceType S>
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::max_subscribers ( const uint64_t  value) -> decltype(auto)

If the [Service] is created it defines how many [Subscriber] shall be supported at most. If an existing [Service] is opened it defines how many [Subscriber] must be at least supported.

◆ open()

template<typename Payload , typename UserHeader , ServiceType S>
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::open ( ) && -> bb::Expected<PortFactoryPublishSubscribe<S, Payload, UserHeader>, PublishSubscribeOpenError>
inline

Opens an existing [Service].

Definition at line 407 of file service_builder_publish_subscribe.hpp.

References iox2::bb::err().

◆ open_or_create()

template<typename Payload , typename UserHeader , ServiceType S>
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::open_or_create ( ) && -> bb::Expected<PortFactoryPublishSubscribe<S, Payload, UserHeader>, PublishSubscribeOpenOrCreateError>
inline

If the [Service] exists, it will be opened otherwise a new [Service] will be created.

Definition at line 392 of file service_builder_publish_subscribe.hpp.

References iox2::bb::err().

◆ open_or_create_with_attributes()

template<typename Payload , typename UserHeader , ServiceType S>
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::open_or_create_with_attributes ( const AttributeVerifier required_attributes) && -> bb:: Expected<PortFactoryPublishSubscribe<S, Payload, UserHeader>, PublishSubscribeOpenOrCreateError>
inline

If the [Service] exists, it will be opened otherwise a new [Service] will be created. It defines a set of attributes. If the [Service] already exists all attribute requirements must be satisfied otherwise the open process will fail. If the [Service] does not exist the required attributes will be defined in the [Service].

Definition at line 437 of file service_builder_publish_subscribe.hpp.

References iox2::bb::err().

◆ open_with_attributes()

template<typename Payload , typename UserHeader , ServiceType S>
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::open_with_attributes ( const AttributeVerifier required_attributes) && -> bb:: Expected<PortFactoryPublishSubscribe<S, Payload, UserHeader>, PublishSubscribeOpenError>
inline

Opens an existing [Service] with attribute requirements. If the defined attribute requirements are not satisfied the open process will fail.

Definition at line 455 of file service_builder_publish_subscribe.hpp.

References iox2::bb::err().

◆ payload_alignment()

template<typename Payload , typename UserHeader , ServiceType S>
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::payload_alignment ( const uint64_t  value) -> decltype(auto)

If the [Service] is created, it defines the [Alignment] of the payload for the service. If an existing [Service] is opened it requires the service to have at least the defined [Alignment]. If the Payload [Alignment] is greater than the provided [Alignment] then the Payload [Alignment] is used.

◆ resume_build()

template<typename Payload , typename UserHeader , ServiceType S>
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::resume_build ( ) & -> ServiceBuilderPublishSubscribe<Payload, UserHeader, S>&&
inline

Returns the builder as an r-value so the fluent chain can be resumed after a free function, such as [set_payload_type_details()] or [set_user_header_type_details()], has been applied to the named builder.

Definition at line 372 of file service_builder_publish_subscribe.hpp.

◆ subscriber_max_borrowed_samples()

template<typename Payload , typename UserHeader , ServiceType S>
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::subscriber_max_borrowed_samples ( const uint64_t  value) -> decltype(auto)

If the [Service] is created it defines how many [Sample]s a [Subscriber] can borrow at most in parallel. If an existing [Service] is opened it defines the minimum required.

◆ subscriber_max_buffer_size()

template<typename Payload , typename UserHeader , ServiceType S>
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::subscriber_max_buffer_size ( const uint64_t  value) -> decltype(auto)

If the [Service] is created it defines how many [Sample] a Subscriber can store in its internal buffer. If an existing [Service] is opened it defines the minimum required.

◆ user_header()

template<typename Payload , typename UserHeader , ServiceType S>
template<typename NewHeader >
auto iox2::ServiceBuilderPublishSubscribe< Payload, UserHeader, S >::user_header ( ) && -> ServiceBuilderPublishSubscribe<Payload, NewHeader, S>&&
inline

Sets the user header type of the [Service].

Definition at line 354 of file service_builder_publish_subscribe.hpp.

Friends And Related Symbol Documentation

◆ ServiceBuilder

template<typename Payload , typename UserHeader , ServiceType S>
template<ServiceType >
friend class ServiceBuilder
friend

Definition at line 188 of file service_builder_publish_subscribe.hpp.

◆ set_payload_type_details

template<typename Payload , typename UserHeader , ServiceType S>
template<typename P , typename U , ServiceType St>
auto set_payload_type_details ( ServiceBuilderPublishSubscribe< P, U, St > &  builder,
const TypeDetail value 
) -> std::enable_if_t< std::is_same< P, bb::Slice< CustomPayloadMarker > >::value >
friend

◆ set_user_header_type_details

template<typename Payload , typename UserHeader , ServiceType S>
template<typename P , typename U , ServiceType St>
auto set_user_header_type_details ( ServiceBuilderPublishSubscribe< P, U, St > &  builder,
const TypeDetail value 
) -> std::enable_if_t< std::is_same< U, CustomHeaderMarker >::value >
friend

The documentation for this class was generated from the following file: