From d276e475f204afc37c0fbbc0cbc0907f13f0f744 Mon Sep 17 00:00:00 2001
From: Martin Killenberg <martin.killenberg@desy.de>
Date: Mon, 27 Jan 2020 15:06:32 +0100
Subject: [PATCH] fixed TimerDummyDevice in example (was missing
 isFunctional())

---
 example/TimerDummyDevice.cc | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/example/TimerDummyDevice.cc b/example/TimerDummyDevice.cc
index 6a3933d4..edb0a3da 100644
--- a/example/TimerDummyDevice.cc
+++ b/example/TimerDummyDevice.cc
@@ -10,25 +10,22 @@ class TimerDummy : public ChimeraTK::DeviceBackendImpl {
  public:
   TimerDummy() : DeviceBackendImpl() { FILL_VIRTUAL_FUNCTION_TEMPLATE_VTABLE(getRegisterAccessor_impl); }
 
-  static boost::shared_ptr<DeviceBackend> createInstance(std::string,
-      std::string,
-      std::list<std::string>,
-      std::string) {
+  static boost::shared_ptr<DeviceBackend> createInstance(
+      std::string, std::string, std::list<std::string>, std::string) {
     return boost::shared_ptr<DeviceBackend>(new TimerDummy());
   }
 
   template<typename UserType>
   boost::shared_ptr<ChimeraTK::NDRegisterAccessor<UserType>> getRegisterAccessor_impl(
-      const ChimeraTK::RegisterPath& registerPathName,
-      size_t,
-      size_t,
-      ChimeraTK::AccessModeFlags flags);
+      const ChimeraTK::RegisterPath& registerPathName, size_t, size_t, ChimeraTK::AccessModeFlags flags);
   DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE_FILLER(TimerDummy, getRegisterAccessor_impl, 4);
 
   void open() override {}
 
   void close() override {}
 
+  bool isFunctional() const override { return true; }
+
   std::string readDeviceInfo() override { return std::string("Dummy timing device "); }
 
   /** Class to register the backend type with the factory. */
@@ -98,10 +95,7 @@ void TimerDummyRegisterAccessor<std::string>::doPostRead() {}
 
 template<typename UserType>
 boost::shared_ptr<ChimeraTK::NDRegisterAccessor<UserType>> TimerDummy::getRegisterAccessor_impl(
-    const ChimeraTK::RegisterPath& registerPathName,
-    size_t,
-    size_t,
-    ChimeraTK::AccessModeFlags flags) {
+    const ChimeraTK::RegisterPath& registerPathName, size_t, size_t, ChimeraTK::AccessModeFlags flags) {
   assert(registerPathName == "/macropulseNr");
   assert(flags.has(ChimeraTK::AccessMode::wait_for_new_data));
   flags.checkForUnknownFlags({ChimeraTK::AccessMode::wait_for_new_data});
-- 
GitLab