iceoryx_doc  1.0.1
application_port.hpp
1 // Copyright (c) 2019 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 #ifndef IOX_POSH_POPO_PORTS_APPLICATION_PORT_HPP
17 #define IOX_POSH_POPO_PORTS_APPLICATION_PORT_HPP
18 
19 #include "iceoryx_posh/internal/popo/ports/application_port_data.hpp"
20 #include "iceoryx_posh/internal/popo/ports/base_port.hpp"
21 
22 namespace iox
23 {
24 namespace popo
25 {
26 class ApplicationPort : public BasePort
27 {
28  public:
30 
31  explicit ApplicationPort(ApplicationPortData* const applicationPortDataPtr) noexcept;
32 
33  ApplicationPort(const ApplicationPort& other) = delete;
34  ApplicationPort& operator=(const ApplicationPort& other) = delete;
35  ApplicationPort(ApplicationPort&& other) = default;
36  ApplicationPort& operator=(ApplicationPort&& other) = default;
37  ~ApplicationPort() = default;
38 
39 
42  cxx::optional<capro::CaproMessage> tryGetCaProMessage() noexcept;
43 
46  void dispatchCaProMessage(const capro::CaproMessage& caProMessage) noexcept;
47 
48  private:
49  const MemberType_t* getMembers() const noexcept;
50  MemberType_t* getMembers() noexcept;
51 };
52 
53 } // namespace popo
54 } // namespace iox
55 
56 #endif // IOX_POSH_POPO_PORTS_APPLICATION_PORT_HPP
Definition: application_port.hpp:27
cxx::optional< capro::CaproMessage > tryGetCaProMessage() noexcept
get an optional CaPro message that was provided by the application
void dispatchCaProMessage(const capro::CaproMessage &caProMessage) noexcept
dispatch a CaPro message from the application side to the daemon
this class is the base for all ports. it is constructed from a member pointer and is only movable....
Definition: base_port.hpp:43
Definition: service_description.hpp:29
Definition: application_port_data.hpp:29