Gazebo Sensors

API Reference

7.3.1
gz/sensors/AirPressureSensor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 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 #ifndef GZ_SENSORS_AIRPRESSURESENSOR_HH_
18 #define GZ_SENSORS_AIRPRESSURESENSOR_HH_
19 
20 #include <memory>
21 
22 #include <sdf/sdf.hh>
23 
24 #include <gz/utils/SuppressWarning.hh>
25 
26 #include <gz/sensors/config.hh>
27 #include <gz/sensors/air_pressure/Export.hh>
28 
29 #include "gz/sensors/Sensor.hh"
30 
31 namespace gz
32 {
33  namespace sensors
34  {
35  // Inline bracket to help doxygen filtering.
36  inline namespace GZ_SENSORS_VERSION_NAMESPACE {
37  //
39  class AirPressureSensorPrivate;
40 
44  class GZ_SENSORS_AIR_PRESSURE_VISIBLE AirPressureSensor :
45  public Sensor
46  {
48  public: AirPressureSensor();
49 
51  public: virtual ~AirPressureSensor();
52 
56  public: virtual bool Load(const sdf::Sensor &_sdf) override;
57 
61  public: virtual bool Load(sdf::ElementPtr _sdf) override;
62 
65  public: virtual bool Init() override;
66 
67  using Sensor::Update;
68 
72  public: virtual bool Update(
73  const std::chrono::steady_clock::duration &_now) override;
74 
77  public: void SetReferenceAltitude(double _reference);
78 
81  public: double ReferenceAltitude() const;
82 
85  public: virtual bool HasConnections() const override;
86 
87  GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
91  GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
92  };
93  }
94  }
95 }
96 
97 #endif