[pytango] 68/483: added experimental fire_change_event
Sandor Bodo-Merle
sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:25 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 225d59d74b86d97ceb5e50b56ee7c3e74faf9508
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date: Mon Nov 28 15:45:37 2011 +0000
added experimental fire_change_event
git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@18503 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
src/server/attribute.cpp | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/src/server/attribute.cpp b/src/server/attribute.cpp
index 232e47e..29a12f3 100644
--- a/src/server/attribute.cpp
+++ b/src/server/attribute.cpp
@@ -432,6 +432,28 @@ namespace PyAttribute
Tango::DeviceImpl *dev_ptr = extract<Tango::DeviceImpl*>(dev);
att.set_properties(tg_attr_cfg, dev_ptr);
}
+
+ inline void fire_change_event(Tango::Attribute &self)
+ {
+ self.fire_change_event();
+ }
+
+ inline void fire_change_event(Tango::Attribute &self, object &data)
+ {
+ boost::python::extract<Tango::DevFailed> except_convert(data);
+ if (except_convert.check()) {
+ self.fire_change_event(
+ const_cast<Tango::DevFailed*>( &except_convert() ));
+ return;
+ }
+ TangoSys_OMemStream o;
+ o << "Wrong Python argument type for attribute " << self.get_name()
+ << ". Expected a DevFailed." << ends;
+ Tango::Except::throw_exception(
+ "PyDs_WrongPythonDataTypeForAttribute",
+ o.str(),
+ "fire_change_event()");
+ }
};
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(set_quality_overloads,
@@ -540,5 +562,12 @@ void export_attribute()
.def("_set_properties", &PyAttribute::set_properties)
.def("_set_properties_3", &PyAttribute::set_properties_3)
- ;
+
+ .def("fire_change_event",
+ (void (*) (Tango::Attribute &))
+ &PyAttribute::fire_change_event)
+ .def("fire_change_event",
+ (void (*) (Tango::Attribute &, boost::python::object &))
+ &PyAttribute::fire_change_event)
+ ;
}
--
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