Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
aead8d55
Commit
aead8d55
authored
Apr 19, 2016
by
Axel Auweter
Browse files
Merge branch 'ticket-38'
parents
f9b575af
b4dea9a0
Changes
42
Expand all
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
aead8d55
...
...
@@ -11,6 +11,9 @@ install/
.settings
*.xcworkspace/
## Ignore debug symbol directories
*.dSYM
## Ignore directory indexing tools
cscope.out
.DS_Store
...
...
CollectAgent/Makefile
View file @
aead8d55
include
../config.mk
CXXFLAGS
=
-O2
-g
--std
=
c++11
-Wall
-Wno-unused-local-typedefs
-Wno-unknown-warning-option
-fmessage-length
=
0
-I
$(DCDBDEPLOYPATH)
/include/
-I
$(DCDBBASEPATH)
/include/
-DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
CXXFLAGS
=
-O2
-g
--std
=
c++11
-Wall
-Wno-unused-local-typedefs
-Wno-deprecated-declarations
-Wno-unknown-warning-option
-fmessage-length
=
0
-I
$(DCDBDEPLOYPATH)
/include/
-I
$(DCDBBASEPATH)
/include/
-DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
OBJS
=
collectagent.o
\
simplemqttserver.o
\
simplemqttserverthread.o
\
...
...
CollectAgent/collectagent.cpp
View file @
aead8d55
...
...
@@ -30,7 +30,7 @@ int keepRunning;
bool
statistics
;
uint64_t
msgCtr
;
uint64_t
pmsgCtr
;
SensorDataStore
*
mySensorDataStore
;
DCDB
::
SensorDataStore
*
mySensorDataStore
;
std
::
string
listenHost
,
cassandraHost
,
ttl
;
/* Normal termination (SIGINT, CTRL+C) */
...
...
@@ -93,7 +93,7 @@ void mqttCallback(SimpleMQTTMessage *msg)
* into a valid SensorId. If successful, store
* the record in the database.
*/
SensorId
sid
;
DCDB
::
SensorId
sid
;
if
(
sid
.
mqttTopicConvert
(
msg
->
getTopic
()))
{
#if 0
cout << "Topic decode successful:"
...
...
@@ -185,8 +185,8 @@ int main(int argc, char* const argv[]) {
* Allocate and initialize connection to Cassandra.
*/
std
::
string
sdHost
=
cassandraHost
;
DCDBConnection
*
dcdbConn
;
dcdbConn
=
new
DCDBConnection
(
sdHost
,
9042
);
DCDB
::
Connection
*
dcdbConn
;
dcdbConn
=
new
DCDB
::
Connection
(
sdHost
,
9042
);
if
(
!
dcdbConn
->
connect
())
{
std
::
cout
<<
"Cannot connect to Cassandra!"
<<
std
::
endl
;
...
...
@@ -201,7 +201,7 @@ int main(int argc, char* const argv[]) {
/*
* Allocate the SensorDataStore.
*/
mySensorDataStore
=
new
SensorDataStore
(
dcdbConn
);
mySensorDataStore
=
new
DCDB
::
SensorDataStore
(
dcdbConn
);
/*
* Set TTL for data store inserts if TTL > 0.
...
...
DCDBLib/Makefile
View file @
aead8d55
...
...
@@ -14,6 +14,7 @@ OBJS = src/connection.o \
src/sensorconfig.o
\
src/sensorid.o
\
src/unitconv.o
\
src/virtualsensor.o
\
src/c_api.o
# List of public header files necessary to use this libray
...
...
@@ -42,7 +43,7 @@ P = $(shell cd $(DCDBDEPLOYPATH)/lib/ && pwd)
.PHONY
:
check-target-env all clean install
# Main Library Target
$(TARGET)
:
$(OBJS)
$(TARGET)
:
$(OBJS)
.header-check
@
if
[
"
$(OS)
"
=
"Darwin"
]
;
then
\
echo
"Linking library in Mac OS style:
$(TARGET)
"
;
\
$(CXX)
$(CXXFLAGS)
$(DLFLAGS)
-o
$(TARGET)
$(OBJS)
$(LIBS)
;
\
...
...
@@ -67,6 +68,11 @@ check-target-env:
printf
"
\n
******************************************
\n
Please type the following line before running:
\n
export LD_LIBRARY_PATH=
$$
LD_LIBRARY_PATH:
$P
\n
******************************************
\n
"
;
\
fi
;
\
fi
# Header check
.header-check
:
$(PUBHEADERS) $(PRIVHEADERS)
@
touch
.header-check
@
touch
$(OBJS:.o=.cpp)
# Build the documentation
docs
:
$(PUBHEADERS) $(PRIVHEADERS) $(SRC)
...
...
@@ -75,6 +81,7 @@ docs: $(PUBHEADERS) $(PRIVHEADERS) $(SRC)
# Clean everything
clean
:
clean-docs
rm
-f
.header-check
rm
-f
$(OBJS)
$(TARGET)
# Clean the documentation
...
...
DCDBLib/include/connection.h
View file @
aead8d55
...
...
@@ -9,7 +9,7 @@
* @file
* @brief This file contains parts of the public API for the
* DCDBLib library.
* It contains the class definition of the
DCDB
Connection class,
* It contains the class definition of the Connection class,
* that handles connections to the data store and schema
* initialization.
*/
...
...
@@ -19,16 +19,18 @@
#include "cassandra.h"
#ifndef CONNECTION_H
#define CONNECTION_H
#ifndef DCDB_CONNECTION_H
#define DCDB_CONNECTION_H
namespace
DCDB
{
/* Forward-declaration of the implementation-internal classes */
class
DCDB
ConnectionImpl
;
class
ConnectionImpl
;
class
DCDB
Connection
class
Connection
{
private:
DCDB
ConnectionImpl
*
impl
;
/**< The object which implements the core functionality of this class */
ConnectionImpl
*
impl
;
/**< The object which implements the core functionality of this class */
public:
/**
...
...
@@ -99,21 +101,23 @@ public:
bool
initSchema
();
/**
* @brief Standard constructor for
DCDB
Connections.
* @brief Standard constructor for Connections.
*
* If not set explicitly, hostname and port will default to localhost and 9042.
*/
DCDB
Connection
();
Connection
();
/**
* @brief Construct a
DCDB
Connection to the specific host and port.
* @brief Construct a Connection to the specific host and port.
*/
DCDB
Connection
(
std
::
string
hostname
,
uint16_t
port
);
Connection
(
std
::
string
hostname
,
uint16_t
port
);
/**
* @brief Standard destructor for
DCDB
Connections.
* @brief Standard destructor for Connections.
*/
virtual
~
DCDB
Connection
();
virtual
~
Connection
();
};
#endif
/* CONNECTION_H */
}
/* End of namespace DCDB */
#endif
/* DCDB_CONNECTION_H */
DCDBLib/include/sensorconfig.h
View file @
aead8d55
...
...
@@ -22,22 +22,29 @@
#include "cassandra.h"
#ifndef SENSORCONFIG_H
#define SENSORCONFIG_H
#ifndef DCDB_SENSORCONFIG_H
#define DCDB_SENSORCONFIG_H
namespace
DCDB
{
class
SensorConfigImpl
;
class
DCDB
PublicSensor
class
PublicSensor
{
public:
std
::
string
name
;
bool
is_virtual
;
std
::
string
pattern
;
double
scaling_factor
;
std
::
string
unit
;
bool
integrable
;
std
::
string
expression
;
std
::
string
v_sensorid
;
uint64_t
t_zero
;
uint64_t
frequency
;
DCDB
PublicSensor
();
DCDB
PublicSensor
(
const
DCDB
PublicSensor
&
copy
);
PublicSensor
();
PublicSensor
(
const
PublicSensor
&
copy
);
};
typedef
enum
{
...
...
@@ -45,6 +52,10 @@ typedef enum {
SC_INVALIDSESSION
,
SC_INVALIDPATTERN
,
SC_INVALIDPUBLICNAME
,
SC_INVALIDEXPRESSION
,
SC_EXPRESSIONSELFREF
,
SC_INVALIDVSENSORID
,
SC_WRONGTYPE
,
SC_UNKNOWNSENSOR
,
SC_UNKNOWNERROR
}
SCError
;
...
...
@@ -56,23 +67,31 @@ protected:
public:
SCError
publishSensor
(
const
char
*
publicName
,
const
char
*
sensorPattern
);
SCError
publishVirtualSensor
(
const
char
*
publicName
,
const
char
*
vSensorExpression
,
const
char
*
vSensorId
,
TimeStamp
tZero
,
uint64_t
frequency
);
SCError
unPublishSensor
(
const
char
*
publicName
);
SCError
getPublicSensorNames
(
std
::
list
<
std
::
string
>&
publicSensors
);
SCError
getPublicSensorsVerbose
(
std
::
list
<
DCDBPublicSensor
>&
publicSensors
);
SCError
getPublicSensorsVerbose
(
std
::
list
<
PublicSensor
>&
publicSensors
);
SCError
getPublicSensorByName
(
PublicSensor
&
sensor
,
const
char
*
publicName
);
SCError
getPublicSensorByName
(
DCDBPublicSensor
&
sensor
,
const
char
*
publicName
);
SCError
isVirtual
(
bool
&
isVirtual
,
std
::
string
publicName
);
SCError
getSensorPattern
(
std
::
string
&
pattern
,
std
::
string
publicName
);
SCError
getSensorListForPattern
(
std
::
list
<
SensorId
>&
sensorIds
,
std
::
string
pattern
);
SCError
getSensorListForPattern
(
std
::
list
<
SensorId
>&
sensorIds
,
std
::
string
pattern
,
DCDB
TimeStamp
start
,
DCDB
TimeStamp
end
);
SCError
getSensorListForPattern
(
std
::
list
<
SensorId
>&
sensorIds
,
std
::
string
pattern
,
TimeStamp
start
,
TimeStamp
end
);
SCError
setSensorScalingFactor
(
std
::
string
publicName
,
double
scalingFactor
);
SCError
setSensorUnit
(
std
::
string
publicName
,
std
::
string
unit
);
SCError
setSensorIntegrable
(
std
::
string
publicName
,
bool
integrable
);
SensorConfig
(
DCDBConnection
*
conn
);
SCError
setVirtualSensorExpression
(
std
::
string
publicName
,
std
::
string
expression
);
SCError
setVirtualSensorTZero
(
std
::
string
publicName
,
TimeStamp
tZero
);
SCError
setVirtualSensorFrequency
(
std
::
string
publicName
,
uint64_t
frequency
);
SensorConfig
(
Connection
*
conn
);
virtual
~
SensorConfig
();
};
}
/* End of namespace DCDB */
#endif
/* CONFIG_H */
#endif
/*
DCDB_SENSOR
CONFIG_H */
DCDBLib/include/sensordatastore.h
View file @
aead8d55
...
...
@@ -21,8 +21,10 @@
#include "timestamp.h"
#include "connection.h"
#ifndef SENSORDATASTORE_H_
#define SENSORDATASTORE_H_
#ifndef DCDB_SENSORDATASTORE_H
#define DCDB_SENSORDATASTORE_H
namespace
DCDB
{
typedef
enum
{
SDS_OK
,
...
...
@@ -40,7 +42,7 @@ class SensorDataStoreReading
{
public:
SensorId
sensorId
;
DCDB
TimeStamp
timeStamp
;
TimeStamp
timeStamp
;
int64_t
value
;
#if 0
...
...
@@ -85,7 +87,19 @@ public:
* @param start Start of the time series.
* @param end End of the time series.
*/
void
query
(
std
::
list
<
SensorDataStoreReading
>&
result
,
SensorId
&
sid
,
DCDBTimeStamp
&
start
,
DCDBTimeStamp
&
end
);
void
query
(
std
::
list
<
SensorDataStoreReading
>&
result
,
SensorId
&
sid
,
TimeStamp
&
start
,
TimeStamp
&
end
);
typedef
void
(
*
QueryCbFunc
)(
SensorDataStoreReading
&
reading
,
void
*
userData
);
/**
* @brief This function queries a sensor's values in
* the given time range.
* @param cbFunc A function to called for each reading.
* @param userData Pointer to user data that will be returned in the callback.
* @param sid The SensorId to query.
* @param start Start of the time series.
* @param end End of the time series.
*/
void
queryCB
(
QueryCbFunc
cbFunc
,
void
*
userData
,
SensorId
&
sid
,
TimeStamp
&
start
,
TimeStamp
&
end
);
/**
* @brief This function queries the integrated value (val * sec)
...
...
@@ -96,7 +110,7 @@ public:
* @param end End of the time series.
* @return SDS_OK if ok, SDS_EMPTYSET if not at least 2 readings in interval.
*/
SDSQueryResult
querySum
(
int64_t
&
result
,
SensorId
&
sid
,
DCDB
TimeStamp
&
start
,
DCDB
TimeStamp
&
end
);
SDSQueryResult
querySum
(
int64_t
&
result
,
SensorId
&
sid
,
TimeStamp
&
start
,
TimeStamp
&
end
);
/**
* @brief This function truncates all sensor data that is older than
...
...
@@ -109,10 +123,10 @@ public:
* @brief A shortcut constructor for a SensorDataStore object
* that allows accessing the data store through a
* connection that is already established.
* @param conn The
DCDB
Connection object of an established
* @param conn The Connection object of an established
* connection to Cassandra.
*/
SensorDataStore
(
DCDB
Connection
*
conn
);
SensorDataStore
(
Connection
*
conn
);
/**
* @brief The standard destructor for a SensorDatStore object.
...
...
@@ -120,5 +134,6 @@ public:
virtual
~
SensorDataStore
();
};
}
/* End of namespace DCDB */
#endif
/* SENSORDATASTORE_H
_
*/
#endif
/*
DCDB_
SENSORDATASTORE_H */
DCDBLib/include/sensorid.h
View file @
aead8d55
...
...
@@ -8,8 +8,10 @@
#include <cstdint>
#include <string>
#ifndef SENSORID_H
#define SENSORID_H
#ifndef DCDB_SENSORID_H
#define DCDB_SENSORID_H
namespace
DCDB
{
/* Ensure that the unions and structs are created without padding */
#pragma pack(push,1)
...
...
@@ -122,4 +124,6 @@ public:
#pragma pack(pop)
#endif
/* SENSORID_H */
}
/* End of namespace DCDB */
#endif
/* DCDB_SENSORID_H */
DCDBLib/include/timestamp.h
View file @
aead8d55
/*
*
dcdb
timestamp.h
* timestamp.h
*
* Created on: Feb 18, 2015
* Author: Axel Auweter
...
...
@@ -8,7 +8,7 @@
/**
* @file
* @brief This file is a companion to the sensordatastore API.
* It contains the
DCDB
TimeStamp class definition that helps in
* It contains the TimeStamp class definition that helps in
* creating and modifying timestamps in the SensorDataStore.
*/
...
...
@@ -17,26 +17,28 @@
#include <string>
#include <stdexcept>
#ifndef DCDBTIMESTAMP_H
#define DCDBTIMESTAMP_H
#ifndef DCDB
_
TIMESTAMP_H
#define DCDB
_
TIMESTAMP_H
class
DCDBTimeStampConversionException
:
public
std
::
runtime_error
namespace
DCDB
{
class
TimeStampConversionException
:
public
std
::
runtime_error
{
public:
DCDB
TimeStampConversionException
()
:
runtime_error
(
"Time stamp conversion error."
)
{}
TimeStampConversionException
()
:
runtime_error
(
"Time stamp conversion error."
)
{}
};
/**
* @brief The
DCDB
TimeStamp class contains a single TimeStamp.
* @brief The TimeStamp class contains a single TimeStamp.
*/
class
DCDB
TimeStamp
class
TimeStamp
{
protected:
uint64_t
raw
;
/**< The raw timestamp data (nanoseconds since Unix Epoch) */
/**
* @brief Parses a string and tries to derive the time from it by
* guessing the format. Throws
DCDB
TimeStampException on failure.
* guessing the format. Throws TimeStampException on failure.
* @param timestr A string containing a representation of time
* @param localTime Denotes if the timestr contains local time instead of UTC
*/
...
...
@@ -47,27 +49,27 @@ public:
/**
* @brief Standard constructor. Initializes the object with the current time.
*/
DCDB
TimeStamp
();
TimeStamp
();
/**
* @brief Raw constructor. Initializes the object with an existing raw time.
*/
DCDB
TimeStamp
(
uint64_t
ts
)
{
raw
=
ts
;}
TimeStamp
(
uint64_t
ts
)
{
raw
=
ts
;}
/**
* @brief String constructor. Initializes the object by best guess from a time string.
*/
DCDB
TimeStamp
(
std
::
string
ts
,
bool
localTime
=
false
);
TimeStamp
(
std
::
string
ts
,
bool
localTime
=
false
);
/**
* @brief Time_t constructor. Initializes the object from a time_t struct.
*/
DCDB
TimeStamp
(
time_t
ts
);
TimeStamp
(
time_t
ts
);
/**
* @brief Standard destructor.
*/
virtual
~
DCDB
TimeStamp
();
virtual
~
TimeStamp
();
/**
* @brief Sets the object's value to the current time.
...
...
@@ -88,28 +90,29 @@ public:
* @brief Returns the raw time stamp value.
* @return The object's value as uint64_t.
*/
uint64_t
getRaw
(
void
);
uint64_t
getRaw
(
void
)
const
;
/**
* @brief Returns the time stamp's value as human readable string
* @return The object's value as std::string.
*/
std
::
string
getString
(
void
);
std
::
string
getString
(
void
)
const
;
/**
* @brief Returns the "weekstamp" corresponding to the object's value
* @return The week number of the timestamp.
*/
uint16_t
getWeekstamp
(
void
);
uint16_t
getWeekstamp
(
void
)
const
;
/* Overloaded operators (compare raw values) */
inline
bool
operator
==
(
const
DCDB
TimeStamp
&
rhs
)
const
{
return
raw
==
rhs
.
raw
;}
inline
bool
operator
!=
(
const
DCDB
TimeStamp
&
rhs
)
const
{
return
raw
!=
rhs
.
raw
;}
inline
bool
operator
<
(
const
DCDB
TimeStamp
&
rhs
)
const
{
return
raw
<
rhs
.
raw
;}
inline
bool
operator
>
(
const
DCDB
TimeStamp
&
rhs
)
const
{
return
raw
>
rhs
.
raw
;}
inline
bool
operator
<=
(
const
DCDB
TimeStamp
&
rhs
)
const
{
return
raw
<=
rhs
.
raw
;}
inline
bool
operator
>=
(
const
DCDB
TimeStamp
&
rhs
)
const
{
return
raw
>=
rhs
.
raw
;}
inline
bool
operator
==
(
const
TimeStamp
&
rhs
)
const
{
return
raw
==
rhs
.
raw
;}
inline
bool
operator
!=
(
const
TimeStamp
&
rhs
)
const
{
return
raw
!=
rhs
.
raw
;}
inline
bool
operator
<
(
const
TimeStamp
&
rhs
)
const
{
return
raw
<
rhs
.
raw
;}
inline
bool
operator
>
(
const
TimeStamp
&
rhs
)
const
{
return
raw
>
rhs
.
raw
;}
inline
bool
operator
<=
(
const
TimeStamp
&
rhs
)
const
{
return
raw
<=
rhs
.
raw
;}
inline
bool
operator
>=
(
const
TimeStamp
&
rhs
)
const
{
return
raw
>=
rhs
.
raw
;}
};
}
/* End of namespace DCDB */
#endif
/* DCDBTIMESTAMP_H */
#endif
/* DCDB
_
TIMESTAMP_H */
DCDBLib/include/unitconv.h
View file @
aead8d55
...
...
@@ -5,68 +5,72 @@
* Author: Axel Auweter
*/
#ifndef UNITCONV_H
#define UNITCONV_H
#include <cstdint>
#include <string>
#ifndef DCDB_UNITCONV_H
#define DCDB_UNITCONV_H
namespace
DCDB
{
typedef
enum
{
/* Undefined */
DCDB
Unit_None
,
Unit_None
,
/* Base units */
DCDB
Unit_Meter
,
DCDB
Unit_Second
,
DCDB
Unit_Ampere
,
DCDB
Unit_Kelvin
,
DCDB
Unit_Watt
,
DCDB
Unit_Volt
,
DCDB
Unit_Hertz
,
Unit_Meter
,
Unit_Second
,
Unit_Ampere
,
Unit_Kelvin
,
Unit_Watt
,
Unit_Volt
,
Unit_Hertz
,
/* Others */
DCDB
Unit_Celsius
,
DCDB
Unit_Fahrenheit
,
Unit_Celsius
,
Unit_Fahrenheit
,
/* 1e3 */
DCDB
Unit_KiloHertz
,
Unit_KiloHertz
,
/* 1e6 */
DCDB
Unit_MegaHertz
,
Unit_MegaHertz
,
/* 1e9 */
DCDB
Unit_GigaHertz
,
Unit_GigaHertz
,
/* 1e-2 */
DCDB
Unit_CentiMeter
,
DCDB
Unit_CentiCelsius
,
Unit_CentiMeter
,
Unit_CentiCelsius
,
/* 1e-3 */
DCDB
Unit_MilliMeter
,
DCDB
Unit_MilliSecond
,
DCDB
Unit_MilliAmpere
,
DCDB
Unit_MilliKelvin
,
DCDB
Unit_MilliWatt
,
DCDB
Unit_MilliVolt
,
DCDB
Unit_MilliCelsius
,
Unit_MilliMeter
,
Unit_MilliSecond
,
Unit_MilliAmpere
,
Unit_MilliKelvin
,
Unit_MilliWatt
,
Unit_MilliVolt
,
Unit_MilliCelsius
,
/* 1e-6 */
DCDB
Unit_MicroMeter
,
DCDB
Unit_MicroSecond
,
DCDB
Unit_MicroAmpere
,
DCDB
Unit_MicroKelvin
,
DCDB
Unit_MicroWatt
,
DCDB
Unit_MicroVolt
,
DCDB
Unit_MicroCelsius
,
}
DCDB
Unit
;
Unit_MicroMeter
,
Unit_MicroSecond
,
Unit_MicroAmpere
,
Unit_MicroKelvin
,
Unit_MicroWatt
,
Unit_MicroVolt
,
Unit_MicroCelsius
,
}
Unit
;
class
UnitConv
{
public:
static
DCDB
Unit
fromString
(
std
::
string
unit
);
static
std
::
string
toString
(
DCDB
Unit
unit
);
static
bool
convert
(
int64_t
&
value
,
DCDB
Unit
from
,
DCDB
Unit
to
);
static
bool
convert
(
double
&
value
,
DCDB
Unit
from
,
DCDB
Unit
to
);
static
Unit
fromString
(
std
::
string
unit
);
static
std
::
string
toString
(
Unit
unit
);
static
bool
convert
(
int64_t
&
value
,
Unit
from
,
Unit
to
);
static
bool
convert
(
double
&
value
,
Unit
from
,
Unit
to
);
};
#endif
}
/* End of namespace DCDB */
#endif
/* DCDB_UNITCONV_H */
DCDBLib/include/virtualsensor.h
0 → 100644
View file @
aead8d55
/*
* virtualsensor.h
*
* Created on: Jan 15, 2016
* Author: Axel Auweter
*/
/**
* @file
* @brief This file contains classes for handling virtual sensors.
*/
#include <stdexcept>
#include <string>
#include <unordered_set>
#include "connection.h"
#include "sensorconfig.h"
#include "sensordatastore.h"
#ifndef DCDB_VIRTUAL_SENSOR_H
#define DCDB_VIRTUAL_SENSOR_H
namespace
DCDB
{
/**
* @brief Exception class for parsing Virtual Sensor Expressions
*
* Exceptions of this type are thrown whenever the parser for virtual
* sensor expressions encounters a syntax error. What() tries to
* provide the user with a hint on the location where the error was
* encountered while processing the expression string.
*/
class
VSExpressionParserException
:
public
std
::
runtime_error
{
public:
VSExpressionParserException
(
const
std
::
string
&
where
)
:
runtime_error
(
"Error parsing expression at: "
),
where_
(
where
)
{}
virtual
const
char
*
what
()
const
throw
();
private:
static
std
::
string
msg_
;
std
::
string
where_
;
};
/* Forward declare VirtualSensor::VSensorExpressionImpl and VirtualSensor::VSensorImpl */
namespace
VirtualSensor
{
class
VSensorExpressionImpl
;
class
VSensorImpl
;
}
/**
* @brief Public class for evaluating Virtual Sensors expressions
*
* This class forwards to the library internal VSensorExpressionImpl class.
*/
class
VSensorExpression
{
protected:
VirtualSensor
::
VSensorExpressionImpl
*
impl
;
public:
void
getInputs
(
std
::
unordered_set
<
std
::
string
>&
inputSet
);
void
getInputsRecursive
(
std
::
unordered_set
<
std
::
string
>&
inputSet
,
bool
virtualOnly
=
true
);
VSensorExpression
(
Connection
*
conn
,
std
::
string
expr
);