Loading src/include/tango/server/AutoTangoMonitor.h +0 −23 Original line number Diff line number Diff line Loading @@ -45,29 +45,6 @@ class AutoTangoMonitor omni_thread::ensure_self auto_self; }; //--------------------------------------------------------------------------------------------------------------------- // // class : // NoSyncModelTangoMonitor // // description : // This class is only a helper class used to get a TangoMonitor object during its construction and to // it during its destruction only if the device server process is in NO_SYNC synchronisation model // //-------------------------------------------------------------------------------------------------------------------- class NoSyncModelTangoMonitor { public: NoSyncModelTangoMonitor(Tango::DeviceImpl *dev); ~NoSyncModelTangoMonitor(); private: TangoMonitor *mon; omni_thread::ensure_self auto_self; }; } // namespace Tango #endif /* AUTO_TANGO_MONITOR */ src/include/tango/server/CMakeLists.txt +2 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,8 @@ set(SERVER_HEADERS UserDefaultAttrProp.h KillThread.h MultiAttribute.h MultiAttrProp.h NoSyncModelTangoMonitor.h NotifdEventSupplier.h UserDefaultPipeProp.h UserDefaultFwdAttrProp.h PollObj.h Loading src/include/tango/server/DeviceImpl.h +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include <tango/server/ImageAttr.h> #include <tango/server/MultiAttribute.h> #include <tango/server/MultiClassAttribute.h> #include <tango/server/NoSyncModelTangoMonitor.h> #include <tango/server/PipeProperty.h> #include <tango/server/PollObj.h> #include <tango/server/SpectrumAttr.h> Loading src/include/tango/server/NoSyncModelTangoMonitor.h 0 → 100644 +42 −0 Original line number Diff line number Diff line /* * SPDX-FileCopyrightText: 2004 Copyright contributors to the cppTango project * * SPDX-License-Identifier: LGPL-3.0-or-later */ #ifndef TANGO_SERVER_NOSYNCMODELTANGOMONITOR_H #define TANGO_SERVER_NOSYNCMODELTANGOMONITOR_H #include <tango/common/omnithread_wrapper.h> namespace Tango { class DeviceImpl; class TangoMonitor; //--------------------------------------------------------------------------------------------------------------------- // // class : // NoSyncModelTangoMonitor // // description : // This class is only a helper class used to get a TangoMonitor object during its construction and to // it during its destruction only if the device server process is in NO_SYNC synchronisation model // //-------------------------------------------------------------------------------------------------------------------- class NoSyncModelTangoMonitor { public: NoSyncModelTangoMonitor(Tango::DeviceImpl *dev); ~NoSyncModelTangoMonitor(); private: TangoMonitor *mon; omni_thread::ensure_self auto_self; }; } // namespace Tango #endif /* AUTO_TANGO_MONITOR */ src/server/AutoTangoMonitor.cpp +0 −32 Original line number Diff line number Diff line Loading @@ -103,36 +103,4 @@ AutoTangoMonitor::AutoTangoMonitor(const std::shared_ptr<Tango::TangoMonitor> &m { } //--------------------------------------------------------------------------------------------------------------- // // class : // NoSyncModelTangoMonitor // // description : // This class is only a helper class used to get a TangoMonitor object during its construction and to // it during its destruction only if the device server process is in NO_SYNC synchronisation model // //--------------------------------------------------------------------------------------------------------------- NoSyncModelTangoMonitor::NoSyncModelTangoMonitor(Tango::DeviceImpl *dev) { SerialModel ser = Util::instance()->get_serial_model(); if(ser == NO_SYNC) { mon = &(dev->only_one); mon->get_monitor(); } else { mon = nullptr; } } NoSyncModelTangoMonitor::~NoSyncModelTangoMonitor() { if(mon != nullptr) { mon->rel_monitor(); } } } // namespace Tango Loading
src/include/tango/server/AutoTangoMonitor.h +0 −23 Original line number Diff line number Diff line Loading @@ -45,29 +45,6 @@ class AutoTangoMonitor omni_thread::ensure_self auto_self; }; //--------------------------------------------------------------------------------------------------------------------- // // class : // NoSyncModelTangoMonitor // // description : // This class is only a helper class used to get a TangoMonitor object during its construction and to // it during its destruction only if the device server process is in NO_SYNC synchronisation model // //-------------------------------------------------------------------------------------------------------------------- class NoSyncModelTangoMonitor { public: NoSyncModelTangoMonitor(Tango::DeviceImpl *dev); ~NoSyncModelTangoMonitor(); private: TangoMonitor *mon; omni_thread::ensure_self auto_self; }; } // namespace Tango #endif /* AUTO_TANGO_MONITOR */
src/include/tango/server/CMakeLists.txt +2 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,8 @@ set(SERVER_HEADERS UserDefaultAttrProp.h KillThread.h MultiAttribute.h MultiAttrProp.h NoSyncModelTangoMonitor.h NotifdEventSupplier.h UserDefaultPipeProp.h UserDefaultFwdAttrProp.h PollObj.h Loading
src/include/tango/server/DeviceImpl.h +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include <tango/server/ImageAttr.h> #include <tango/server/MultiAttribute.h> #include <tango/server/MultiClassAttribute.h> #include <tango/server/NoSyncModelTangoMonitor.h> #include <tango/server/PipeProperty.h> #include <tango/server/PollObj.h> #include <tango/server/SpectrumAttr.h> Loading
src/include/tango/server/NoSyncModelTangoMonitor.h 0 → 100644 +42 −0 Original line number Diff line number Diff line /* * SPDX-FileCopyrightText: 2004 Copyright contributors to the cppTango project * * SPDX-License-Identifier: LGPL-3.0-or-later */ #ifndef TANGO_SERVER_NOSYNCMODELTANGOMONITOR_H #define TANGO_SERVER_NOSYNCMODELTANGOMONITOR_H #include <tango/common/omnithread_wrapper.h> namespace Tango { class DeviceImpl; class TangoMonitor; //--------------------------------------------------------------------------------------------------------------------- // // class : // NoSyncModelTangoMonitor // // description : // This class is only a helper class used to get a TangoMonitor object during its construction and to // it during its destruction only if the device server process is in NO_SYNC synchronisation model // //-------------------------------------------------------------------------------------------------------------------- class NoSyncModelTangoMonitor { public: NoSyncModelTangoMonitor(Tango::DeviceImpl *dev); ~NoSyncModelTangoMonitor(); private: TangoMonitor *mon; omni_thread::ensure_self auto_self; }; } // namespace Tango #endif /* AUTO_TANGO_MONITOR */
src/server/AutoTangoMonitor.cpp +0 −32 Original line number Diff line number Diff line Loading @@ -103,36 +103,4 @@ AutoTangoMonitor::AutoTangoMonitor(const std::shared_ptr<Tango::TangoMonitor> &m { } //--------------------------------------------------------------------------------------------------------------- // // class : // NoSyncModelTangoMonitor // // description : // This class is only a helper class used to get a TangoMonitor object during its construction and to // it during its destruction only if the device server process is in NO_SYNC synchronisation model // //--------------------------------------------------------------------------------------------------------------- NoSyncModelTangoMonitor::NoSyncModelTangoMonitor(Tango::DeviceImpl *dev) { SerialModel ser = Util::instance()->get_serial_model(); if(ser == NO_SYNC) { mon = &(dev->only_one); mon->get_monitor(); } else { mon = nullptr; } } NoSyncModelTangoMonitor::~NoSyncModelTangoMonitor() { if(mon != nullptr) { mon->rel_monitor(); } } } // namespace Tango