| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
RpcClientWriter.hpp
1// Copyright 2025 Proyectos y Sistemas de Mantenimiento SL (eProsima).
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
18
19#ifndef FASTDDS_DDS_RPC_INTERFACES__RPCCLIENTWRITER_HPP
20#define FASTDDS_DDS_RPC_INTERFACES__RPCCLIENTWRITER_HPP
21
22#include <fastdds/dds/rpc/interfaces/RpcStatusCode.hpp>
23
24 namespace eprosima {
25 namespace fastdds {
26 namespace dds {
27 namespace rpc {
28
34 template <typename T>
35 class RpcClientWriter
36{
37 public:
38
42 virtual ~RpcClientWriter() noexcept = default;
43
56 virtual void write(
57 const T& value) = 0;
58
71 virtual void write(
72 T&& value) = 0;
73
88 virtual void finish(
89 RpcStatusCode reason = RPC_STATUS_CODE_OK) = 0;
90
91};
92
93} // namespace rpc
94} // namespace dds
95} // namespace fastdds
96} // namespace eprosima
97
98#endif // FASTDDS_DDS_RPC_INTERFACES__RPCCLIENTWRITER_HPP
eprosima::fastdds::dds::rpc::RpcClientWriter
An interface for a client-side RPC writer.
Definition RpcClientWriter.hpp:36
eprosima::fastdds::dds::rpc::RpcClientWriter::~RpcClientWriter
virtual ~RpcClientWriter() noexcept=default
Destructor.
eprosima::fastdds::dds::rpc::RpcClientWriter::write
virtual void write(const T &value)=0
Copy write operation.
eprosima::fastdds::dds::rpc::RpcClientWriter::finish
virtual void finish(RpcStatusCode reason=RPC_STATUS_CODE_OK)=0
Marks the end of the input feed.
eprosima::fastdds::dds::rpc
Definition DomainParticipant.hpp:59
eprosima::fastdds::dds::rpc::RpcStatusCode
uint32_t RpcStatusCode
Status codes for RPC operations.
Definition RpcStatusCode.hpp:32
eprosima::fastdds::dds::rpc::RPC_STATUS_CODE_OK
constexpr RpcStatusCode RPC_STATUS_CODE_OK
Status code for successful operations.
Definition RpcStatusCode.hpp:37
eprosima::fastdds::dds
Definition BuiltinTopicKey.hpp:26
eprosima::fastdds
eprosima
eProsima namespace.