Gazebo Transport

API Reference

11.4.1
gz/transport/parameters/Interface.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef GZ_TRANSPORT_PARAMETERS_INTERFACE_HH_
19 #define GZ_TRANSPORT_PARAMETERS_INTERFACE_HH_
20 
21 #include <functional>
22 #include <memory>
23 #include <string>
24 #include <variant>
25 
26 #include <google/protobuf/message.h>
27 
28 #include <ignition/msgs/parameter_declarations.pb.h>
29 
30 #include "gz/transport/config.hh"
32 #include "gz/transport/parameters/Export.hh"
33 
35 {
36  // Inline bracket to help doxygen filtering.
37  inline namespace IGNITION_TRANSPORT_VERSION_NAMESPACE {
38 
41  class IGNITION_TRANSPORT_PARAMETERS_VISIBLE ParametersInterface
42  {
44  public: virtual ~ParametersInterface() = default;
45 
55  public: virtual ParameterResult DeclareParameter(
56  const std::string & _parameterName,
57  const google::protobuf::Message & _msg) = 0;
58 
68  public: virtual ParameterResult Parameter(
69  const std::string & _parameterName,
70  google::protobuf::Message & _parameter) const = 0;
71 
82  public: virtual ParameterResult Parameter(
83  const std::string & _parameterName,
84  std::unique_ptr<google::protobuf::Message> & _parameter) const = 0;
85 
94  public: virtual ParameterResult SetParameter(
95  const std::string & _parameterName,
96  const google::protobuf::Message & _msg) = 0;
97 
100  public: virtual ignition::msgs::ParameterDeclarations
101  ListParameters() const = 0;
102  };
103  }
104 }
105 
106 #endif
STL class.
The return type used in all falible parameters methods.
Definition: gz/transport/parameters/result.hh:43
Common interface, implemented by ParametersRegistry (local updates) and by ParametersClients (remote ...
Definition: gz/transport/parameters/Interface.hh:41
Definition: gz/transport/parameters/Client.hh:33
STL class.