Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
dcdb
dcdb
Commits
5f69ad3b
Commit
5f69ad3b
authored
Nov 21, 2018
by
Michael Ott
Browse files
Add DCDB:Sensor constructor that accepts a PublicSensor object instead of a sensor name
parent
d9283b7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/include/dcdb/sensor.h
View file @
5f69ad3b
...
...
@@ -18,7 +18,8 @@ namespace DCDB {
class
Sensor
{
public:
Sensor
(
DCDB
::
Connection
*
connection
,
std
::
string
publicName
);
Sensor
(
DCDB
::
Connection
*
connection
,
std
::
string
&
publicName
);
Sensor
(
Connection
*
connection
,
PublicSensor
&
sensor
);
virtual
~
Sensor
();
void
query
(
std
::
list
<
SensorDataStoreReading
>&
reading
,
TimeStamp
&
start
,
TimeStamp
&
end
,
QueryAggregate
aggregate
=
AGGREGATE_NONE
);
...
...
lib/src/sensor.cpp
View file @
5f69ad3b
...
...
@@ -11,7 +11,7 @@
namespace
DCDB
{
Sensor
::
Sensor
(
Connection
*
connection
,
std
::
string
publicName
)
{
Sensor
::
Sensor
(
Connection
*
connection
,
std
::
string
&
publicName
)
{
/* Initialize the SensorConfig interface */
sensorConfig
=
new
SensorConfig
(
connection
);
...
...
@@ -32,6 +32,14 @@ namespace DCDB {
return
;
}
}
Sensor
::
Sensor
(
Connection
*
connection
,
PublicSensor
&
sensor
)
{
/* Initialize the SensorConfig interface */
sensorConfig
=
new
SensorConfig
(
connection
);
this
->
connection
=
connection
;
publicSensor
=
sensor
;
}
Sensor
::~
Sensor
()
{
delete
sensorConfig
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment