aboutsummaryrefslogtreecommitdiff
path: root/apps/diller_util.cpp
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2016-04-12 20:06:47 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2016-04-12 20:06:47 +0200
commit2ca532122d60cff4dbdc7f24fbc5783bcc5ad68d (patch)
tree19f9ce796886e216a608fa5e938bd2bd4f0d0b55 /apps/diller_util.cpp
parentce07550c57172443c10a66957b50085e273d20b3 (diff)
downloadble-toys-2ca532122d60cff4dbdc7f24fbc5783bcc5ad68d.tar.gz
ble-toys-2ca532122d60cff4dbdc7f24fbc5783bcc5ad68d.tar.bz2
ble-toys-2ca532122d60cff4dbdc7f24fbc5783bcc5ad68d.tar.xz
ble-toys-2ca532122d60cff4dbdc7f24fbc5783bcc5ad68d.zip
Soil Moisture: Adding support for controlling lights.
Bluetooth: refectorying, trying to be more c++ idiomatic and modern. SM/Diller: adding bluetooth to Diller bridge.
Diffstat (limited to 'apps/diller_util.cpp')
-rw-r--r--apps/diller_util.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/apps/diller_util.cpp b/apps/diller_util.cpp
new file mode 100644
index 0000000..420ebc6
--- /dev/null
+++ b/apps/diller_util.cpp
@@ -0,0 +1,19 @@
+#include "diller_util.h"
+
+#include <string>
+
+namespace trygvis {
+namespace diller {
+
+using namespace std;
+
+string diller_topic_for_property_value(const string &device, const string &property) {
+ return "/diller/" + device + "/property/" + property + "/value";
+}
+
+string diller_topic_for_property_name(const string &device, const string &property) {
+ return "/diller/" + device + "/property/" + property + "/name";
+}
+
+}; // namespace diller
+}; // namespace trygvis