iceoryx_doc  1.0.1
subscriber_port_single_producer.hpp
1 // Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15 // SPDX-License-Identifier: Apache-2.0
16 
17 #ifndef IOX_POPO_SUBSCRIBER_PORT_SINGLE_PRODUCER_HPP_
18 #define IOX_POPO_SUBSCRIBER_PORT_SINGLE_PRODUCER_HPP_
19 
20 #include "iceoryx_posh/internal/capro/capro_message.hpp"
21 #include "iceoryx_posh/internal/popo/ports/subscriber_port_roudi.hpp"
22 #include "iceoryx_utils/cxx/optional.hpp"
23 
24 namespace iox
25 {
26 namespace popo
27 {
32 {
33  public:
35 
36  explicit SubscriberPortSingleProducer(cxx::not_null<MemberType_t* const> publisherPortDataPtr) noexcept;
37 
42  ~SubscriberPortSingleProducer() = default;
43 
46  cxx::optional<capro::CaproMessage> tryGetCaProMessage() noexcept override;
47 
51  cxx::optional<capro::CaproMessage>
52  dispatchCaProMessageAndGetPossibleResponse(const capro::CaproMessage& caProMessage) noexcept override;
53 };
54 
55 } // namespace popo
56 } // namespace iox
57 
58 #endif
The SubscriberPortRouDi provides the API for accessing a subscriber port from the RouDi middleware da...
Definition: subscriber_port_roudi.hpp:36
The SubscriberPortSingleProducer is the implementation of the SubscriberPortRouDi for a setup where s...
Definition: subscriber_port_single_producer.hpp:32
cxx::optional< capro::CaproMessage > dispatchCaProMessageAndGetPossibleResponse(const capro::CaproMessage &caProMessage) noexcept override
dispatch a CaPro message to the subscriber for processing
cxx::optional< capro::CaproMessage > tryGetCaProMessage() noexcept override
get an optional CaPro message that changes the subscription state of the subscriber
Definition: service_description.hpp:29
Defines different base port data.
Definition: base_port_data.hpp:34
Definition: subscriber_port_data.hpp:37