corelib
include
rtabmap
core
EnvSensor.h
Go to the documentation of this file.
1
/*
2
Copyright (c) 2010-2018, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
3
All rights reserved.
4
5
Redistribution and use in source and binary forms, with or without
6
modification, are permitted provided that the following conditions are met:
7
* Redistributions of source code must retain the above copyright
8
notice, this list of conditions and the following disclaimer.
9
* Redistributions in binary form must reproduce the above copyright
10
notice, this list of conditions and the following disclaimer in the
11
documentation and/or other materials provided with the distribution.
12
* Neither the name of the Universite de Sherbrooke nor the
13
names of its contributors may be used to endorse or promote products
14
derived from this software without specific prior written permission.
15
16
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
*/
27
28
#ifndef CORELIB_INCLUDE_RTABMAP_CORE_ENVSENSOR_H_
29
#define CORELIB_INCLUDE_RTABMAP_CORE_ENVSENSOR_H_
30
31
namespace
rtabmap
{
32
33
class
EnvSensor
34
{
35
public
:
36
enum
Type
{
37
// built-in types
38
kUndefined
= 0,
39
kWifiSignalStrength
,
// dBm
40
kAmbientTemperature
,
// Celcius
41
kAmbientAirPressure
,
// hPa
42
kAmbientLight
,
// lx
43
kAmbientRelativeHumidity
,
// %
44
45
// user types
46
kCustomSensor1
= 100,
47
kCustomSensor2
,
48
kCustomSensor3
,
49
kCustomSensor4
,
50
kCustomSensor5
,
51
kCustomSensor6
,
52
kCustomSensor7
,
53
kCustomSensor8
,
54
kCustomSensor9
55
};
56
57
public
:
58
EnvSensor
() :
59
type_
(
kUndefined
),
60
value_
(0.0),
61
stamp_
(0.0)
62
{}
63
EnvSensor
(
const
Type
&
type
,
const
double
&
value
,
const
double
&
stamp
= 0) :
64
type_
(
type
),
65
value_
(
value
),
66
stamp_
(
stamp
)
67
{}
68
69
virtual
~EnvSensor
() {}
70
71
const
Type
&
type
()
const
{
return
type_
;}
72
const
double
&
value
()
const
{
return
value_
;}
73
const
double
&
stamp
()
const
{
return
stamp_
;}
74
75
private
:
76
Type
type_
;
77
double
value_
;
78
double
stamp_
;
79
};
80
81
typedef
std::map<EnvSensor::Type, EnvSensor>
EnvSensors
;
82
83
}
84
85
#endif
/* CORELIB_INCLUDE_RTABMAP_CORE_ENVSENSOR_H_ */
rtabmap::EnvSensor::kCustomSensor1
@ kCustomSensor1
Definition:
EnvSensor.h:46
rtabmap::EnvSensor::type_
Type type_
Definition:
EnvSensor.h:76
rtabmap::EnvSensor::kCustomSensor4
@ kCustomSensor4
Definition:
EnvSensor.h:49
rtabmap::EnvSensor::kCustomSensor6
@ kCustomSensor6
Definition:
EnvSensor.h:51
type
rtabmap::EnvSensor::kCustomSensor3
@ kCustomSensor3
Definition:
EnvSensor.h:48
rtabmap::EnvSensor::kAmbientAirPressure
@ kAmbientAirPressure
Definition:
EnvSensor.h:41
rtabmap::EnvSensor::kAmbientLight
@ kAmbientLight
Definition:
EnvSensor.h:42
rtabmap::EnvSensor::value
const double & value() const
Definition:
EnvSensor.h:72
rtabmap::EnvSensor::EnvSensor
EnvSensor()
Definition:
EnvSensor.h:58
rtabmap::EnvSensor::kAmbientTemperature
@ kAmbientTemperature
Definition:
EnvSensor.h:40
rtabmap::EnvSensor::EnvSensor
EnvSensor(const Type &type, const double &value, const double &stamp=0)
Definition:
EnvSensor.h:63
rtabmap::EnvSensor::kUndefined
@ kUndefined
Definition:
EnvSensor.h:38
Type
rtabmap::EnvSensor::value_
double value_
Definition:
EnvSensor.h:77
rtabmap::EnvSensor::stamp
const double & stamp() const
Definition:
EnvSensor.h:73
rtabmap::EnvSensor::~EnvSensor
virtual ~EnvSensor()
Definition:
EnvSensor.h:69
rtabmap::EnvSensor::kAmbientRelativeHumidity
@ kAmbientRelativeHumidity
Definition:
EnvSensor.h:43
rtabmap::EnvSensor::type
const Type & type() const
Definition:
EnvSensor.h:71
rtabmap::EnvSensor::stamp_
double stamp_
Definition:
EnvSensor.h:78
rtabmap::EnvSensor::kCustomSensor8
@ kCustomSensor8
Definition:
EnvSensor.h:53
rtabmap::EnvSensors
std::map< EnvSensor::Type, EnvSensor > EnvSensors
Definition:
EnvSensor.h:81
rtabmap::EnvSensor::kCustomSensor2
@ kCustomSensor2
Definition:
EnvSensor.h:47
rtabmap::EnvSensor::kCustomSensor5
@ kCustomSensor5
Definition:
EnvSensor.h:50
rtabmap::EnvSensor::kCustomSensor7
@ kCustomSensor7
Definition:
EnvSensor.h:52
rtabmap::EnvSensor::kCustomSensor9
@ kCustomSensor9
Definition:
EnvSensor.h:54
rtabmap
Definition:
CameraARCore.cpp:35
rtabmap::EnvSensor
Definition:
EnvSensor.h:33
rtabmap::EnvSensor::kWifiSignalStrength
@ kWifiSignalStrength
Definition:
EnvSensor.h:39
rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:09