From 2c1a508c304ac8b3109b46ff524ec02e71829a3f Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 14 Oct 2021 23:58:34 +0200 Subject: Extended client by adding sample state mutation to daemon and lib --- library/include/hwd.h | 2 ++ library/src/library.cpp | 10 ++++++++++ 2 files changed, 12 insertions(+) (limited to 'library') diff --git a/library/include/hwd.h b/library/include/hwd.h index afb7b20..197b44b 100644 --- a/library/include/hwd.h +++ b/library/include/hwd.h @@ -3,4 +3,6 @@ namespace hwd { void stop_server(); +void set_value(int value); +int get_value(); } diff --git a/library/src/library.cpp b/library/src/library.cpp index 4691849..73f40f9 100644 --- a/library/src/library.cpp +++ b/library/src/library.cpp @@ -16,4 +16,14 @@ void stop_server() get_client().call("stop_server"); } +void set_value(const int value) +{ + get_client().call("set_value", value); +} + +int get_value() +{ + return get_client().call("get_value").as(); +} + } // namespace hwd -- cgit v1.1