[pytango] 03/483: preparing for 7.2.0

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:18 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.

commit 656740929b5b06991b4cb59cf10857c47d2a9450
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date:   Wed Mar 2 12:56:33 2011 +0000

    preparing for 7.2.0
    
    git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@15872 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
 PyTango/db.py                         | 27 ++++++++++-
 PyTango/device_class.py               |  4 +-
 PyTango/device_server.py              | 87 +++++++++++++++++++++++++++++++++--
 setup.py                              | 24 +++++++---
 src/api_util.cpp                      | 22 ++++++++-
 src/archive_event_info.cpp            |  2 +-
 src/attr_conf_event_data.cpp          |  2 +-
 src/attribute_alarm_info.cpp          |  2 +-
 src/attribute_dimension.cpp           |  2 +-
 src/attribute_event_info.cpp          |  2 +-
 src/attribute_info.cpp                |  2 +-
 src/attribute_info_ex.cpp             |  2 +-
 src/attribute_proxy.cpp               |  2 +-
 src/base_types.cpp                    |  2 +-
 src/callback.cpp                      |  2 +-
 src/change_event_info.cpp             |  2 +-
 src/command_info.cpp                  |  2 +-
 src/connection.cpp                    |  2 +-
 src/constants.cpp                     |  3 +-
 src/data_ready_event_data.cpp         |  2 +-
 src/database.cpp                      | 14 +++++-
 src/db.cpp                            |  2 +-
 src/dev_command_info.cpp              |  2 +-
 src/dev_error.cpp                     |  2 +-
 src/device_attribute.cpp              |  2 +-
 src/device_attribute.h                |  2 +-
 src/device_attribute_config.cpp       |  2 +-
 src/device_attribute_history.cpp      |  2 +-
 src/device_data.cpp                   |  2 +-
 src/device_data_history.cpp           |  2 +-
 src/device_info.cpp                   |  2 +-
 src/device_proxy.cpp                  |  2 +-
 src/enums.cpp                         |  2 +-
 src/event_data.cpp                    |  2 +-
 src/exception.cpp                     |  2 +-
 src/exception.h                       |  2 +-
 src/from_py.h                         |  2 +-
 src/group.cpp                         |  2 +-
 src/group_element.cpp                 |  2 +-
 src/group_reply.cpp                   |  2 +-
 src/group_reply_list.cpp              |  2 +-
 src/locker_info.cpp                   |  2 +-
 src/locking_thread.cpp                |  2 +-
 src/periodic_event_info.cpp           |  2 +-
 src/poll_device.cpp                   |  2 +-
 src/precompiled_header.hpp            |  3 +-
 src/pytango.cpp                       |  2 +-
 src/pytgutils.cpp                     |  2 +-
 src/pytgutils.h                       |  2 +-
 src/server/attr.cpp                   |  7 ++-
 src/server/attr.h                     |  2 +-
 src/server/attribute.cpp              |  2 +-
 src/server/attribute.h                |  2 +-
 src/server/command.cpp                |  2 +-
 src/server/command.h                  |  2 +-
 src/server/device_class.cpp           |  6 ++-
 src/server/device_class.h             |  4 +-
 src/server/device_impl.cpp            | 12 ++++-
 src/server/device_impl.h              |  2 +-
 src/server/dserver.cpp                |  2 +-
 src/server/log4tango.cpp              |  2 +-
 src/server/subdev.cpp                 |  2 +-
 src/server/tango_util.cpp             | 15 +++---
 src/server/user_default_attr_prop.cpp | 23 ++++++++-
 src/server/wattribute.cpp             |  2 +-
 src/tango_numpy.h                     |  2 +-
 src/tgutils.h                         |  2 +-
 src/time_val.cpp                      |  2 +-
 src/to_py.h                           |  2 +-
 src/version.cpp                       |  2 +-
 70 files changed, 274 insertions(+), 89 deletions(-)

diff --git a/PyTango/db.py b/PyTango/db.py
index b125e9e..f206fdb 100644
--- a/PyTango/db.py
+++ b/PyTango/db.py
@@ -925,7 +925,7 @@ def __doc_Database():
     document_method("get_access_except_errors", """
     get_access_except_errors(self) -> DevErrorList
 
-            Returns a reference to the conctrol access exceptions.
+            Returns a reference to the control access exceptions.
 
         Parameters : None
         Return     : DevErrorList
@@ -933,6 +933,31 @@ def __doc_Database():
         New in PyTango 7.0.0
     """ )
 
+    document_method("is_multi_tango_host", """
+    is_multi_tango_host(self) -> bool
+
+            Returns if in multi tango host.
+
+        Parameters : None
+        Return     : True if multi tango host or False otherwise
+
+        New in PyTango 7.2.0
+    """ )
+
+    document_method("get_file_name", """
+    get_file_name(self) -> str
+
+            Returns the database file name or throws an exception
+            if not using a file database
+
+        Parameters : None
+        Return     : a string containing the database file name
+
+        Throws     : DevFailed
+        
+        New in PyTango 7.2.0
+    """ )
+    
     document_method("get_info", """
     get_info(self) -> str
 
diff --git a/PyTango/device_class.py b/PyTango/device_class.py
index ea44caf..d877f7f 100644
--- a/PyTango/device_class.py
+++ b/PyTango/device_class.py
@@ -449,7 +449,9 @@ class DeviceClass(_DeviceClass):
         else:
             memorized = False
 
-        att_prop = self.__create_user_default_attr_prop(attr_name, extra_info)
+        att_prop = None
+        if extra_info:
+            att_prop = self.__create_user_default_attr_prop(attr_name, extra_info)
 
         self._create_attribute(attr_list, attr_name, attr_type, attr_format,
                                attr_write, dim_x, dim_y,
diff --git a/PyTango/device_server.py b/PyTango/device_server.py
index b22ea4e..e835884 100644
--- a/PyTango/device_server.py
+++ b/PyTango/device_server.py
@@ -97,7 +97,7 @@ class EventProperties(object):
         self.per_event = PeriodicEventProp()
         self.arch_event = ArchiveEventProp()
 
-def __init_attr_config(attr_cfg):
+def _init_attr_config(attr_cfg):
     """Helper function to initialize attribute config objects"""
     attr_cfg.name = ''
     attr_cfg.writable = -1
@@ -121,7 +121,7 @@ class AttributeConfig(object):
     AttributeConfig."""
     
     def __init__(self):
-        __init_attr_config(self)
+        _init_attr_config(self)
         self.min_alarm = ''
         self.max_alarm = ''
         
@@ -130,7 +130,7 @@ class AttributeConfig_2(object):
     AttributeConfig_2."""
 
     def __init__(self):
-        __init_attr_config(self)
+        _init_attr_config(self)
         self.level = -1
         self.min_alarm = ''
         self.max_alarm = ''
@@ -140,7 +140,7 @@ class AttributeConfig_3(object):
     AttributeConfig_3."""
 
     def __init__(self):
-        __init_attr_config(self)
+        _init_attr_config(self)
         self.level = -1
         self.att_alarm = AttributeAlarm()
         self.event_prop = EventProperties()
@@ -999,6 +999,39 @@ def __doc_DeviceImpl():
         
         New in PyTango 7.1.2
     """ )
+
+    document_method("get_min_poll_period", """
+    get_min_poll_period(self) -> int
+
+            Returns the min poll period
+
+        Parameters : None
+        Return     : (int) the min poll period
+        
+        New in PyTango 7.2.0
+    """ )
+
+    document_method("get_cmd_min_poll_period", """
+    get_cmd_min_poll_period(self) -> seq<str>
+
+            Returns the min command poll period
+
+        Parameters : None
+        Return     : (seq<str>) the min command poll period
+        
+        New in PyTango 7.2.0
+    """ )
+
+    document_method("get_attr_min_poll_period", """
+    get_attr_min_poll_period(self) -> seq<str>
+
+            Returns the min attribute poll period
+
+        Parameters : None
+        Return     : (seq<str>) the min attribute poll period
+        
+        New in PyTango 7.2.0
+    """ )
     
 def __doc_extra_DeviceImpl(cls):
     def document_method(method_name, desc, append=True):
@@ -1854,6 +1887,29 @@ def __doc_Attr():
         Return     : (bool) true if a archive event criteria will be checked.
     """ )
 
+    document_method("set_data_ready_event", """
+    set_data_ready_event(self, implemented) -> None
+
+            Set a flag to indicate that the server fires data ready events.
+
+        Parameters :
+            - implemented : (bool) True when the server fires data ready events
+        Return     : None
+        
+        New in PyTango 7.2.0
+    """ )
+
+    document_method("is_data_ready_event", """
+    is_data_ready_event(self) -> bool
+
+            Check if the data ready event is fired for this attribute.
+
+        Parameters : None
+        Return     : (bool) true if firing data ready event is implemented.
+        
+        New in PyTango 7.2.0
+    """ )
+
     document_method("get_name", """
     get_name(self) -> str
 
@@ -1945,6 +2001,29 @@ def __doc_Attr():
         Return     : (bool) if it is assoc
     """ )
 
+    document_method("get_cl_name", """
+    get_cl_name(self) -> str
+
+            Returns the class name
+
+        Parameters : None
+        Return     : (str) the class name
+        
+        New in PyTango 7.2.0
+    """ )
+
+    document_method("set_cl_name", """
+    set_cl_name(self, cl) -> None
+
+            Sets the class name
+
+        Parameters :
+            - cl : (str) new class name
+        Return     : None
+        
+        New in PyTango 7.2.0
+    """ )
+
     document_method("get_class_properties", """
     get_class_properties(self) -> sequence<AttrProperty>
 
diff --git a/setup.py b/setup.py
index 60fb334..55167ee 100644
--- a/setup.py
+++ b/setup.py
@@ -27,11 +27,12 @@ import platform
 
 #from ez_setup import use_setuptools
 #use_setuptools()
+
 #from setuptools import setup
 #from setuptools import Extension, Distribution
+
 from distutils.core import setup, Extension
 from distutils.dist import Distribution
-
 import distutils.sysconfig
 
 
@@ -133,12 +134,23 @@ def uniquify(seq):
     [ no_dups.append(i) for i in seq if not no_dups.count(i) ]
     return no_dups
 
-include_dirs = [
-    os.path.abspath('src'),
-    os.path.join(TANGO_ROOT, 'include'),
+#-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
+# include directories
+#-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
+
+include_dirs = [ os.path.abspath('src') ]
+
+_tango_root_inc = os.path.join(TANGO_ROOT, 'include')
+include_dirs.append(_tango_root_inc)
+
+include_dirs.extend([
     os.path.join(OMNI_ROOT, 'include'),
     os.path.join(NUMPY_ROOT, 'include'),
-]
+])
+
+#-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
+# library directories
+#-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
 
 libraries = [
         'tango',
@@ -237,7 +249,7 @@ else:
     # and then uncommenting this line. Someday maybe this will be
     # automated...
     extra_compile_args += [
-#        '-includesrc/precompiled_header.hpp',
+        '-includesrc/precompiled_header.hpp',
     ]
 
     #if not please_debug:
diff --git a/src/api_util.cpp b/src/api_util.cpp
index 7f6dfc8..91bce4b 100644
--- a/src/api_util.cpp
+++ b/src/api_util.cpp
@@ -23,12 +23,25 @@
 
 #include <boost/python.hpp>
 #include <boost/python/return_value_policy.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "pyutils.h"
 
 using namespace boost::python;
 
+namespace PyApiUtil
+{
+    inline object get_env_var(const char *name)
+    {
+        std::string value;
+        if (Tango::ApiUtil::get_env_var(name, value) == 0)
+        {
+            return str(value);
+        }
+        return object();
+    }
+};
+
 void (Tango::ApiUtil::*get_asynch_replies1)() = &Tango::ApiUtil::get_asynch_replies;
 void (Tango::ApiUtil::*get_asynch_replies2)(long) = &Tango::ApiUtil::get_asynch_replies;
 
@@ -50,5 +63,12 @@ void export_api_util()
         
         .def("set_asynch_cb_sub_model", &Tango::ApiUtil::set_asynch_cb_sub_model)
         .def("get_asynch_cb_sub_model", &Tango::ApiUtil::get_asynch_cb_sub_model)
+        
+        .def("get_env_var", &PyApiUtil::get_env_var)
+        .staticmethod("get_env_var")
+        
+        .def("is_event_consumer_created", &Tango::ApiUtil::is_event_consumer_created)
+        .def("get_user_connect_timeout", &Tango::ApiUtil::get_user_connect_timeout)
+        
     ;
 }
\ No newline at end of file
diff --git a/src/archive_event_info.cpp b/src/archive_event_info.cpp
index 45c99b8..6c75a35 100644
--- a/src/archive_event_info.cpp
+++ b/src/archive_event_info.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/attr_conf_event_data.cpp b/src/attr_conf_event_data.cpp
index d938c9d..a90b14d 100644
--- a/src/attr_conf_event_data.cpp
+++ b/src/attr_conf_event_data.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/attribute_alarm_info.cpp b/src/attribute_alarm_info.cpp
index ef5a18e..a8873b5 100644
--- a/src/attribute_alarm_info.cpp
+++ b/src/attribute_alarm_info.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/attribute_dimension.cpp b/src/attribute_dimension.cpp
index d180094..765acda 100644
--- a/src/attribute_dimension.cpp
+++ b/src/attribute_dimension.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/attribute_event_info.cpp b/src/attribute_event_info.cpp
index d51da67..5b730b6 100644
--- a/src/attribute_event_info.cpp
+++ b/src/attribute_event_info.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/attribute_info.cpp b/src/attribute_info.cpp
index 5e77cf7..2f09b03 100644
--- a/src/attribute_info.cpp
+++ b/src/attribute_info.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/attribute_info_ex.cpp b/src/attribute_info_ex.cpp
index e8cf698..f97d41a 100644
--- a/src/attribute_info_ex.cpp
+++ b/src/attribute_info_ex.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/attribute_proxy.cpp b/src/attribute_proxy.cpp
index dc3f3e4..bb28532 100644
--- a/src/attribute_proxy.cpp
+++ b/src/attribute_proxy.cpp
@@ -23,7 +23,7 @@
 
 #include <boost/python.hpp>
 #include <boost/python/return_value_policy.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 #include <string>
 
 #include "defs.h"
diff --git a/src/base_types.cpp b/src/base_types.cpp
index b384de0..0e4a51e 100644
--- a/src/base_types.cpp
+++ b/src/base_types.cpp
@@ -23,7 +23,7 @@
 
 #include <boost/python.hpp>
 #include <boost/python/suite/indexing/vector_indexing_suite.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "defs.h"
 #include "pytgutils.h"
diff --git a/src/callback.cpp b/src/callback.cpp
index 36c3421..12dc2e0 100644
--- a/src/callback.cpp
+++ b/src/callback.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 #include "pytgutils.h"
 #include "callback.h"
 #include "device_attribute.h"
diff --git a/src/change_event_info.cpp b/src/change_event_info.cpp
index dbdd364..0b551f0 100644
--- a/src/change_event_info.cpp
+++ b/src/change_event_info.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/command_info.cpp b/src/command_info.cpp
index 7a0d64a..e748e42 100644
--- a/src/command_info.cpp
+++ b/src/command_info.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/connection.cpp b/src/connection.cpp
index 18ae606..03c9245 100644
--- a/src/connection.cpp
+++ b/src/connection.cpp
@@ -23,7 +23,7 @@
 
 #include <boost/python/copy_const_reference.hpp>
 #include <boost/python/copy_non_const_reference.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "pytgutils.h"
 #include "callback.h"
diff --git a/src/constants.cpp b/src/constants.cpp
index 638f909..9ccdc54 100644
--- a/src/constants.cpp
+++ b/src/constants.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
@@ -109,6 +109,7 @@ void export_constants()
 
     consts_scope.attr("CLNT_TIMEOUT_STR") = CLNT_TIMEOUT_STR;
     consts_scope.attr("CLNT_TIMEOUT") = CLNT_TIMEOUT;
+    consts_scope.attr("NARROW_CLNT_TIMEOUT") = NARROW_CLNT_TIMEOUT;
 
     //
     // Connection and call timeout for database device
diff --git a/src/data_ready_event_data.cpp b/src/data_ready_event_data.cpp
index a45cce3..2378e15 100644
--- a/src/data_ready_event_data.cpp
+++ b/src/data_ready_event_data.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/database.cpp b/src/database.cpp
index bb4868d..b22aaeb 100644
--- a/src/database.cpp
+++ b/src/database.cpp
@@ -23,7 +23,7 @@
 
 #include <boost/python.hpp>
 #include <boost/python/return_value_policy.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 #include <string>
 
 #include "defs.h"
@@ -126,6 +126,11 @@ struct PyDatabase
         Tango::Connection *conn = static_cast<Tango::Connection *>(&self);
         return boost::python::str(conn->dev_name());
     }
+
+    //static inline boost::python::str get_file_name(Tango::Database& self)
+    //{
+    //    return boost::python::str(self.get_file_name());
+    //}
 };
 
 void export_database()
@@ -249,7 +254,12 @@ void export_database()
         .def("get_access_except_errors",
             &Tango::Database::get_access_except_errors,
             return_internal_reference<1>())
-
+        .def("is_multi_tango_host", &Tango::Database::is_multi_tango_host)
+        
+        //.def("get_file_name", &PyDatabase::get_file_name)
+        .def("get_file_name", &Tango::Database::get_file_name,
+            return_value_policy<copy_const_reference>())
+        
         //
         // General methods
         //
diff --git a/src/db.cpp b/src/db.cpp
index ca7589d..547ce8f 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "defs.h"
 #include "pytgutils.h"
diff --git a/src/dev_command_info.cpp b/src/dev_command_info.cpp
index b34735f..620b2b6 100644
--- a/src/dev_command_info.cpp
+++ b/src/dev_command_info.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/dev_error.cpp b/src/dev_error.cpp
index 50946aa..fa693f7 100644
--- a/src/dev_error.cpp
+++ b/src/dev_error.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/device_attribute.cpp b/src/device_attribute.cpp
index 5e3ecc3..8985c40 100644
--- a/src/device_attribute.cpp
+++ b/src/device_attribute.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 #include <iostream>
 #include <string>
 #include <memory>
diff --git a/src/device_attribute.h b/src/device_attribute.h
index 6b94c2b..c3fccb2 100644
--- a/src/device_attribute.h
+++ b/src/device_attribute.h
@@ -24,7 +24,7 @@
 #pragma once
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 #include <iostream>
 #include <string>
 
diff --git a/src/device_attribute_config.cpp b/src/device_attribute_config.cpp
index dd07798..87b18bc 100644
--- a/src/device_attribute_config.cpp
+++ b/src/device_attribute_config.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/device_attribute_history.cpp b/src/device_attribute_history.cpp
index 4089909..f094e27 100644
--- a/src/device_attribute_history.cpp
+++ b/src/device_attribute_history.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/device_data.cpp b/src/device_data.cpp
index 8757a8d..2265ca4 100644
--- a/src/device_data.cpp
+++ b/src/device_data.cpp
@@ -23,7 +23,7 @@
 
 #include <boost/python.hpp>
 #include <boost/mpl/if.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 #include <iostream>
 #include <string>
 
diff --git a/src/device_data_history.cpp b/src/device_data_history.cpp
index ffcbe30..a4ef60e 100644
--- a/src/device_data_history.cpp
+++ b/src/device_data_history.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/device_info.cpp b/src/device_info.cpp
index ee16d18..9db5ced 100644
--- a/src/device_info.cpp
+++ b/src/device_info.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/device_proxy.cpp b/src/device_proxy.cpp
index 654e887..56999fa 100644
--- a/src/device_proxy.cpp
+++ b/src/device_proxy.cpp
@@ -23,7 +23,7 @@
 
 #include <boost/python.hpp>
 #include <boost/python/return_value_policy.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 #include <string>
 #include <memory>
 
diff --git a/src/enums.cpp b/src/enums.cpp
index 4ae21cf..c1123df 100644
--- a/src/enums.cpp
+++ b/src/enums.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/event_data.cpp b/src/event_data.cpp
index b0fb084..d317fb8 100644
--- a/src/event_data.cpp
+++ b/src/event_data.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/exception.cpp b/src/exception.cpp
index 0090959..009879e 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -23,7 +23,7 @@
 
 #include <boost/python.hpp>
 #include <boost/python/suite/indexing/vector_indexing_suite.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 #include <iostream>
 #include <string>
 
diff --git a/src/exception.h b/src/exception.h
index cad258c..cfd94d4 100644
--- a/src/exception.h
+++ b/src/exception.h
@@ -24,7 +24,7 @@
 #pragma once
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 /**
  * Translates a seq<DevError> into a C++ DevErrorList
diff --git a/src/from_py.h b/src/from_py.h
index 3a40e1a..74cbe1a 100644
--- a/src/from_py.h
+++ b/src/from_py.h
@@ -28,7 +28,7 @@
 #if BOOST_VERSION < 103400
 #include <boost/python/detail/api_placeholder.hpp>
 #endif
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "defs.h"
 #include "tgutils.h"
diff --git a/src/group.cpp b/src/group.cpp
index fa4438c..104520c 100644
--- a/src/group.cpp
+++ b/src/group.cpp
@@ -24,7 +24,7 @@
 #include <boost/python/copy_const_reference.hpp>
 #include <boost/python/copy_non_const_reference.hpp>
 #include <boost/python/suite/indexing/vector_indexing_suite.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 #include <memory>
 
 #include "pytgutils.h"
diff --git a/src/group_element.cpp b/src/group_element.cpp
index ccf4099..2749b32 100644
--- a/src/group_element.cpp
+++ b/src/group_element.cpp
@@ -24,7 +24,7 @@
 #include <boost/python/copy_const_reference.hpp>
 #include <boost/python/copy_non_const_reference.hpp>
 #include <boost/python/suite/indexing/vector_indexing_suite.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "pytgutils.h"
 #include "device_attribute.h"
diff --git a/src/group_reply.cpp b/src/group_reply.cpp
index ce3765f..1aee356 100644
--- a/src/group_reply.cpp
+++ b/src/group_reply.cpp
@@ -24,7 +24,7 @@
 #include <boost/python/copy_const_reference.hpp>
 #include <boost/python/copy_non_const_reference.hpp>
 #include <boost/python/suite/indexing/vector_indexing_suite.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "pytgutils.h"
 #include "device_attribute.h"
diff --git a/src/group_reply_list.cpp b/src/group_reply_list.cpp
index 83ee745..27b8e4e 100644
--- a/src/group_reply_list.cpp
+++ b/src/group_reply_list.cpp
@@ -24,7 +24,7 @@
 #include <boost/python/copy_const_reference.hpp>
 #include <boost/python/copy_non_const_reference.hpp>
 #include <boost/python/suite/indexing/vector_indexing_suite.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "pytgutils.h"
 #include "device_attribute.h"
diff --git a/src/locker_info.cpp b/src/locker_info.cpp
index 7b32ae8..08c3895 100644
--- a/src/locker_info.cpp
+++ b/src/locker_info.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/locking_thread.cpp b/src/locking_thread.cpp
index de19964..7224ae5 100644
--- a/src/locking_thread.cpp
+++ b/src/locking_thread.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/periodic_event_info.cpp b/src/periodic_event_info.cpp
index e1767b5..e59ca84 100644
--- a/src/periodic_event_info.cpp
+++ b/src/periodic_event_info.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/poll_device.cpp b/src/poll_device.cpp
index 388f936..cbc83ed 100644
--- a/src/poll_device.cpp
+++ b/src/poll_device.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/precompiled_header.hpp b/src/precompiled_header.hpp
index 78ef84d..78ccb6c 100644
--- a/src/precompiled_header.hpp
+++ b/src/precompiled_header.hpp
@@ -28,5 +28,4 @@
 // We don't want to waste those seconds for each cpp file, so we
 // use this precompiled header.
 #include <boost/python.hpp>
-#include <tango.h>
-
+#include <tango/tango.h>
diff --git a/src/pytango.cpp b/src/pytango.cpp
index 35210a7..e905c78 100644
--- a/src/pytango.cpp
+++ b/src/pytango.cpp
@@ -32,7 +32,7 @@
 #   include <numpy/arrayobject.h>
 #endif
 
-#include <tango.h>
+#include <tango/tango.h>
 #include <iostream>
 #include <string>
 
diff --git a/src/pytgutils.cpp b/src/pytgutils.cpp
index a9c1c82..6319c68 100644
--- a/src/pytgutils.cpp
+++ b/src/pytgutils.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "defs.h"
 #include "pytgutils.h"
diff --git a/src/pytgutils.h b/src/pytgutils.h
index 4029f13..80e1803 100644
--- a/src/pytgutils.h
+++ b/src/pytgutils.h
@@ -24,7 +24,7 @@
 #pragma once
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "defs.h"
 #include "pyutils.h"
diff --git a/src/server/attr.cpp b/src/server/attr.cpp
index c3fbc4c..31e5d07 100644
--- a/src/server/attr.cpp
+++ b/src/server/attr.cpp
@@ -1,5 +1,5 @@
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "server/attr.h"
 
@@ -82,6 +82,8 @@ void export_attr()
         .def("set_archive_event", &Tango::Attr::set_archive_event)
         .def("is_archive_event", &Tango::Attr::is_archive_event)
         .def("is_check_archive_criteria", &Tango::Attr::is_check_archive_criteria)
+        .def("set_data_ready_event", &Tango::Attr::set_data_ready_event)
+        .def("is_data_ready_event", &Tango::Attr::is_data_ready_event)
         .def("get_name", &Tango::Attr::get_name,
             return_value_policy<copy_non_const_reference>())
         .def("get_format", &Tango::Attr::get_format)
@@ -94,6 +96,9 @@ void export_attr()
         .def("get_assoc", &Tango::Attr::get_assoc,
             return_value_policy<copy_non_const_reference>())
         .def("is_assoc", &Tango::Attr::is_assoc)
+        .def("get_cl_name", &Tango::Attr::get_cl_name,
+            return_value_policy<copy_const_reference>())
+        .def("set_cl_name", &Tango::Attr::set_cl_name)
         .def("get_class_properties", &Tango::Attr::get_class_properties,
             return_internal_reference<>())
         .def("get_user_default_properties", &Tango::Attr::get_user_default_properties,
diff --git a/src/server/attr.h b/src/server/attr.h
index 5a430aa..6281363 100644
--- a/src/server/attr.h
+++ b/src/server/attr.h
@@ -2,7 +2,7 @@
 #define _ATTR_H_
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "exception.h"
 #include "pytgutils.h"
diff --git a/src/server/attribute.cpp b/src/server/attribute.cpp
index e15ea7c..fd4329f 100644
--- a/src/server/attribute.cpp
+++ b/src/server/attribute.cpp
@@ -1,7 +1,7 @@
 #include <boost/python.hpp>
 #include <boost/python/return_value_policy.hpp>
 #include <string>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "defs.h"
 #include "pytgutils.h"
diff --git a/src/server/attribute.h b/src/server/attribute.h
index 299702f..de05479 100644
--- a/src/server/attribute.h
+++ b/src/server/attribute.h
@@ -2,7 +2,7 @@
 #define _ATTRIBUTE_H_
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 namespace PyAttribute
 {
diff --git a/src/server/command.cpp b/src/server/command.cpp
index ffdfe9a..46e2366 100644
--- a/src/server/command.cpp
+++ b/src/server/command.cpp
@@ -1,6 +1,6 @@
 #include <boost/python.hpp>
 #include <boost/python/return_value_policy.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "exception.h"
 #include "pytgutils.h"
diff --git a/src/server/command.h b/src/server/command.h
index f82f62c..3deb82b 100644
--- a/src/server/command.h
+++ b/src/server/command.h
@@ -2,7 +2,7 @@
 #define _COMMAND_H_
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 class PyCmd : public Tango::Command
 {
diff --git a/src/server/device_class.cpp b/src/server/device_class.cpp
index 85345c6..d664214 100644
--- a/src/server/device_class.cpp
+++ b/src/server/device_class.cpp
@@ -64,7 +64,7 @@ void CppDeviceClass::create_attribute(vector<Tango::Attr *> &att_list,
                                     const std::string &read_method_name,
                                     const std::string &write_method_name,
                                     const std::string &is_allowed_name,
-                                    Tango::UserDefaultAttrProp &att_prop)
+                                    Tango::UserDefaultAttrProp *att_prop)
 {
     //
     // Create the attribute objet according to attribute format
@@ -112,7 +112,9 @@ void CppDeviceClass::create_attribute(vector<Tango::Attr *> &att_list,
     py_attr_ptr->set_write_name(write_method_name);
     py_attr_ptr->set_allowed_name(is_allowed_name);
 
-    attr_ptr->set_default_properties(att_prop);
+    if (att_prop)
+        attr_ptr->set_default_properties(*att_prop);
+        
     attr_ptr->set_disp_level(display_level);
     if (memorized)
     {
diff --git a/src/server/device_class.h b/src/server/device_class.h
index da64ea3..995ec6c 100644
--- a/src/server/device_class.h
+++ b/src/server/device_class.h
@@ -2,7 +2,7 @@
 #define _DEVICE_CLASS_H_
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 class CppDeviceClass: public Tango::DeviceClass
 {
@@ -68,7 +68,7 @@ public:
                           const std::string &read_method_name,
                           const std::string &write_method_name,
                           const std::string &is_allowed_name,
-                          Tango::UserDefaultAttrProp &att_prop);
+                          Tango::UserDefaultAttrProp *att_prop);
 
     /**
      * Creates a command.
diff --git a/src/server/device_impl.cpp b/src/server/device_impl.cpp
index f52e0f6..0bad65b 100644
--- a/src/server/device_impl.cpp
+++ b/src/server/device_impl.cpp
@@ -1,7 +1,7 @@
 #include <boost/python.hpp>
 #include <boost/python/return_value_policy.hpp>
 #include <string>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "defs.h"
 #include "pytgutils.h"
@@ -1232,8 +1232,16 @@ void export_device_impl()
         .def("__warn_stream", &PyDeviceImpl::warn)
         .def("__error_stream", &PyDeviceImpl::error)
         .def("__fatal_stream", &PyDeviceImpl::fatal)
+        
+        .def("get_min_poll_period", &Tango::DeviceImpl::get_min_poll_period)
+        .def("get_cmd_min_poll_period", 
+            &Tango::DeviceImpl::get_cmd_min_poll_period,
+            return_internal_reference<>())
+        .def("get_attr_min_poll_period", 
+            &Tango::DeviceImpl::get_attr_min_poll_period,
+            return_internal_reference<>())
     ;
-
+    
     class_<Tango::Device_2Impl, Device_2ImplWrap,
            bases<Tango::DeviceImpl>,
            boost::noncopyable>
diff --git a/src/server/device_impl.h b/src/server/device_impl.h
index 43cdbb6..f52bc24 100644
--- a/src/server/device_impl.h
+++ b/src/server/device_impl.h
@@ -2,7 +2,7 @@
 #define _DEVICE_IMPL_H
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include <server/device_class.h>
 
diff --git a/src/server/dserver.cpp b/src/server/dserver.cpp
index 7478783..9bf22e5 100644
--- a/src/server/dserver.cpp
+++ b/src/server/dserver.cpp
@@ -1,5 +1,5 @@
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "to_py.h"
 #include "from_py.h"
diff --git a/src/server/log4tango.cpp b/src/server/log4tango.cpp
index 7e0e6c4..61a8c02 100644
--- a/src/server/log4tango.cpp
+++ b/src/server/log4tango.cpp
@@ -1,5 +1,5 @@
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "defs.h"
 #include "pytgutils.h"
diff --git a/src/server/subdev.cpp b/src/server/subdev.cpp
index 08449b3..044e3be 100644
--- a/src/server/subdev.cpp
+++ b/src/server/subdev.cpp
@@ -1,5 +1,5 @@
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/server/tango_util.cpp b/src/server/tango_util.cpp
index e82cbe1..e35353d 100644
--- a/src/server/tango_util.cpp
+++ b/src/server/tango_util.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 #include <iostream>
 
 #include "defs.h"
@@ -35,7 +35,7 @@ using namespace boost::python;
 
 /// @todo GET RID OF THIS!! I HATE "HERE_OLD_TANGO___"
 #ifndef WIN32
-# define HERE_OLD_TANGO___
+//# define HERE_OLD_TANGO___
 #endif
 
 #ifdef HERE_OLD_TANGO___
@@ -60,9 +60,9 @@ namespace PyUtil
         for(int i = 0; i < cl_len; ++i)
         {
             tuple class_info = extract<tuple>(cpp_class_list[i]);
-            char *class_name = extract<char *>(class_info[0]);
-            char *par_name   = extract<char *>(class_info[1]);
-            dserver->create_cpp_class(class_name, par_name);
+            const char *class_name = extract<const char *>(class_info[0]);
+            const char *par_name   = extract<const char *>(class_info[1]);
+            dserver->_create_cpp_class(class_name, par_name);
         }
 
     //
@@ -78,7 +78,7 @@ namespace PyUtil
         for(int i = 0; i < cc_len; ++i)
         {
             CppDeviceClass *cpp_dc = extract<CppDeviceClass *> (constructed_classes[i])();
-            dserver->add_class(cpp_dc);
+            dserver->_add_class(cpp_dc);
         }
     }
 
@@ -94,7 +94,8 @@ namespace PyUtil
     void server_init(Tango::Util & instance, bool with_window = false)
     {
         AutoPythonAllowThreads guard;
-        instance.set_class_factory_cb(_class_factory);
+        Tango::DServer::register_class_factory(_class_factory);
+        //instance.set_class_factory_cb(_class_factory);
         instance.server_init(with_window);
     }
 #endif
diff --git a/src/server/user_default_attr_prop.cpp b/src/server/user_default_attr_prop.cpp
index f9e03b6..9d16c1f 100644
--- a/src/server/user_default_attr_prop.cpp
+++ b/src/server/user_default_attr_prop.cpp
@@ -1,5 +1,5 @@
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
@@ -26,6 +26,27 @@ void export_user_default_attr_prop()
         .def("set_archive_abs_change", &Tango::UserDefaultAttrProp::set_archive_abs_change)
         .def("set_archive_rel_change", &Tango::UserDefaultAttrProp::set_archive_rel_change)
         .def("set_archive_period", &Tango::UserDefaultAttrProp::set_archive_period)
+        
+        .def_readwrite("label", &Tango::UserDefaultAttrProp::label)
+        .def_readwrite("description", &Tango::UserDefaultAttrProp::description)
+        .def_readwrite("unit", &Tango::UserDefaultAttrProp::unit)
+        .def_readwrite("standard_unit", &Tango::UserDefaultAttrProp::standard_unit)
+        .def_readwrite("display_unit", &Tango::UserDefaultAttrProp::display_unit)
+        .def_readwrite("format", &Tango::UserDefaultAttrProp::format)
+        .def_readwrite("min_value", &Tango::UserDefaultAttrProp::min_value)
+        .def_readwrite("max_value", &Tango::UserDefaultAttrProp::max_value)
+        .def_readwrite("min_alarm", &Tango::UserDefaultAttrProp::min_alarm)
+        .def_readwrite("max_alarm", &Tango::UserDefaultAttrProp::max_alarm)
+        .def_readwrite("min_warning", &Tango::UserDefaultAttrProp::min_warning)
+        .def_readwrite("max_warning", &Tango::UserDefaultAttrProp::max_warning)
+        .def_readwrite("delta_val", &Tango::UserDefaultAttrProp::delta_val)
+        .def_readwrite("delta_t", &Tango::UserDefaultAttrProp::delta_t)
+        .def_readwrite("abs_change", &Tango::UserDefaultAttrProp::abs_change)
+        .def_readwrite("rel_change", &Tango::UserDefaultAttrProp::rel_change)
+        .def_readwrite("period", &Tango::UserDefaultAttrProp::period)
+        .def_readwrite("archive_abs_change", &Tango::UserDefaultAttrProp::archive_abs_change)
+        .def_readwrite("archive_rel_change", &Tango::UserDefaultAttrProp::archive_rel_change)
+        .def_readwrite("archive_period", &Tango::UserDefaultAttrProp::archive_period)
     ;
 
 }
diff --git a/src/server/wattribute.cpp b/src/server/wattribute.cpp
index 1a98d22..61350ce 100644
--- a/src/server/wattribute.cpp
+++ b/src/server/wattribute.cpp
@@ -1,7 +1,7 @@
 #include <boost/python.hpp>
 #include <boost/python/return_value_policy.hpp>
 #include <string>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "defs.h"
 #include "pytgutils.h"
diff --git a/src/tango_numpy.h b/src/tango_numpy.h
index 9651514..ffe211d 100644
--- a/src/tango_numpy.h
+++ b/src/tango_numpy.h
@@ -37,7 +37,7 @@
 #      include <numpy/arrayobject.h>
 // - }
 
-#include <tgutils.h>
+#include "tgutils.h"
 
 /// @name Conversion from a Tango scalar type name to the numpy equivalent name
 /// @{
diff --git a/src/tgutils.h b/src/tgutils.h
index 4070418..b37e7ab 100644
--- a/src/tgutils.h
+++ b/src/tgutils.h
@@ -24,7 +24,7 @@
 #pragma once
 
 #include <cassert>
-#include <tango.h>
+#include <tango/tango.h>
 
 namespace Tango
 {
diff --git a/src/time_val.cpp b/src/time_val.cpp
index 8aa6958..5d74b93 100644
--- a/src/time_val.cpp
+++ b/src/time_val.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 
diff --git a/src/to_py.h b/src/to_py.h
index 8494751..323862b 100644
--- a/src/to_py.h
+++ b/src/to_py.h
@@ -24,7 +24,7 @@
 #pragma once
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 #include "defs.h"
 
diff --git a/src/version.cpp b/src/version.cpp
index 2afd411..1d03029 100644
--- a/src/version.cpp
+++ b/src/version.cpp
@@ -22,7 +22,7 @@
 *******************************************************************************/
 
 #include <boost/python.hpp>
-#include <tango.h>
+#include <tango/tango.h>
 
 using namespace boost::python;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list