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
215fda96
Commit
215fda96
authored
Oct 12, 2020
by
Alessio Netti
Browse files
libDCDB: increasing tolerance for fuzzy queries
parent
e4cdfa3b
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib/include/dcdb/sensor.h
View file @
215fda96
...
...
@@ -47,7 +47,7 @@ namespace DCDB {
Sensor
(
DCDB
::
Connection
*
connection
,
const
std
::
string
&
publicName
);
Sensor
(
Connection
*
connection
,
const
PublicSensor
&
sensor
);
virtual
~
Sensor
();
void
query
(
std
::
list
<
SensorDataStoreReading
>&
reading
,
TimeStamp
&
start
,
TimeStamp
&
end
,
QueryAggregate
aggregate
=
AGGREGATE_NONE
,
uint64_t
tol_ns
=
1
0000000000
);
void
query
(
std
::
list
<
SensorDataStoreReading
>&
reading
,
TimeStamp
&
start
,
TimeStamp
&
end
,
QueryAggregate
aggregate
=
AGGREGATE_NONE
,
uint64_t
tol_ns
=
360
0000000000
);
private:
Connection
*
connection
;
...
...
lib/include/dcdb/sensordatastore.h
View file @
215fda96
...
...
@@ -179,7 +179,7 @@ public:
* @param ts The target timestamp.
* @param tol_ns Tolerance of the fuzzy query in nanoseconds.
*/
void
fuzzyQuery
(
std
::
list
<
SensorDataStoreReading
>&
result
,
SensorId
&
sid
,
TimeStamp
&
ts
,
uint64_t
tol_ns
=
1
0000000000
);
void
fuzzyQuery
(
std
::
list
<
SensorDataStoreReading
>&
result
,
SensorId
&
sid
,
TimeStamp
&
ts
,
uint64_t
tol_ns
=
360
0000000000
);
/**
* @brief This function performs a fuzzy query and returns the closest
...
...
@@ -192,7 +192,7 @@ public:
* @param tol_ns Tolerance of the fuzzy query in nanoseconds.
* @param storeSid If true, Sensor IDs will be retrieved for each reading.
*/
void
fuzzyQuery
(
std
::
list
<
SensorDataStoreReading
>&
result
,
std
::
list
<
SensorId
>&
sids
,
TimeStamp
&
ts
,
uint64_t
tol_ns
=
1
0000000000
,
bool
storeSids
=
true
);
void
fuzzyQuery
(
std
::
list
<
SensorDataStoreReading
>&
result
,
std
::
list
<
SensorId
>&
sids
,
TimeStamp
&
ts
,
uint64_t
tol_ns
=
360
0000000000
,
bool
storeSids
=
true
);
typedef
void
(
*
QueryCbFunc
)(
SensorDataStoreReading
&
reading
,
void
*
userData
);
/**
...
...
lib/include_internal/sensordatastore_internal.h
View file @
215fda96
...
...
@@ -151,7 +151,7 @@ public:
* @param ts The target timestamp.
* @param tol_ns Tolerance of the fuzzy query in nanoseconds.
*/
void
fuzzyQuery
(
std
::
list
<
SensorDataStoreReading
>&
result
,
SensorId
&
sid
,
TimeStamp
&
ts
,
uint64_t
tol_ns
=
1
0000000000
);
void
fuzzyQuery
(
std
::
list
<
SensorDataStoreReading
>&
result
,
SensorId
&
sid
,
TimeStamp
&
ts
,
uint64_t
tol_ns
=
360
0000000000
);
/**
* @brief This function performs a fuzzy query and returns the closest
...
...
@@ -164,7 +164,7 @@ public:
* @param tol_ns Tolerance of the fuzzy query in nanoseconds.
* @param storeSid If true, Sensor IDs will be retrieved for each reading.
*/
void
fuzzyQuery
(
std
::
list
<
SensorDataStoreReading
>&
result
,
std
::
list
<
SensorId
>&
sids
,
TimeStamp
&
ts
,
uint64_t
tol_ns
=
1
0000000000
,
bool
storeSids
=
true
);
void
fuzzyQuery
(
std
::
list
<
SensorDataStoreReading
>&
result
,
std
::
list
<
SensorId
>&
sids
,
TimeStamp
&
ts
,
uint64_t
tol_ns
=
360
0000000000
,
bool
storeSids
=
true
);
/**
* @brief This function queries a sensor's values in
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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