aboutsummaryrefslogtreecommitdiff
path: root/sensor
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-03-22 17:29:35 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2015-03-22 17:29:35 +0100
commitd7d545575250f616f0b9e2243e08544ab2794a03 (patch)
tree3ac666251499b8b665d82681920f1afee645cb51 /sensor
parentaad1eaa291460509a5cf94092609ae22ebef5494 (diff)
downloadble-toys-d7d545575250f616f0b9e2243e08544ab2794a03.tar.gz
ble-toys-d7d545575250f616f0b9e2243e08544ab2794a03.tar.bz2
ble-toys-d7d545575250f616f0b9e2243e08544ab2794a03.tar.xz
ble-toys-d7d545575250f616f0b9e2243e08544ab2794a03.zip
o Renaming trygvis::soil_moisture to trygvis::sample.
Diffstat (limited to 'sensor')
-rw-r--r--sensor/CMakeLists.txt5
-rw-r--r--sensor/include/trygvis/SensorSample.h (renamed from sensor/include/SensorSample.h)8
-rw-r--r--sensor/main/SensorSample.cpp6
3 files changed, 8 insertions, 11 deletions
diff --git a/sensor/CMakeLists.txt b/sensor/CMakeLists.txt
index 5d7612f..7cee42b 100644
--- a/sensor/CMakeLists.txt
+++ b/sensor/CMakeLists.txt
@@ -1,5 +1,8 @@
+file(GLOB INCLUDES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/*.h)
+
add_library(trygvis-sensor
- main/SensorSample.cpp)
+ main/SensorSample.cpp
+ ${INCLUDES})
include_directories("${PROJECT_SOURCE_DIR}/json/src")
include_directories(include)
diff --git a/sensor/include/SensorSample.h b/sensor/include/trygvis/SensorSample.h
index 386296a..438e2ae 100644
--- a/sensor/include/SensorSample.h
+++ b/sensor/include/trygvis/SensorSample.h
@@ -1,5 +1,4 @@
-#ifndef SOIL_MOISTURE_IO_H
-#define SOIL_MOISTURE_IO_H
+#pragma once
#include <ostream>
#include <vector>
@@ -12,9 +11,8 @@
#include <functional>
#include <mutex>
-// TODO: rename to trygvis::sample
namespace trygvis {
-namespace soil_moisture {
+namespace sensor {
using namespace std;
using namespace boost::asio;
@@ -423,5 +421,3 @@ public:
}
}
-
-#endif
diff --git a/sensor/main/SensorSample.cpp b/sensor/main/SensorSample.cpp
index 6ec6dfc..5f0e9c6 100644
--- a/sensor/main/SensorSample.cpp
+++ b/sensor/main/SensorSample.cpp
@@ -1,4 +1,4 @@
-#include "SensorSample.h"
+#include "trygvis/SensorSample.h"
#include "json.hpp"
#include <set>
@@ -6,7 +6,7 @@
#include <chrono>
namespace trygvis {
-namespace soil_moisture {
+namespace sensor {
using namespace std;
using json = nlohmann::json;
@@ -441,11 +441,9 @@ unique_ptr<SampleOutputStream> open_sample_output_stream(
}
}
-//template<typename T>
ThreadSafeSampleOutputStream::ThreadSafeSampleOutputStream(unique_ptr<SampleOutputStream> underlying) : underlying(move(underlying)) {
}
-//template<typename T>
void ThreadSafeSampleOutputStream::write(SampleRecord const &sample) {
std::unique_lock<std::mutex> lock(mutex);