WirelessTransceiver.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2015 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 _GAZEBO_WIRELESS_TRANSCEIVER_HH_
18 #define _GAZEBO_WIRELESS_TRANSCEIVER_HH_
19 
20 #include <string>
21 #include <ignition/math/Pose3.hh>
22 
24 #include "gazebo/sensors/Sensor.hh"
26 #include "gazebo/util/system.hh"
27 
28 namespace gazebo
29 {
30  namespace sensors
31  {
34 
38  {
40  public: WirelessTransceiver();
41 
43  public: ~WirelessTransceiver();
44 
45  // Documentation inherited
46  public: virtual std::string GetTopic() const;
47 
48  // Documentation inherited
49  public: virtual void Load(const std::string &_worldName);
50 
51  // Documentation inherited
52  public: virtual void Init();
53 
54  // Documentation inherited
55  public: virtual void Fini();
56 
59  public: double GetGain() const;
60 
63  public: double GetPower() const;
64 
67 
69  protected: double power;
70 
72  protected: double gain;
73 
75  protected: boost::weak_ptr<physics::Link> parentEntity;
76 
78  protected: ignition::math::Pose3d referencePose;
79  };
81  }
82 }
83 #endif
Sensor class for receiving wireless signals.
Definition: WirelessTransceiver.hh:37
Forward declarations for transport.
default namespace for gazebo
transport::PublisherPtr pub
Publisher to publish propagation model data.
Definition: WirelessTransceiver.hh:66
boost::weak_ptr< physics::Link > parentEntity
Parent entity which the sensor is attached to.
Definition: WirelessTransceiver.hh:75
double power
Receiver's power (dBm).
Definition: WirelessTransceiver.hh:69
ignition::math::Pose3d referencePose
Sensor reference pose.
Definition: WirelessTransceiver.hh:78
double gain
Antenna's gain of the receiver (dBi).
Definition: WirelessTransceiver.hh:72
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
Base class for sensors.
Definition: Sensor.hh:69
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66