Commit 215fda96 authored by Alessio Netti's avatar Alessio Netti
Browse files

libDCDB: increasing tolerance for fuzzy queries

parent e4cdfa3b
......@@ -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=10000000000);
void query(std::list<SensorDataStoreReading>& reading, TimeStamp& start, TimeStamp& end, QueryAggregate aggregate = AGGREGATE_NONE, uint64_t tol_ns=3600000000000);
private:
Connection* connection;
......
......@@ -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=10000000000);
void fuzzyQuery(std::list<SensorDataStoreReading>& result, SensorId& sid, TimeStamp& ts, uint64_t tol_ns=3600000000000);
/**
* @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=10000000000, bool storeSids=true);
void fuzzyQuery(std::list<SensorDataStoreReading>& result, std::list<SensorId>& sids, TimeStamp& ts, uint64_t tol_ns=3600000000000, bool storeSids=true);
typedef void (*QueryCbFunc)(SensorDataStoreReading& reading, void* userData);
/**
......
......@@ -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=10000000000);
void fuzzyQuery(std::list<SensorDataStoreReading>& result, SensorId& sid, TimeStamp& ts, uint64_t tol_ns=3600000000000);
/**
* @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=10000000000, bool storeSids=true);
void fuzzyQuery(std::list<SensorDataStoreReading>& result, std::list<SensorId>& sids, TimeStamp& ts, uint64_t tol_ns=3600000000000, bool storeSids=true);
/**
* @brief This function queries a sensor's values in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment