[SCM] TANGO distributed control system. branch, master, updated. debian/6.1.1c-1-71-g94cbbcf

Frédéric-Emmanuel PICCA picca at synchrotron-soleil.fr
Wed Oct 13 09:50:40 UTC 2010


The following commit has been merged in the master branch:
commit f60e90c49aaf2e3cb0a0f35c8c5f56f573e6be46
Author: Frédéric-Emmanuel PICCA <picca at synchrotron-soleil.fr>
Date:   Wed Oct 13 11:02:57 2010 +0200

    Imported Upstream version 7.2.0~rc2

diff --git a/Makefile.am b/Makefile.am
index 9971605..0c00a47 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,7 @@
 SUBDIRS = lib utils cppserver scripts doc 
 
 if TANGO_JAVA_ENABLED
-SUBDIRS += templates
+SUBDIRS += pogo
 endif
 
 ACLOCAL_AMFLAGS = -I m4
diff --git a/Makefile.in b/Makefile.in
index bb48308..a39700d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -33,12 +33,14 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
- at TANGO_JAVA_ENABLED_TRUE@am__append_1 = templates
+ at TANGO_JAVA_ENABLED_TRUE@am__append_1 = pogo
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in $(srcdir)/ac_config.h.tmp.in \
 	$(top_srcdir)/configure \
-	$(top_srcdir)/templates/pogo/cpp/Makefile.in AUTHORS COPYING \
+	$(top_srcdir)/pogo/preferences/Pogo.site_properties.in \
+	$(top_srcdir)/pogo/preferences/tango.opt.in \
+	$(top_srcdir)/pogo/templates/cpp/Makefile.in AUTHORS COPYING \
 	COPYING.LESSER ChangeLog INSTALL NEWS config/config.guess \
 	config/config.sub config/depcomp config/install-sh \
 	config/ltmain.sh config/missing install-sh missing \
@@ -64,7 +66,9 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = ac_config.h.tmp
-CONFIG_CLEAN_FILES = templates/pogo/cpp/Makefile
+CONFIG_CLEAN_FILES = pogo/preferences/tango.opt \
+	pogo/preferences/Pogo.site_properties \
+	pogo/templates/cpp/Makefile
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -78,7 +82,7 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
 ETAGS = etags
 CTAGS = ctags
-DIST_SUBDIRS = lib utils cppserver scripts doc templates
+DIST_SUBDIRS = lib utils cppserver scripts doc pogo
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -348,7 +352,11 @@ $(srcdir)/ac_config.h.tmp.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
 
 distclean-hdr:
 	-rm -f ac_config.h.tmp stamp-h1
-templates/pogo/cpp/Makefile: $(top_builddir)/config.status $(top_srcdir)/templates/pogo/cpp/Makefile.in
+pogo/preferences/tango.opt: $(top_builddir)/config.status $(top_srcdir)/pogo/preferences/tango.opt.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+pogo/preferences/Pogo.site_properties: $(top_builddir)/config.status $(top_srcdir)/pogo/preferences/Pogo.site_properties.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+pogo/templates/cpp/Makefile: $(top_builddir)/config.status $(top_srcdir)/pogo/templates/cpp/Makefile.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 
 mostlyclean-libtool:
diff --git a/README b/README
index 5006fdf..d6882ed 100644
--- a/README
+++ b/README
@@ -2,7 +2,7 @@
 		==============================================
 			Jens Meyer (meyer at esrf.fr) - Emmanuel Taurel (taurel at esrf.fr)
 			-------------------------------------------------------------
-			        01/10/2010
+			        11/10/2010
 
 
 TABLE OF CONTENTS
@@ -37,13 +37,14 @@ runs on Windows but the Makefile don't.
 Tango 7 and above is compliant to the 64 bit architecture.
 
 This package is foreseen (and was tested) to run with omniORB4.1.4 and
-Java 1.5
+Java 1.6
 
-The Pogo application in this package can generate source code
-for C++, Java and Python device servers.
+The default Pogo application in this package can generate source code
+for C++. The old Pogo application is also provided to
+generate Java and Python device servers.
 
 The database server delivered with this package do not force the MySQL
-user to be root any more. You have to use the my.cnf configuration files
+user to be root. You have to use the my.cnf configuration files
 or the MYSQL_USER and MYSQL_PASSWORD environment variables to specify
 the MySQL account to be used by the database server.
 
@@ -51,7 +52,7 @@ The TangoTest device server delivered with this package is an example
 implementation of all possible Tango data types. 
 The displayed data is animated what creates some CPU load 
 when running the server. Starting an atkpanel (generic Tango client)
-on a device of this server is very CPU and memory consuming, because
+on a device of this server is CPU and memory consuming, because
 all possible data is read and displayed.
 
 In the case of upgrading an alreay running Tango system, please follow
@@ -402,7 +403,37 @@ To test wether the TANGO build worked do the following :
 7 - UPDATING FROM PREVIOUS TANGO RELEASES
 -----------------------------------------
 
-7-1 - UPDATING FROM A TANGO 6 DATABASE
+WARNINGS: 
+To update the Tango database, the distribution provides some scripts.
+The "make install" command will create these database related scripts in
+<install_dir>/share/tango/db ONLY if the mysql database connection test
+done at configure time is successfull ("database schema create" reported
+as yes at the end of the configure script execution)
+
+
+7-1 - UPDATING FROM A TANGO 7.1 DATABASE
+--------------------------------------
+
+Tango 7.2 is provided with a small update of the data in the database. This is simply a new
+release of the stored procedure. It has been reported that with some MySQL release,
+the stored procedure does not work correctly. This update is provided to
+solve this problem.
+
+To update your database, follow these instructions:
+
+a - Stop your control system and your database server(s)
+
+b - Backup your database (Recommended, not mandatory)
+
+c - Cd to the <install_dir>/share/tango/db directory
+
+d - Run the update script:
+	./update_db.sh
+	
+e - Restart your database server(s)
+
+
+7-2 - UPDATING FROM A TANGO 6 DATABASE
 --------------------------------------
 
 Tango 7 needs a very small update of the data in the database. This is simply some new
@@ -417,11 +448,11 @@ b - Backup your database (Recommended, not mandatory)
 c - Cd to the <install_dir>/share/tango/db directory
 
 d - Run the update script:
-	mysql -u[user] -p[password] < ./update_db.sql
+	mysql -u[user] -p[password] < ./update_db6.sql
 	
 e - Restart your database server(s)
 
-7-2 - UPDATING FROM A TANGO 5 DATABASE
+7-3 - UPDATING FROM A TANGO 5 DATABASE
 --------------------------------------
 
 Tango 7 needs an updated database schema to run the database server
@@ -532,17 +563,27 @@ Changes between Tango distribution 7.1.1 and 7.2.0
 --------------------------------------------------
 
 - Added tango_admin								Release 1.0
-- Updated database device server				Release
+- Updated database device server				Release 4.8
 - Updated TangoAccessControl device server		Release 1.5
 - Updated TangoTest to 							Release 1.4.4
 - Updated ATKCore and ATKWidget to				Release 4.2.0
+- Updated atkpanel to							Release 4.3
 - Updated Jive to								Release 4.10
-- Updated Pogo									Release
+- Updated Pogo									Release 7.0
 - Updated Astor to								Release 5.2.9
 - Updated TangORB to							Release 7.3.5
 - Updated Starter to							Release 4.14
 
 - Fix SourceForge bugs number 3000308 - 3000310 - 3000329
+- After installation, the doc and man folders are now under the "share" folder
+- A new doc/src folder added in the source package. This folder contains all the
+necessary files (lyx format) to generate the Tango bible (tango.pdf).
+If lyx is installed on your computer, to re-generate the bible, go to doc/src
+and type " lyx -e pdf tango.lyx"
+- Pogo release 6 and 7 are available in this release. If you want to start
+pogo release 6, simply use the pogo-6 script available in the bin directory after
+the install
+- After installation, all Pogo code generation related files are in a pogo directory 
 
 
 Changes between Tango distribution 7.0.2 and 7.1.1
diff --git a/TANGO_CHANGES b/TANGO_CHANGES
index 8e73f83..41efb8f 100644
--- a/TANGO_CHANGES
+++ b/TANGO_CHANGES
@@ -2,7 +2,7 @@ TANGO history file
 
 
                *******************************************************
-               *                                                   	 *
+               *                                                     *
                *  Tango release 7.2.0 : Changes since version 7.1.1  *
                *                                                     *
                *******************************************************
@@ -70,7 +70,7 @@ Bugs recorded in SourceForge
 - 3019067 : Dead lock in device server
 - 3033465 : File name for device server using database in a file
 - 3068607 : Memory leak for scalar, R/W string attribute
-
+- 3079309 : Wrong error messages
 - 3080885 : Double free for some DB calls in case of communication problem
 
 Bugs not recorded in SourceForge (Shame on us)
diff --git a/configure b/configure
index 4e26be5..e720601 100755
--- a/configure
+++ b/configure
@@ -20934,7 +20934,7 @@ ac_config_commands="$ac_config_commands ac_config.h"
 subdirs="$subdirs lib/cpp/log4tango"
 
 
-ac_config_files="$ac_config_files Makefile lib/Makefile lib/idl/Makefile lib/cpp/tango.pc lib/cpp/Makefile lib/cpp/server/Makefile lib/cpp/server/idl/Makefile lib/cpp/server/jpeg/Makefile lib/cpp/client/Makefile lib/cpp/client/helpers/Makefile cppserver/Makefile cppserver/database/Makefile cppserver/database/create_db.sql cppserver/database/create_db.sh cppserver/database/my.cnf cppserver/database/stored_proc.sql cppserver/database/create_db_tables.sql cppserver/database/update_db.sql cppserver/database/update_db5.sql cppserver/starter/Makefile cppserver/tangotest/Makefile cppserver/AbstractClass/Makefile cppserver/tangoaccesscontrol/Makefile utils/Makefile utils/notifd2db/Makefile utils/tango_admin/Makefile scripts/Makefile scripts/jive scripts/logviewer scripts/TangoVers scripts/astor scripts/atkpanel scripts/atktuning scripts/pogo scripts/cvstag scripts/tg_devtest scripts/tango scripts/tango_wca scripts/devicetree scripts/jdraw scripts/synopticappli scripts/atkmoni scripts/notify_daemon doc/Makefile doc/man/Makefile templates/Makefile templates/pogo/cpp/Makefile"
+ac_config_files="$ac_config_files Makefile lib/Makefile lib/idl/Makefile lib/cpp/tango.pc lib/cpp/Makefile lib/cpp/server/Makefile lib/cpp/server/idl/Makefile lib/cpp/server/jpeg/Makefile lib/cpp/client/Makefile lib/cpp/client/helpers/Makefile cppserver/Makefile cppserver/database/Makefile cppserver/database/create_db.sql cppserver/database/create_db.sh cppserver/database/my.cnf cppserver/database/stored_proc.sql cppserver/database/create_db_tables.sql cppserver/database/update_db.sh cppserver/database/update_db5.sql cppserver/database/update_db6.sql cppserver/starter/Makefile cppserver/tangotest/Makefile cppserver/AbstractClass/Makefile cppserver/tangoaccesscontrol/Makefile utils/Makefile utils/notifd2db/Makefile utils/tango_admin/Makefile scripts/Makefile scripts/jive scripts/logviewer scripts/TangoVers scripts/astor scripts/atkpanel scripts/atktuning scripts/pogo-6 scripts/pogo scripts/cvstag scripts/tg_devtest scripts/tango scripts/tango_wca scripts/devicetree scripts/jdraw scripts/synopticappli scripts/atkmoni scripts/notify_daemon doc/Makefile doc/man/Makefile pogo/preferences/tango.opt pogo/preferences/Pogo.site_properties pogo/Makefile pogo/templates/Makefile pogo/templates/cpp/Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -21976,8 +21976,9 @@ do
     "cppserver/database/my.cnf") CONFIG_FILES="$CONFIG_FILES cppserver/database/my.cnf" ;;
     "cppserver/database/stored_proc.sql") CONFIG_FILES="$CONFIG_FILES cppserver/database/stored_proc.sql" ;;
     "cppserver/database/create_db_tables.sql") CONFIG_FILES="$CONFIG_FILES cppserver/database/create_db_tables.sql" ;;
-    "cppserver/database/update_db.sql") CONFIG_FILES="$CONFIG_FILES cppserver/database/update_db.sql" ;;
+    "cppserver/database/update_db.sh") CONFIG_FILES="$CONFIG_FILES cppserver/database/update_db.sh" ;;
     "cppserver/database/update_db5.sql") CONFIG_FILES="$CONFIG_FILES cppserver/database/update_db5.sql" ;;
+    "cppserver/database/update_db6.sql") CONFIG_FILES="$CONFIG_FILES cppserver/database/update_db6.sql" ;;
     "cppserver/starter/Makefile") CONFIG_FILES="$CONFIG_FILES cppserver/starter/Makefile" ;;
     "cppserver/tangotest/Makefile") CONFIG_FILES="$CONFIG_FILES cppserver/tangotest/Makefile" ;;
     "cppserver/AbstractClass/Makefile") CONFIG_FILES="$CONFIG_FILES cppserver/AbstractClass/Makefile" ;;
@@ -21992,6 +21993,7 @@ do
     "scripts/astor") CONFIG_FILES="$CONFIG_FILES scripts/astor" ;;
     "scripts/atkpanel") CONFIG_FILES="$CONFIG_FILES scripts/atkpanel" ;;
     "scripts/atktuning") CONFIG_FILES="$CONFIG_FILES scripts/atktuning" ;;
+    "scripts/pogo-6") CONFIG_FILES="$CONFIG_FILES scripts/pogo-6" ;;
     "scripts/pogo") CONFIG_FILES="$CONFIG_FILES scripts/pogo" ;;
     "scripts/cvstag") CONFIG_FILES="$CONFIG_FILES scripts/cvstag" ;;
     "scripts/tg_devtest") CONFIG_FILES="$CONFIG_FILES scripts/tg_devtest" ;;
@@ -22004,8 +22006,11 @@ do
     "scripts/notify_daemon") CONFIG_FILES="$CONFIG_FILES scripts/notify_daemon" ;;
     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
     "doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/Makefile" ;;
-    "templates/Makefile") CONFIG_FILES="$CONFIG_FILES templates/Makefile" ;;
-    "templates/pogo/cpp/Makefile") CONFIG_FILES="$CONFIG_FILES templates/pogo/cpp/Makefile" ;;
+    "pogo/preferences/tango.opt") CONFIG_FILES="$CONFIG_FILES pogo/preferences/tango.opt" ;;
+    "pogo/preferences/Pogo.site_properties") CONFIG_FILES="$CONFIG_FILES pogo/preferences/Pogo.site_properties" ;;
+    "pogo/Makefile") CONFIG_FILES="$CONFIG_FILES pogo/Makefile" ;;
+    "pogo/templates/Makefile") CONFIG_FILES="$CONFIG_FILES pogo/templates/Makefile" ;;
+    "pogo/templates/cpp/Makefile") CONFIG_FILES="$CONFIG_FILES pogo/templates/cpp/Makefile" ;;
 
   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -23855,8 +23860,6 @@ build:
 Please check whether the configuration I detected matches what you
 would like to have.
 
-ATTENTION: To run the new database server you must have MySQL 5.x installed
-           and to update your database schema with the update_db.sql script!
 " >&5
 $as_echo "
 Configuration ($PACKAGE):
@@ -23885,6 +23888,4 @@ build:
 Please check whether the configuration I detected matches what you
 would like to have.
 
-ATTENTION: To run the new database server you must have MySQL 5.x installed
-           and to update your database schema with the update_db.sql script!
 " >&6; }
diff --git a/configure.in b/configure.in
index e39cbfe..4046a52 100644
--- a/configure.in
+++ b/configure.in
@@ -405,8 +405,9 @@ AC_OUTPUT(Makefile
 	  cppserver/database/my.cnf
 	  cppserver/database/stored_proc.sql
 	  cppserver/database/create_db_tables.sql
-	  cppserver/database/update_db.sql
+	  cppserver/database/update_db.sh
 	  cppserver/database/update_db5.sql
+	  cppserver/database/update_db6.sql
 	  cppserver/starter/Makefile
   	  cppserver/tangotest/Makefile
 	  cppserver/AbstractClass/Makefile
@@ -421,6 +422,7 @@ AC_OUTPUT(Makefile
 	  scripts/astor
 	  scripts/atkpanel
 	  scripts/atktuning
+	  scripts/pogo-6
 	  scripts/pogo
 	  scripts/cvstag
 	  scripts/tg_devtest
@@ -433,8 +435,11 @@ AC_OUTPUT(Makefile
 	  scripts/notify_daemon
   	  doc/Makefile
 	  doc/man/Makefile
-	  templates/Makefile
-	  templates/pogo/cpp/Makefile)
+	  pogo/preferences/tango.opt
+	  pogo/preferences/Pogo.site_properties
+	  pogo/Makefile
+	  pogo/templates/Makefile
+	  pogo/templates/cpp/Makefile)
 
 
 AC_MSG_RESULT([
@@ -464,6 +469,4 @@ build:
 Please check whether the configuration I detected matches what you
 would like to have.
 
-ATTENTION: To run the new database server you must have MySQL 5.x installed
-           and to update your database schema with the update_db.sql script!	
 ])
diff --git a/cppserver/database/ClassFactory.cpp b/cppserver/database/ClassFactory.cpp
index 080c7db..821ac84 100644
--- a/cppserver/database/ClassFactory.cpp
+++ b/cppserver/database/ClassFactory.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/ClassFactory.cpp,v 2.19 2007/11/06 07:24:05 taurel Exp $";
+static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/ClassFactory.cpp,v 2.20 2010/09/21 11:43:20 taurel Exp $";
 //+=============================================================================
 //
 // file :        ClassFactory.cpp
@@ -12,9 +12,32 @@ static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/Cla
 //
 // $Author: taurel $
 //
-// $Revision: 2.19 $
+// Copyright (C) :      2004,2005,2006,2007,2008,2009,2010
+//						European Synchrotron Radiation Facility
+//                      BP 220, Grenoble 38043
+//                      FRANCE
+//
+// This file is part of Tango.
+//
+// Tango is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+// 
+// Tango is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with Tango.  If not, see <http://www.gnu.org/licenses/>.
+//
+// $Revision: 2.20 $
 //
 // $Log: ClassFactory.cpp,v $
+// Revision 2.20  2010/09/21 11:43:20  taurel
+// - Add GPL stuff
+//
 // Revision 2.19  2007/11/06 07:24:05  taurel
 // - Added the DbGetDataForServerCache command (with timing stats)
 // - Add timing stats for the DbPutClassProperty command
@@ -76,11 +99,6 @@ static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/Cla
 // Revision 1.16  2000/10/19 07:30:27  goetz
 // ported Database to TANGO V2.0
 //
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
 //-=============================================================================
 //
 //  		This file is generated by POGO
@@ -96,7 +114,7 @@ static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/Cla
  *	Create DataBaseClass singleton and store it in DServer object.
  *
  * @author	$Author: taurel $
- * @version	$Revision: 2.19 $
+ * @version	$Revision: 2.20 $
  */
 
 void Tango::DServer::class_factory()
diff --git a/cppserver/database/DataBase.cpp b/cppserver/database/DataBase.cpp
index f7c7ea5..331526b 100644
--- a/cppserver/database/DataBase.cpp
+++ b/cppserver/database/DataBase.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/DataBase.cpp,v 2.84 2009/09/16 09:08:23 pascal_verdier Exp $";
+static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/DataBase.cpp,v 2.88 2010/09/21 11:43:20 taurel Exp $";
 //+=============================================================================
 //
 // file :         DataBase.cpp
@@ -13,9 +13,45 @@ static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/Dat
 //
 // author(s) :    A.Gotz, JL Pons, P.Verdier
 //
-// $Revision: 2.84 $
+// Copyright (C) :      2004,2005,2006,2007,2008,2009,2010
+//						European Synchrotron Radiation Facility
+//                      BP 220, Grenoble 38043
+//                      FRANCE
+//
+// This file is part of Tango.
+//
+// Tango is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+// 
+// Tango is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with Tango.  If not, see <http://www.gnu.org/licenses/>.
+//
+// $Revision: 2.88 $
 //
 // $Log: DataBase.cpp,v $
+// Revision 2.88  2010/09/21 11:43:20  taurel
+// - Add GPL stuff
+//
+// Revision 2.87  2010/04/13 08:21:33  taurel
+// Fix some memory leaks in case of command returning error.
+// The main one was for the DbGetAttributeAlias. Small other for the
+// hotory related commands
+//
+// Revision 2.86  2010/04/12 12:59:53  taurel
+// - Add some delete in the code when the device is deleted. This should not
+// happen but....
+//
+// Revision 2.85  2010/03/26 11:41:16  taurel
+// - Add mutual exclusion for the timing stat. map access in the
+// attribute getting data from this map
+//
 // Revision 2.84  2009/09/16 09:08:23  pascal_verdier
 // Bug on stored procedure status fixed.
 //
@@ -172,11 +208,6 @@ static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/Dat
 // Revision 2.53  2005/09/26 10:40:20  pascal_verdier
 // sql_query.clear() replaced by sql_query.erase(sql_query.size()) for windows compatibility.
 //
-//
-// copyleft :     European Synchrotron Radiation Facility
-//                BP 220, Grenoble 38043
-//                FRANCE
-//
 //-=============================================================================
 //
 //  This file has been partially generated by POGO
@@ -458,6 +489,19 @@ void DataBase::init_device()
 void DataBase::delete_device()
 {
 	//	Delete device's allocated object
+
+	delete [] timing_stats_average;
+	delete [] timing_stats_minimum;
+	delete [] timing_stats_maximum;
+	delete [] timing_stats_calls;
+
+	for (int i = 0;i < timing_stats_map.size();i++)
+		delete timing_stats_index[i];
+	delete [] timing_stats_index;
+
+	std::map<std::string,TimingStatsStruct*>::iterator iter;
+	for (iter = timing_stats_map.begin(); iter != timing_stats_map.end(); iter++)
+		delete iter->second;
 	
 	for (int loop = 0;loop < conn_pool_size;loop++)
 	{
@@ -570,15 +614,20 @@ void DataBase::read_Timing_info(Tango::Attribute &attr)
  
     std::map<std::string,TimingStatsStruct*>::iterator iter;
     int i=0;
-    for (iter = timing_stats_map.begin(); iter != timing_stats_map.end(); iter++)
-    {
-    	sprintf(info_str,"%s\t%6.3f\t%6.3f\t%6.3f\t%.0f",
-				iter->first.c_str(), iter->second->average,
-    			iter->second->minimum, iter->second->maximum,
-				iter->second->calls);
-        timing_info[i+4] = CORBA::string_dup(info_str);
-        i++;
-    }
+
+	{
+		omni_mutex_lock guard(timing_stats_mutex);
+	    for (iter = timing_stats_map.begin(); iter != timing_stats_map.end(); iter++)
+	    {
+	    	sprintf(info_str,"%s\t%6.3f\t%6.3f\t%6.3f\t%.0f",
+					iter->first.c_str(), iter->second->average,
+	    			iter->second->minimum, iter->second->maximum,
+					iter->second->calls);
+	        timing_info[i+4] = CORBA::string_dup(info_str);
+	        i++;
+	    }
+	}
+
 	attr.set_value(timing_info,timing_stats_size+4,0,true);
 }
 
@@ -596,10 +645,13 @@ void DataBase::read_Timing_average(Tango::Attribute &attr)
 	std::map<std::string,TimingStatsStruct*>::iterator iter;
 	int i=0;
 
-	for (iter = timing_stats_map.begin(); iter != timing_stats_map.end(); iter++)
 	{
-		timing_stats_average[i] = iter->second->average;
-		i++;
+		omni_mutex_lock guard(timing_stats_mutex);
+		for (iter = timing_stats_map.begin(); iter != timing_stats_map.end(); iter++)
+		{
+			timing_stats_average[i] = iter->second->average;
+			i++;
+		}
 	}
 
 	attr.set_value(timing_stats_average, timing_stats_size);
@@ -618,10 +670,13 @@ void DataBase::read_Timing_minimum(Tango::Attribute &attr)
 	std::map<std::string,TimingStatsStruct*>::iterator iter;
 	int i=0;
 
-	for (iter = timing_stats_map.begin(); iter != timing_stats_map.end(); iter++)
 	{
-		timing_stats_minimum[i] = iter->second->minimum;
-		i++;
+		omni_mutex_lock guard(timing_stats_mutex);
+		for (iter = timing_stats_map.begin(); iter != timing_stats_map.end(); iter++)
+		{
+			timing_stats_minimum[i] = iter->second->minimum;
+			i++;
+		}
 	}
 
 	attr.set_value(timing_stats_minimum, timing_stats_size);
@@ -640,10 +695,13 @@ void DataBase::read_Timing_maximum(Tango::Attribute &attr)
 	std::map<std::string,TimingStatsStruct*>::iterator iter;
 	int i=0;
 
-	for (iter = timing_stats_map.begin(); iter != timing_stats_map.end(); iter++)
 	{
-		timing_stats_maximum[i] = iter->second->maximum;
-		i++;
+		omni_mutex_lock guard(timing_stats_mutex);
+		for (iter = timing_stats_map.begin(); iter != timing_stats_map.end(); iter++)
+		{
+			timing_stats_maximum[i] = iter->second->maximum;
+			i++;
+		}
 	}
 
 	attr.set_value(timing_stats_maximum, timing_stats_size);
@@ -662,10 +720,13 @@ void DataBase::read_Timing_calls(Tango::Attribute &attr)
 	std::map<std::string,TimingStatsStruct*>::iterator iter;
 	int i=0;
 
-	for (iter = timing_stats_map.begin(); iter != timing_stats_map.end(); iter++)
 	{
-		timing_stats_calls[i] = iter->second->calls;
-		i++;
+		omni_mutex_lock guard(timing_stats_mutex);
+		for (iter = timing_stats_map.begin(); iter != timing_stats_map.end(); iter++)
+		{
+			timing_stats_calls[i] = iter->second->calls;
+			i++;
+		}
 	}
 
 	attr.set_value(timing_stats_calls, timing_stats_size);
@@ -2160,7 +2221,6 @@ Tango::DevVarStringArray *DataBase::db_get_device_property(const Tango::DevVarSt
 	MYSQL_RES *result;
 	MYSQL_ROW row;
 	int n_properties=0, n_rows=0, n_props=0, i, j;
-	Tango::DevVarStringArray *property_list = new Tango::DevVarStringArray;
 	const char *tmp_device;
 	string	tmp_name;
 	string	prop_name;
@@ -2178,6 +2238,8 @@ Tango::DevVarStringArray *DataBase::db_get_device_property(const Tango::DevVarSt
 
 	INFO_STREAM << "DataBase::GetDeviceProperty(): get " << property_names->length()-1 << " properties for device " << (*property_names)[0] << endl;
 
+	Tango::DevVarStringArray *property_list = new Tango::DevVarStringArray;
+
 	tmp_device = (*property_names)[0];
 	sprintf(n_properties_str, "%lu", property_names->length()-1);
 	n_props = 2;
@@ -5100,6 +5162,8 @@ Tango::DevString DataBase::db_get_attribute_alias(Tango::DevString argin)
 		//strcpy(argout,"");
         TangoSys_OMemStream o;
 	   	o << "No attribute found for alias  \'" << argin << "\'";
+		mysql_free_result(result);
+		delete [] argout;
 	   	Tango::Except::throw_exception((const char *)DB_SQLError,
 	   				  	               o.str(),
 					  	               (const char *)"DataBase::db_get_attribute_alias()");
@@ -5812,7 +5876,6 @@ Tango::DevVarStringArray *DataBase::db_get_device_property_hist(const Tango::Dev
 	MYSQL_RES *ids;
 	MYSQL_RES *result;
 	MYSQL_ROW row;
-	Tango::DevVarStringArray *property_hist = new Tango::DevVarStringArray;
 	const char *tmp_device;
 	string      tmp_name;
 
@@ -5824,6 +5887,8 @@ Tango::DevVarStringArray *DataBase::db_get_device_property_hist(const Tango::Dev
 					  (const char *)"DataBase::GetDevicePropertyHist()");
 	}
 
+	Tango::DevVarStringArray *property_hist = new Tango::DevVarStringArray;
+
 	tmp_device = (*argin)[0];
 	tmp_name   = replace_wildcard((*argin)[1]);
 	
@@ -5898,7 +5963,6 @@ Tango::DevVarStringArray *DataBase::db_get_device_attribute_property_hist(const
 	MYSQL_RES *ids;
 	MYSQL_RES *result;
 	MYSQL_ROW row;
-	Tango::DevVarStringArray *property_hist = new Tango::DevVarStringArray;
 	const char *tmp_device;
 	string      tmp_attribute;
 	string      tmp_name;
@@ -5911,6 +5975,8 @@ Tango::DevVarStringArray *DataBase::db_get_device_attribute_property_hist(const
 					  (const char *)"DataBase::DbGetDeviceAttributePropertyHist()");
 	}
 
+	Tango::DevVarStringArray *property_hist = new Tango::DevVarStringArray;
+
 	tmp_device    = (*argin)[0];
 	tmp_attribute = replace_wildcard((*argin)[1]);
 	tmp_name      = replace_wildcard((*argin)[2]);
@@ -5989,7 +6055,6 @@ Tango::DevVarStringArray *DataBase::db_get_class_attribute_property_hist(const T
 	MYSQL_RES *ids;
 	MYSQL_RES *result;
 	MYSQL_ROW row;
-	Tango::DevVarStringArray *property_hist = new Tango::DevVarStringArray;
 	const char *tmp_class;
 	string      tmp_attribute;
 	string      tmp_name;
@@ -6002,6 +6067,8 @@ Tango::DevVarStringArray *DataBase::db_get_class_attribute_property_hist(const T
 					  (const char *)"DataBase::DbGetClassAttributePropertyHist()");
 	}
 
+	Tango::DevVarStringArray *property_hist = new Tango::DevVarStringArray;
+
 	tmp_class     = (*argin)[0];
 	tmp_attribute = replace_wildcard((*argin)[1]);
 	tmp_name      = replace_wildcard((*argin)[2]);
@@ -6080,7 +6147,6 @@ Tango::DevVarStringArray *DataBase::db_get_class_property_hist(const Tango::DevV
 	MYSQL_RES *ids;
 	MYSQL_RES *result;
 	MYSQL_ROW row;
-	Tango::DevVarStringArray *property_hist = new Tango::DevVarStringArray;
 	const char *tmp_class;
 	string      tmp_name;
 
@@ -6092,6 +6158,8 @@ Tango::DevVarStringArray *DataBase::db_get_class_property_hist(const Tango::DevV
 					  (const char *)"DataBase::DbGetClassPropertyHist()");
 	}
 
+	Tango::DevVarStringArray *property_hist = new Tango::DevVarStringArray;
+
 	tmp_class  = (*argin)[0];
 	tmp_name   = replace_wildcard((*argin)[1]);
 	
@@ -6167,7 +6235,6 @@ Tango::DevVarStringArray *DataBase::db_get_property_hist(const Tango::DevVarStri
 	MYSQL_RES *ids;
 	MYSQL_RES *result;
 	MYSQL_ROW row;
-	Tango::DevVarStringArray *property_hist = new Tango::DevVarStringArray;
 	const char *tmp_object;
 	string      tmp_name;
 
@@ -6179,6 +6246,8 @@ Tango::DevVarStringArray *DataBase::db_get_property_hist(const Tango::DevVarStri
 					  (const char *)"DataBase::DbGetPropertyHist()");
 	}
 
+	Tango::DevVarStringArray *property_hist = new Tango::DevVarStringArray;
+
 	tmp_object  = (*argin)[0];
 	tmp_name   = replace_wildcard((*argin)[1]);
 	
@@ -6344,7 +6413,7 @@ Tango::DevVarStringArray *DataBase::db_get_data_for_server_cache(const Tango::De
 	//	See "TANGO Device Server Programmer's Manual"
 	//		(chapter : Writing a TANGO DS / Exchanging data)
 	//------------------------------------------------------------
-	Tango::DevVarStringArray	*argout  = new Tango::DevVarStringArray();
+
 	DEBUG_STREAM << "DataBase::db_get_data_for_server_cache(): entering... !" << endl;
 
 	//	Add your own code to control device here
@@ -6365,6 +6434,8 @@ Tango::DevVarStringArray *DataBase::db_get_data_for_server_cache(const Tango::De
 						(const char *)"DataBase::DbGetDataForServerCache()");
 	} 
 
+	Tango::DevVarStringArray	*argout  = new Tango::DevVarStringArray();
+
 	TimeVal	before, after;
 	GetTime(before);
 		
@@ -6396,6 +6467,7 @@ Tango::DevVarStringArray *DataBase::db_get_data_for_server_cache(const Tango::De
 	int con_nb = get_connection();
 	if (mysql_real_query(conn_pool[con_nb].db, sql_query.c_str(),sql_query.length()) != 0)
 	{
+		delete argout;
 		TangoSys_OMemStream o;
 
 		WARN_STREAM << "DataBase::db_get_data_for_server_cache failed to query TANGO database:" << endl;
@@ -6422,6 +6494,7 @@ Tango::DevVarStringArray *DataBase::db_get_data_for_server_cache(const Tango::De
 		{
 			if (mysql_field_count(conn_pool[con_nb].db) != 0)
 			{
+				delete argout;
 				TangoSys_OMemStream o;
 
 				WARN_STREAM << "DataBase::db_get_data_for_server_cache: mysql_store_result() failed  (error=" << mysql_error(conn_pool[con_nb].db) << ")" << endl;
@@ -6436,6 +6509,7 @@ Tango::DevVarStringArray *DataBase::db_get_data_for_server_cache(const Tango::De
 
 			if ((status = mysql_next_result(conn_pool[con_nb].db)) > 0)
 			{
+				delete argout;
 				TangoSys_OMemStream o;
 
 				WARN_STREAM << "DataBase::db_get_data_for_server_cache: mysql_next_result() failed  (error=" << mysql_error(conn_pool[con_nb].db) << ")" << endl;
@@ -6466,6 +6540,7 @@ Tango::DevVarStringArray *DataBase::db_get_data_for_server_cache(const Tango::De
 	{
 		if (str.size() == 0)
 		{
+			delete argout;
 			mysql_free_result(res);
 			WARN_STREAM << "DataBase::DbGetDataForServerCache(): Stored procedure does not return any result!!!" << endl;
 			Tango::Except::throw_exception((const char *)"DB_StoredProcedureNoResult",
@@ -6474,6 +6549,7 @@ Tango::DevVarStringArray *DataBase::db_get_data_for_server_cache(const Tango::De
 		}
 		else
 		{
+			delete argout;
 			mysql_free_result(res);
 			WARN_STREAM << "DataBase::DbGetDataForServerCache(): Stored procedure failed with a MySQL error!!!" << endl;
 			Tango::Except::throw_exception((const char *)"DB_StoredProcedureFailed",
diff --git a/cppserver/database/DataBase.h b/cppserver/database/DataBase.h
index 0e82204..40cfbd4 100644
--- a/cppserver/database/DataBase.h
+++ b/cppserver/database/DataBase.h
@@ -8,9 +8,35 @@
 //
 // Author(s): andy_gotz, P.Verdier
 //
-// $Revision: 2.44 $
+// Copyright (C) :      2004,2005,2006,2007,2008,2009,2010
+//						European Synchrotron Radiation Facility
+//                      BP 220, Grenoble 38043
+//                      FRANCE
+//
+// This file is part of Tango.
+//
+// Tango is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+// 
+// Tango is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with Tango.  If not, see <http://www.gnu.org/licenses/>.
+//
+// $Revision: 2.46 $
 //
 // $Log: DataBase.h,v $
+// Revision 2.46  2010/09/21 11:43:21  taurel
+// - Add GPL stuff
+//
+// Revision 2.45  2010/09/21 11:37:00  taurel
+// - Do not call mysql_init during DS startup
+//
 // Revision 2.44  2009/04/06 13:11:09  pascal_verdier
 // DbMySqlSelect command added.
 //
@@ -94,11 +120,6 @@
 // ResetTimingValues command added.
 // Windows compatibility added for timing attributes.
 //
-//
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
-//
 //=============================================================================
 //
 //  		This file is generated by POGO
@@ -1350,8 +1371,16 @@ public:
 	DbInter() {}
 	~DbInter() {}
 	
-	virtual void create_thread() {mysql_thread_init();}
-	virtual void delete_thread() {mysql_thread_end();}
+	virtual void create_thread() 
+	{
+		if (Tango::Util::instance()->is_svr_starting() == false)
+			mysql_thread_init();
+	}
+	virtual void delete_thread()
+	{
+		if (Tango::Util::instance()->is_svr_starting() == false)
+			mysql_thread_end();
+	}
 };
 
 }	//	namespace
diff --git a/cppserver/database/DataBaseClass.cpp b/cppserver/database/DataBaseClass.cpp
index 6472cd3..dd184b7 100644
--- a/cppserver/database/DataBaseClass.cpp
+++ b/cppserver/database/DataBaseClass.cpp
@@ -1,9 +1,9 @@
-static const char *ClassId    = "$Id: DataBaseClass.cpp,v 2.38 2009/04/06 13:11:08 pascal_verdier Exp $";
+static const char *ClassId    = "$Id: DataBaseClass.cpp,v 2.39 2010/09/21 11:43:21 taurel Exp $";
 static const char *CvsPath    = "$Source: /cvsroot/tango-cs/tango/cppserver/dbase/DataBaseClass.cpp,v $";
 static const char *SvnPath    = "$HeadURL: $";
-static const char *TagName    = "$Name: DataBase-Release_4_5 $";
+static const char *TagName    = "$Name: Database-Release_4_8 $";
 static const char *HttpServer = "http://www.esrf.fr/computing/cs/tango/tango_doc/ds_doc/";
-static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/DataBaseClass.cpp,v 2.38 2009/04/06 13:11:08 pascal_verdier Exp $";
+static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/DataBaseClass.cpp,v 2.39 2010/09/21 11:43:21 taurel Exp $";
 //+=============================================================================
 //
 // file :        DataBaseClass.cpp
@@ -17,9 +17,32 @@ static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/Dat
 //
 // author(s) :   A.Gotz, JL Pons, P Verdier
 //
+// Copyright (C) :      2004,2005,2006,2007,2008,2009,2010
+//						European Synchrotron Radiation Facility
+//                      BP 220, Grenoble 38043
+//                      FRANCE
+//
+// This file is part of Tango.
+//
+// Tango is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+// 
+// Tango is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with Tango.  If not, see <http://www.gnu.org/licenses/>.
+//
 // $Version$
 //
 // $Log: DataBaseClass.cpp,v $
+// Revision 2.39  2010/09/21 11:43:21  taurel
+// - Add GPL stuff
+//
 // Revision 2.38  2009/04/06 13:11:08  pascal_verdier
 // DbMySqlSelect command added.
 //
@@ -195,10 +218,6 @@ static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/Dat
 // converted DataBaseds to POGO
 //
 //
-// copyleft :   European Synchrotron Radiation Facility
-//              BP 220, Grenoble 38043
-//              FRANCE
-//
 //-=============================================================================
 //
 //  This file was generated by POGO
diff --git a/cppserver/database/DataBaseClass.h b/cppserver/database/DataBaseClass.h
index a16484f..be8d7de 100644
--- a/cppserver/database/DataBaseClass.h
+++ b/cppserver/database/DataBaseClass.h
@@ -10,11 +10,34 @@
 //			
 // project :      TANGO Device Server
 //
-// $Author: pascal_verdier $
+// $Author: taurel $
 //
-// $Revision: 2.33 $
+// Copyright (C) :      2004,2005,2006,2007,2008,2009,2010
+//						European Synchrotron Radiation Facility
+//                      BP 220, Grenoble 38043
+//                      FRANCE
+//
+// This file is part of Tango.
+//
+// Tango is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+// 
+// Tango is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with Tango.  If not, see <http://www.gnu.org/licenses/>.
+//
+// $Revision: 2.34 $
 //
 // $Log: DataBaseClass.h,v $
+// Revision 2.34  2010/09/21 11:43:21  taurel
+// - Add GPL stuff
+//
 // Revision 2.33  2009/04/06 13:11:08  pascal_verdier
 // DbMySqlSelect command added.
 //
@@ -120,11 +143,6 @@
 // Revision 2.4  2001/03/06 11:01:56  goetz
 // added DbGetDeviceExportedList command; DbExportDevice updates host in server table
 //
-//
-// copyleft :     European Synchrotron Radiation Facility
-//                BP 220, Grenoble 38043
-//                FRANCE
-//
 //=============================================================================
 //
 //  		This file is generated by POGO
diff --git a/cppserver/database/DataBaseStateMachine.cpp b/cppserver/database/DataBaseStateMachine.cpp
index 20b4be0..4ca69c8 100644
--- a/cppserver/database/DataBaseStateMachine.cpp
+++ b/cppserver/database/DataBaseStateMachine.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/DataBaseStateMachine.cpp,v 2.11 2009/04/06 13:11:09 pascal_verdier Exp $";
+static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/DataBaseStateMachine.cpp,v 2.12 2010/09/21 11:43:21 taurel Exp $";
 //+=============================================================================
 //
 // file :         DataBaseStateMachine.cpp
@@ -8,11 +8,34 @@ static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/Dat
 //
 // project :      TANGO Device Server
 //
-// $Author: pascal_verdier $
+// $Author: taurel $
 //
-// $Revision: 2.11 $
+// Copyright (C) :      2004,2005,2006,2007,2008,2009,2010
+//						European Synchrotron Radiation Facility
+//                      BP 220, Grenoble 38043
+//                      FRANCE
+//
+// This file is part of Tango.
+//
+// Tango is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+// 
+// Tango is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with Tango.  If not, see <http://www.gnu.org/licenses/>.
+//
+// $Revision: 2.12 $
 //
 // $Log: DataBaseStateMachine.cpp,v $
+// Revision 2.12  2010/09/21 11:43:21  taurel
+// - Add GPL stuff
+//
 // Revision 2.11  2009/04/06 13:11:09  pascal_verdier
 // DbMySqlSelect command added.
 //
@@ -59,11 +82,6 @@ static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/Dat
 // Revision 2.1  2005/01/10 10:35:26  pascal_verdier
 // Updated to Tango 5.
 //
-//
-// copyleft :     European Synchrotron Radiation Facility
-//                BP 220, Grenoble 38043
-//                FRANCE
-//
 //-=============================================================================
 //
 //  		This file is generated by POGO
diff --git a/cppserver/database/DataBaseUtils.cpp b/cppserver/database/DataBaseUtils.cpp
index 690448b..12165aa 100644
--- a/cppserver/database/DataBaseUtils.cpp
+++ b/cppserver/database/DataBaseUtils.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/DataBaseUtils.cpp,v 2.13 2009/09/10 15:04:02 taurel Exp $";
+static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/DataBaseUtils.cpp,v 2.14 2010/09/21 11:43:21 taurel Exp $";
 //+=============================================================================
 //
 // file :         DataBaseUtils.cpp
@@ -9,10 +9,25 @@ static const char *RcsId = "$Header: /cvsroot/tango-cs/tango/cppserver/dbase/Dat
 //
 // author(s) :    A.Gotz, P.Verdier, JL Pons
 //
+// Copyright (C) :      2004,2005,2006,2007,2008,2009,2010
+//						European Synchrotron Radiation Facility
+//                      BP 220, Grenoble 38043
+//                      FRANCE
 //
-// copyleft :     European Synchrotron Radiation Facility
-//                BP 220, Grenoble 38043
-//                FRANCE
+// This file is part of Tango.
+//
+// Tango is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+// 
+// Tango is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with Tango.  If not, see <http://www.gnu.org/licenses/>.
 //
 
 #if HAVE_CONFIG_H
diff --git a/cppserver/database/Makefile.am b/cppserver/database/Makefile.am
index 1ba8f30..5a4c36e 100644
--- a/cppserver/database/Makefile.am
+++ b/cppserver/database/Makefile.am
@@ -27,8 +27,8 @@ DataBaseds_SOURCES=ClassFactory.cpp  		\
 if TANGO_DB_CREATE_ENABLED
 
 dbdir=${pkgdatadir}/db
-db_DATA=create_db.sh create_db.sql my.cnf create_db_tables.sql stored_proc.sql update_db.sql update_db5.sql
-
+db_DATA=create_db.sh create_db.sql my.cnf create_db_tables.sql stored_proc.sql update_db.sh update_db5.sql update_db6.sql
+	
 ## This is to make sure that the create-db script is run on each make all.
 ## See create_db.sh for more information.
 all-local: .force
@@ -36,8 +36,9 @@ all-local: .force
 
 endif
 
-DB_CREATE_FILES=create_db.sh.in create_db.sql.in my.cnf.in create_db_tables.sql.in stored_proc.sql.in update_db.sql.in update_db5.sql.in
-
+DB_CREATE_FILES=create_db.sh.in create_db.sql.in my.cnf.in create_db_tables.sql.in stored_proc.sql.in \
+				update_db.sh.in update_db5.sql.in update_db6.sql.in	
+	
 dist-hook:
 	for file in $(DB_CREATE_FILES); do \
 	     cp $(srcdir)/$$file $(distdir)/$$file;  \
diff --git a/cppserver/database/Makefile.in b/cppserver/database/Makefile.in
index b90897b..4f4132d 100644
--- a/cppserver/database/Makefile.in
+++ b/cppserver/database/Makefile.in
@@ -38,8 +38,8 @@ subdir = cppserver/database
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
 	$(srcdir)/create_db.sh.in $(srcdir)/create_db.sql.in \
 	$(srcdir)/create_db_tables.sql.in $(srcdir)/my.cnf.in \
-	$(srcdir)/stored_proc.sql.in $(srcdir)/update_db.sql.in \
-	$(srcdir)/update_db5.sql.in
+	$(srcdir)/stored_proc.sql.in $(srcdir)/update_db.sh.in \
+	$(srcdir)/update_db5.sql.in $(srcdir)/update_db6.sql.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/RSSH_CHECK_OMNIORB.m4 \
 	$(top_srcdir)/m4/RSSH_CHECK_PTHREADS.m4 \
@@ -60,7 +60,8 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/ac_config.h.tmp
 CONFIG_CLEAN_FILES = create_db.sql create_db.sh my.cnf stored_proc.sql \
-	create_db_tables.sql update_db.sql update_db5.sql
+	create_db_tables.sql update_db.sh update_db5.sql \
+	update_db6.sql
 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dbdir)"
 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
@@ -302,8 +303,10 @@ DataBaseds_SOURCES = ClassFactory.cpp  		\
 		  		   update_starter.h
 
 @TANGO_DB_CREATE_ENABLED_TRUE at dbdir = ${pkgdatadir}/db
- at TANGO_DB_CREATE_ENABLED_TRUE@db_DATA = create_db.sh create_db.sql my.cnf create_db_tables.sql stored_proc.sql update_db.sql update_db5.sql
-DB_CREATE_FILES = create_db.sh.in create_db.sql.in my.cnf.in create_db_tables.sql.in stored_proc.sql.in update_db.sql.in update_db5.sql.in
+ at TANGO_DB_CREATE_ENABLED_TRUE@db_DATA = create_db.sh create_db.sql my.cnf create_db_tables.sql stored_proc.sql update_db.sh update_db5.sql update_db6.sql
+DB_CREATE_FILES = create_db.sh.in create_db.sql.in my.cnf.in create_db_tables.sql.in stored_proc.sql.in \
+				update_db.sh.in update_db5.sql.in update_db6.sql.in	
+
 all: all-am
 
 .SUFFIXES:
@@ -347,10 +350,12 @@ stored_proc.sql: $(top_builddir)/config.status $(srcdir)/stored_proc.sql.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 create_db_tables.sql: $(top_builddir)/config.status $(srcdir)/create_db_tables.sql.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-update_db.sql: $(top_builddir)/config.status $(srcdir)/update_db.sql.in
+update_db.sh: $(top_builddir)/config.status $(srcdir)/update_db.sh.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 update_db5.sql: $(top_builddir)/config.status $(srcdir)/update_db5.sql.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+update_db6.sql: $(top_builddir)/config.status $(srcdir)/update_db6.sql.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
 	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
diff --git a/cppserver/database/main.cpp b/cppserver/database/main.cpp
index a32c7c5..3b57814 100644
--- a/cppserver/database/main.cpp
+++ b/cppserver/database/main.cpp
@@ -1,3 +1,25 @@
+//
+// Copyright (C) :      2004,2005,2006,2007,2008,2009,2010
+//						European Synchrotron Radiation Facility
+//                      BP 220, Grenoble 38043
+//                      FRANCE
+//
+// This file is part of Tango.
+//
+// Tango is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+// 
+// Tango is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with Tango.  If not, see <http://www.gnu.org/licenses/>.
+//
+
 #include <tango.h>
 #include <dserverclass.h>
 #include <DataBase.h>
@@ -138,7 +160,9 @@ int main(int argc,char *argv[])
 		Tango::Device_var d = dserver->_this();
 		dserver->set_d_var(Tango::Device::_duplicate(d));
 		(*export_parms)[0] = CORBA::string_dup(dserver->get_name().c_str());
-		(*export_parms)[1] = CORBA::string_dup((Tango::Util::instance()->get_orb()->object_to_string(d)));
+		const char *dserver_str_ior = Tango::Util::instance()->get_orb()->object_to_string(d);
+		(*export_parms)[1] = CORBA::string_dup(dserver_str_ior);
+		delete dserver_str_ior;
 		(*export_parms)[2] = CORBA::string_dup(tango_util->get_host_name().c_str());
 		(*export_parms)[3] = CORBA::string_dup(tango_util->get_pid_str().c_str());
 		(*export_parms)[4] = CORBA::string_dup(tango_util->get_version_str().c_str());
@@ -148,9 +172,13 @@ int main(int argc,char *argv[])
 // export database object to TANGO database
 
 		(*export_parms)[0] = CORBA::string_dup(dbase->get_name().c_str());
-		(*export_parms)[1] = CORBA::string_dup((Tango::Util::instance()->get_orb()->object_to_string(dbase->get_d_var())));
+		const char *str_ior = Tango::Util::instance()->get_orb()->object_to_string(dbase->get_d_var());
+		(*export_parms)[1] = CORBA::string_dup(str_ior);
+		delete str_ior;
 		((DataBase_ns::DataBase*)dbase)->db_export_device(export_parms);
 
+		delete export_parms;
+
 //
 // Run the endless loop
 //
diff --git a/cppserver/database/stored_proc.sql.in b/cppserver/database/stored_proc.sql.in
index d9dd980..52052f9 100644
--- a/cppserver/database/stored_proc.sql.in
+++ b/cppserver/database/stored_proc.sql.in
@@ -33,7 +33,7 @@ DELIMITER |
 CREATE PROCEDURE @TANGO_DB_NAME at .ds_start 
 (IN ds_name VARCHAR(255),
  IN host VARCHAR(255),
- OUT res_str BLOB) READS SQL DATA COMMENT 'release 1.2'
+ OUT res_str BLOB) READS SQL DATA COMMENT 'release 1.3'
 proc: BEGIN
 
 	DECLARE notifd_event_name VARCHAR(255) DEFAULT 'notifd/factory/';
@@ -673,7 +673,7 @@ BEGIN
 		IF NOT done THEN						
 			SET res_str = CONCAT_WS(CHAR(0),res_str,tmp_name);
 			IF nb_dev = 0 THEN
-				SET d_list = tmp_name;
+				SET d_list = CONCAT_WS("",d_list,tmp_name);
 			ELSE
 				SET d_list = CONCAT_WS(CHAR(0),d_list,tmp_name);
 			END IF;
diff --git a/cppserver/database/update_db.sh.in b/cppserver/database/update_db.sh.in
new file mode 100755
index 0000000..54ca4b4
--- /dev/null
+++ b/cppserver/database/update_db.sh.in
@@ -0,0 +1,28 @@
+mysql=@MYSQL@
+mysql_admin=@MYSQL_ADMIN@
+mysql_admin_passwd=@MYSQL_ADMIN_PASSWD@
+mysql_host=@MYSQL_HOST@
+db_name=@TANGO_DB_NAME@
+srcdir=@srcdir@
+
+
+if test "x$mysql_admin" = "x"; then
+	user_switch="";
+else
+	user_switch="-u$x$mysql_admin";
+fi
+
+if test "x$mysql_admin_passwd" = "x"; then
+   passwd_switch="";
+else
+   passwd_switch="-p$mysql_admin_passwd"
+fi
+
+if test "x$mysql_host" = "x"; then
+  host_switch="";
+else
+  host_switch="-h$mysql_host";
+fi
+
+
+$mysql $user_switch $passwd_switch $host_switch < ./stored_proc.sql > /dev/null
diff --git a/cppserver/database/update_db.sql.in b/cppserver/database/update_db6.sql.in
similarity index 100%
rename from cppserver/database/update_db.sql.in
rename to cppserver/database/update_db6.sql.in
diff --git a/cppserver/database/update_starter.cpp b/cppserver/database/update_starter.cpp
index cc9b9c9..9ecc13b 100644
--- a/cppserver/database/update_starter.cpp
+++ b/cppserver/database/update_starter.cpp
@@ -9,11 +9,27 @@
 //
 // $Author: taurel $
 //
-// $Revision: 2.10 $
+// Copyright (C) :      2004,2005,2006,2007,2008,2009,2010
+//						European Synchrotron Radiation Facility
+//                      BP 220, Grenoble 38043
+//                      FRANCE
 //
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
+// This file is part of Tango.
+//
+// Tango is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+// 
+// Tango is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with Tango.  If not, see <http://www.gnu.org/licenses/>.
+//
+// $Revision: 2.11 $
 //
 //=============================================================================
 
diff --git a/cppserver/database/update_starter.h b/cppserver/database/update_starter.h
index 3cbd451..6fabe07 100644
--- a/cppserver/database/update_starter.h
+++ b/cppserver/database/update_starter.h
@@ -6,13 +6,29 @@
 //
 // project :	Starter for Tango Administration
 //
-// $Author: andy_gotz $
+// $Author: taurel $
 //
-// $Revision: 2.2 $
+// Copyright (C) :      2004,2005,2006,2007,2008,2009,2010
+//						European Synchrotron Radiation Facility
+//                      BP 220, Grenoble 38043
+//                      FRANCE
 //
-// copyleft :    European Synchrotron Radiation Facility
-//               BP 220, Grenoble 38043
-//               FRANCE
+// This file is part of Tango.
+//
+// Tango is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+// 
+// Tango is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with Tango.  If not, see <http://www.gnu.org/licenses/>.
+//
+// $Revision: 2.3 $
 //
 //=============================================================================
 #ifndef _UPD_STARTER_THREAD_H
@@ -23,8 +39,8 @@
 namespace DataBase_ns {
 
 /**
- * @author	$Author: andy_gotz $
- * @version	$Revision: 2.2 $
+ * @author	$Author: taurel $
+ * @version	$Revision: 2.3 $
  */
 
 //=========================================================
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 2680786..ea432ce 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -11,4 +11,6 @@ install-data-local:
 dist-hook:
 	for file in $(DOCS); do        \
 	   cp $(top_srcdir)/doc/$$file $(distdir)/$$file;       \
-	done
+	done; \
+	cp -R $(top_srcdir)/doc/src $(distdir); \
+	rm -rf `find $(distdir) -name CVS`
diff --git a/doc/Makefile.in b/doc/Makefile.in
index b522ac1..bc18134 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -566,7 +566,9 @@ install-data-local:
 dist-hook:
 	for file in $(DOCS); do        \
 	   cp $(top_srcdir)/doc/$$file $(distdir)/$$file;       \
-	done
+	done; \
+	cp -R $(top_srcdir)/doc/src $(distdir); \
+	rm -rf `find $(distdir) -name CVS`
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/doc/src/README b/doc/src/README
new file mode 100644
index 0000000..920410b
--- /dev/null
+++ b/doc/src/README
@@ -0,0 +1,19 @@
+Before opening the Tango manual with lyx, copy the layout files 
+to the following directories in your home directory:
+
+cp layouts/Tango_book.layout  ~/.lyx/layouts/Tango_book.layout
+cp layouts/stdsections.inc  ~/.lyx/layouts/stdsections.inc
+cp layouts/textclass.lst  ~/.lyx/textclass.lst
+cp layouts/styFiles.lst  ~/.lyx/styFiles.lst
+
+cp layouts/Tango_book.cls  ~/.TeX/Tango_book.cls
+
+
+To create the html documentation use tango_latex2html to get
+the correct splitting parameters and the correct line breaks.
+
+In the case of an latex error as:
+	missing tex class Tango_book
+you might have to use the TEXINPUTS environment variable
+to indicate where to find the Tango_book.cls file.
+	export TEXINPUTS=$TEXINPUTS:~/.TeX
diff --git a/doc/src/advanced/ThreadsManagement.png b/doc/src/advanced/ThreadsManagement.png
new file mode 100644
index 0000000..a293c29
Binary files /dev/null and b/doc/src/advanced/ThreadsManagement.png differ
diff --git a/doc/src/advanced/advanced.lyx b/doc/src/advanced/advanced.lyx
new file mode 100644
index 0000000..996ca8f
--- /dev/null
+++ b/doc/src/advanced/advanced.lyx
@@ -0,0 +1,4547 @@
+#LyX 1.6.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 345
+\begin_document
+\begin_header
+\textclass Tango_book
+\begin_preamble
+\usepackage{a4wide}
+\end_preamble
+\use_default_options false
+\language english
+\inputencoding latin1
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_amsmath 1
+\use_esint 0
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\secnumdepth 5
+\tocdepth 5
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\author "" 
+\author "" 
+\end_header
+
+\begin_body
+
+\begin_layout Chapter
+Advanced features
+\end_layout
+
+\begin_layout Section
+Attribute alarms
+\end_layout
+
+\begin_layout Standard
+Each Tango attribute two several alarms.
+ These alarms are :
+\end_layout
+
+\begin_layout Itemize
+A four thresholds level alarm
+\end_layout
+
+\begin_layout Itemize
+The read different than set (RDS
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+RDS
+\end_layout
+
+\end_inset
+
+) alarm
+\end_layout
+
+\begin_layout Subsection
+The level alarms
+\end_layout
+
+\begin_layout Standard
+This alarm is defined for all Tango attribute read type and for numerical
+ data type.
+ The action of this alarm depend on the attribute value when it is read
+ :
+\end_layout
+
+\begin_layout Itemize
+If the attribute value is below or equal the attribute configuration 
+\series bold
+min_alarm
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+min-alarm
+\end_layout
+
+\end_inset
+
+
+\series default
+ parameter, the attribute quality factor is switched to Tango::ATTR_ALARM
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ATTR-ALARM
+\end_layout
+
+\end_inset
+
+ and if the device state is Tango::ON, it is switched to Tango::ALARM.
+ 
+\end_layout
+
+\begin_layout Itemize
+If the attribute value is below or equal the attribute configuration 
+\series bold
+min_warning
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+min-warning
+\end_layout
+
+\end_inset
+
+
+\series default
+ parameter, the attribute quality factor is switched to Tango::ATTR_WARNING
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ATTR-WARNING
+\end_layout
+
+\end_inset
+
+ and if the device state is Tango::ON, it is switched to Tango::ALARM.
+\end_layout
+
+\begin_layout Itemize
+If the attribute value is above or equal the attribute configuration 
+\series bold
+max_warning
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+max-warning
+\end_layout
+
+\end_inset
+
+
+\series default
+ parameter, the attribute quality factor is switched to Tango::ATTR_WARNING
+\begin_inset Index
+status open
+
+\begin_layout Plain Layout
+ATTR-WARNING
+\end_layout
+
+\end_inset
+
+ and if the device state is Tango::ON, it is switched to Tango::ALARM.
+\end_layout
+
+\begin_layout Itemize
+If the attribute value is above or equal the attribute configuration 
+\series bold
+max_alarm
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+max-alarm
+\end_layout
+
+\end_inset
+
+
+\series default
+ parameter, the attribute quality factor is switched to Tango::ATTR_ALARM
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ATTR-ALARM
+\end_layout
+
+\end_inset
+
+ and if the device state is Tango::ON, it is switched to Tango::ALARM.
+\end_layout
+
+\begin_layout Standard
+If the attribute is a spectrum or an image, then the alarm is set if any
+ one of the attribute value satisfies the above criterium.
+ By default, these four parameters are not defined and no check will be
+ done.
+\end_layout
+
+\begin_layout Standard
+The following figure is a drawing of attribute quality factor and device
+ state values function of the the attribute value.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename alarm.eps
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Level alarm
+\begin_inset CommandInset label
+LatexCommand label
+name "alarm_fig"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+If the min_warning and max_warning parameters are not set, the attribute
+ quality factor will simply change between Tango::ATTR_ALARM and Tango::ATTR_VAL
+ID function of the attribute value.
+\end_layout
+
+\begin_layout Subsection
+The Read Different than Set (RDS) alarm
+\end_layout
+
+\begin_layout Standard
+This alarm is defined only for attribute of the Tango::READ_WRITE and Tango::REA
+D_WITH_WRITE read/write type and for numerical data type.
+ When the attribute is read (or when the device state is requested), if
+ the difference between its read value and the last written value is something
+ more than or equal to an authorized delta and if at least a certain amount
+ of milli seconds occurs since the last write operation, the attribute quality
+ factor will be set to Tango::ATTR_ALARM
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ATTR-ALARM
+\end_layout
+
+\end_inset
+
+ and if the device state is Tango::ON, it is switched to Tango::ALARM
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ALARM
+\end_layout
+
+\end_inset
+
+.
+ If the attribute is a spectrum or an image, then the alarm is set if any
+ one of the attribute value's satisfies the above criterium.
+ This alarm configuration is done with two attribute configuration parameters
+ called 
+\series bold
+delta_val
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+delta-val
+\end_layout
+
+\end_inset
+
+
+\series default
+ and 
+\series bold
+delta_t
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+delta-t
+\end_layout
+
+\end_inset
+
+
+\series default
+.
+ By default, these two parameters are not defined and no check will be done.
+\end_layout
+
+\begin_layout Section
+Device polling
+\end_layout
+
+\begin_layout Subsection
+Introduction
+\end_layout
+
+\begin_layout Standard
+Each tango device server automatically have a separate polling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+polling
+\end_layout
+
+\end_inset
+
+ thread pool.
+ Polling a device means periodically executing command on a device (or reading
+ device attribute) and storing the results (or the thrown exception) in
+ a polling buffer.
+ The aim of this polling is threefold :
+\end_layout
+
+\begin_layout Itemize
+Speed-up response time for slow device
+\end_layout
+
+\begin_layout Itemize
+Get a first-level history of device command output or attribute value
+\end_layout
+
+\begin_layout Itemize
+Be the data source for the Tango event system
+\end_layout
+
+\begin_layout Standard
+Speeding-up response time is achieved because the command_inout CORBA operation
+ is able to get its data from the polling buffer or from the a real access
+ to the device.
+ For 
+\begin_inset Quotes eld
+\end_inset
+
+slow
+\begin_inset Quotes erd
+\end_inset
+
+ device, getting the data from the buffer is much faster than accessing
+ the device.
+ Returning a first-level command output history (or attribute value history)
+ to a client is possible due to the polling buffer which is managed as a
+ circular buffer.
+ The history is the contents of this circular buffer.
+ Obviously, the history depth is limited to the depth of the circular buffer.
+ The polling is also the data source for the event system because detecting
+ an event means being able to regularly read the data, memorize it and declaring
+ that it is an event after some comparison with older values.
+\end_layout
+
+\begin_layout Subsection
+Configuring the polling system
+\end_layout
+
+\begin_layout Subsubsection
+Configuring what has to be polled and how
+\end_layout
+
+\begin_layout Standard
+It is possible to configure the polling in order to poll :
+\end_layout
+
+\begin_layout Itemize
+Any command which does not need input parameter
+\end_layout
+
+\begin_layout Itemize
+Any attribute
+\end_layout
+
+\begin_layout Standard
+Configuring the polling is done by sending command to the device server
+ administration device automatically implemented in every device server
+ process.
+ Seven commands are dedicated to this feature.
+ These commands are
+\end_layout
+
+\begin_layout Description
+AddObjPolling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AddObjPolling
+\end_layout
+
+\end_inset
+
+ It add a new object (command or attribute) to the list of object(s) to
+ be polled.
+ It is also with this command that the polling period is specified.
+\end_layout
+
+\begin_layout Description
+RemObjPolling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+RemObjPolling
+\end_layout
+
+\end_inset
+
+ To remove one object (command or attribute) from the polled object(s) list
+\end_layout
+
+\begin_layout Description
+UpdObjPollingPeriod
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+UpdObjPollingPeriod
+\end_layout
+
+\end_inset
+
+ Change one object polling period
+\end_layout
+
+\begin_layout Description
+StartPolling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+StartPolling
+\end_layout
+
+\end_inset
+
+ Starts polling for the whole process
+\end_layout
+
+\begin_layout Description
+StopPolling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+StopPolling
+\end_layout
+
+\end_inset
+
+ Stops polling for the whole process
+\end_layout
+
+\begin_layout Description
+PolledDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+PolledDevice
+\end_layout
+
+\end_inset
+
+ Allow a client to know which device are polled
+\end_layout
+
+\begin_layout Description
+DevPollStatus
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevPollStatus
+\end_layout
+
+\end_inset
+
+ Allow a client to precisely knows the polling status for a device
+\end_layout
+
+\begin_layout Standard
+All the necessary parameters for the polling configuration are stored in
+ the Tango database.
+ Therefore, the polling configuration is not lost after a device server
+ process stop and restart (or after a device server process crash!!).
+\end_layout
+
+\begin_layout Standard
+It is also possible to automatically poll a command (or an attribute) without
+ sending command to the device server administration device.
+ This request some coding (a method call) in the device server software
+ during the command or attribute creation.
+ In this case, for every devices supporting this command or this attribute,
+ polling configuration will be automatically updated in the database and
+ the polling will start automatically at each device server process startup.
+ It is possible to stop this behavior on a device basis by sending a RemObjPolli
+ng
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+RemObjPolling
+\end_layout
+
+\end_inset
+
+ command to the device server administration device.
+ The following piece of code shows how the source code should be written.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+     1  
+\end_layout
+
+\begin_layout LyX-Code
+     2  void DevTestClass::command_factory()
+\end_layout
+
+\begin_layout LyX-Code
+     3  {
+\end_layout
+
+\begin_layout LyX-Code
+     4  ...
+\end_layout
+
+\begin_layout LyX-Code
+     5          command_list.push_back(new IOStartPoll("IOStartPoll",
+\end_layout
+
+\begin_layout LyX-Code
+     6                                                 Tango::DEV_VOID,
+\end_layout
+
+\begin_layout LyX-Code
+     7                                                 Tango::DEV_LONG,
+\end_layout
+
+\begin_layout LyX-Code
+     8                                                 "Void",
+\end_layout
+
+\begin_layout LyX-Code
+     9                                                 "Constant number"));
+\end_layout
+
+\begin_layout LyX-Code
+    10          command_list.back()->set_polling_period(400);
+\end_layout
+
+\begin_layout LyX-Code
+    11  ...
+\end_layout
+
+\begin_layout LyX-Code
+    12  }
+\end_layout
+
+\begin_layout LyX-Code
+    13  
+\end_layout
+
+\begin_layout LyX-Code
+    14  
+\end_layout
+
+\begin_layout LyX-Code
+    15  void DevTestClass::attribute_factory(vector<Tango::Attr *> &att_list)
+\end_layout
+
+\begin_layout LyX-Code
+    16  {
+\end_layout
+
+\begin_layout LyX-Code
+    17  ...
+\end_layout
+
+\begin_layout LyX-Code
+    18          att_list.push_back(new Tango::Attr("String_attr",
+\end_layout
+
+\begin_layout LyX-Code
+    19                                             Tango::DEV_STRING,
+\end_layout
+
+\begin_layout LyX-Code
+    20                                             Tango::READ));
+\end_layout
+
+\begin_layout LyX-Code
+    21          att_list.back()->set_polling_period(250);
+\end_layout
+
+\begin_layout LyX-Code
+    22  ...
+\end_layout
+
+\begin_layout LyX-Code
+    23  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+A polling period of 400 mS is set for the command called 
+\begin_inset Quotes eld
+\end_inset
+
+IOStartPoll
+\begin_inset Quotes erd
+\end_inset
+
+ at line 10 with the 
+\emph on
+set_polling_period
+\emph default
+ method of the Command class.
+ Therefore, for a device of this class, the polling thread will start polling
+ its IOStartPoll command at process start-up except if a RemObjPolling indicatin
+g this device and the IOStartPoll command has already been received by the
+ device server administration device.
+ This is exactly the same behavior for attribute.
+ The polling period for attribute called 
+\begin_inset Quotes eld
+\end_inset
+
+String_attr
+\begin_inset Quotes erd
+\end_inset
+
+ is defined at line 20.
+\end_layout
+
+\begin_layout Standard
+Configuring the polling means defining device attribute/command polling
+ period.
+ The polling period has to be chosen with care.
+ If reading an attribute needs 200 mS, there is no point to poll this attribute
+ with a polling period equal or even below 200 mS.
+ You should also take into account that some "free" time has to be foreseen
+ for external request(s) on the device.
+ On average, for one attribute needing X mS as reading time, define a polling
+ period which is equal to 1.4 X (280 mS for our example of one attribute
+ needing 200 mS as reading time).
+ In case the polling tuning is given to external user, Tango provides a
+ way to define polling period minimun threshold.
+ This is done using device properties.
+ These properties are named 
+\emph on
+min_poll_period
+\emph default
+, 
+\emph on
+cmd_min_poll_period
+\emph default
+ and 
+\emph on
+attr_min_poll_period
+\emph default
+.
+ The property min_poll_period
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+min-poll-period
+\end_layout
+
+\end_inset
+
+ (mS) defined a minimun polling period for the device.
+ The property cmd_min_poll_period
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+cmd-min-poll-period
+\end_layout
+
+\end_inset
+
+ allows the definition of a minimun polling period for a specific device
+ command.
+ The property attr_min_poll_period
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attr-min-poll-period
+\end_layout
+
+\end_inset
+
+ allows the definition of a minimun polling period for one device attribute.
+ In case these properties are defined, it is not possible to poll the device
+ command/attribute with a polling period below those defined by these properties.
+ See Appendix A on device parameter to get a precise syntax description
+ for these properties.
+\end_layout
+
+\begin_layout Standard
+The Jive
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Jive doc"
+
+\end_inset
+
+ tool also allows a graphical device polling configuration.
+\end_layout
+
+\begin_layout Subsubsection
+Configuring the polling threads pool
+\end_layout
+
+\begin_layout Standard
+Starting with Tango release 7, a Tango device server process may have several
+ polling threads managed as a pool.
+ For instance, this could be usefull in case of devices within the same
+ device server process but accessed by different hardware channel when one
+ of the channel is not responding (Thus generating long timeout and de-synchroni
+sing the polling thread).
+ By default, the polling threads pool size is set to 1 and all the polled
+ object(s) are managed by the same thread (idem polling system in Tango
+ releases older than release 7) .
+ The configuration of the polling thread pool is done using two properties
+ associated to the device server administration device.
+ These properties are named:
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+polling_threads_pool_size
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+polling-threads-pool-size
+\end_layout
+
+\end_inset
+
+
+\emph default
+ defining the maximun number of threads that you can have in the pool
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+polling_threads_pool_conf
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+polling-threads-pool-conf
+\end_layout
+
+\end_inset
+
+
+\emph default
+ defining which threads in the pool manages which device
+\end_layout
+
+\begin_layout Standard
+The granularity of the polling threads pool tuning is the device.
+ You cannot ask the polling threads pool to have thread number 1 in charge
+ of attribute 
+\emph on
+att1
+\emph default
+ of device 
+\emph on
+dev1
+\emph default
+ and thread number 2 to be in charge of 
+\emph on
+att2
+\emph default
+ of the same device 
+\emph on
+dev1
+\emph default
+.
+\end_layout
+
+\begin_layout Standard
+When you require a new object (command or attribute) to be polled, two main
+ cases may arrive:
+\end_layout
+
+\begin_layout Enumerate
+Some polled object(s) belonging to the device are already polled by one
+ of the polling threads in the pool: There is no new thread created.
+ The object is simply added to the list of objects to be polled for the
+ existing thread
+\end_layout
+
+\begin_layout Enumerate
+There is no thread already created for the device.
+ We have two sub-cases:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The number of polling threads is less than the polling_threads_pool_size:
+ A new thread is created and started to poll the object (command or attribute)
+\end_layout
+
+\begin_layout Enumerate
+The number of polling threads is already equal to the polling_threads_pool_size:
+ The software search for the thread with the smallest number of polled objects
+ and add the new polled object to this thread
+\end_layout
+
+\end_deeper
+\begin_layout Standard
+Each time the polling threads pool configuration is changed, it is written
+ in the database using the polling_threads_pool_conf property.
+ If the behaviour previously described does not fulfill your needs, it is
+ possible to update the polling_threads_pool_conf property in a graphical
+ way using the Tango Astor 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Astor_doc"
+
+\end_inset
+
+ tool or manually using the Jive tool 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Jive doc"
+
+\end_inset
+
+.
+ These changes will be taken into account at the next device server process
+ start-up.
+ At start-up, the polling threads pool will allways be configured as required
+ by the polling_threads_pool_conf property.
+ The syntax used for this property is described in the Reference part of
+ the Appendix 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:Reference-part"
+
+\end_inset
+
+.
+ The following window dump is the Astor tool window which allows polling
+ threads pool management.
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Graphics
+	filename ThreadsManagement.png
+
+\end_inset
+
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align block
+In this example, the polling threads pool size to set to 9 but only 4 polling
+ threads are running.
+ Thread 1 is in charge of all polled objects related to device pv/thread-pool/te
+st-1 and pv/thread-pool/test-2.
+ Thread 2 is in charge of all polled objects related to device pv/thread-pool/te
+st-3.
+ Thread 3 is in charge of all polled objects related to device pv/thread-pool/te
+st-5 anf finally, thread 4 is in charge of all polled objects for devices
+ pv/thread-pool/test-4, pv/thread-pool/test-6 and pv/thread-pool/test-7.
+\end_layout
+
+\begin_layout Standard
+It's also possible to define the polling threads pool size programmatically
+ in the main function of a device server process using the 
+\emph on
+Util::set_polling_threads_pool_size()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+set-polling-threads-pool-size
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method before the call to the 
+\emph on
+Util::server_init()
+\emph default
+ method
+\end_layout
+
+\begin_layout Subsection
+Reading data from the polling buffer
+\end_layout
+
+\begin_layout Standard
+For a polled command or a polled attribute, a client has three possibilities
+ to get command result or attribute value (or the thrown exception) :
+\end_layout
+
+\begin_layout Itemize
+From the device itself
+\end_layout
+
+\begin_layout Itemize
+From the polling buffer
+\end_layout
+
+\begin_layout Itemize
+From the polling buffer first and from the device if data in the polling
+ buffer are invalid or if the polling is badly configured.
+\end_layout
+
+\begin_layout Standard
+The choice is done during the command_inout CORBA operation by positioning
+ one of the operation parameter.
+ When reading data from the polling buffer, several error cases are possible
+ 
+\end_layout
+
+\begin_layout Itemize
+The data in the buffer are not valid any more.
+ Every time data are requested from the polling buffer, a check is done
+ between the client request date and the date when the data were stored
+ in the buffer.
+ An exception is thrown if the delta is greater than the polling period
+ multiplied by a 
+\begin_inset Quotes eld
+\end_inset
+
+too old
+\begin_inset Quotes erd
+\end_inset
+
+ factor.
+ This factor has a default value and is up-datable via a device property.
+ This is detailed in the reference part of this manual.
+\end_layout
+
+\begin_layout Itemize
+The polling is correctly configured but there is no data yet in the polling
+ buffer.
+\end_layout
+
+\begin_layout Subsection
+Retrieving command/attribute result history
+\end_layout
+
+\begin_layout Standard
+The polling thread stores the command result or attribute value in circular
+ buffers.
+ It is possible to retrieve an history of the command result (or attribute
+ value) from these polling buffers.
+ Obviously the history is limited by the depth of the circular buffer.
+ For commands, a CORBA operation called 
+\emph on
+command_inout_history_2
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-inout-history-2
+\end_layout
+
+\end_inset
+
+
+\emph default
+ allows this retrieval.
+ The client specifies the command name and the record number he want to
+ retrieve.
+ For each record, the call returns the date when the command was executed,
+ the command result or the exception stack in case of the command failed
+ when it was executed by the polling thread.
+ In such a case, the exception stack is sent as a structure member and not
+ as an exception.
+ The same thing is available for attribute.
+ The CORBA operation name is 
+\emph on
+read_attribute_history_2
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attribute-history-2
+\end_layout
+
+\end_inset
+
+.
+
+\emph default
+ For these two calls, there is no check done between the call date and the
+ record date in contrary of the call to retrieve the last command result
+ (or attribute value).
+\end_layout
+
+\begin_layout Subsection
+Externally triggered polling (only for C++ device server)
+\end_layout
+
+\begin_layout Standard
+Sometimes, rather than polling a command or an attribute regulary with a
+ fixed period, it is more interesting to "manually" decides when the polling
+ must occurs.
+ The Tango polling system also supports this kind of usage.
+ This is called 
+\emph on
+externally triggered polling
+\emph default
+.
+ To define one attribute (or command) as externally triggered, simply set
+ its polling period to 0.
+ This can be done with the device server administration device AddObjPolling
+ or UpdObjPollingPeriod command.
+ Once in this mode, the attribute (or command) polling is triggered with
+ the 
+\emph on
+trigger_cmd_polling()
+\emph default
+ method (or 
+\emph on
+trigger_attr_polling()
+\emph default
+ method) of the Util class.
+ The following piece of code shows how this method could be used for one
+ externally triggered command.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+     1          .....
+\end_layout
+
+\begin_layout LyX-Code
+     2  
+\end_layout
+
+\begin_layout LyX-Code
+     3          string ext_polled_cmd("MyCmd");
+\end_layout
+
+\begin_layout LyX-Code
+     4          Tango::DeviceImpl *device = .....;
+\end_layout
+
+\begin_layout LyX-Code
+     5  
+\end_layout
+
+\begin_layout LyX-Code
+     6          Tango::Util *tg = Tango::Util::instance();
+\end_layout
+
+\begin_layout LyX-Code
+     7  
+\end_layout
+
+\begin_layout LyX-Code
+     8          tg->trigger_cmd_polling(device,ext_polled_cmd);
+\end_layout
+
+\begin_layout LyX-Code
+     9  
+\end_layout
+
+\begin_layout LyX-Code
+    10          .....
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+line 3 : The externally polled command name
+\end_layout
+
+\begin_layout Standard
+line 4 : The device object
+\end_layout
+
+\begin_layout Standard
+line 8 : Trigger polling of command MyCmd
+\end_layout
+
+\begin_layout Subsection
+Filling polling buffer (only for C++ device server)
+\end_layout
+
+\begin_layout Standard
+Some hardware to be interfaced already returned an array of pair value,
+ timestamp.
+ In order to be read with the 
+\emph on
+command_inout_history
+\emph default
+ or 
+\emph on
+read_attribute_history
+\emph default
+ calls, this array has to be transferred in the attribute or command polling
+ buffer.
+ This is possible only for attribute or command configured in the externally
+ triggered polling mode.
+ Once in externally triggered polling mode, the attribute (or command) polling
+ buffer is filled with the 
+\emph on
+fill_cmd_polling_buffer()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+fill-cmd-polling-buffer
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method (or 
+\emph on
+fill_attr_polling_buffer()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+fill-attr-polling-buffer
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method) of the Util class.
+ For command, the user uses a template class called 
+\emph on
+TimedCmdData
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TimedCmdData
+\end_layout
+
+\end_inset
+
+
+\emph default
+ for each element of the command history.
+ Each element is stored in a stack in one instance of a template class called
+ 
+\emph on
+CmdHistoryStack
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CmdHistoryStack
+\end_layout
+
+\end_inset
+
+.
+
+\emph default
+ This object is one of the argument of the fill_cmd_polling_buffer() method.
+ Obviously, the stack depth cannot be larger than the polling buffer depth.
+ See 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:The-device-polling-prop"
+
+\end_inset
+
+ to learn how the polling buffer depth is defined.
+ The same way is used for attribute with the 
+\emph on
+TimedAttrData
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TimedAttrData
+\end_layout
+
+\end_inset
+
+
+\emph default
+ and 
+\emph on
+AttrHistoryStack
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AttrHistoryStack
+\end_layout
+
+\end_inset
+
+
+\emph default
+ template classes.
+ These classes are documented in 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+.
+ The following piece of code fills the polling buffer for a command called
+ MyCmd which is already in externally triggered mode.
+ It returns a DevVarLongArray data type with three elements.
+ This example is not really something you will find in a real hardware interface.
+ It is only to demonstrate the fill_cmd_polling_buffer() method usage.
+ Error management has also been removed.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+     1          ....
+\end_layout
+
+\begin_layout LyX-Code
+     2  
+\end_layout
+
+\begin_layout LyX-Code
+     3          Tango::DevVarLongArray dvla_array[4];
+\end_layout
+
+\begin_layout LyX-Code
+     4          
+\end_layout
+
+\begin_layout LyX-Code
+     5          for(int i = 0;i < 4;i++)
+\end_layout
+
+\begin_layout LyX-Code
+     6          {
+\end_layout
+
+\begin_layout LyX-Code
+     7                  dvla_array[i].length(3);
+\end_layout
+
+\begin_layout LyX-Code
+     8                  dvla_array[i][0] = 10 + i;
+\end_layout
+
+\begin_layout LyX-Code
+     9                  dvla_array[i][1] = 11 + i;
+\end_layout
+
+\begin_layout LyX-Code
+    10                  dvla_array[i][2] = 12 + i;
+\end_layout
+
+\begin_layout LyX-Code
+    11          }
+\end_layout
+
+\begin_layout LyX-Code
+    12  
+\end_layout
+
+\begin_layout LyX-Code
+    13          Tango::CmdHistoryStack<DevVarLongArray> chs;
+\end_layout
+
+\begin_layout LyX-Code
+    14          chs.length(4);
+\end_layout
+
+\begin_layout LyX-Code
+    15  
+\end_layout
+
+\begin_layout LyX-Code
+    16          for (int k = 0;k < 4;k++)
+\end_layout
+
+\begin_layout LyX-Code
+    17          {
+\end_layout
+
+\begin_layout LyX-Code
+    18                  time_t when = time(NULL);
+\end_layout
+
+\begin_layout LyX-Code
+    19  
+\end_layout
+
+\begin_layout LyX-Code
+    20                  Tango::TimedCmdData<DevVarLongArray> tcd(&dvla_array[k],
+when);
+\end_layout
+
+\begin_layout LyX-Code
+    21                  chs.push(tcd);
+\end_layout
+
+\begin_layout LyX-Code
+    22          }
+\end_layout
+
+\begin_layout LyX-Code
+    23  
+\end_layout
+
+\begin_layout LyX-Code
+    24          Tango::Util *tg = Tango::Util::instance();
+\end_layout
+
+\begin_layout LyX-Code
+    25          string cmd_name("MyCmd");
+\end_layout
+
+\begin_layout LyX-Code
+    26          DeviceImpl *dev = ....;
+\end_layout
+
+\begin_layout LyX-Code
+    27  
+\end_layout
+
+\begin_layout LyX-Code
+    28          tg->fill_cmd_polling_buffer(dev,cmd_name,chs);
+\end_layout
+
+\begin_layout LyX-Code
+    29  
+\end_layout
+
+\begin_layout LyX-Code
+    30          .....
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 3-11 : Simulate data coming from hardware
+\end_layout
+
+\begin_layout Standard
+Line 13-14 : Create one instance of the CmdHistoryStack class and reserve
+ space for one history of 4 elements
+\end_layout
+
+\begin_layout Standard
+Line 16-17 : A loop on each history element
+\end_layout
+
+\begin_layout Standard
+Line 18 : Get date (hardware simulation)
+\end_layout
+
+\begin_layout Standard
+Line 20 : Create one instance of the TimedCmdData class with data and date
+\end_layout
+
+\begin_layout Standard
+Line 21 : Store this command history element in the history stack.
+ The element order will be the insertion order whatever the element date
+ is.
+\end_layout
+
+\begin_layout Standard
+Line 28 : Fill command polling buffer
+\end_layout
+
+\begin_layout Standard
+After one execution of this code, a command_inout_history() call will return
+ one history with 4 elements.
+ The first array element of the oldest history record will have the value
+ 10.
+ The first array element of the newest history record will have the value
+ 13.
+ A command_inout() call with the data source parameter set to CACHE will
+ return the newest history record (ie an array with values 13,14 and 15).
+ A command_inout() call with the data source parameter set to DEVICE will
+ return what is coded is the command method.
+ If you execute this code a second time, a command_inout_history() call
+ will return an history of 8 elements.
+\end_layout
+
+\begin_layout Standard
+The next example fills the polling buffer for an attribute called MyAttr
+ which is already in externally triggered mode.
+ It is a scalar attribute of the DevString data type.
+ This example is not really something you will find in a real hardware interface.
+ It is only to demonstrate the fill_attr_polling_buffer() method usage with
+ memory management issue.
+ Error management has also been removed.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+     1               ....
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+     2  
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+     3          AttrHistoryStack<DevString> ahs;
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+     4          ahs.length(3);
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+     5  
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+     6          for (int k = 0;k < 3;k++)
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+     7          {
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+     8                  time_t when = time(NULL);
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+     9  
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+    10                  DevString *ptr = new DevString [1];
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+    11                  ptr = CORBA::string_dup("Attr history data");
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+    12  
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+    13                  TimedAttrData<DevString> tad(ptr,Tango::ATTR_VALID,true,
+when);
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+    14                  ahs.push(tad);
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+    15          }
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+    16  
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+    17          Tango::Util *tg = Tango::Util::instance();
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+    18          string attr_name("MyAttr");
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+    19          DeviceImpl *dev = ....;
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+    20  
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+    21          tg->fill_attr_polling_buffer(dev,attr_name,ahs);
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+    22  
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+    23          .....
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+  
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 3-4 : Create one instance of the AttrHistoryStack class and reserve
+ space for an history with 3 elements
+\end_layout
+
+\begin_layout Standard
+Line 6-7 : A loop on each history element
+\end_layout
+
+\begin_layout Standard
+Line 8 : Get date (hardware simulation)
+\end_layout
+
+\begin_layout Standard
+Line 10-11 : Create a string.
+ Note that the DevString object is created on the heap
+\end_layout
+
+\begin_layout Standard
+Line 13 : Create one instance of the TimedAttrData class with data and date
+ requesting the memory to be released.
+\end_layout
+
+\begin_layout Standard
+Line 14 : Store this attribute history element in the history stack.
+ The element order will be the insertion order whatever the element date
+ is.
+\end_layout
+
+\begin_layout Standard
+Line 21 : Fill command polling buffer
+\end_layout
+
+\begin_layout Standard
+It is not necessary to return the memory allocated at line 10.
+ The 
+\emph on
+fill_attr_polling_buffer()
+\emph default
+ method will do it for you.
+\end_layout
+
+\begin_layout Section
+Threading
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Threading"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+When used with C++, Tango used omniORB as underlying ORB.
+ This CORBA implementation is a threaded implementation and therefore a
+ C++ Tango device server or client are multi-threaded processes.
+\end_layout
+
+\begin_layout Subsection
+C++ device server process
+\end_layout
+
+\begin_layout Standard
+A classical Tango device server without any connected clients has five threads.
+ These threads
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+thread
+\end_layout
+
+\end_inset
+
+ are :
+\end_layout
+
+\begin_layout Enumerate
+The main thread waiting in the ORB main loop
+\end_layout
+
+\begin_layout Enumerate
+An ORB implementation thread (the POA thread)
+\end_layout
+
+\begin_layout Enumerate
+The ORB scavanger thread
+\end_layout
+
+\begin_layout Enumerate
+The signal thread
+\end_layout
+
+\begin_layout Enumerate
+The heartbeat thread (needed by the Tango event system)
+\end_layout
+
+\begin_layout Standard
+On top of these five threads, you have to add the thread(s) used by the
+ polling threads pool.
+ This number depends on the polling thread pool configuration and could
+ be between 0 (no polling at all) and the maximun number of threads in the
+ pool.
+\end_layout
+
+\begin_layout Standard
+Linux specific (for kernel < 2.6) : On top of the 5 basic threads allways
+ there, there is a sixth thread which is the Linux thread manager.
+ If you type a "ps" command, you will see at least six "processes".
+ The signal thread is the fifth one and its PID is the PID which should
+ be used when sending signal
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+signal
+\end_layout
+
+\end_inset
+
+ to the device server process.
+\end_layout
+
+\begin_layout Standard
+A new thread is started for each connected client.
+ Device server are mostly used to interface hardware which most of the time
+ does not support multi-threaded access.
+ Therefore, all remote calls executed from a client are serialized within
+ the device server code by using mutual exclusion.
+ See chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Serialization-model-within"
+
+\end_inset
+
+ on which serialization model are available.
+ In order to limit thread number, the underlying ORB (omniORB) is configured
+ to shutdown threads dedicated to client if the connection is inactive for
+ more than 3 minutes.
+ To also limit thread number, the ORB is configured to create one thread
+ per connection up to 55 threads.
+ When this level is reached, the threading model is automatically switch
+ to a "thread pool" model with up to 100 threads.
+ If the number of threads decrease down to 50, the threading model will
+ return to "thread per connection" model.
+\end_layout
+
+\begin_layout Standard
+If you are using event, the event system for its internal heartbeat system
+ periodically (every 200 seconds) sends a command to the device server administr
+ation device.
+ As explained above, a thread is created to execute these command.
+ The omniORB scavanger will terminate this thread before the next event
+ system heartbeat command arrives.
+ For example, if you have a device server with three connected clients using
+ only event, the process thread number will permanently change between 5
+ and 8 threads (6 and 9 under Linux with kernel < 2.6).
+\end_layout
+
+\begin_layout Standard
+In summary, the number of threads in a device server process can be evaluated
+ with the following formula:
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+
+\series bold
+4 + 1 + k + m
+\series default
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+k is the number of polling threads used from the polling threads pool and
+ m is the number of threads used for connected clients.
+\end_layout
+
+\begin_layout Subsubsection
+Serialization model within a device server
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Serialization-model-within"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Four serialization
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+serialization
+\end_layout
+
+\end_inset
+
+ models are available within a device server.
+ These models protect all requests coming from the network but also requests
+ coming from the polling thread.
+ These models are:
+\end_layout
+
+\begin_layout Enumerate
+Serialization by device.
+ All access to the same device are serialized.
+ As an example, let's take a device server implementing one class of device
+ with two instances (dev1 and dev2).
+ Two clients are connected to these devices (client1 and client2).
+ Client2 will not be able to access dev1 if client1 is using it.
+ Nevertheless, client2 is able to access dev2 while client1 access dev1
+ (There is one mutual exclusion object by device)
+\end_layout
+
+\begin_layout Enumerate
+Serialization by class.
+ With non multi-threaded legacy software, the preceding scenario could generate
+ problem.
+ In this mode of serialization, client2 is not able to access dev2 while
+ client1 access dev1 because dev2 and dev1 are instances of the same class
+ (There is one mutual exclusion object by class)
+\end_layout
+
+\begin_layout Enumerate
+Serialization by process.
+ This is one step further than the previous case.
+ In this mode, only one client can access any device embedded within the
+ device server at a time.
+ There is only one mutual exclusion object for the whole process)
+\end_layout
+
+\begin_layout Enumerate
+No serialization.
+ This is an exotic kind of serialization and 
+\series bold
+should be used with extreme care
+\series default
+ only with device which are fully thread safe.
+ In this model, most of the device access are not serialized at all.
+ Due to Tango internal structure, the 
+\emph on
+get_attribute_config
+\emph default
+, 
+\emph on
+set_attribute_config
+\emph default
+, 
+\emph on
+read_attributes
+\emph default
+ and 
+\emph on
+write_attributes
+\emph default
+ CORBA calls are still protected.
+ Reading the device state and status via commands or via CORBA attribute
+ is also protected.
+\end_layout
+
+\begin_layout Standard
+By default, every Tango device server is in serialization by device mode.
+ A method of the Tango::Util class allows to change this default behavior.
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  #include <tango.h>
+\end_layout
+
+\begin_layout LyX-Code
+     2  
+\end_layout
+
+\begin_layout LyX-Code
+     3  int main(int argc,char *argv[])
+\end_layout
+
+\begin_layout LyX-Code
+     4  {
+\end_layout
+
+\begin_layout LyX-Code
+     5  
+\end_layout
+
+\begin_layout LyX-Code
+     6          try
+\end_layout
+
+\begin_layout LyX-Code
+     7          {
+\end_layout
+
+\begin_layout LyX-Code
+     8          
+\end_layout
+
+\begin_layout LyX-Code
+     9                  Tango::Util *tg = Tango::Util::init(argc,argv);
+\end_layout
+
+\begin_layout LyX-Code
+    10  
+\end_layout
+
+\begin_layout LyX-Code
+    11                  tg->set_serial_model(Tango::BY_CLASS);
+\end_layout
+
+\begin_layout LyX-Code
+    12  
+\end_layout
+
+\begin_layout LyX-Code
+    13                  tg->server_init();
+\end_layout
+
+\begin_layout LyX-Code
+    14  
+\end_layout
+
+\begin_layout LyX-Code
+    15                  cout << "Ready to accept request" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    16                  tg->server_run();
+\end_layout
+
+\begin_layout LyX-Code
+    17          }
+\end_layout
+
+\begin_layout LyX-Code
+    18          catch (bad_alloc)
+\end_layout
+
+\begin_layout LyX-Code
+    19          {
+\end_layout
+
+\begin_layout LyX-Code
+    20                  cout << "Can't allocate memory!!!" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    21                  cout << "Exiting" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    22          }
+\end_layout
+
+\begin_layout LyX-Code
+    23          catch (CORBA::Exception &e)
+\end_layout
+
+\begin_layout LyX-Code
+    24          {
+\end_layout
+
+\begin_layout LyX-Code
+    25                  Tango::Except::print_exception(e);
+\end_layout
+
+\begin_layout LyX-Code
+    26                  
+\end_layout
+
+\begin_layout LyX-Code
+    27                  cout << "Received a CORBA::Exception" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    28                  cout << "Exiting" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    29          }
+\end_layout
+
+\begin_layout LyX-Code
+    30          
+\end_layout
+
+\begin_layout LyX-Code
+    31          return(0);
+\end_layout
+
+\begin_layout LyX-Code
+    32  }
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The serialization model is set at line 11 before the server is initialized
+ and the infinite loop is started.
+ See 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+ for all details on the methods to set/get serialization model.
+\end_layout
+
+\begin_layout Subsubsection
+Attribute Serialization model
+\end_layout
+
+\begin_layout Standard
+Even with the serialization model described previously, in case of attributes
+ carrying a large number of data and several clients reading this attribute,
+ a device attribute serialization has to be followed.
+ Without this level of serialization, for attribute using a shared buffer,
+ a thread scheduling may happens while the device server process is in the
+ CORBA layer transferring the attribute data on the network.
+ Three serialization
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+serialization
+\end_layout
+
+\end_inset
+
+ models are available for attribute serialization.
+ The default is well adapted to nearly all cases.
+ Nevertheless, if the user code manages several attributes data buffer or
+ if it manages its own buffer protection by one way or another, it could
+ be interesting to tune this serialization level.
+ The available models are:
+\end_layout
+
+\begin_layout Enumerate
+Serialization by kernel.
+ This is the default case.
+ The kernel is managing the serialization
+\end_layout
+
+\begin_layout Enumerate
+Serialization by user.
+ The user code is in charge of the serialization.
+ This serialization is done by the use of a omni_mutex object.
+ An omni_mutex is an object provided by the omniORB package.
+ It is the user responsability to lock this mutex when appropriate and to
+ give this mutex to the Tango kernel before leaving the attribute read method
+\end_layout
+
+\begin_layout Enumerate
+No serialization.
+\end_layout
+
+\begin_layout Standard
+By default, every Tango device attribute is in serialization by kernel.
+ Methods of the Tango::Attribute class allow to change the attribute serializati
+on behavior and to give the user omni_mutex object to the kernel.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+1 void MyClass::init_device()
+\end_layout
+
+\begin_layout LyX-Code
+2 {
+\end_layout
+
+\begin_layout LyX-Code
+3    ...
+\end_layout
+
+\begin_layout LyX-Code
+4    ...
+\end_layout
+
+\begin_layout LyX-Code
+5    Tango::Attribute &att = dev_attr->get_attr_by_name("TheAttribute");
+\end_layout
+
+\begin_layout LyX-Code
+6    att.set_attr_serial_model(Tango::ATTR_BY_USER);
+\end_layout
+
+\begin_layout LyX-Code
+7    ....
+\end_layout
+
+\begin_layout LyX-Code
+8    ....
+\end_layout
+
+\begin_layout LyX-Code
+9 
+\end_layout
+
+\begin_layout LyX-Code
+10 }
+\end_layout
+
+\begin_layout LyX-Code
+11 
+\end_layout
+
+\begin_layout LyX-Code
+12 
+\end_layout
+
+\begin_layout LyX-Code
+13 void MyClass::read_TheAttribute(Tango::Attribute &attr)
+\end_layout
+
+\begin_layout LyX-Code
+14 {
+\end_layout
+
+\begin_layout LyX-Code
+15    ....
+\end_layout
+
+\begin_layout LyX-Code
+16    ....
+\end_layout
+
+\begin_layout LyX-Code
+17    the_mutex.lock();
+\end_layout
+
+\begin_layout LyX-Code
+18    ....
+\end_layout
+
+\begin_layout LyX-Code
+19    // Fill the attribute buffer
+\end_layout
+
+\begin_layout LyX-Code
+20    ....
+\end_layout
+
+\begin_layout LyX-Code
+21    attr.set_value(buffer,....);
+\end_layout
+
+\begin_layout LyX-Code
+22    attr->set_user_attr_mutex(&the_mutex);
+\end_layout
+
+\begin_layout LyX-Code
+23 }
+\end_layout
+
+\begin_layout LyX-Code
+24 
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The serialization model is set at line 6 in the init_device() method.
+ The user omni_mutex is passed to the Tango kernel at line 22.
+ This omni_mutex object is a device data member.
+ See 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+ for all details on the methods to set attribute serialization model.
+\end_layout
+
+\begin_layout Subsection
+C++ client process
+\end_layout
+
+\begin_layout Standard
+Clients are also multi threaded processes.
+ The underlying C++ ORB (omniORB) try to keep system resources to a minimum.
+ To decrease process file descriptors usage, each connection to server is
+ automatically closed if it is idle for more than 2 minutes and automatically
+ re-opened when needed.
+ A dedicated thread is spawned by the ORB to manage this automatic closing
+ connection (the scavanger thread).
+\end_layout
+
+\begin_layout Standard
+Threrefore, a Tango client has two threads (3 under Linux) which are:
+\end_layout
+
+\begin_layout Enumerate
+The main thread
+\end_layout
+
+\begin_layout Enumerate
+The ORB scavanger thread
+\end_layout
+
+\begin_layout Standard
+If the client is using the event system and as Tango is using the event
+ push-push model, it has to be a server for the Notification service.
+ This increases the number of thread
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+thread
+\end_layout
+
+\end_inset
+
+.
+ The client now has 6 threads (7 under Linux with kernel < 2.6) which are:
+\end_layout
+
+\begin_layout Enumerate
+The main thread
+\end_layout
+
+\begin_layout Enumerate
+The ORB scavanger thread
+\end_layout
+
+\begin_layout Enumerate
+The main server ORB loop thread
+\end_layout
+
+\begin_layout Enumerate
+The server POA thread
+\end_layout
+
+\begin_layout Enumerate
+The thread created by omniORB has soon has an event has been sent by a Notificat
+ion service.
+ This thread will execute the callbacks
+\end_layout
+
+\begin_layout Enumerate
+A Tango internal event system thread (called the KeepAliveThread)
+\end_layout
+
+\begin_layout Section
+Generating events in a device server
+\end_layout
+
+\begin_layout Standard
+The server is at the origin of events
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+event
+\end_layout
+
+\end_inset
+
+.
+ It will fire events as soon as they occur.
+ Standard events (
+\emph on
+change
+\emph default
+, 
+\emph on
+periodic
+\emph default
+ and 
+\emph on
+archive
+\emph default
+) are detected automatically in the polling thread and fired as soon as
+ they are detected.
+ The 
+\emph on
+periodic
+\emph default
+ events can only be handled by the polling thread.
+ 
+\emph on
+Change, Data ready
+\emph default
+ and 
+\emph on
+archive
+\emph default
+ events can also be pushed from the device server code.
+ To allow a client to subscribe to events of non polled attributes the server
+ has to declare that events are pushed from the code.
+ Three methods are available for this purpose:
+\end_layout
+
+\begin_layout LyX-Code
+Attr::set_change_event(bool implemented, bool detect = true);
+\end_layout
+
+\begin_layout LyX-Code
+Attr::set_archive_event(bool implemented, bool detect = true);
+\end_layout
+
+\begin_layout LyX-Code
+Attr::set_data_ready_event( bool implemented);
+\end_layout
+
+\begin_layout Standard
+where 
+\emph on
+implemented
+\emph default
+=true indicates that events are pushed manually from the code and 
+\emph on
+detect
+\emph default
+=true (when used) triggers the verification of the same event properties
+ as for events send by the polling thread.
+ When setting 
+\emph on
+detect
+\emph default
+=false, no value checking is done on the pushed value! The class DeviceImpl
+ also supports the first two methods with an addictional parameter attr_name
+ defining the attribute name.
+\end_layout
+
+\begin_layout Standard
+To push events manually from the code a set of data type dependent methods
+ can be used:
+\end_layout
+
+\begin_layout LyX-Code
+DeviceImpl::push_change_event (string attr_name, ....);
+\end_layout
+
+\begin_layout LyX-Code
+DeviceImpl::push_archive_event(string attr_name, ....);
+\end_layout
+
+\begin_layout Standard
+For the data ready event, a DeviceImpl class method has to be used to push
+ the event.
+\end_layout
+
+\begin_layout LyX-Code
+DeviceImpl::push_data_ready_event(string attr_name,Tango::DevLong ctr);
+\end_layout
+
+\begin_layout Standard
+See the class documentation for all available interfaces.
+\end_layout
+
+\begin_layout Standard
+For non-standard events a single call exists for pushing the data to the
+ CORBA Notification Service (omniNotify).
+ Clients who are subscribed to this event have to know what data type is
+ in the DeviceAttribute and unpack it accordingly.
+\end_layout
+
+\begin_layout Standard
+To push non-standard events, use the following api call is available to
+ all device servers :
+\end_layout
+
+\begin_layout LyX-Code
+DeviceImpl::push_event( string attr_name,
+\end_layout
+
+\begin_layout LyX-Code
+             vector<string> &filterable_names,
+\end_layout
+
+\begin_layout LyX-Code
+             vector<double> &filterable_vals,
+\end_layout
+
+\begin_layout LyX-Code
+             Attribute &att)
+\end_layout
+
+\begin_layout Standard
+where 
+\emph on
+attr_name
+\emph default
+ is the name of the attribute
+\emph on
+.
+ Filterable_names
+\emph default
+ and 
+\emph on
+filterable_vals
+\emph default
+ represent any filterable data which can be used by clients to filter on.
+ Here is a typical example of what a server will need to do to send its
+ own events.
+ We are in the read method of the "Sinusoide" attribute.
+ This attribute is readable as any other attribute but an event is sent
+ if its value is positive when it is read.
+ On top of that, this event is sent with one filterable field called "value"
+ which is set to the attribute value.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+1  void MyClass::read_Sinusoide(Tango::Attribute &attr)
+\end_layout
+
+\begin_layout LyX-Code
+2  {
+\end_layout
+
+\begin_layout LyX-Code
+3    ...
+\end_layout
+
+\begin_layout LyX-Code
+4       struct timeval tv;
+\end_layout
+
+\begin_layout LyX-Code
+5       gettimeofday(&tv, NULL);
+\end_layout
+
+\begin_layout LyX-Code
+6       sinusoide = 100 * sin( 2 * 3.14 * frequency * tv.tv_sec);
+\end_layout
+
+\begin_layout LyX-Code
+7  
+\end_layout
+
+\begin_layout LyX-Code
+8       if (sinusoide >= 0) 
+\end_layout
+
+\begin_layout LyX-Code
+9       {
+\end_layout
+
+\begin_layout LyX-Code
+10          vector<string> filterable_names;
+\end_layout
+
+\begin_layout LyX-Code
+11          vector<double> filterable_value;
+\end_layout
+
+\begin_layout LyX-Code
+12 
+\end_layout
+
+\begin_layout LyX-Code
+13          filterable_names.push_back("value");
+\end_layout
+
+\begin_layout LyX-Code
+14          filterable_value.push_back((double)sinusoide);
+\end_layout
+
+\begin_layout LyX-Code
+15 
+\end_layout
+
+\begin_layout LyX-Code
+16          push_event( attr.get_name(),
+\end_layout
+
+\begin_layout LyX-Code
+17                      filterable_names, filterable_value,
+\end_layout
+
+\begin_layout LyX-Code
+18                      &sinusoide);
+\end_layout
+
+\begin_layout LyX-Code
+19       }
+\end_layout
+
+\begin_layout LyX-Code
+20    ....
+\end_layout
+
+\begin_layout LyX-Code
+21    ....
+\end_layout
+
+\begin_layout LyX-Code
+22 
+\end_layout
+
+\begin_layout LyX-Code
+23 }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+line 13-14 : The filter pair name/value is initialised
+\end_layout
+
+\begin_layout Standard
+line 16-18 : The event is pushed
+\end_layout
+
+\begin_layout Section
+Memorized attribute
+\end_layout
+
+\begin_layout Standard
+It is possible to ask Tango to store in its database the last written value
+ for attribute of the SCALAR data format and obviously only for READ_WRITE
+ or READ_WITH_WRITE attribute.
+ This is fully automatic.
+ During device startup phase, for all device memorized
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+memorized
+\end_layout
+
+\end_inset
+
+ attributes, the value written in the database is fetched and applied.
+ A write_attribute call can be generated to apply the memorized value to
+ the attribute or only the attribute set point can be initialised.
+ The following piece of code shows how the source code should be written
+ to set an attribute as memorized and to initialise only the attribute set
+ point.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+1 void DevTestClass::attribute_factory(vector<Tango::Attr *> &att_list)
+\end_layout
+
+\begin_layout LyX-Code
+2  {
+\end_layout
+
+\begin_layout LyX-Code
+3      ...
+\end_layout
+
+\begin_layout LyX-Code
+4      att_list.push_back(new String_attrAttr());
+\end_layout
+
+\begin_layout LyX-Code
+5      att_list.back()->set_memorized();
+\end_layout
+
+\begin_layout LyX-Code
+6      att_list.back()->set_memorized_init(false);
+\end_layout
+
+\begin_layout LyX-Code
+7      ...
+\end_layout
+
+\begin_layout LyX-Code
+8  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 4 : The attribute to be memorized is created and inserted in the attribute
+ vector.
+\end_layout
+
+\begin_layout Standard
+Line 5 : The 
+\emph on
+set_memorized()
+\emph default
+ method of the attribute base class is called to define the attribute as
+ memorized.
+\end_layout
+
+\begin_layout Standard
+Line 6 : The set_memorized_init() method is called with the parameter false
+ to define that only the set point should be initialsied.
+\end_layout
+
+\begin_layout Section
+Transfering images
+\end_layout
+
+\begin_layout Standard
+Some optimized methods have been written to optimize image transfer between
+ client and server using the attribute DevEncoded
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevEncoded
+\end_layout
+
+\end_inset
+
+ data type.
+ All these methods have been merged in a class called EncodedAttribute.
+ Within this class, you will find methods to:
+\end_layout
+
+\begin_layout Itemize
+Encode an image in a compressed way (JPEG
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+JPEG
+\end_layout
+
+\end_inset
+
+) for images coded on 8 (gray scale), 24 or 32 bits
+\end_layout
+
+\begin_layout Itemize
+Encode a grey scale image coded on 8 or 16 bits
+\end_layout
+
+\begin_layout Itemize
+Encode a color image coded on 24 bits
+\end_layout
+
+\begin_layout Itemize
+Decode images coded on 8 or 16 bits (gray scale) and returned a 8 or 16
+ bits grey scale image
+\end_layout
+
+\begin_layout Itemize
+Decode color images transmitted using a compressed format (JPEG) and returns
+ a 32 bits RGB image
+\end_layout
+
+\begin_layout Standard
+The following code snippets are examples of how these methods have to be
+ used in a server and in a client.
+ On the server side, creates an instance of the EncodedAttribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+EncodedAttribute
+\end_layout
+
+\end_inset
+
+ class within your object
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+1 class MyDevice::Tango::Device_4Impl
+\end_layout
+
+\begin_layout LyX-Code
+2  {
+\end_layout
+
+\begin_layout LyX-Code
+3      ...
+\end_layout
+
+\begin_layout LyX-Code
+4      Tango::EncodedAttribute jpeg;
+\end_layout
+
+\begin_layout LyX-Code
+5      ...
+\end_layout
+
+\begin_layout LyX-Code
+6  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In the code of your device, use an encoding method of the EncodedAttribute
+ class
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+1 void MyDevice::read_Encoded_attr_image(Tango::Attribute &att)
+\end_layout
+
+\begin_layout LyX-Code
+2 {
+\end_layout
+
+\begin_layout LyX-Code
+3      ....
+\end_layout
+
+\begin_layout LyX-Code
+4      jpeg.encode_jpeg_gray8(imageData,256,256,50.0);
+\end_layout
+
+\begin_layout LyX-Code
+5      att.set_value(&jpeg);
+\end_layout
+
+\begin_layout LyX-Code
+6 }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 4: Image encoding.
+ The size of the image is 256 by 256.
+ Each pixel is coded using 8 bits.
+ The encoding quality is defined to 50 in a scale of 0 - 100.
+ imageData is the pointer to the image data (pointer to unsigned char)
+\end_layout
+
+\begin_layout Standard
+Line 5: Set the value of the attribute using a 
+\emph on
+Attribute::set_value()
+\emph default
+ method.
+\end_layout
+
+\begin_layout Standard
+On the client side, the code is the following (without exception management)
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+1    ....
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+2    DeviceAttribute da;
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+3    EncodedAttribute att;
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+4    int width,height;
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+5    unsigned char *gray8;
+\end_layout
+
+\begin_layout LyX-Code
+6      
+\end_layout
+
+\begin_layout LyX-Code
+7    da = device.read_attribute("Encoded_attr_image");
+\end_layout
+
+\begin_layout LyX-Code
+8    att.decode_gray8(&da,&width,&height,&gray8);
+\end_layout
+
+\begin_layout LyX-Code
+9    ....
+\end_layout
+
+\begin_layout LyX-Code
+10   delete [] gray8;
+\end_layout
+
+\begin_layout LyX-Code
+11   ...
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The attribute named Encoded_attr_image is read at line7.
+ The image is decoded at line 8 in a 8 bits gray scale format.
+ The image data are stored in the buffer pointed to by "gray8".
+ The memory allocated by the image decoding at line 8 is returned to the
+ system at line 10.
+\end_layout
+
+\begin_layout Section
+Device server with user defined event loop
+\end_layout
+
+\begin_layout Standard
+Sometimes, it could be usefull to write your own process event handling
+ loop
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+event-loop
+\end_layout
+
+\end_inset
+
+.
+ For instance, this feature can be used in a device server process where
+ the ORB is only one of several components that must perform event handling.
+ A device server with a graphical user interface must allow the GUI to handle
+ windowing events in addition to allowing the ORB to handle incoming requests.
+ These types of device server therefore perform non-blocking event handling.
+ They turn the main thread of control over each of the vvarious event-handling
+ sub-systems while not allowing any of them to block for significants period
+ of time.
+ The 
+\emph on
+Tango::Util
+\emph default
+ class has a method called 
+\emph on
+server_set_event_loop()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+server-set-event-loop
+\end_layout
+
+\end_inset
+
+
+\emph default
+ to deal with such a case.
+ This method has only one argument which is a function pointer.
+ This function does not receive any argument and returns a boolean.
+ If this boolean is true, the device server process exits.
+ The device server core will call this function in a loop without any sleeping
+ time between the call.
+ It is the user responsability to implement in this function some kind of
+ sleeping mechanism in order not to make this loop too CPU consuming.
+ The code of this function is executed by the device server main thread
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+thread
+\end_layout
+
+\end_inset
+
+.
+ The following piece of code is an example of how you can use this feature.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\align block
+     1  
+\end_layout
+
+\begin_layout LyX-Code
+     2  bool my_event_loop()
+\end_layout
+
+\begin_layout LyX-Code
+     3  {
+\end_layout
+
+\begin_layout LyX-Code
+     4     bool ret;
+\end_layout
+
+\begin_layout LyX-Code
+     5  
+\end_layout
+
+\begin_layout LyX-Code
+     6     some_sleeping_time();
+\end_layout
+
+\begin_layout LyX-Code
+     7  
+\end_layout
+
+\begin_layout LyX-Code
+     8     ret = handle_gui_events();
+\end_layout
+
+\begin_layout LyX-Code
+     9  
+\end_layout
+
+\begin_layout LyX-Code
+    10     return ret;
+\end_layout
+
+\begin_layout LyX-Code
+    11  }
+\end_layout
+
+\begin_layout LyX-Code
+    12  
+\end_layout
+
+\begin_layout LyX-Code
+    13  int main(int argc,char *argv[])
+\end_layout
+
+\begin_layout LyX-Code
+    14  {
+\end_layout
+
+\begin_layout LyX-Code
+    15     Tango::Util *tg;
+\end_layout
+
+\begin_layout LyX-Code
+    16     try
+\end_layout
+
+\begin_layout LyX-Code
+    17     {
+\end_layout
+
+\begin_layout LyX-Code
+    18        // Initialise the device server
+\end_layout
+
+\begin_layout LyX-Code
+    19        //----------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+    20        tg = Tango::Util::init(argc,argv);
+\end_layout
+
+\begin_layout LyX-Code
+    21  
+\end_layout
+
+\begin_layout LyX-Code
+    22        tg->set_polling_threads_pool_size(5);
+\end_layout
+
+\begin_layout LyX-Code
+    23  
+\end_layout
+
+\begin_layout LyX-Code
+    24        // Create the device server singleton 
+\end_layout
+
+\begin_layout LyX-Code
+    25        //        which will create everything
+\end_layout
+
+\begin_layout LyX-Code
+    26        //----------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+    27        tg->server_init(false);
+\end_layout
+
+\begin_layout LyX-Code
+    28  
+\end_layout
+
+\begin_layout LyX-Code
+    29        tg->server_set_event_loop(my_event_loop);
+\end_layout
+
+\begin_layout LyX-Code
+    30  
+\end_layout
+
+\begin_layout LyX-Code
+    31        // Run the endless loop
+\end_layout
+
+\begin_layout LyX-Code
+    32        //----------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+    33        cout << "Ready to accept request" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    34        tg->server_run();
+\end_layout
+
+\begin_layout LyX-Code
+    35     }
+\end_layout
+
+\begin_layout LyX-Code
+    36     catch (bad_alloc)
+\end_layout
+
+\begin_layout LyX-Code
+    37     {
+\end_layout
+
+\begin_layout LyX-Code
+    38     ...
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The device server main event loop is set at line 29 before the call to the
+ Util::server_run() method.
+ The function used as server loop is defined between lines 2 and 11.
+\end_layout
+
+\begin_layout Section
+Device server using file
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+file
+\end_layout
+
+\end_inset
+
+ as database
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+database
+\end_layout
+
+\end_inset
+
+
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Device-server-file"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+For device servers not able to access the Tango database (most of the time
+ due to network route or security reason), it is possible to start them
+ using file instead of a real database.
+ This is done via the device server
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+-file=<file name>
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+ command line option.
+ In this case,
+\end_layout
+
+\begin_layout Itemize
+Getting, setting and deleting class properties
+\end_layout
+
+\begin_layout Itemize
+Getting, setting and deleting device properties
+\end_layout
+
+\begin_layout Itemize
+Getting, setting and deleting class attribute properties
+\end_layout
+
+\begin_layout Itemize
+Getting, setting and deleting device attribute properties
+\end_layout
+
+\begin_layout Standard
+are handled using the specified file instead of the Tango database.
+ The file is an ASCII file and follows a well-defined syntax with predefined
+ keywords.
+ The simplest way to generate the file for a specific device server is to
+ use the Jive application.
+ See  
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Jive doc"
+
+\end_inset
+
+ to get Jive documentation.
+ The Tango database is not only used to store device configuration parameters,
+ it is also used to store device network access parameter (the CORBA IOR).
+ To allow an application to connect to a device hosted by a device server
+ using file instead of database, you need to start it on a pre-defined port
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+port
+\end_layout
+
+\end_inset
+
+, and you must use one of the underlying ORB option called 
+\emph on
+endPoint
+\emph default
+ like 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+myserver myinstance_name -file=/tmp/MyServerFile -ORBendPoint giop:tcp::<port
+ number>
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+ to start your device server.
+ The device name passed to the client application must also be modified
+ in order to refect the non-database usage.
+ See 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "DeviceNaming"
+
+\end_inset
+
+ to learn about Tango device name syntax.
+ Nevertheless, using this Tango feature prevents some other features to
+ be used :
+\end_layout
+
+\begin_layout Itemize
+No check that the same device server is running twice.
+\end_layout
+
+\begin_layout Itemize
+No device or attribute alias name.
+\end_layout
+
+\begin_layout Itemize
+In case of several device servers running on the same host, the user must
+ manually manage a list of already used network port.
+\end_layout
+
+\begin_layout Section
+Device server without database
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Device-server-without"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In some very specific cases (Running a device server within a lab during
+ hardware development...), it could be very useful to have a device server
+ able to run even if there is no database
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+database
+\end_layout
+
+\end_inset
+
+ in the control system.
+ Obviously, running a Tango device server without a database means loosing
+ Tango features.
+ The lost features are :
+\end_layout
+
+\begin_layout Itemize
+No check that the same device server is running twice.
+\end_layout
+
+\begin_layout Itemize
+No device configuration via properties.
+\end_layout
+
+\begin_layout Itemize
+No event generated by the server.
+\end_layout
+
+\begin_layout Itemize
+No memorized attributes
+\end_layout
+
+\begin_layout Itemize
+No device attribute configuration via the database.
+\end_layout
+
+\begin_layout Itemize
+No check that the same device name is used twice within the same control
+ system.
+\end_layout
+
+\begin_layout Itemize
+In case of several device servers running on the same host, the user must
+ manually manage a list of already used network port.
+\end_layout
+
+\begin_layout Standard
+To run a device server without a database, the 
+\series bold
+-nodb
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+nodb
+\end_layout
+
+\end_inset
+
+
+\series default
+ command line option must be used.
+ One problem when running a device server without the database is to pass
+ device name(s) to the device server.
+ Within Tango, it is possible to define these device names at two different
+ levels :
+\end_layout
+
+\begin_layout Enumerate
+At the command line with the 
+\series bold
+-dlist
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+dlist
+\end_layout
+
+\end_inset
+
+
+\series default
+ option: In case of device server with several device pattern implementation,
+ the device name list given at command line is only for the last device
+ pattern created in the 
+\emph on
+class_factory()
+\emph default
+ method.
+ In the device name list, the device name separator is the comma character.
+\end_layout
+
+\begin_layout Enumerate
+At the device pattern implementation level: In the class inherited from
+ the Tango::DeviceClass class via the re-definition of a well defined method
+ called 
+\emph on
+device_name_factory()
+\end_layout
+
+\begin_layout Standard
+If none of these two possibilities is used, the tango core classes defined
+ one default device name for each device pattern implementation.
+ This default device name is 
+\emph on
+NoName
+\emph default
+.
+ Device definition at the command line has the highest priority.
+\end_layout
+
+\begin_layout Subsection
+Example of device server started without database usage
+\end_layout
+
+\begin_layout Standard
+Without database, you need to start a Tango device server on a pre-defined
+ port
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+port
+\end_layout
+
+\end_inset
+
+, and you must use one of the underlying ORB option called 
+\emph on
+endPoint
+\emph default
+ like 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+myserver myinstance_name -ORBendPoint giop:tcp::<port number> -nodb -dlist
+ a/b/c
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The following is two examples of starting a device server not using the
+ database when the 
+\emph on
+device_name_factory()
+\emph default
+ method is not re-defined.
+\end_layout
+
+\begin_layout Itemize
+StepperMotor et -nodb -dlist id11/motor/1,id11/motor/2
+\begin_inset Newline newline
+\end_inset
+
+This command line starts the device server with two devices named 
+\emph on
+id11/motor/1
+\emph default
+ and 
+\emph on
+id11/motor/2
+\end_layout
+
+\begin_layout Itemize
+StepperMotor et -nodb
+\begin_inset Newline newline
+\end_inset
+
+This command line starts a device server with one device named 
+\emph on
+NoName
+\end_layout
+
+\begin_layout Standard
+When the 
+\emph on
+device_name_factory()
+\emph default
+ method is re-defined within the StepperMotorClass class.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  void StepperMotorClass::device_name_factory(vector<string> &list)
+\end_layout
+
+\begin_layout LyX-Code
+     2  {
+\end_layout
+
+\begin_layout LyX-Code
+     3          list.push_back("sr/cav-tuner/1");
+\end_layout
+
+\begin_layout LyX-Code
+     4          list.push_back("sr/cav-tuner/2");
+\end_layout
+
+\begin_layout LyX-Code
+     5  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+StepperMotor et -nodb
+\begin_inset Newline newline
+\end_inset
+
+This commands starts a device server with two devices named 
+\emph on
+sr/cav-tuner/1
+\emph default
+ and 
+\emph on
+sr/cav-tuner/2
+\emph default
+.
+\end_layout
+
+\begin_layout Itemize
+StepperMotor et -nodb -dlist id12/motor/1
+\begin_inset Newline newline
+\end_inset
+
+Starts a device server with only one device named id12/motor/1
+\end_layout
+
+\begin_layout Subsubsection
+Java device server without the database
+\end_layout
+
+\begin_layout Standard
+It is also possible to start a Java device server without the database using
+ exactly the principle described in the above lines.
+ Nevertheless, a java device server process retrieves its list of device
+ pattern implementation from the database! Therefore, a 
+\emph on
+add_class()
+\emph default
+ method is defined in the java Util class and the main method must be updated.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  package StepperMotor
+\end_layout
+
+\begin_layout LyX-Code
+     2  
+\end_layout
+
+\begin_layout LyX-Code
+     3  import java.util.*;
+\end_layout
+
+\begin_layout LyX-Code
+     4  import org.omg.CORBA.*;
+\end_layout
+
+\begin_layout LyX-Code
+     5  import fr.esrf.Tango.*;
+\end_layout
+
+\begin_layout LyX-Code
+     6  import fr.esrf.TangoDs.*;
+\end_layout
+
+\begin_layout LyX-Code
+     7  
+\end_layout
+
+\begin_layout LyX-Code
+     8  public class StepperMotor extends DeviceImpl implements TangoConst
+\end_layout
+
+\begin_layout LyX-Code
+     9  {
+\end_layout
+
+\begin_layout LyX-Code
+    10          public static void main(String[] argv)
+\end_layout
+
+\begin_layout LyX-Code
+    11          {
+\end_layout
+
+\begin_layout LyX-Code
+    12                  try
+\end_layout
+
+\begin_layout LyX-Code
+    13                  {
+\end_layout
+
+\begin_layout LyX-Code
+    14                  
+\end_layout
+
+\begin_layout LyX-Code
+    15                          Util tg = Util.init(argv,"StepperMotor");
+\end_layout
+
+\begin_layout LyX-Code
+    16                          
+\end_layout
+
+\begin_layout LyX-Code
+    17                          tg.add_class("StepperMotor");
+\end_layout
+
+\begin_layout LyX-Code
+    18                          tg.server_init();
+\end_layout
+
+\begin_layout LyX-Code
+    19                          
+\end_layout
+
+\begin_layout LyX-Code
+    20                          System.out.println("Ready to accept request");
+\end_layout
+
+\begin_layout LyX-Code
+    21  
+\end_layout
+
+\begin_layout LyX-Code
+    22                          tg.server_run();
+\end_layout
+
+\begin_layout LyX-Code
+    23                  }
+\end_layout
+
+\begin_layout LyX-Code
+    24                  catch (OutOfMemoryError ex)
+\end_layout
+
+\begin_layout LyX-Code
+    25                  {
+\end_layout
+
+\begin_layout LyX-Code
+    26                          System.err.println("Can't allocate memory
+ !!!!");
+\end_layout
+
+\begin_layout LyX-Code
+    27                          System.err.println("Exiting");
+\end_layout
+
+\begin_layout LyX-Code
+    28                  }
+\end_layout
+
+\begin_layout LyX-Code
+    29                  catch (UserException ex)
+\end_layout
+
+\begin_layout LyX-Code
+    30                  {
+\end_layout
+
+\begin_layout LyX-Code
+    31                          Except.print_exception(ex);
+\end_layout
+
+\begin_layout LyX-Code
+    32                          
+\end_layout
+
+\begin_layout LyX-Code
+    33                          System.err.println("Received a CORBA user
+ exception");
+\end_layout
+
+\begin_layout LyX-Code
+    34                          System.err.println("Exiting");
+\end_layout
+
+\begin_layout LyX-Code
+    35                  }
+\end_layout
+
+\begin_layout LyX-Code
+    36                  catch (SystemException ex)
+\end_layout
+
+\begin_layout LyX-Code
+    37                  {
+\end_layout
+
+\begin_layout LyX-Code
+    38                          Except.print_exception(ex);
+\end_layout
+
+\begin_layout LyX-Code
+    39                          
+\end_layout
+
+\begin_layout LyX-Code
+    40                          System.err.println("Received a CORBA system
+ exception");
+\end_layout
+
+\begin_layout LyX-Code
+    41                          System.err.println("Exiting");
+\end_layout
+
+\begin_layout LyX-Code
+    42                  }
+\end_layout
+
+\begin_layout LyX-Code
+    43                  
+\end_layout
+
+\begin_layout LyX-Code
+    44                  System.exit(-1);                
+\end_layout
+
+\begin_layout LyX-Code
+    45          
+\end_layout
+
+\begin_layout LyX-Code
+    46          }       
+\end_layout
+
+\begin_layout LyX-Code
+    47  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The add_class() method is used at line 17 before the device pattern(s) implement
+ation initialization.
+\end_layout
+
+\begin_layout Subsubsection
+Start a java device server without database
+\end_layout
+
+\begin_layout Standard
+Without database, you need to start a Tango device server on a pre-defined
+ port
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+port
+\end_layout
+
+\end_inset
+
+, and you must use one of the underlying ORB option OAPort like 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+java -DOAPort=<port number> myserver myinstance_name -nodb -dlist id11/motor/1,i
+d11/motor/2
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Connecting client to device within a device server started without database
+\end_layout
+
+\begin_layout Standard
+In this case, the host and port on which the device server is running are
+ part of the device name.
+ If the device name is 
+\emph on
+a/b/c
+\emph default
+, the host is 
+\emph on
+mycomputer
+\emph default
+ and the port 
+\emph on
+1234
+\emph default
+, the device name to be used by client is
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+mycomputer:1234/a/b/c
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+See appendix 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "DeviceNaming"
+
+\end_inset
+
+ for all details about Tango object naming.
+\end_layout
+
+\begin_layout Section
+Multiple database servers within a Tango control system
+\end_layout
+
+\begin_layout Standard
+Tango uses MySQL as database and allows access to this database via a specific
+ Tango device server.
+ It is possible for the same Tango control system to have several Tango
+ database servers.
+ The host name and port number of the database server is known via the TANGO_HOS
+T
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TANGO-HOST
+\end_layout
+
+\end_inset
+
+ environment variable.
+ If you want to start several database servers in order to prevent server
+ crash, use the following TANGO_HOST syntax
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+TANGO_HOST=<host_1>:<port_1>,<host_2>:<port_2>,<host_3>:<port_3>
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+All calls to the database server will automatically switch to a running
+ servers in the given list if the one used dies.
+\end_layout
+
+\begin_layout Section
+The Tango controlled access system
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+controlled-access
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+User rights definition
+\end_layout
+
+\begin_layout Standard
+Within the Tango controlled system, you give rights to a user.
+ User is the name of the user used to log-in the computer where the application
+ trying to access a device is running.
+ Two kind of users are defined:
+\end_layout
+
+\begin_layout Enumerate
+Users with defined rights
+\end_layout
+
+\begin_layout Enumerate
+Users without any rights defined in the controlled system.
+ These users will have the rights associated with the pseudo-user called
+ "All Users"
+\end_layout
+
+\begin_layout Standard
+The controlled system manages two kind of rights:
+\end_layout
+
+\begin_layout Itemize
+Write access meaning that all type of requests are allowed on the device
+\end_layout
+
+\begin_layout Itemize
+Read access meaning that only read-like access are allowed (write_attribute,
+ write_read_attribute and set_attribute_config network calls are forbidden).
+ Executing a command is also forbidden except for commands defined as "
+\series bold
+Allowed commands
+\series default
+".
+ Getting a device state or status using the command_inout call is always
+ allowed.
+ The definition of the allowed commands is done at the device class level.
+ Therefore, all devices belonging to the same class will have the allowed
+ commands set.
+\end_layout
+
+\begin_layout Standard
+The rights given to a user is the check result splitted in two levels:
+\end_layout
+
+\begin_layout Enumerate
+At the host level: You define from which hosts the user may have write access
+ to the control system by specifying the host name.
+ If the request comes from a host which is not defined, the right will be
+ Read access.
+ If nothing is defined at this level for the user, the rights of the "All
+ Users" user will be used.
+ It is also possible to specify the host by its IP address.
+ You can define a host family using wide-card in the IP address (eg.
+ 160.103.11.* meaning any host with IP address starting with 160.103.11).
+ Only IP V4 is supported.
+ 
+\end_layout
+
+\begin_layout Enumerate
+At the device level: You define on which device(s) request are allowed using
+ device name.
+ Device family can be used using widecard in device name like domin/family/*
+\end_layout
+
+\begin_layout Standard
+Therefore, the controlled system is doing the following checks when a client
+ try to access a device:
+\end_layout
+
+\begin_layout Itemize
+Get the user name
+\end_layout
+
+\begin_layout Itemize
+Get the host IP address
+\end_layout
+
+\begin_layout Itemize
+If rights defined at host level for this specific user and this IP address,
+ gives user temporary write acccess to the control system
+\end_layout
+
+\begin_layout Itemize
+If nothing is specified for this specific user on this host, gives to the
+ user a temporary access right equal to the host access rights of the "All
+ User" user.
+\end_layout
+
+\begin_layout Itemize
+If the temporary right given to the user is write access to the control
+ system
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+If something defined at device level for this specific user
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+If there is a right defined for the device to be accessed (or for the device
+ family), give user the defined right
+\end_layout
+
+\begin_layout Itemize
+Else
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+If rights defined for the "All Users" user for this device, give this right
+ to the user
+\end_layout
+
+\begin_layout Itemize
+Else, give user the Read Access for this device
+\end_layout
+
+\end_deeper
+\end_deeper
+\begin_layout Itemize
+Else
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+If there is a right defined for the device to be accessed (or for the device
+ family) for the "All User" user, give user this right
+\end_layout
+
+\begin_layout Itemize
+Else, give user the Read Access right for this device
+\end_layout
+
+\end_deeper
+\end_deeper
+\begin_layout Itemize
+Else, access right will be Read Access
+\end_layout
+
+\begin_layout Standard
+Then, when the client tries to access the device, the following algorithm
+ is used:
+\end_layout
+
+\begin_layout Itemize
+If right is Read Access
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+If the call is a write type call, refuse the call
+\end_layout
+
+\begin_layout Itemize
+If the call is a command execution
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+If the command is one of the command defined in the "Allowed commands" for
+ the device class, send the call
+\end_layout
+
+\begin_layout Itemize
+Else, refuse the call
+\end_layout
+
+\end_deeper
+\end_deeper
+\begin_layout Standard
+All these checks are done during the DeviceProxy instance constructor except
+ those related to the device class allowed commands which are checked during
+ the command_inout call.
+\end_layout
+
+\begin_layout Standard
+To simplify the rights management, give the "All Users" user host access
+ right to all hosts ("*.*.*.*") and read access to all devices ("*/*/*").
+ With such a set-up for this user, each new user without any rights defined
+ in the controlled access will have only Read Access to all devices on the
+ control system but from any hosts.
+ Then, on request, gives Write Access to specific user on specific host
+ (or family) and on specific device (or family).
+ 
+\end_layout
+
+\begin_layout Standard
+The rights managements are done using the Tango Astor
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Astor_doc"
+
+\end_inset
+
+ tool which has some graphical windows allowing to grant/revoke user rights
+ and to define device class allowed commands set.
+ The following window dump shows this Astor window.
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Graphics
+	filename control.PNG
+
+\end_inset
+
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align block
+In this example, the user "taurel" has Write Access to the device "sr/d-ct/1"
+ and to all devices belonging to the domain "fe" but only from the host
+ "pcantares" He has read access to all other devices but always only from
+ the host pcantares.
+ The user "verdier" has write access to the device "sys/dev/01" from any
+ host on the network "160.103.5" and Read Access to all the remaining devices
+ from the same network.
+ All the other users has only Read Access but from any host.
+\end_layout
+
+\begin_layout Subsection
+Running a Tango control system with the controlled access
+\end_layout
+
+\begin_layout Standard
+All the users rights are stored in two tables of the Tango database.
+ A dedicated device server called 
+\series bold
+TangoAccessControl
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TangoAccessControl
+\end_layout
+
+\end_inset
+
+
+\series default
+ access these tables without using the classical Tango database server.
+ This TangoAccessControl device server must be configured with only one
+ device.
+ The property 
+\series bold
+Services
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Services
+\end_layout
+
+\end_inset
+
+ 
+\series default
+belonging to the free object
+\series bold
+ CtrlSystem
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CtrlSystem
+\end_layout
+
+\end_inset
+
+
+\series default
+ is used to run a Tango control system with its controlled access.
+ This property is an array of string with each string describing the service(s)
+ running in the control system.
+ For controlled access, the service name is "AccessControl".
+ The service instance name has to be defined as "tango".
+ The device name associated with this service must be the name of the TangoAcces
+sControl server device.
+ For instance, if the TangoAccessControl device server device is named 
+\emph on
+sys/access_control/1
+\emph default
+, one element of the Services property of the CtrlSystem object has to be
+ set to
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+AccessControl/tango:sys/access_control/1
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+If the service is defined but without a valid device name corresponding
+ to the TangoAccessControl device server, all users from any host will have
+ write access (simulating a Tango control system without controlled access).
+ Note that this device server connects to the MySQL database and therefore
+ may need the MySQL connection related environment variables MYSQL_USER
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+MYSQL-USER
+\end_layout
+
+\end_inset
+
+ and MYSQL_PASSWORD
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+MYSQL-PASSWORD
+\end_layout
+
+\end_inset
+
+ described in 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Db-Env-Variables"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Even if a controlled access system is running, it is possible to by-pass
+ it if, in the environment of the client application, the environment variable
+ SUPER_TANGO
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SUPER-TANGO
+\end_layout
+
+\end_inset
+
+ is defined to "true".
+ If for one reason or another, the controlled access server is defined but
+ not accessible, the device right checked at that time will be Read Access.
+\begin_inset VSpace 1cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset CommandInset label
+LatexCommand label
+name "FourRicardo"
+
+\end_inset
+
+
+\begin_inset Graphics
+	filename ../dance/AT97-65-size.jpg
+	scale 400
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/doc/src/advanced/alarm.eps b/doc/src/advanced/alarm.eps
new file mode 100644
index 0000000..8febc5f
--- /dev/null
+++ b/doc/src/advanced/alarm.eps
@@ -0,0 +1,255 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: alarm.eps
+%%Creator: fig2dev Version 3.2 Patchlevel 3d
+%%CreationDate: Sun Nov 21 14:13:04 2004
+%%For: taurel at wow (E.Taurel,,,)
+%%BoundingBox: 0 0 728 155
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 155 moveto 0 0 lineto 728 0 lineto 728 155 lineto closepath clip newpath
+-27.6 187.8 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+  bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+  4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+10 setmiterlimit
+ 0.06299 0.06299 sc
+%
+% Fig objects follow
+%
+% Polyline
+7.500 slw
+gs  clippath
+3795 1965 m 3795 1905 l 3643 1905 l 3763 1935 l 3643 1965 l cp
+eoclip
+n 2070 1935 m
+ 3780 1935 l gs col0 s gr gr
+
+% arrowhead
+n 3643 1965 m 3763 1935 l 3643 1905 l  col0 s
+% Polyline
+gs  clippath
+5775 1965 m 5775 1905 l 5623 1905 l 5743 1935 l 5623 1965 l cp
+3900 1905 m 3900 1965 l 4052 1965 l 3932 1935 l 4052 1905 l cp
+eoclip
+n 3915 1935 m
+ 5760 1935 l gs col0 s gr gr
+
+% arrowhead
+n 4052 1905 m 3932 1935 l 4052 1965 l  col0 s
+% arrowhead
+n 5623 1965 m 5743 1935 l 5623 1905 l  col0 s
+% Polyline
+gs  clippath
+7845 1965 m 7845 1905 l 7693 1905 l 7813 1935 l 7693 1965 l cp
+5835 1905 m 5835 1965 l 5987 1965 l 5867 1935 l 5987 1905 l cp
+eoclip
+n 5850 1935 m
+ 7830 1935 l gs col0 s gr gr
+
+% arrowhead
+n 5987 1905 m 5867 1935 l 5987 1965 l  col0 s
+% arrowhead
+n 7693 1965 m 7813 1935 l 7693 1905 l  col0 s
+% Polyline
+gs  clippath
+9690 1965 m 9690 1905 l 9538 1905 l 9658 1935 l 9538 1965 l cp
+7905 1905 m 7905 1965 l 8057 1965 l 7937 1935 l 8057 1905 l cp
+eoclip
+n 7920 1935 m
+ 9675 1935 l gs col0 s gr gr
+
+% arrowhead
+n 8057 1905 m 7937 1935 l 8057 1965 l  col0 s
+% arrowhead
+n 9538 1965 m 9658 1935 l 9538 1905 l  col0 s
+% Polyline
+gs  clippath
+9750 1905 m 9750 1965 l 9902 1965 l 9782 1935 l 9902 1905 l cp
+eoclip
+n 9765 1935 m
+ 11565 1935 l gs col0 s gr gr
+
+% arrowhead
+n 9902 1905 m 9782 1935 l 9902 1965 l  col0 s
+% Polyline
+30.000 slw
+gs  clippath
+11490 1260 m 11490 1080 l 11049 1080 l 11409 1170 l 11049 1260 l cp
+eoclip
+n 1980 1170 m
+ 11475 1170 l gs col0 s gr gr
+
+% arrowhead
+n 11049 1260 m 11409 1170 l 11049 1080 l  col0 s
+% Polyline
+n 3825 990 m
+ 3825 1350 l gs col0 s gr 
+% Polyline
+n 5805 990 m
+ 5805 1350 l gs col0 s gr 
+% Polyline
+n 9720 945 m
+ 9720 1305 l gs col0 s gr 
+% Polyline
+n 7875 990 m
+ 7875 1350 l gs col0 s gr 
+% Polyline
+7.500 slw
+gs  clippath
+5730 2550 m 5730 2490 l 5578 2490 l 5698 2520 l 5578 2550 l cp
+eoclip
+n 1980 2520 m
+ 5715 2520 l gs col0 s gr gr
+
+% arrowhead
+n 5578 2550 m 5698 2520 l 5578 2490 l  col0 s
+% Polyline
+gs  clippath
+7845 2550 m 7845 2490 l 7693 2490 l 7813 2520 l 7693 2550 l cp
+5835 2490 m 5835 2550 l 5987 2550 l 5867 2520 l 5987 2490 l cp
+eoclip
+n 5850 2520 m
+ 7830 2520 l gs col0 s gr gr
+
+% arrowhead
+n 5987 2490 m 5867 2520 l 5987 2550 l  col0 s
+% arrowhead
+n 7693 2550 m 7813 2520 l 7693 2490 l  col0 s
+% Polyline
+gs  clippath
+7905 2490 m 7905 2550 l 8057 2550 l 7937 2520 l 8057 2490 l cp
+eoclip
+n 7920 2520 m
+ 11565 2520 l gs col0 s gr gr
+
+% arrowhead
+n 8057 2490 m 7937 2520 l 8057 2550 l  col0 s
+% Polyline
+n 450 540 m 11970 540 l 11970 2970 l 450 2970 l
+ cp gs col0 s gr 
+/Times-Roman ff 210.00 scf sf
+1035 1035 m
+gs 1 -1 sc (Attribute) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+1035 1215 m
+gs 1 -1 sc (  value) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+630 1755 m
+gs 1 -1 sc (Attribute quality) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+900 1980 m
+gs 1 -1 sc (     factor) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+855 2565 m
+gs 1 -1 sc (Device state) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+2205 1755 m
+gs 1 -1 sc (ATTR_ALARM) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+4005 1755 m
+gs 1 -1 sc (ATTR_WARNING) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+6165 1755 m
+gs 1 -1 sc (ATTR_VALID) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+7965 1755 m
+gs 1 -1 sc (ATTR_WARNING) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+9900 1755 m
+gs 1 -1 sc (ATTR_ALARM) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+3465 2430 m
+gs 1 -1 sc (ALARM) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+6660 2430 m
+gs 1 -1 sc (ON) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+9405 2430 m
+gs 1 -1 sc (ALARM) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+3330 855 m
+gs 1 -1 sc (min_alarm) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+5265 855 m
+gs 1 -1 sc (min_warning) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+7335 855 m
+gs 1 -1 sc (max_warning) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+9225 855 m
+gs 1 -1 sc (max_alarm) col0 sh gr
+$F2psEnd
+rs
diff --git a/doc/src/advanced/control.PNG b/doc/src/advanced/control.PNG
new file mode 100644
index 0000000..9e14f2a
Binary files /dev/null and b/doc/src/advanced/control.PNG differ
diff --git a/doc/src/advanced/line.tex b/doc/src/advanced/line.tex
new file mode 100644
index 0000000..1ba963f
--- /dev/null
+++ b/doc/src/advanced/line.tex
@@ -0,0 +1,6 @@
+\begin{flushleft}
+\begin{picture}(0,0)
+\thicklines
+\put(0,0){\line(1,0){400}}
+\end{picture}
+\end{flushleft}
diff --git a/doc/src/appendix/appendix.lyx b/doc/src/appendix/appendix.lyx
new file mode 100644
index 0000000..a3d225e
--- /dev/null
+++ b/doc/src/appendix/appendix.lyx
@@ -0,0 +1,11162 @@
+#LyX 1.6.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 345
+\begin_document
+\begin_header
+\textclass Tango_book
+\begin_preamble
+\usepackage{a4wide}
+\end_preamble
+\use_default_options false
+\language english
+\inputencoding latin1
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_amsmath 1
+\use_esint 0
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\secnumdepth 5
+\tocdepth 5
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\author "" 
+\author "" 
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+appendix
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Chapter
+Reference part
+\begin_inset CommandInset label
+LatexCommand label
+name "cha:Reference-part"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+This chapter is only part of the TANGO device server reference guide.
+ To get reference documentation about the C++ library classes, see 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+.
+ To get reference documentation about the Java classes, also see 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Section
+Device parameter
+\end_layout
+
+\begin_layout Standard
+A black box, a device description field, a device state and status are associate
+d with each TANGO device.
+\end_layout
+
+\begin_layout Subsection
+The device black box
+\end_layout
+
+\begin_layout Standard
+The device black box
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+black-box
+\end_layout
+
+\end_inset
+
+ is managed as a circular buffer.
+ It is possible to tune the buffer depth via a device property.
+ This property name is 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+device name->blackbox_depth
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+ A default value is hard-coded to 50 if the property is not defined.
+ This black box depth property is retrieved from the Tango property database
+ during the device creation phase.
+\end_layout
+
+\begin_layout Subsection
+The device description field
+\end_layout
+
+\begin_layout Standard
+There are two ways to intialise the device description
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+description
+\end_layout
+
+\end_inset
+
+ field.
+\end_layout
+
+\begin_layout Itemize
+At device creation time.
+ Some constructors of the DeviceImpl class supports this field as parameter.
+ If these constructor are not used, the device description field is set
+ to a default value which is 
+\emph on
+A Tango device
+\emph default
+.
+\end_layout
+
+\begin_layout Itemize
+With a property.
+ A description field defines with this method overrides a device description
+ defined at construction time.
+ The property name is 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+device name->description
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+The device state and status
+\end_layout
+
+\begin_layout Standard
+Some constructors of the DeviceImpl class allows the initialisation of device
+ state
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+state
+\end_layout
+
+\end_inset
+
+ and/or status
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+status
+\end_layout
+
+\end_inset
+
+ or device creation time.
+ If these fields are not defined, a default value is applied.
+ The default state is Tango::UNKOWN, the default status is 
+\emph on
+Not Initialised.
+\end_layout
+
+\begin_layout Subsection
+The device polling
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:The-device-polling-prop"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Seven device properties allow the polling tunning.
+ These properties are described in the following table 
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="8" columns="3">
+<features islongtable="true">
+<column alignment="center" valignment="bottom" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Property name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+property rule
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+default value
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+poll_ring_depth
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Polling buffer depth
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+10
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+cmd_poll_ring_depth
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Cmd polling buffer depth
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+attr_poll_ring_depth
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Attr polling buffer depth
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+poll_old_factor
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+"Data too old" factor
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+4
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+min_poll_period
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Minimun polling period
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+cmd_min_poll_period
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Min.
+ polling period for cmd
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+attr_min_poll_period
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Min.
+ polling period for attr
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The rule of the poll_ring_depth
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+poll-ring-depth
+\end_layout
+
+\end_inset
+
+ property is obvious.
+ It defines the polling ring depth for all the device polled command(s)
+ and attribute(s).
+ Nevertheless, when filling the polling buffer via the fill_cmd_polling_buffer()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+fill-cmd-polling-buffer
+\end_layout
+
+\end_inset
+
+ (or fill_attr_polling_buffer()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+fill-attr-polling-buffer
+\end_layout
+
+\end_inset
+
+) method, it could be helpfull to define specific polling ring depth for
+ a command (or an attribute).
+ This is the rule of the cmd_poll_ring_depth
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+cmd-poll-ring-depth
+\end_layout
+
+\end_inset
+
+ and attr_poll_ring_depth
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attr-poll-ring-depth
+\end_layout
+
+\end_inset
+
+ properties.
+ For each polled object with specific polling depth (command or attribute),
+ the syntax of this property is the object name followed by the ring depth
+ (ie State,20,Status,15).
+ If one of these properties is defined, for the specific command or attribute,
+ it will overwrite the value set by the poll_ring_depth property.
+ The poll_old_factor
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+poll-old-factor
+\end_layout
+
+\end_inset
+
+ property allows the user to tune how long the data recorded in the polling
+ buffer are valid.
+ Each time some data are read from the polling buffer, a check is done between
+ the date when the data were recorded in the polling buffer and the date
+ when the user request these data.
+ If the interval is greater than the object polling period multiply by the
+ value of the poll_old_factor factory, an exception is returned to the caller.
+ These two properties are defined at device level and therefore, it is not
+ possible to tune this parameter for each polled object (command or attribute).
+ The last 3 properties are dedicated to define a polling period minimum
+ threshold.
+ The property min_poll_period
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+min-poll-period
+\end_layout
+
+\end_inset
+
+ defines in (mS) a device minimum polling period.
+ Property cmd_min_poll_period
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+cmd-min-poll-period
+\end_layout
+
+\end_inset
+
+ defines (in mS) a minimum polling period for a specific command.
+ The syntax of this property is the command name followed by the minimum
+ polling period (ie MyCmd,400).
+ Property attr_min_poll_period
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attr-min-poll-period
+\end_layout
+
+\end_inset
+
+ defines (in mS) a minimum polling period for a specific attribute.
+ The syntax of this property is the attribute name followed by the minimum
+ polling period (ie MyAttr,600).
+ These two properties has a higher priority than the min_poll_period property.
+ By default these three properties are not defined mening that there is
+ no minimun polling period.
+\end_layout
+
+\begin_layout Standard
+Four other properties are used by the Tango core classes to manage the polling
+ thread.
+ These properties are :
+\end_layout
+
+\begin_layout Itemize
+polled_cmd to memorize the name of the device polled command
+\end_layout
+
+\begin_layout Itemize
+polled_attr to memorize the name of the device polled attribute
+\end_layout
+
+\begin_layout Itemize
+non_auto_polled_cmd to memorize the name of the command which shoule not
+ be polled automatically at the first request
+\end_layout
+
+\begin_layout Itemize
+non_auto_polled_attr to memorize the name of the attribute which should
+ not be polled automatically at the first request
+\end_layout
+
+\begin_layout Standard
+You don't have to change these properties values by yourself.
+ They are automatically created/modified/deleted by Tango core classes.
+\end_layout
+
+\begin_layout Subsection
+The device logging
+\end_layout
+
+\begin_layout Standard
+The Tango Logging Service (TLS) uses device properties to control device
+ logging at startup (static configuration).
+ These properties are described in the following table 
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="5" columns="3">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Property name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+property rule
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+default value
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+logging_level
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Initial device logging level
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+WARN
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+logging_target
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Initial device logging target
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+No default
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+logging_rft
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Logging rolling file threshold
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2 Mega bytes
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+logging_path
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Logging file path
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+/tmp/tango or C:/tango (win32)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+The logging_level
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+logging-level
+\end_layout
+
+\end_inset
+
+ property controls the initial logging level of a device.
+ Its set of possible values is: "OFF", "FATAL", "ERROR", "WARN", "INFO"
+ or "DEBUG".
+ This property is overwritten by the verbose command line option (-v).
+\end_layout
+
+\begin_layout Itemize
+The logging_target
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+logging-target
+\end_layout
+
+\end_inset
+
+ property is a multi-valued property containing the initial target list.
+ Each entry must have the following format: target_type::target_name (where
+ target_type is one of the supported target types and target_name, the name
+ of the target).
+ Supported target types are: 
+\emph on
+console
+\emph default
+, 
+\emph on
+file
+\emph default
+ and 
+\emph on
+device
+\emph default
+.
+ For a device target, target_name must contain the name of a log consumer
+ device (as defined in 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Tango-log-consumer"
+
+\end_inset
+
+).
+ For a file target, target_name is the name of the file to log to.
+ If omitted the device's name is used to build the file name (domain_family_memb
+er.log).
+ Finally, target_name is ignored in the case of a console target.
+ The TLS does not report any error occurred while trying to setup the initial
+ targets.
+ 
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+Logging_target property example : 
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+logging_target = [ "console", "file", "file::/home/me/mydevice.log", "device::tmp
+/log/1"]
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+In this case, the device will automatically logs to the standard output,
+ to its default file (which is something like domain_family_member.log),
+ to a file named mydevice.log and located in /home/me.
+ Finally, the device logs are also sent to a log consumer device named tmp/log/1.
+ 
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+The logging_rft
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+logging-rft
+\end_layout
+
+\end_inset
+
+ property specifies the rolling file threshold (rft), of the device's file
+ targets.
+ This threshold is expressed in Kb in the range [500, 20480].
+ When the size of a log file reaches the so-called rolling-file-threshold
+ (rft), it is backuped as "
+\emph on
+current_log_file_name
+\emph default
+" + "
+\emph on
+_1
+\emph default
+" and a new current_log_file_name is opened.
+ Obviously, there is only one backup file at a time (i.e.
+ any existing backup is destroyed before the current log file is backuped).
+ The default threshold is 2Mb, the minimum is 500 Kb and the maximum is
+ 20 Mb.
+\end_layout
+
+\begin_layout Itemize
+The logging_path
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+logging-path
+\end_layout
+
+\end_inset
+
+ property overwrites the TANGO_LOG_PATH
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TANGO-LOG-PATH
+\end_layout
+
+\end_inset
+
+ environment variable.
+ This property can only be applied to a DServer class device and has no
+ effect on other devices.
+\end_layout
+
+\begin_layout Section
+Device attribute
+\end_layout
+
+\begin_layout Standard
+Attribute are configured with two kind of parameters: Parameters hard-coded
+ in source code and modifiable parameters
+\end_layout
+
+\begin_layout Subsection
+Hard-coded device attribute parameters
+\end_layout
+
+\begin_layout Standard
+Seven attribute parameters are defined at attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+ creation time in the device server source code.
+ Obviously, these parameters are not modifiable except with a new source
+ code compilation.
+ These parameters are 
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="9" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Parameter name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Parameter description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Attribute name
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+data_type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Attribute data type
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+data_format
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Attribute data format
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+writable
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+writable
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Attribute read/write type
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+max_dim_x
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Maximum X dimension
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+max_dim_y
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Maximum Y dimension
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+writable_attr_name
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+writable-attr-name
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Associated write attribute
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+level
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+level
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Attribute display level
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+The Attribute data type
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+data-type
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Eight data types are supported.
+ These data types are
+\end_layout
+
+\begin_layout Itemize
+Tango::DevBoolean 
+\end_layout
+
+\begin_layout Itemize
+Tango::DevShort
+\end_layout
+
+\begin_layout Itemize
+Tango::DevLong
+\end_layout
+
+\begin_layout Itemize
+Tango::DevFloat
+\end_layout
+
+\begin_layout Itemize
+Tango::DevDouble
+\end_layout
+
+\begin_layout Itemize
+Tango::DevUChar
+\end_layout
+
+\begin_layout Itemize
+Tango::DevUShort
+\end_layout
+
+\begin_layout Itemize
+Tango::DevString
+\end_layout
+
+\begin_layout Subsubsection
+The attribute data format
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+data-format
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Three data format are supported for attribute
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="4" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Format
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::SCALAR
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SCALAR
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+The attribute value is a single number
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::SPECTRUM
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SPECTRUM
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+The attribute value is a one dimension number
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::IMAGE
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+IMAGE
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+The attribute value is a two dimension number
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+The max_dim_x
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+max-dim-x
+\end_layout
+
+\end_inset
+
+ and max_dim_y
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+max-dim-y
+\end_layout
+
+\end_inset
+
+ parameters
+\end_layout
+
+\begin_layout Standard
+These two parameters defined the maximum size for attributes of the SPECTRUM
+ and IMAGE data format.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="4" columns="3">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+data format
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+max_dim_x
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+max_dim_y
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::SCALAR
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::SPECTRUM
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+User Defined
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::IMAGE
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+User Defined
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+User Defined
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+For attribute of the Tango::IMAGE data format, all the data are also returned
+ in a one dimension array.
+ The first array is value[0],[0], array element X is value[0],[X-1], array
+ element X+1 is value[1][0] and so forth.
+\end_layout
+
+\begin_layout Subsubsection
+The attribute read/write type
+\end_layout
+
+\begin_layout Standard
+Tango supports four kind of read/write attribute which are :
+\end_layout
+
+\begin_layout Itemize
+Tango::READ
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+READ
+\end_layout
+
+\end_inset
+
+ for read only attribute
+\end_layout
+
+\begin_layout Itemize
+Tango::WRITE
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+WRITE
+\end_layout
+
+\end_inset
+
+ for writable attribute
+\end_layout
+
+\begin_layout Itemize
+Tango::READ_WRITE
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+READ-WRITE
+\end_layout
+
+\end_inset
+
+ for attribute which can be read and write
+\end_layout
+
+\begin_layout Itemize
+Tango::READ_WITH_WRITE
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+READ-WITH-WRITE
+\end_layout
+
+\end_inset
+
+ for a readable attribute associated to a writable attribute (For a power
+ supply device, the current really generated is not the wanted current.
+ To handle this, two attributes are defined which are 
+\emph on
+generated_current
+\emph default
+ and 
+\emph on
+wanted_current
+\emph default
+.
+ The 
+\emph on
+wanted_current
+\emph default
+ is a Tango::WRITE attribute.
+ When the 
+\emph on
+generated_current
+\emph default
+ attribute is read, it is very convenient to also get the 
+\emph on
+wanted_current
+\emph default
+ attribute.
+ This is exactly what the Tango::READ_WITH_WRITE attribute is doing)
+\end_layout
+
+\begin_layout Standard
+When read, attribute values are always returned within an array even for
+ scalar attribute.
+ The length of this array and the meaning of its elements is detailed in
+ the following table for scalar attribute.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="5" columns="4">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Array length
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Array[0]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Array[1]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::READ
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Read value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::WRITE
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Last write value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::READ_WRITE
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Read value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Last write value
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::READ_WITH_WRITE 
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Read value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Associated attributelast write value
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+When a spectrum or image attribute is read, it is possible to code the device
+ class in order to send only some part of the attribute data (For instance
+ only a Region Of Interest for an image) but never more than what is defined
+ by the attribute configuration parameters max_dim_x and max_dim_y.
+ The number of data sent is also transferred with the data and is named
+ 
+\series bold
+dim_x
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+dim-x
+\end_layout
+
+\end_inset
+
+ and 
+\series bold
+dim_y
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+dim-y
+\end_layout
+
+\end_inset
+
+.
+ When a spectrum or image attribute is written, it is also possible to send
+ only some of the attribute data but always less than max_dim_x for spectrum
+ and max_dim_x * max_dim_y for image.
+ The following table describe how data are returned for spectrum attribute.
+ dim_x is the data size sent by the server when the attribute is read and
+ dim_x_w is the data size used during the last attribute write call.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="5" columns="4">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Array length
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Array[0->dim_x-1]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Array[dim_x -> dim_x + dim_x_w -1]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::READ
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+dim_x
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Read values
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::WRITE
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+dim_x_w
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Last write values
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::READ_WRITE
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+dim_x + dim_x_w
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Read value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Last write values
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::READ_WITH_WRITE 
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+dim_x + dim_x_w
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Read value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Associated attributelast write values
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The following table describe how data are returned for image attribute.
+ dim_r is the data size sent by the server when the attribute is read (dim_x
+ * dim_y) and dim_w is the data size used during the last attribute write
+ call (dim_x_w * dim_y_w).
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="5" columns="4">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Array length
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Array[0->dim_r-1]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Array[dim_r-> dim_r + dim_w -1]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::READ
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+dim_r
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Read values
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::WRITE
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+dim_w
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Last write values
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::READ_WRITE
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+dim_r + dim_w
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Read value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Last write values
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::READ_WITH_WRITE 
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+dim_r + dim_w
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Read value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Associated attributelast write values
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Until a write operation has been performed, the last write value is initialized
+ to 
+\emph on
+0
+\emph default
+ for scalar attribute of the numeriacal type, to 
+\emph on
+"Not Initialised"
+\emph default
+ for scalar string attribute and to 
+\emph on
+true
+\emph default
+ for scalar boolean attribute.
+ For spectrum or image attribute, the last write value is initialized to
+ an array of one element set to 
+\emph on
+0
+\emph default
+ for numerical type, to an array of one element set to 
+\emph on
+true
+\emph default
+ for boolean attribute and to an array of one element set to "
+\emph on
+Not initialized
+\emph default
+" for string attribute
+\end_layout
+
+\begin_layout Subsubsection
+The associated write attribute parameter
+\end_layout
+
+\begin_layout Standard
+This parameter has a meaning only for attribute with a Tango::READ_WITH_WRITE
+ read/write type.
+ This is the name of the associated write attribute.
+\end_layout
+
+\begin_layout Subsubsection
+The attribute display level
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+level
+\end_layout
+
+\end_inset
+
+ parameter
+\begin_inset CommandInset label
+LatexCommand label
+name "display level"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This parameter is only an help for graphical application.
+ It is a C++ enumeration starting at 0 or a final class for Java.
+ The code associated with each attribute display level is defined in the
+ following table (Tango::DispLevel
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DispLevel
+\end_layout
+
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="3" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Value
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::OPERATOR
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::EXPERT
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This parameter allows a graphical application to support two types of operation
+ :
+\end_layout
+
+\begin_layout Itemize
+An operator mode for day to day operation
+\end_layout
+
+\begin_layout Itemize
+An expert mode when tuning is necessary
+\end_layout
+
+\begin_layout Standard
+According to this parameter, a graphical application knows if the attribute
+ is for the operator mode or for the expert mode.
+\end_layout
+
+\begin_layout Subsection
+Modifiable attribute parameters
+\end_layout
+
+\begin_layout Standard
+Each attribute has a configuration set of 20 modifiable parameters.
+ These can be grouped in three different purposes:
+\end_layout
+
+\begin_layout Enumerate
+General purpose parameters
+\end_layout
+
+\begin_layout Enumerate
+Alarm related parameters
+\end_layout
+
+\begin_layout Enumerate
+Event related parameters
+\end_layout
+
+\begin_layout Subsubsection
+General purpose parameters
+\end_layout
+
+\begin_layout Standard
+Eight attribute parameters are modifiable at run-time via a device call
+ or via the property database.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="9" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Parameter name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Parameter description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+description
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Attribute description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+label
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Attribute label
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unit
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Attribute unit
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+standard_unit
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Conversion factor to MKSA unit
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+display_unit
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+The attribute unit in a printable form
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+format
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+How to print attribute value
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+min_value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Attribute min value
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+max_value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Attribute max value
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The 
+\series bold
+description
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+descripition
+\end_layout
+
+\end_inset
+
+
+\series default
+ parameter describes the attribute.
+ The 
+\series bold
+label
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+label
+\end_layout
+
+\end_inset
+
+
+\series default
+ parameter is used by graphical application to display a label when this
+ attribute is used in a graphical application.
+ The 
+\series bold
+unit
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+unit
+\end_layout
+
+\end_inset
+
+
+\series default
+ parameter is the attribute value unit.
+ The 
+\series bold
+standard_unit
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+standard-unit
+\end_layout
+
+\end_inset
+
+
+\series default
+ parameter is the conversion factor to get attribute value in MKSA units.
+ Even if this parameter is a number, it is returned as a string by the device
+ 
+\emph on
+get_attribute_config
+\emph default
+ call.
+ The 
+\series bold
+display_unit
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+display-unit
+\end_layout
+
+\end_inset
+
+
+\series default
+ parameter is the string used by graphical application to display attribute
+ unit to application user.
+\end_layout
+
+\begin_layout Paragraph
+The format
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+format
+\end_layout
+
+\end_inset
+
+ attribute parameter
+\end_layout
+
+\begin_layout Standard
+This parameter specifies how the attribute value should be printed.
+ It is not valid for string attribute.
+ This format is a string of C++ streams manipulators separated by the 
+\series bold
+;
+\series default
+ character.
+ The supported manipulators are :
+\end_layout
+
+\begin_layout Itemize
+fixed
+\end_layout
+
+\begin_layout Itemize
+scientific
+\end_layout
+
+\begin_layout Itemize
+uppercase
+\end_layout
+
+\begin_layout Itemize
+showpoint
+\end_layout
+
+\begin_layout Itemize
+showpos
+\end_layout
+
+\begin_layout Itemize
+setprecision()
+\end_layout
+
+\begin_layout Itemize
+setw()
+\end_layout
+
+\begin_layout Standard
+Their definition are the same than for C++ streams.
+ An example of format parameter is 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+scientific;uppercase;setprecision(3)
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+.
+ A class called Tango::AttrManip has been written to handle this format
+ string.
+ Once the attribute format string has been retrieved from the device, its
+ value can be printed with 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+cout << Tango::AttrManip(format) << value << endl;
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Paragraph
+The min_value
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+min-value
+\end_layout
+
+\end_inset
+
+ and max_value
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+max-value
+\end_layout
+
+\end_inset
+
+ parameters
+\end_layout
+
+\begin_layout Standard
+These two parameters have a meaning only for attribute of the Tango::WRITE
+ read/write type and for numeriacal data type.
+ Trying to set the value of an attribute to something less than or equal
+ to the min_value parameter is an error.
+ Trying to set the value of the attribute to something more or equal to
+ the max_value parameter is also an error.
+ Even if these parameters are numbers, they are returned as strings by the
+ device 
+\emph on
+get_attribute_config()
+\emph default
+ call.
+\end_layout
+
+\begin_layout Subsubsection
+The alarm related configuration parameters
+\end_layout
+
+\begin_layout Standard
+Six alarm related attribute parameters are modifiable at run-time via a
+ device call or via the property database.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="7" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Parameter name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Parameter description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+min_alarm
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Attribute low level alarm
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+max_alarm
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Attribute high level alarm
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+min_warning
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Attribute low level warning
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+max_warning
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Attribute high level warning
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+delta_t
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+delta time for RDS alarm (mS)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+delta_val
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+delta value for RDS alarm (absolute)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Paragraph
+The min_alarm
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+min-alarm
+\end_layout
+
+\end_inset
+
+ and max_alarm
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+max-alarm
+\end_layout
+
+\end_inset
+
+ parameters
+\end_layout
+
+\begin_layout Standard
+These two parameters have a meaning only for attribute of the Tango::READ,
+ Tango::READ_WRITE and Tango::READ_WITH_WRITE read/write type and for numerical
+ data type.
+ When the attribute is read, if its value is something less than or equal
+ to the min_alarm parameter or if it is something more or equal to the max_alarm
+ parameter, the attribute quality factor will be set to Tango::ATTR_ALARM
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ATTR-ALARM
+\end_layout
+
+\end_inset
+
+ and if the device state is Tango::ON, it is switched to Tango::ALARM
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ALARM
+\end_layout
+
+\end_inset
+
+.
+ Even if these parameters are numbers, they are returned as strings by the
+ device 
+\emph on
+get_attribute_config()
+\emph default
+ call.
+\end_layout
+
+\begin_layout Paragraph
+The min_warning
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+min-warning
+\end_layout
+
+\end_inset
+
+ and max_warning
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+max-warning
+\end_layout
+
+\end_inset
+
+ parameters
+\end_layout
+
+\begin_layout Standard
+These two parameters have a meaning only for attribute of the Tango::READ,
+ Tango::READ_WRITE and Tango::READ_WITH_WRITE read/write type and for numerical
+ data type.
+ When the attribute is read, if its value is something less than or equal
+ to the min_warning parameter or if it is something more or equal to the
+ max_warning parameter, the attribute quality factor will be set to Tango::ATTR_
+WARNING
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ATTR-WARNING
+\end_layout
+
+\end_inset
+
+ and if the device state is Tango::ON, it is switched to Tango::ALARM
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ALARM
+\end_layout
+
+\end_inset
+
+.
+ Even if these parameters are numbers, they are returned as strings by the
+ device 
+\emph on
+get_attribute_config()
+\emph default
+ call.
+\end_layout
+
+\begin_layout Paragraph
+The delta_t
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+delta-t
+\end_layout
+
+\end_inset
+
+ and delta_val
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+delta-val
+\end_layout
+
+\end_inset
+
+ parameters
+\end_layout
+
+\begin_layout Standard
+These two parameters have a meaning only for attribute of the Tango::READ_WRITE
+ and Tango::READ_WITH_WRITE read/write type and for numerical data type.
+ They specify if and how the RDS
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+RDS
+\end_layout
+
+\end_inset
+
+ alarm is used.
+ When the attribute is read, if the difference between its read value and
+ the last written value is something more than or equal to the delta_val
+ parameter and if at least delta_val milli seconds occurs since the last
+ write operation, the attribute quality factor will be set to Tango::ATTR_ALARM
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ATTR-ALARM
+\end_layout
+
+\end_inset
+
+ and if the device state is Tango::ON, it is switched to Tango::ALARM
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ALARM
+\end_layout
+
+\end_inset
+
+.
+ Even if these parameters are numbers, they are returned as strings by the
+ device 
+\emph on
+get_attribute_config()
+\emph default
+ call.
+\end_layout
+
+\begin_layout Subsubsection
+The event related configuration parameters
+\end_layout
+
+\begin_layout Standard
+Six event
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+event
+\end_layout
+
+\end_inset
+
+ related attribute parameters are modifiable at run-time via a device call
+ or via the property database.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="7" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Parameter name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Parameter description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+rel_change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Relative change triggering change event
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+abs_change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Absolute change triggering change event
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+period 
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Period for periodic event
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+archive_rel_change 
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Relative change for archive event
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+archive_abs_change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Absolute change for archive event
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+archive_period 
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Period for change archive event
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Paragraph
+The rel_change and abs_change parameters
+\end_layout
+
+\begin_layout Standard
+Rel_change
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+rel-change
+\end_layout
+
+\end_inset
+
+ is an array property with a maximum of 2 values.
+ It specifies the positive and negative relative change of the attribute
+ value w.r.t.
+ the value of the previous change event which will trigger the event.
+ If the attribute is a spectrum or an image then a change event is generated
+ if any one of the attribute value's satisfies the above criterium.
+ If only one property is specified then it is used for the positive and
+ negative change.
+\end_layout
+
+\begin_layout Standard
+Abs_change
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+abs-change
+\end_layout
+
+\end_inset
+
+ is an array property of maximum 2 values.It specifies the positive and negative
+ absolute change of the attribute value w.r.t the value of the previous change
+ event which will trigger the event.
+ If the attribute is a spectrum or an image then a change event is generated
+ if any one of the attribute value's satisfies the above criterium.
+ If only one property is specified then it is used for the positive and
+ negative change.
+ If no properties are specified then the relative change is used.
+\end_layout
+
+\begin_layout Paragraph
+The periodic period
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+period
+\end_layout
+
+\end_inset
+
+ parameter
+\end_layout
+
+\begin_layout Standard
+The minimum time between events (in milliseconds).
+ If no property is specified then a default value of 1 second is used.
+\end_layout
+
+\begin_layout Paragraph
+The archive_rel_change
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+archive-rel-change
+\end_layout
+
+\end_inset
+
+, archive_abs_change
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+archive-abs-change
+\end_layout
+
+\end_inset
+
+ and archive_period
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+archive-period
+\end_layout
+
+\end_inset
+
+ parameters
+\end_layout
+
+\begin_layout Standard
+archive_rel_change is an array property of maximum 2 values which specifies
+ the positive and negative relative change w.r.t.
+ the previous attribute value which will trigger the event.
+ If the attribute is a spectrum or an image then an archive event is generated
+ if any one of the attribute value's satisfies the above criterium.
+ If only one property is specified then it is used for the positive and
+ negative change.
+ If no properties are specified then a default fo +-10% is used
+\end_layout
+
+\begin_layout Standard
+archive_abs_change is an array property of maximum 2 values which specifies
+ the positive and negative absolute change w.r.t the previous attribute value
+ which will trigger the event.
+ If the attribute is a spectrum or an image then an archive event is generated
+ if any one of the attribute value's satisfies the above criterium.
+ If only one property is specified then it is used for the positive and
+ negative change.
+ If no properties are specified then the relative change is used.
+\end_layout
+
+\begin_layout Standard
+archive_period is the minimum time between archive events (in milliseconds).
+ If no property is specified, no periodic archiving events are send.
+\end_layout
+
+\begin_layout Subsection
+Setting modifiable attribute parameters
+\end_layout
+
+\begin_layout Standard
+A default value is given to all modifiable attribute parameters by the Tango
+ core classes.
+ Nevertheless, it is possible to modify these values in source code at attribute
+ creation time or via the database.
+ Values retrieved from the database have a higher priority than values given
+ at attribute creation time.
+ The default value set by the Tango core classes are
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="21" columns="3">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Parameter type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Parameter name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Library default value
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+description
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+No description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+label
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+device name/attribute name
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unit
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+No unit
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+general
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+standard_unit
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+No standard unit
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+purpose
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+display_unit
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+No display unit
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+format
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+6 characters with 2 decimal
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+min_value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Not specified
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+max_value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Not specified
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+min_alarm
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Not specified
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+max_alarm
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Not specified
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+alarm 
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+min_warning
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Not specified
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+parameters
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+max_warning
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Not specified
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+delta_t
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Not specified
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+delta_val
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Not specified
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+rel_change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Not specified
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+abs_change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Not specified
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+event
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+period
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1000 (mS)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+parameters
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+archive_rel_change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Not specified
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+archive_abs_change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Not specified
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+archive_period
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Not specified
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+It is possible to set modifiable parameters via the database at two levels
+ :
+\end_layout
+
+\begin_layout Enumerate
+At class level
+\end_layout
+
+\begin_layout Enumerate
+At device level.
+ Each device attribute have all its modifiable parameters sets to the value
+ defined at class level.
+ If the setting defined at class level is not correct for one device, it
+ is possible to re-define it.
+\end_layout
+
+\begin_layout Standard
+If we take the example of a class called 
+\emph on
+BumperPowerSupply
+\emph default
+ with three devices called 
+\emph on
+sr/bump/1
+\emph default
+, 
+\emph on
+sr/bump/2
+\emph default
+ and 
+\emph on
+sr/bump/3
+\emph default
+ and one attribute called 
+\emph on
+wanted_current
+\emph default
+.
+ For the first two bumpers, the max_value is equal to 500.
+ For the third one, the max_value is only 400.
+ If the max_value parameter is defined at class level with the value 500,
+ all devices will have 500 as max_value for the 
+\emph on
+wanted_current
+\emph default
+ attribute.
+ It is necessary to re-defined this parameter at device level in order to
+ have the max_value for device sr/bump/3 set to 400.
+\end_layout
+
+\begin_layout Standard
+For the description, label, unit, standard_unit, display_unit and format
+ parameters, it is possible to return them to their default value by setting
+ them to an empty string.
+\end_layout
+
+\begin_layout Section
+Device class parameter
+\end_layout
+
+\begin_layout Standard
+A device documentation
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+documentation
+\end_layout
+
+\end_inset
+
+ field is also defined at Tango device class level.
+ It is defined as Tango device class level because each device belonging
+ to a Tango device class should have the same behaviour and therefore the
+ same documentation.
+ This field is store in the DeviceClass class.
+ It is possible to set this field via a class property.
+ This property name is 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+class name->doc_url
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center} 
+\end_layout
+
+\end_inset
+
+and is retrieved when instance of the DeviceClass object is created.
+ A default value is defined for this field.
+\end_layout
+
+\begin_layout Section
+The device black box
+\end_layout
+
+\begin_layout Standard
+This black box
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+black-box
+\end_layout
+
+\end_inset
+
+ is a help tool to ease debugging session for a running device server.
+ The TANGO core software records every device request in this black box.
+ A tango client is able to retrieve the black box contents with a specific
+ CORBA
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CORBA
+\end_layout
+
+\end_inset
+
+ operation availabble for every device.
+ Each black box entry is returned as a string with the following information
+ :
+\end_layout
+
+\begin_layout Itemize
+The date where the request has been executed by the device.
+ The date format is dd/mm/yyyy hh24:mi:ss:SS (The last field is the second
+ hundredth number).
+\end_layout
+
+\begin_layout Itemize
+The type of CORBA requests.
+ In case of attributes, the name of the requested attribute is returned.
+ In case of operation, the operation type is returned.
+ For 
+\begin_inset Quotes eld
+\end_inset
+
+command_inout
+\begin_inset Quotes erd
+\end_inset
+
+ operation, the command name is returned.
+\end_layout
+
+\begin_layout Itemize
+The client host name
+\end_layout
+
+\begin_layout Section
+Automatically added commands
+\end_layout
+
+\begin_layout Standard
+As already mentionned in this documentation, each Tango device supports
+ at least three commands which are State
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+State
+\end_layout
+
+\end_inset
+
+, Status
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Status
+\end_layout
+
+\end_inset
+
+ and Init
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Init
+\end_layout
+
+\end_inset
+
+.
+ The following array details command input and output data type
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="4" columns="3">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Command name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Input data type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Output data type
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+State
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevState
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Status
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevString
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Init
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+The State command
+\end_layout
+
+\begin_layout Standard
+This command gets the device state (stored in its 
+\emph on
+device_state
+\emph default
+ data member) and returns it to the caller.
+ The device state is a variable of the Tango_DevState type (packed into
+ a CORBA Any object when it is returned by a command)
+\end_layout
+
+\begin_layout Subsection
+The Status command
+\end_layout
+
+\begin_layout Standard
+This command gets the device status (stored in its 
+\emph on
+device_status
+\emph default
+ data member) and returns it to the caller.
+ The device status is a variable of the string type.
+\end_layout
+
+\begin_layout Subsection
+The Init command
+\end_layout
+
+\begin_layout Standard
+This commands re-initialise a device keeping the same network connection.
+ After an Init command executed on a device, it is not necessary for client
+ to re-connect to the device.
+ This command first calls the device 
+\emph on
+delete_device()
+\emph default
+ method and then execute its 
+\emph on
+init_device()
+\emph default
+ method.
+ For C++ device server, all the memory allocated in the 
+\emph on
+init_device()
+\emph default
+ method must be freed in the 
+\emph on
+delete_device()
+\emph default
+ method.
+ The language device desctructor automatically calls the 
+\emph on
+delete_device()
+\emph default
+ method.
+\end_layout
+
+\begin_layout Section
+DServer
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DServer
+\end_layout
+
+\end_inset
+
+ class device commands
+\end_layout
+
+\begin_layout Standard
+As already explained in 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "DServer_class"
+
+\end_inset
+
+, each device server process has its own Tango device.
+ This device supports the three commands previously described plus 27 commands
+ (for C++ device server, only 25 for Java device server) which are DevRestart
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevRestart
+\end_layout
+
+\end_inset
+
+, RestartServer
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+RestartServer
+\end_layout
+
+\end_inset
+
+, QueryClass
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+QueryClass
+\end_layout
+
+\end_inset
+
+, QueryDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+QueryDevice
+\end_layout
+
+\end_inset
+
+, Kill
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Kill
+\end_layout
+
+\end_inset
+
+, QueryWizardClassProperty
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+QueyWizardClassProperty
+\end_layout
+
+\end_inset
+
+, QueryWizardDevProperty
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+QueryWizardDevProperty
+\end_layout
+
+\end_inset
+
+, QuerySubDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+QuerySubDevice
+\end_layout
+
+\end_inset
+
+, the polling related commands which are StartPolling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+StartPolling
+\end_layout
+
+\end_inset
+
+, StopPolling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+StopPolling
+\end_layout
+
+\end_inset
+
+, AddObjPolling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AddObjPolling
+\end_layout
+
+\end_inset
+
+, RemObjPolling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+RemObjPolling
+\end_layout
+
+\end_inset
+
+, UpdObjPollingPeriod
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+UpdObjPollingPeriod
+\end_layout
+
+\end_inset
+
+, PolledDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+PolledDevice
+\end_layout
+
+\end_inset
+
+ and DevPollStatus
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevPollStatus
+\end_layout
+
+\end_inset
+
+, the device locking related commands which are LockDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+LockDevice
+\end_layout
+
+\end_inset
+
+, UnLockDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+UnLockDevice
+\end_layout
+
+\end_inset
+
+, ReLockDevices
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ReLockDevices
+\end_layout
+
+\end_inset
+
+ and DevLockStatus
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevLockStatus
+\end_layout
+
+\end_inset
+
+, the event related command called EventSubscriptionChange
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+EventSubscriptionChange
+\end_layout
+
+\end_inset
+
+ (only for C++) and finally the logging related commands which are AddLoggingTar
+get
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AddLoggingTarget
+\end_layout
+
+\end_inset
+
+, RemoveLoggingTarget
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+RemoveLoggingTarget
+\end_layout
+
+\end_inset
+
+, GetLoggingTarget
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GetLoggingTarget
+\end_layout
+
+\end_inset
+
+, GetLoggingLevel
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GetLoggingLevel
+\end_layout
+
+\end_inset
+
+, SetLoggingLevel
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SetLoggingLevel
+\end_layout
+
+\end_inset
+
+, StopLogging
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+StopLogging
+\end_layout
+
+\end_inset
+
+ and StartLogging
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+StartLogging
+\end_layout
+
+\end_inset
+
+.
+ The following table give all commands input and output data types
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="31" columns="3">
+<features islongtable="true">
+<column alignment="center" valignment="middle" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Command name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Input data type 
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Output data type
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+State
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevState
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Status
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevString
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Init
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevRestart
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevString
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+RestartServer
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+QueryClass
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+QueryDevice
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Kill
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+QueryWizardClassProperty
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevString
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+QueryWizardDevProperty
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevString
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+QuerySubDevice
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+StartPolling
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+StopPolling
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+AddObjPolling
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarLongStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+RemObjPolling
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+UpdObjPollingPeriod
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarLongStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+PolledDevice
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevPollStatus
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevString
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+LockDevice
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarLongStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+UnLockDevice
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarLongStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevLong
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ReLockDevices
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevLockStatus
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevString
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarLongStringArray
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+EventSubscribeChange
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+AddLoggingTarget 
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+RemoveLoggingTarget 
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+GetLoggingTarget 
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevString
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+GetLoggingLevel
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarLongStringArray
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+SetLoggingLevel
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarLongStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+StopLogging
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+StartLogging
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+void
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The device description field is set to 
+\begin_inset Quotes eld
+\end_inset
+
+A device server device
+\begin_inset Quotes erd
+\end_inset
+
+.
+ Device server started with the -file command line option also supports
+ a command called QueryEventChannelIOR
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+QueryEventChannelIOR
+\end_layout
+
+\end_inset
+
+.
+ This command is used interanally by the Tango kernel classes when the event
+ system is used with device server using database on file.
+\end_layout
+
+\begin_layout Subsection
+The State command
+\end_layout
+
+\begin_layout Standard
+This device state is always set to ON
+\end_layout
+
+\begin_layout Subsection
+The Status command
+\end_layout
+
+\begin_layout Standard
+This device status is always set to 
+\begin_inset Quotes eld
+\end_inset
+
+The device is ON
+\begin_inset Quotes erd
+\end_inset
+
+ followed by a new line character and a string describing polling thread
+ status.
+ This string is either 
+\begin_inset Quotes eld
+\end_inset
+
+The polling is OFF
+\begin_inset Quotes erd
+\end_inset
+
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+The polling is ON
+\begin_inset Quotes erd
+\end_inset
+
+ according to polling state.
+\end_layout
+
+\begin_layout Subsection
+The DevRestart command
+\end_layout
+
+\begin_layout Standard
+The DevRestart command restart a device.
+ The name of the device to be re-started is the command input parameter.
+ The command destroys the device by calling its destructor and re-create
+ it from its constructor.
+\end_layout
+
+\begin_layout Subsection
+The RestartServer command
+\end_layout
+
+\begin_layout Standard
+The DevRestartServer command restarts all the device pattern(s) embedded
+ in the device server process.
+ Therefore, all the devices implemented in the server process are destroyed
+ and re-built
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+Their black-box is also destroyed and re-built
+\end_layout
+
+\end_inset
+
+.
+ The network connection between client(s) and device(s) implemented in the
+ device server process is destroyed and re-built.
+ 
+\end_layout
+
+\begin_layout Standard
+Executing this command allows a complete restart of the device server without
+ stopping the process.
+\end_layout
+
+\begin_layout Subsection
+The QueryClass
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+QueryClass
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command returns to the client the list of Tango device class(es) embedded
+ in the device server.
+ It returns only class(es) implemented by the device server programmer.
+ The DServer device class name (implemented by the TANGO core software)
+ is not returned by this command.
+\end_layout
+
+\begin_layout Subsection
+The QueryDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+QueryDevice
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command returns to the client the list of device name for all the device(s)
+ implemented in the device server process.
+ Each device name is returned using the following syntax : 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+<class name>::<device name>
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The name of the DServer class device is not returned by this command.
+\end_layout
+
+\begin_layout Subsection
+The Kill
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Kill
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command stops the device server process.
+ In order that the client receives a last answer from the server, this command
+ starts a thread which will after a short delay, kills the device server
+ process.
+\end_layout
+
+\begin_layout Subsection
+The QueryWizardClassProperty
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+QueryWizardClassProperty
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command returns the list of property(ies) defined for a class stored
+ in the device server process property wizard.
+ For each property, its name, a description and a default value is returned.
+\end_layout
+
+\begin_layout Subsection
+The QueryWizardDevProperty
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+QueryWizardDevProperty
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command returns the list of property(ies) defined for a device stored
+ in the device server process property wizard.
+ For each property, its name, a description and a default value is returned.
+\end_layout
+
+\begin_layout Subsection
+The QuerySubDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+QuerySubDevice
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command returns the list of sub-device(s) imported by each device within
+ the server.
+ A sub-device is a device used ( to execute command(s) and/or to read/write
+ attribute(s) ) by one of the device server process devices.
+ There is one element in the returned strings array for each sub-device.
+ The syntax of each string is the device name, a space and the sub-device
+ name.
+ In case of device server process starting threads using a sub-device, it
+ is not possible to link this sub-device to any process devices.
+ In such a case, the string contains only the sub-device name
+\end_layout
+
+\begin_layout Subsection
+The StartPolling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+StartPolling
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command starts the polling thread
+\end_layout
+
+\begin_layout Subsection
+The StopPolling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+StopPolling
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command stops the polling thread
+\end_layout
+
+\begin_layout Subsection
+The AddObjPolling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AddObjPolling
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command adds a new object in the list of object(s) to be polled.
+ The command input parameters are embedded within a Tango::DevVarLongStringArray
+ data type with one long data and three strings.
+ The input parameters are:
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="5" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Command parameter
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Parameter meaning
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+svalue[0]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Device name
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+svalue[1]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Object type (
+\begin_inset Quotes eld
+\end_inset
+
+command
+\begin_inset Quotes eld
+\end_inset
+
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+attribute
+\begin_inset Quotes eld
+\end_inset
+
+)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+svalue[2]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Object name
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+lvalue[0]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+polling period in mS
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The object type string is case independent.
+ The object name string (command name or attribute name) is case dependant.
+ This command does not start polling if it is stopped.
+ This command is not allowed in case the device is locked and the command
+ requester is not the lock owner.
+\end_layout
+
+\begin_layout Subsection
+The RemObjPolling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+RemObjPolling
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command removes an object of the list of polled objects.
+ The command input data type is a Tango::DevVarStringArray with three strings.
+ These strings meaning are :
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="4" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+String
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Meaning
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+string[0]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Device name
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+string[1]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Object type (
+\begin_inset Quotes eld
+\end_inset
+
+command
+\begin_inset Quotes eld
+\end_inset
+
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+attribute
+\begin_inset Quotes eld
+\end_inset
+
+)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+string[2]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Object name
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The object type string is case independent.
+ The object name string (command name or attribute name) is case dependant.
+ This command is not allowed in case the device is locked and the command
+ requester is not the lock owner.
+\end_layout
+
+\begin_layout Subsection
+The UpdObjPollingPeriod
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+UpdObjPollingPeriod
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command changes the polling period for a specified object.
+ The command input parameters are embedded within a Tango::DevVarLongStringArray
+ data type with one long data and three strings.
+ The input parameters are:
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="5" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Command parameter
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Parameter meaning
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+svalue[0]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Device name
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+svalue[1]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Object type (
+\begin_inset Quotes eld
+\end_inset
+
+command
+\begin_inset Quotes eld
+\end_inset
+
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+attribute
+\begin_inset Quotes eld
+\end_inset
+
+)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+svalue[2]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Object name
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+lvalue[0]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+new polling period in mS
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The object type string is case independent.
+ The object name string (command name or attribute name) is case dependant.
+ This command does not start polling if it is stopped.
+ This command is not allowed in case the device is locked and the command
+ requester is not the lock owner.
+\end_layout
+
+\begin_layout Subsection
+The PolledDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+PolledDevice
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command returns the name of device which are polled.
+ Each string in the Tango::DevVarStringArray returned by the command is
+ a device name which has at least one command or attribute polled.
+ The list is alphabetically sorted.
+\end_layout
+
+\begin_layout Subsection
+The DevPollStatus
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevPollStatus
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command returns a polling status for a specific device.
+ The input parameter is a device name.
+ Each string in the Tango::DevVarStringArray returned by the command is
+ the polling status for each polled device objects (command or attribute).
+ For each polled objects, the polling status is :
+\end_layout
+
+\begin_layout Itemize
+The object name
+\end_layout
+
+\begin_layout Itemize
+The object polling period (in mS)
+\end_layout
+
+\begin_layout Itemize
+The object polling ring buffer depth
+\end_layout
+
+\begin_layout Itemize
+The time needed (in mS) for the last command execution or attribute reading
+\end_layout
+
+\begin_layout Itemize
+The time since data in the ring buffer has not been updated.
+ This allows a check of the polling thread
+\end_layout
+
+\begin_layout Itemize
+The delta time between the last records in the ring buffer.
+ This allows checking that the polling period is respected by the polling
+ thread.
+\end_layout
+
+\begin_layout Itemize
+The exception parameters in case of the last command execution or the last
+ attribute reading failed.
+\end_layout
+
+\begin_layout Standard
+A new line character is inserted between each piece of information.
+\end_layout
+
+\begin_layout Subsection
+The LockDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+LockDevice
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command locks a device for the calling process.
+ The command input parameters are embedded within a Tango::DevVarLongStringArray
+ data type with one long data and one string.
+ The input parameters are:
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="3" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Command parameter
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Parameter meaning
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+svalue[0]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Device name
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+lvalue[0]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Lock validity
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+The UnLockDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+UnLockDevice
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command unlocks a device.
+ The command input parameters are embedded within a Tango::DevVarLongStringArray
+ data type with one long data and one string.
+ The input parameters are:
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="3" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Command parameter
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Parameter meaning
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+svalue[0]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Device name
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+lvalue[0]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Force flag
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The force flag parameter allows a client to unlock a device already locked
+ by another process (for admin usage only)
+\end_layout
+
+\begin_layout Subsection
+The ReLockDevices
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ReLockDevices
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command re-lock devices.
+ The input argument is the list of devices to be re-locked.
+ It's an error to re-lock a device which is not already locked.
+\end_layout
+
+\begin_layout Subsection
+The DevLockStatus
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevLockStatus
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command returns a device locking status to the caller.
+ Its input parameter is the device name.
+ The output parameters are embedded within a Tango::DevVarLongStringArray
+ data type with three strings and six long.
+ These data are
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="10" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Command parameter
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Parameter meaning
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+svalue[0]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Locking string
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+svalue[1]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CPP client host IP address or "Not defined"
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+svalue[2]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Java VM main class for Java client or "Not defined"
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+lvalue[0]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Lock flag (1 if locked, 0 othterwise)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+lvalue[1]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CPP client host IP address or 0 for Java locker
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+lvalue[2]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Java locker UUID part 1or 0 for CPP locker
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+lvalue[3]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Java locker UUID part 2 or 0 for CPP locker
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+lvalue[4]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Java locker UUID part 3 or 0 for CPP locker
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+lvalue[5]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Java locker UUID part 4 or 0 for CPP locker
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+The EventSubscriptionChange
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+EventSubscriptionChange
+\end_layout
+
+\end_inset
+
+ command (C++ server only)
+\end_layout
+
+\begin_layout Standard
+This command is used as a piece of the "heartbeat" system between an event
+ client and the device server generating the event.
+ There is no reason to generate events if there is no client which has subscribe
+d to it.
+ It is used by the 
+\emph on
+DeviceProxy::subscribe_event()
+\emph default
+ method and the event thread on the client side to inform the server to
+ keep on generating events for the attribute in question.
+ It reloads the subscription timer with the current time.
+ Events are not generated when there are no clients subscribed within the
+ last 10 minutes.
+ The input parameters are:
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="5" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Command parameter
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Parameter meaning
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+argin[0]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Device name
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+argin[1]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Attribute name
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+argin[2]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+action ("subscribe" or "unsubsribe")
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+argin[3]
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+event name ("change", "periodic", "archive","attr_conf")
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+The AddLoggingTarget
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AddLoggingTarget
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+This command adds one (or more) logging target(s) to the specified device(s).
+ The command input parameter is an array of string logically composed of
+ {device_name, target_type::target_name} groups where the elements have
+ the following semantic: 
+\end_layout
+
+\begin_layout Itemize
+device_name is the name of the device which logging behavior is to be controlled.
+ The wildcard "*" is supported to apply the modification to all devices
+ encapsulated within the device server (e.g.
+ to ask all devices to log to the same device target).
+\end_layout
+
+\begin_layout Itemize
+target_type::target_name: target_type is one of the supported target types
+ and target_name, the name of the target.
+ Supported target types are: 
+\emph on
+console
+\emph default
+, 
+\emph on
+file
+\emph default
+ and 
+\emph on
+device
+\emph default
+.
+ For a device target, target_name must contain the name of a log consumer
+ device (as defined in 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Tango-log-consumer"
+
+\end_inset
+
+).
+ For a file target, target_name is the full path to the file to log to.
+ If omitted the device's name is used to build the file name (domain_family_memb
+er.log).
+ Finally, target_name is ignored in the case of a console target and can
+ be omitted.
+\end_layout
+
+\begin_layout Standard
+This command is not allowed in case the device is locked and the command
+ requester is not the lock owner.
+\end_layout
+
+\begin_layout Subsection
+The RemoveLoggingTarget
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+RemoveLoggingTarget
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+Remove one (or more) logging target(s) from the specified device(s).The command
+ input parameter is an array of string logically composed of {device_name,
+ target_type::target_name} groups where the elements have the following
+ semantic:
+\end_layout
+
+\begin_layout Itemize
+device_name: the name of the device which logging behavior is to be controlled.
+ The wildcard "*" is supported to apply the modification to all devices
+ encapsulated within the device server (e.g.
+ to ask all devices to stop logging to a given device target).
+\end_layout
+
+\begin_layout Itemize
+target_type::target_name: target_type is one of the supported target types
+ and target_name, the name of the target.
+ Supported target types are: 
+\emph on
+console
+\emph default
+, 
+\emph on
+file
+\emph default
+ and 
+\emph on
+device
+\emph default
+.
+ For a device target, target_name must contain the name of a log consumer
+ device (as defined in 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Tango-log-consumer"
+
+\end_inset
+
+).
+ For a file target, target_name is the full path to the file to log to.
+ If omitted the device's name is used to build the file name (domain_family_memb
+er.log).
+ Finally, target_name is ignored in the case of a console target and can
+ be omitted.
+\end_layout
+
+\begin_layout Standard
+The wildcard "*" is supported for target_name.
+ For instance, RemoveLoggingTarget (["*", "device::*"]) removes all the
+ device targets from all the devices running in the device server.
+ This command is not allowed in case the device is locked and the command
+ requester is not the lock owner.
+\end_layout
+
+\begin_layout Subsection
+The GetLoggingTarget
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GetLoggingTarget
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+Returns the current target list of the specified device.
+ The command parameter device_name is the name of the device which logging
+ target list is requested.
+ The list is returned as a DevVarStringArray containing target_type::target_name
+ elements.
+\end_layout
+
+\begin_layout Subsection
+The GetLoggingLevel
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GetLoggingLevel
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+Returns the logging level of the specified devices.
+ The command input parameter device_list contains the names of the devices
+ which logging target list is requested.
+ The wildcard "*" is supported to get the logging level of all the devices
+ running within the server.
+ The string part of the result contains the name of the devices and its
+ long part contains the levels.
+ Obviously, result.lvalue[i] is the current logging level of the device named
+ result.svalue[i].
+\end_layout
+
+\begin_layout Subsection
+The SetLoggingLevel
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SetLoggingLevel
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+Changes the logging level of the specified devices.
+ The string part of the command input parameter contains the device names
+ while its long part contains the logging levels.
+ The set of possible values for levels is: 0=OFF, 1=FATAL, 2=ERROR, 3=WARNING,
+ 4=INFO, 5=DEBUG.
+ 
+\end_layout
+
+\begin_layout Standard
+The wildcard "*" is supported to assign all devices the same logging level.
+ For instance, SetLoggingLevel (["*"] [3]) set the logging level of all
+ the devices running within the server to WARNING.
+ This command is not allowed in case the device is locked and the command
+ requester is not the lock owner.
+\end_layout
+
+\begin_layout Subsection
+The StopLogging
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+StopLogging
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+For all the devices running within the server, StopLogging saves their current
+ logging level and set their logging level to OFF.
+ 
+\end_layout
+
+\begin_layout Subsection
+The StartLogging
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+StartLogging
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+For each device running within the server, StartLogging restores their logging
+ level to the value stored during a previous StopLogging call.
+\end_layout
+
+\begin_layout Section
+DServer class device properties
+\end_layout
+
+\begin_layout Standard
+This device has two properties related to polling threads pool management.
+ These properties are described in the following table 
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="3" columns="3">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Property name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+property rule
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+default value
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+polling_threads_pool_size
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Max number of thread in the polling pool
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+polling_threads_pool_conf
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Polling threads pool configuration
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The rule of the polling_threads_pool_size
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+polling-threads-pool-size
+\end_layout
+
+\end_inset
+
+ is to define the maximun number of thread created for the polling threads
+ pool size.
+ The rule of the polling_threads_pool_conf
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+polling-threads-pool-conf
+\end_layout
+
+\end_inset
+
+ is to define which thread in the pool is in charge of all the polled object(s)
+ of which device.
+ This property is an array of strings with one string per used thread in
+ the pool.
+ The content of the string is simply a device name list with device name
+ splitted by a comma.
+ Example of polling_threads_pool_conf property for 3 threads used:
+\end_layout
+
+\begin_layout LyX-Code
+dserver/<ds exec name>/<inst.
+ name>/polling_threads_pool_conf-> the/dev/01
+\end_layout
+
+\begin_layout LyX-Code
+                  the/dev/02,the/dev/06
+\end_layout
+
+\begin_layout LyX-Code
+                  the/dev/03
+\end_layout
+
+\begin_layout Standard
+Thread number 2 is in charge of 2 devices.
+ Note that there is an entry in this list only for the used threads in the
+ pool.
+\end_layout
+
+\begin_layout Section
+Tango log consumer
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+consumer
+\end_layout
+
+\end_inset
+
+ 
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tango-log-consumer"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+The available Log Consumer
+\end_layout
+
+\begin_layout Standard
+One implementation of a log consumer associated to a graphical user interface
+ is available within Tango.
+ It is a standalone java application called 
+\series bold
+LogViewer
+\series default
+ based on the publicly available chainsaw application from the log4j package.
+ It supports two way of running which are:
+\end_layout
+
+\begin_layout Itemize
+The static mode: In this mode, LogViewer is started with a parameter which
+ is the name of the log consumer device implemented by the application.
+ All messages sent by devices with a logging target type set to 
+\emph on
+device
+\emph default
+ and with a logging target name set to the same device name than the device
+ name passed as application parameter will be displayed (if the logging
+ level allows it).
+\end_layout
+
+\begin_layout Itemize
+The dynamic mode: In this mode, the name of the log consumer device implemented
+ by the application is build at application startup and is dynamic.
+ The user with the help of the graphical interface chooses device(s) for
+ which he want to see log messages.
+\end_layout
+
+\begin_layout Subsection
+The Log Consumer interface
+\end_layout
+
+\begin_layout Standard
+A Tango Log Consumer device is nothing but a tango device supporting the
+ following tango command : 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+void log (Tango::DevVarStringArray details)
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+ where details is an array of string carrying the log details.
+ Its structure is:
+\end_layout
+
+\begin_layout Itemize
+details[0] : the timestamp in millisecond since epoch (01.01.1970) 
+\end_layout
+
+\begin_layout Itemize
+details[1] : the log level
+\end_layout
+
+\begin_layout Itemize
+details[2] : the log source (i.e.
+ device name)
+\end_layout
+
+\begin_layout Itemize
+details[3] : the log message
+\end_layout
+
+\begin_layout Itemize
+details[4] : the log NDC (contextual info) - Not used but reserved
+\end_layout
+
+\begin_layout Itemize
+details[5] : the thread identifier (i.e.
+ the thread from which the log request comes from)
+\end_layout
+
+\begin_layout Standard
+These log details can easily be extended.
+ Any tango device supporting this command can act as a device target for
+ other devices.
+ 
+\end_layout
+
+\begin_layout Section
+Control system specific
+\end_layout
+
+\begin_layout Standard
+It is possible to define a few control system parameters.
+ By control system, we mean for each set of computers having the same database
+ device server (the same TANGO_HOST environment variable)
+\end_layout
+
+\begin_layout Subsection
+The device class documentation default value
+\end_layout
+
+\begin_layout Standard
+Each control system may have it's own default device class documentation
+ value.
+ This is defined via a class property.
+ The property name is 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+Default->doc_url
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+ It's retrieved if the device class itself does not define any doc_url property.
+ If the Default->doc_url property is also not defined, a hard-coded default
+ value is provided.
+\end_layout
+
+\begin_layout Subsection
+The services definition
+\end_layout
+
+\begin_layout Standard
+The property used to defined control system services is named 
+\series bold
+Services
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Services
+\end_layout
+
+\end_inset
+
+
+\series default
+ and belongs to the free object 
+\series bold
+CtrlSystem
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CtrlSystem
+\end_layout
+
+\end_inset
+
+.
+ This property is an erray of strings.
+ Each string defines a service available within the control system.
+ The syntax of each service definition is 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+Service name/Instance name:service device name
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+C++ specific
+\end_layout
+
+\begin_layout Subsection
+The Tango master include file (tango.h
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+tango.h
+\end_layout
+
+\end_inset
+
+)
+\end_layout
+
+\begin_layout Standard
+Tango has a master include file called 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+tango.h
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center} 
+\end_layout
+
+\end_inset
+
+This master include file includes the following files :
+\end_layout
+
+\begin_layout Itemize
+C++ language include file : 
+\series bold
+typeinfo
+\end_layout
+
+\begin_layout Itemize
+Tango configuration include file : 
+\series bold
+tango_config.h
+\end_layout
+
+\begin_layout Itemize
+CORBA include file : 
+\series bold
+idl/tango.h
+\end_layout
+
+\begin_layout Itemize
+Some network include files for WIN32 : 
+\series bold
+winsock2.h
+\series default
+ and 
+\series bold
+mswsock.h
+\end_layout
+
+\begin_layout Itemize
+C++ streams include file :
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+
+\series bold
+iostream
+\series default
+, 
+\series bold
+sstream
+\series default
+ and 
+\series bold
+fstream
+\series default
+ for Windows NT and Solaris with its natif compiler
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+iostream.h
+\series default
+, 
+\series bold
+strstream.h, fstream.h
+\series default
+ and 
+\series bold
+sstream
+\series default
+ for Linux and Solaris with gcc
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+Some standard C++ library include files : 
+\series bold
+string
+\series default
+ and 
+\series bold
+vector
+\end_layout
+
+\begin_layout Itemize
+The main include file generated by the CORBA IDL compiler : 
+\series bold
+idl/tango.h
+\end_layout
+
+\begin_layout Itemize
+The Tango database and device API include files : 
+\series bold
+dbapi.h
+\series default
+ and 
+\series bold
+devapi.h
+\end_layout
+
+\begin_layout Itemize
+A list of other Tango include files : 
+\series bold
+tango_const.h
+\series default
+, 
+\series bold
+utils.h
+\series default
+, 
+\series bold
+device.h
+\series default
+, 
+\series bold
+command.h, except.h, seqvec.h, device_2.h, log4tango.h, attrmanip.h
+\series default
+ and 
+\series bold
+dserver.h
+\end_layout
+
+\begin_layout Subsection
+Tango specific types
+\end_layout
+
+\begin_layout Subsubsection*
+Operating system free type
+\end_layout
+
+\begin_layout Standard
+Some data type used in the TANGO core software are not the same under UNIX
+ like operating system and Windows NT.
+ In order to have less 
+\begin_inset Quotes eld
+\end_inset
+
+#ifdef
+\begin_inset Quotes erd
+\end_inset
+
+ in the source code, some Tango types have been defined.
+ They are described in the following table.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="5" columns="3">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Type name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Unix like
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Windows NT
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+TangoSys_MemStream
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+strstream
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+stringstream
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+TangoSys_OMemStream
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ostrstream
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ostringstream
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+TangoSys_Pid
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+pid_t
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+int
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+TangoSys_Cout
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+_IO_ostream_withassign
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ostream
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+These types are defined in the tango_config.h file
+\end_layout
+
+\begin_layout Subsubsection
+Template command model related type
+\end_layout
+
+\begin_layout Standard
+As explained in 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Command fact"
+
+\end_inset
+
+, command created with the template command model uses static casting.
+ Many type definition have been written for these casting.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="5" columns="3">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Class name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Command allowed method (if any)
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Command execute method
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+TemplCommand
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TemplCommand
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::StateMethodPtr
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::CmdMethPtr
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+TemplCommandIn
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TemplCommandIn
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::StateMethodPtr
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::CmdMethPtr_xxx
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+TemplCommandOut
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TemplCommandOut
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::StateMethodPtr
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::xxx_CmdMethPtr
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+TemplCommandInOut
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TemplCommandInOut
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::StateMethodPtr
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::xxx_CmdMethPtr_yyy
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The 
+\series bold
+Tango::StateMethPtr
+\series default
+ is a pointer to a method of the DeviceImpl class which returns a boolean
+ and has one parameter which is a reference to a const CORBA::Any obect.
+ 
+\end_layout
+
+\begin_layout Standard
+The 
+\series bold
+Tango::CmdMethPtr
+\series default
+ is a pointer to a method of the DeviceImpl class which returns nothing
+ and needs nothing as parameter.
+\end_layout
+
+\begin_layout Standard
+The 
+\series bold
+Tango::CmdMethPtr_xxx
+\series default
+ is a pointer to a method of the DeviceImpl class which returns nothing
+ and has one parameter.
+ xxx must be set according to the method parameter type as described in
+ the next table
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="20" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+short cut (xxx)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevBoolean
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Bo
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevShort
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Sh
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevLong
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Lg
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevFloat
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Fl
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevDouble
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Db
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevUshort
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+US
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevULong
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+UL
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevString
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Str
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarCharArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ChA
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarShortArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ShA
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarLongArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+LgA
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarFloatArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+FlA
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarDoubleArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DbA
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarUShortArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+USA
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarULongArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ULA
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+StrA
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarLongStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+LSA
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarDoubleStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DSA
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevState
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Sta
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+For instance, a pointer to a method which takes a Tango::DevVarStringArray
+ as input parameter must be statically casted to a Tango::CmdMethPtr_StrA,
+ a pointer to a method which takes a Tango::DevLong data as input parameter
+ must be statically casted to a Tango::CmdMethPtr_Lg.
+\end_layout
+
+\begin_layout Standard
+The 
+\series bold
+Tango::xxx_CmdMethPtr
+\series default
+ is a pointer to a method of the DeviceImpl class which returns data of
+ one of the Tango type and has no input parameter.
+ xxx must be set according to the method return data type following the
+ same rules than those described in the previous table.
+ For instance, a pointer to a method which returns a Tango::DevDouble data
+ must be statically casted to a Tango::Db_CmdMethPtr.
+\end_layout
+
+\begin_layout Standard
+The 
+\series bold
+Tango::xxx_CmdMethPtr_yyy
+\series default
+ is a pointer to a method of the DeviceImpl class which returns data of
+ one of the Tango type and has one input parameter of one of the Tango data
+ type.
+ xxx and yyy must be set according to the method return data type and parameter
+ type following the same rules than those described in the previous table.
+ For instance, a pointer to a method which returns a Tango::DevDouble data
+ and which takes a Tango::DevVarLongStringArray must be statically casted
+ to a Tango::Db_CmdMethPtr_LSA.
+\end_layout
+
+\begin_layout Standard
+All those type are defined in the tango_const.h file.
+\end_layout
+
+\begin_layout Subsection
+Tango device state code
+\end_layout
+
+\begin_layout Standard
+The Tango::DevState type is a C++ enumeration starting at 0.
+ The code associated with each state
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+state
+\end_layout
+
+\end_inset
+
+ is defined in the following table.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="15" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+State name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Value
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::ON
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::OFF
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::CLOSE
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::OPEN
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+3
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::INSERT
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+4
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::EXTRACT
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+5
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::MOVING
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+6
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::STANDBY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+7
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::FAULT
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+8
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::INIT
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+9
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::RUNNING
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+10
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::ALARM
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+11
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DISABLE
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+12
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::UNKNOWN
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+13
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+A strings array called 
+\series bold
+Tango::DevStateName
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevStateName
+\end_layout
+
+\end_inset
+
+
+\series default
+ can be used to get the device state as a string.
+ Use the Tango device state code as index into the array to get the correct
+ string.
+\end_layout
+
+\begin_layout Subsection
+Tango data type 
+\end_layout
+
+\begin_layout Standard
+A 
+\begin_inset Quotes eld
+\end_inset
+
+define
+\begin_inset Quotes erd
+\end_inset
+
+ has been created for each Tango data type.
+ This is summarized in the following table
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="29" columns="3">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Type name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Type code
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Value
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevBoolean
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEV_BOOLEAN
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevShort
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEV_SHORT
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevLong
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEV_LONG
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+3
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevFloat
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEV_FLOAT
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+4
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevDouble
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEV_DOUBLE
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+5
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevUShort
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEV_USHORT
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+6
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevULong
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEV_ULONG
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+7
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevString
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEV_STRING
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+8
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarCharArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEVVAR_CHARARRAY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+9
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarShortArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEVVAR_SHORTARRAY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+10
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarLongArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEVVAR_LONGARRAY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+11
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarFloatArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEVVAR_FLOATARRAY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+12
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarDoubleArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEVVAR_DOUBLEARRAY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+13
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarUShortArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEVVAR_USHORTARRAY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+14
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarULongArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEVVAR_ULONGARRAY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+15
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEVVAR_STRINGARRAY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+16
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarLongStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEVVAR_LONGSTRINGARRAY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+17
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarDoubleStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEVVAR_DOUBLESTRINGARRAY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+18
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevState
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEV_STATE
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+19
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::ConstDevString
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::CONST_DEV_STRING
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+20
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarBooleanArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEVVAR_BOOLEANARRAY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+21
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevUChar
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEV_UCHAR
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+22
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevLong64
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEV_LONG64
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+23
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevULong64
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEV_ULONG64
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+24
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarLong64Array
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEVVAR_LONG64ARRAY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+25
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarULong64Array
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEVVAR_ULONG64ARRAY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+26
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevInt
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEV_INT
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+27
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevEncoded
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DEV_ENCODED
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+28
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+For command which do not take input parameter, the type code Tango::DEV_VOID
+ (value = 0) has been defined.
+\end_layout
+
+\begin_layout Standard
+A strings array called 
+\series bold
+Tango::CmdArgTypeName
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CmdArgTypeName
+\end_layout
+
+\end_inset
+
+
+\series default
+ can be used to get the data type as a string.
+ Use the Tango data type code as index into the array to get the correct
+ string.
+\end_layout
+
+\begin_layout Subsection
+Tango command display level
+\end_layout
+
+\begin_layout Standard
+Like attribute, Tango command has a display level.
+ The Tango::DispLevel type is a C++ enumeration starting at 0.
+ The code associated with each command display level is already described
+ in page 
+\begin_inset CommandInset ref
+LatexCommand pageref
+reference "display level"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+As for attribute, this parameter allows a graphical application to support
+ two types of operation :
+\end_layout
+
+\begin_layout Itemize
+An operator mode for day to day operation
+\end_layout
+
+\begin_layout Itemize
+An expert mode when tuning is necessary
+\end_layout
+
+\begin_layout Standard
+According to this parameter, a graphical application knows if the command
+ is for the operator mode or for the expert mode.
+\end_layout
+
+\begin_layout Section
+Java specific
+\end_layout
+
+\begin_layout Subsection
+Packages
+\end_layout
+
+\begin_layout Standard
+All the Tango core classes are bundled in the a Java package
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+package
+\end_layout
+
+\end_inset
+
+ called 
+\series bold
+fr.esrf.TangoDs
+\series default
+.
+ All the classes generated by the IDL compiler are bundled in a Java package
+ called 
+\series bold
+fr.esrf.Tango
+\series default
+.
+ All the Tango Java API classes are bundled in Java packages called 
+\series bold
+fr.esrf.TangoApi
+\series default
+ and 
+\series bold
+fr.esrf.TangoApi.Group
+\series default
+.
+ All the CORBA related classes are stored in a package
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+package
+\end_layout
+
+\end_inset
+
+ called 
+\series bold
+org.omg.CORBA
+\series default
+.
+ These package Tango, TangoDs, TangoApi, Group and CORBA are stored in the
+ same jar file called 
+\series bold
+TangORB.jar
+\series default
+.
+\end_layout
+
+\begin_layout Section
+Device server process option and environment variables
+\end_layout
+
+\begin_layout Subsection
+Classical device server
+\end_layout
+
+\begin_layout Standard
+The synopsis of a device server process is
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+ds_name instance_name [OPTIONS]
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+The supported options are :
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+-h, -? -help
+\series default
+
+\begin_inset Newline newline
+\end_inset
+
+Print the device server synopsis and a list of instance name defined in
+ the database for this device server.
+ An instance name in not mandatory in the command line to use this option
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+-v[trace level]
+\series default
+
+\begin_inset Newline newline
+\end_inset
+
+Set the verbose level.
+ If no trace level is given, a default value of 4 is used
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+-file=<file name path>
+\series default
+
+\begin_inset Newline newline
+\end_inset
+
+Start a device server using an ASCII file instead of the Tango database.
+ 
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+-nodb
+\series default
+
+\begin_inset Newline newline
+\end_inset
+
+Start a device server without using the database.
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+-dlist <device name list>
+\series default
+
+\begin_inset Newline newline
+\end_inset
+
+Give the device name list.
+ This option is supported only with the -nodb option.
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+ORB options
+\series default
+ (started with -ORBxxx)
+\begin_inset Newline newline
+\end_inset
+
+Options directly passed to the underlying ORB.
+ Should be rarely used except the -ORBendPoint option for device server
+ not using the database
+\end_layout
+
+\begin_layout Subsection
+Device server process as Windows service
+\end_layout
+
+\begin_layout Standard
+When used as a Windows service
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+service
+\end_layout
+
+\end_inset
+
+, a Tango device server supports several new options.
+ These options are :
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+-i
+\series default
+
+\begin_inset Newline newline
+\end_inset
+
+Install the service
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+-s
+\series default
+
+\begin_inset Newline newline
+\end_inset
+
+Install the service and choose the automatic startup mode
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+-u
+\series default
+
+\begin_inset Newline newline
+\end_inset
+
+Un-install the service
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+-dbg
+\series default
+
+\begin_inset Newline newline
+\end_inset
+
+Run in console mode to debug service.
+ The service must have been installed prior to use it.
+\end_layout
+
+\begin_layout Standard
+Note that these options must be used after the device server instance name.
+\end_layout
+
+\begin_layout Subsection
+Environment variables
+\end_layout
+
+\begin_layout Standard
+A few environment variables can be used to tune a Tango control system.
+ TANGO_HOST
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TANGO-HOST
+\end_layout
+
+\end_inset
+
+ is the most important one but on top it, some Tango features like Tango
+ logging service or controlled access (if used) can be tuned using environment
+ variable.
+ If these environment variables are not defined, the software searches in
+ the file 
+\series bold
+$HOME/.tangorc
+\series default
+ for its value.
+ If the file is not defined or if the environment variable is also not defined
+ in this file, the software searches in the file 
+\series bold
+/etc/tangorc
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+tangorc
+\end_layout
+
+\end_inset
+
+ for its value.
+ For Windows, the file is 
+\series bold
+$TANGO_ROOT/tangorc
+\series default
+ TANGO_ROOT
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TANGO-ROOT
+\end_layout
+
+\end_inset
+
+ being the mandatory environment variable of the Windows binary distribution.
+\end_layout
+
+\begin_layout Subsubsection
+TANGO_HOST
+\end_layout
+
+\begin_layout Standard
+This environment variable is the anchor of the system.
+ It specifies where the Tango database server is running.
+ Most of the time, its syntax is
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+TANGO_HOST=<host>:<port>
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+host is the name of the computer where the database server is running and
+ port is th eport number on which it is litenning.
+ If you want to have a Tango control system which has several database servers
+ (but only one database) in order to survive a database server crashes,
+ use the following syntax
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+TANGO_HOST=<host_1>:<port_1>,<host_2>:<port_2>,<host_3>:<port_3>
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+Obviously, host_1 is the name of the computer where the first database server
+ is running, port_1 is the port number on which this server is listenning.
+ host_2 is the name of the computer where the second database server is
+ running and port_2 is its port number.
+ All access to database will automatically switch from one server to another
+ one in the list if the one which was used has died.
+\end_layout
+
+\begin_layout Subsubsection
+Tango Logging Service (TANGO_LOG_PATH)
+\end_layout
+
+\begin_layout Standard
+The TANGO_LOG_PATH
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TANGO-LOG-PATH
+\end_layout
+
+\end_inset
+
+ environment variable can be used to specify the log files location.
+ If not set it defaults to /tmp/tango under Unix and c:/tango under Windows.
+ For a given device-server, the files are actually saved into $TANGO_LOG_PATH/{
+ server_name}/{ server_instance_name}.
+ This means that all the devices running within the same process log into
+ the same directory.
+ 
+\end_layout
+
+\begin_layout Subsubsection
+The database and controlled access server (MYSQL_USER and MYSQL_PASSWORD)
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Db-Env-Variables"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The Tango database server and the controlled access server (if used) need
+ to connect to the MySQL database.
+ They are using two environment variables called MYSQL_USER
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+MYSQL-USER
+\end_layout
+
+\end_inset
+
+ and MYSQL_PASSWORD
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+MYSQL-PASSWORD
+\end_layout
+
+\end_inset
+
+ to know which user/password they must use to access the database.
+ If these environment variables are not defined, they will connect to the
+ DBMS using the "root" login.
+\end_layout
+
+\begin_layout Subsubsection
+The controlled access
+\end_layout
+
+\begin_layout Standard
+Even if a controlled access system is running, it is possible to by-pass
+ it if in the environment of the client application the environment variable
+ SUPER_TANGO
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SUPER-TANGO
+\end_layout
+
+\end_inset
+
+ is defined to "true".
+\end_layout
+
+\end_body
+\end_document
diff --git a/doc/src/appendix/idl.lyx b/doc/src/appendix/idl.lyx
new file mode 100644
index 0000000..f4e9624
--- /dev/null
+++ b/doc/src/appendix/idl.lyx
@@ -0,0 +1,5133 @@
+#LyX 1.5.6 created this file. For more info see http://www.lyx.org/
+\lyxformat 276
+\begin_document
+\begin_header
+\textclass Tango_book
+\begin_preamble
+\usepackage{a4wide}
+\usepackage{amstext}
+\def\reg{\setbox0\hbox{$\mathchar"20D$}%
+\hbox to 0pt{\hbox to \wd0{\hfill\,\rm R\hfill}\hss}%
+$\mathchar"20D$}
+\end_preamble
+\language english
+\inputencoding utf8x
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+\graphics default
+\paperfontsize default
+\spacing single
+\papersize default
+\use_geometry false
+\use_amsmath 1
+\use_esint 0
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\secnumdepth 2
+\tocdepth 2
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\author "" 
+\author "" 
+\end_header
+
+\begin_body
+
+\begin_layout Chapter
+The TANGO IDL file : Module Tango
+\end_layout
+
+\begin_layout Standard
+The fundamental idea of a device as a network object which has methods and
+ data has been retained for TANGO.
+ In TANGO objects are real C++/Java objects which can be instantiated and
+ accessed via their methods and data by the client as if they were local
+ objects.
+ This interface is defined in CORBA IDL.
+ The fundamental interface is Device.
+ All TANGO control objects will be of this type i.e.
+ they will implement and offer the Device interface.
+ Some wrapper classes group in an API will hide the calls to the Device
+ interface from the client so that the client will only see the wrapper
+ classes.
+ All CORBA details will be hidden from the client as far as possible.
+\end_layout
+
+\begin_layout Section
+Aliases
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+AttributeConfigList
+\end_layout
+
+\begin_layout Standard
+typedef sequence<AttributeConfig> AttributeConfigList;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+AttributeConfigList_2
+\end_layout
+
+\begin_layout Standard
+typedef sequence<AttributeConfig_2> AttributeConfigList_2;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+AttributeConfigList_3
+\end_layout
+
+\begin_layout Standard
+typedef sequence<AttributeConfig_3> AttributeConfigList_3;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+AttributeDimList
+\end_layout
+
+\begin_layout Standard
+typedef sequence<AttributeDim> AttributeDimList;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+AttributeValueList
+\end_layout
+
+\begin_layout Standard
+typedef sequence<AttributeValue> AttributeValueList;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+AttributeValueList_3
+\end_layout
+
+\begin_layout Standard
+typedef sequence<AttributeValue_3> AttributeValueList_3;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+AttributeValueList_4
+\end_layout
+
+\begin_layout Standard
+typedef sequence<AttributeValue_4> AttributeValueList_4;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+AttrQualityList
+\end_layout
+
+\begin_layout Standard
+typedef sequence<AttrQuality> AttrQualityList;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+CppClntIdent
+\end_layout
+
+\begin_layout Standard
+typedef unsigned long CppClntIdent;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevAttrHistoryList
+\end_layout
+
+\begin_layout Standard
+typedef sequence<DevAttrHistory> DevAttrHistoryList;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevAttrHistoryList_3
+\end_layout
+
+\begin_layout Standard
+typedef sequence<DevAttrHistory_3> DevAttrHistoryList_3;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevBoolean
+\end_layout
+
+\begin_layout Standard
+typedef boolean DevBoolean;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevCmdHistoryList
+\end_layout
+
+\begin_layout Standard
+typedef sequence<DevCmdHistory> DevCmdHistoryList
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevCmdInfoList
+\end_layout
+
+\begin_layout Standard
+typedef sequence<DevCmdInfo> DevCmdInfoList;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevCmdInfoList_2
+\end_layout
+
+\begin_layout Standard
+typedef sequence<DevCmdInfo_2> DevCmdInfoList_2;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevDouble
+\end_layout
+
+\begin_layout Standard
+typedef double DevDouble;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevErrorList
+\end_layout
+
+\begin_layout Standard
+typedef sequence<DevError> DevErrorList;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevErrorListList
+\end_layout
+
+\begin_layout Standard
+typedef sequence<DevErrorList> DevErrorListList;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevFloat
+\end_layout
+
+\begin_layout Standard
+typedef float DevFloat;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevLong
+\end_layout
+
+\begin_layout Standard
+typedef long DevLong;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevShort
+\end_layout
+
+\begin_layout Standard
+typedef short DevShort;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevString
+\end_layout
+
+\begin_layout Standard
+typedef string DevString;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevULong
+\end_layout
+
+\begin_layout Standard
+typedef unsigned long DevULong;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevUShort
+\end_layout
+
+\begin_layout Standard
+typedef unsigned short DevUShort;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevVarCharArray
+\end_layout
+
+\begin_layout Standard
+typedef sequence<octet> DevVarCharArray;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevVarDoubleArray
+\end_layout
+
+\begin_layout Standard
+typedef sequence<double> DevVarDoubleArray;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevVarEncodedArray
+\end_layout
+
+\begin_layout Standard
+typedef sequence<DevEncoded> DevVarEncodedArray;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevVarFloatArray
+\end_layout
+
+\begin_layout Standard
+typedef sequence<float> DevVarFloatArray;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevVarLongArray
+\end_layout
+
+\begin_layout Standard
+typedef sequence<long> DevVarLongArray;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevVarShortArray
+\end_layout
+
+\begin_layout Standard
+typedef sequence<short> DevVarShortArray;
+\newline
+
+\series bold
+
+\newline
+DevVarStateArray
+\end_layout
+
+\begin_layout Standard
+typedef sequence<DevState> DevVarStateArray;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevVarStringArray
+\end_layout
+
+\begin_layout Standard
+typedef sequence<string> DevVarStringArray;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevVarULongArray
+\end_layout
+
+\begin_layout Standard
+typedef sequence<unsigned long> DevVarULongArray;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevVarUShortArray
+\end_layout
+
+\begin_layout Standard
+typedef sequence<unsigned short> DevVarUShortArray;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+EltInArrayList
+\end_layout
+
+\begin_layout Standard
+typedef sequence<EltInArray> EltInArrayList;
+\series bold
+
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+JavaUUID
+\end_layout
+
+\begin_layout Standard
+typedef unsigned long long JavaUUID[2];
+\newline
+
+\series bold
+
+\newline
+NamedDevErrorList
+\end_layout
+
+\begin_layout Standard
+typedef sequence<NamedDevError> NamedDevErrorList;
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+TimeValList
+\end_layout
+
+\begin_layout Standard
+typedef sequence<TimeVal> TimeValList;
+\series bold
+
+\newline
+
+\end_layout
+
+\begin_layout Section
+Enums
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+AttrDataFormat
+\end_layout
+
+\begin_layout Standard
+enum AttrDataFormat
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+SCALAR,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+SPECTRUM,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+IMAGE,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+FMT_UNKNOWN
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+AttributeDataType
+\end_layout
+
+\begin_layout Standard
+enum AttributeDataType
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATT_BOOL,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATT_SHORT,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATT_LONG,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATT_LONG64,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATT_FLOAT,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATT_DOUBLE,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATT_UCHAR,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATT_USHORT,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATT_ULONG,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATT_ULONG64,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATT_STRING,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATT_STATE,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DEVICE_STATE,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATT_ENCODED,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+NO_DATA
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+AttrQuality
+\end_layout
+
+\begin_layout Standard
+enum AttrQuality
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATTR_VALID,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATTR_INVALID,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATTR_ALARM,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATTR_CHANGING,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ATTR_WARNING
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+AttrWriteType
+\end_layout
+
+\begin_layout Standard
+enum AttrWriteType
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+READ,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+READ_WITH_WRITE,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+WRITE,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+READ_WRITE
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DispLevel
+\end_layout
+
+\begin_layout Standard
+enum DispLevel
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+OPERATOR,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+EXPERT
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevSource
+\end_layout
+
+\begin_layout Standard
+enum DevSource
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DEV,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+CACHE,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+CACHE_DEV
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevState
+\end_layout
+
+\begin_layout Standard
+enum DevState
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ON,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+OFF,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+CLOSE,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+OPEN,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+INSERT,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+EXTRACT,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+MOVING,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+STANDBY,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+FAULT,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+INIT,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+RUNNING,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ALARM,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DISABLE,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+UNKNOWN
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+ErrSeverity
+\end_layout
+
+\begin_layout Standard
+enum ErrSeverity
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+WARN,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ERR,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+PANIC
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+LockerLanguage
+\end_layout
+
+\begin_layout Standard
+enum LockerLanguage
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+CPP,
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+JAVA
+\end_layout
+
+\begin_layout Standard
+};
+\end_layout
+
+\begin_layout Section
+Structs
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+ArchiveEventProp
+\end_layout
+
+\begin_layout Standard
+struct ArchiveEventProp
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string rel_change;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string abs_change;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string period;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarStringArray extensions;
+\end_layout
+
+\begin_layout Standard
+};
+\series bold
+
+\newline
+
+\newline
+AttributeAlarm
+\end_layout
+
+\begin_layout Standard
+struct AttributeAlarm
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string min_alarm;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string max_alarm;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string min_warning;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string max_warning;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string delta_t;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string delta_val;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarStringArray extensions;
+\end_layout
+
+\begin_layout Standard
+};
+\series bold
+
+\newline
+
+\newline
+AttDataReady
+\end_layout
+
+\begin_layout Standard
+struct AttributeAlarm
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string name;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long data_type;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long ctr;
+\end_layout
+
+\begin_layout Standard
+};
+\series bold
+
+\newline
+
+\newline
+AttributeConfig
+\end_layout
+
+\begin_layout Standard
+struct AttributeConfig
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string name;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttrWriteType writable;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttrDataFormat data_format;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long data_type;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long max_dim_x;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long max_dim_y;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string description;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string label;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string unit;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string standard_unit;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string display_unit;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string format;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string min_value;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string max_value;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string min_alarm;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string max_alarm;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string writable_attr_name;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarStringArray extensions;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+AttributeConfig_2
+\end_layout
+
+\begin_layout Standard
+struct AttributeConfig_2
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string name;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttrWriteType writable;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttrDataFormat data_format;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long data_type;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long max_dim_x;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long max_dim_y;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string description;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string label;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string unit;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string standard_unit;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string display_unit;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string format;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string min_value;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string max_value;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string min_alarm;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string max_alarm;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string writable_attr_name;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DispLevel level;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarStringArray extensions;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+AttributeConfig_3
+\end_layout
+
+\begin_layout Standard
+struct AttributeConfig_3
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string name;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttrWriteType writable;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttrDataFormat data_format;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long data_type;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long max_dim_x;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long max_dim_y;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string description;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string label;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string unit;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string standard_unit;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string display_unit;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string format;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string min_value;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string max_value;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string writable_attr_name;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DispLevel level;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttributeAlarm alarm;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+EventProperties event_prop;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarStringArray extensions;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarStringArray sys_extensions;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+AttributeDim
+\end_layout
+
+\begin_layout Standard
+struct AttributeDim
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long dim_x;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long dim_y;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+AttributeValue
+\end_layout
+
+\begin_layout Standard
+struct AttributeValue
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+any value;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttrQuality quality;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+TimeVal time;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string name;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long dim_x;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long dim_y;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+AttributeValue_3
+\end_layout
+
+\begin_layout Standard
+struct AttributeValue_3
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+any value;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttrQuality quality;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+TimeVal time;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string name;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttributeDim r_dim;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttributeDim w_dim;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevErrorList err_list;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+AttributeValue_4
+\end_layout
+
+\begin_layout Standard
+struct AttributeValue_4
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttrValUnion value;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttrQuality quality;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttrDataFormat data_format;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+TimeVal time;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string name;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttributeDim r_dim;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttributeDim w_dim;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevErrorList err_list;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+ChangeEventProp
+\end_layout
+
+\begin_layout Standard
+struct ChangeEventProp
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string rel_change;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string abs_change;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarStringArray extensions;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevAttrHistory
+\end_layout
+
+\begin_layout Standard
+struct DevAttrHistory
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+boolean attr_failed;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttributeValue value;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevErrorList errors;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevAttrHistory_3
+\end_layout
+
+\begin_layout Standard
+struct DevAttrHistory_3
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+boolean attr_failed;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttributeValue_3 value;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevAttrHistory_4
+\end_layout
+
+\begin_layout Standard
+struct DevAttrHistory_4
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string name;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+TimeValList dates;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+any value;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttrQualityList quals;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+EltInArrayList quals_array;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttributeDimList r_dims;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+EltInArrayList r_dims_array;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttributeDimList w_dims;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+EltInArrayList w_dims_array;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevErrorListList errors;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+EltInArrayList errors_array;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevCmdHistory
+\end_layout
+
+\begin_layout Standard
+struct DevCmdHistory
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+TimeVal time;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+boolean cmd_failed;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+any value;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevErrorList errors;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevCmdHistory_4
+\end_layout
+
+\begin_layout Standard
+struct DevCmdHistory_4
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+TimeValList dates;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+any value;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+AttributeDimList dims;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+EltInArrayList dims_array;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevErrorListList errors;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+EltInArrayList errors_array;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long cmd_type;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevCmdInfo
+\end_layout
+
+\begin_layout Standard
+struct DevCmdInfo
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string cmd_name;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long cmd_tag;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long in_type;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long out_type;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string in_type_desc;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string out_type_desc;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevCmdInfo_2
+\end_layout
+
+\begin_layout Standard
+struct DevCmdInfo_2
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string cmd_name;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DispLevel level;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long cmd_tag;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long in_type;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long out_type;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string in_type_desc;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string out_type_desc;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevEncoded
+\end_layout
+
+\begin_layout Standard
+struct DevEncoded
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevString encoded_format;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarCharArray encoded_data;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevError
+\end_layout
+
+\begin_layout Standard
+struct DevError
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string reason;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ErrSeverity severity;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string desc;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string origin;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevInfo
+\end_layout
+
+\begin_layout Standard
+struct DevInfo
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string dev_class;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string server_id;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string server_host;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long server_version;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string doc_url;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevInfo_3
+\end_layout
+
+\begin_layout Standard
+struct DevInfo_3
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string dev_class;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string server_id;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string server_host;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long server_version;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string doc_url;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string dev_type;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevVarDoubleStringArray
+\end_layout
+
+\begin_layout Standard
+struct DevVarDoubleStringArray
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarDoubleArray dvalue;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarStringArray svalue;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+DevVarLongStringArray
+\end_layout
+
+\begin_layout Standard
+struct DevVarLongStringArray
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarLongArray lvalue;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarStringArray svalue;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+EltInArray
+\end_layout
+
+\begin_layout Standard
+struct EltInArray
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long start;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long nb_elt;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+EventProperties
+\end_layout
+
+\begin_layout Standard
+struct EventProperties
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ChangeEventProp ch_event;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+PeriodicEventProp per_event;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+ArchiveEventProp arch_event;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+JavaClntIdent
+\end_layout
+
+\begin_layout Standard
+struct JavaClntIdent
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string MainClass;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+JavaUUID uuid;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+NamedDevError
+\end_layout
+
+\begin_layout Standard
+struct NamedDevError
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string name;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long index_in_call;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevErrorList err_list;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+PeriodicEventProp
+\end_layout
+
+\begin_layout Standard
+struct PeriodicEventProp
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+string period;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarStringArray extensions;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+TimeV
+\series default
+a
+\series bold
+l
+\end_layout
+
+\begin_layout Standard
+struct TimeVal
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long tv_sec;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long tv_usec;
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+long tv_nsec;
+\end_layout
+
+\begin_layout Standard
+};
+\end_layout
+
+\begin_layout Section
+Unions
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+AttrValUnion
+\end_layout
+
+\begin_layout Standard
+union AttrValUnion switch (AttributeDataType)
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+case ATT_BOOL:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarBooleanArray bool_att_value;
+\end_layout
+
+\begin_layout Standard
+case ATT_SHORT:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarShortArray short_att_value;
+\end_layout
+
+\begin_layout Standard
+case ATT_LONG:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarLongArray long_att_value;
+\end_layout
+
+\begin_layout Standard
+case ATT_LONG64:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarLong64Array long64_att_value;
+\end_layout
+
+\begin_layout Standard
+case ATT_FLOAT:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarFloatArray float_att_value;
+\end_layout
+
+\begin_layout Standard
+case ATT_DOUBLE:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarDoubleArray double_att_value;
+\end_layout
+
+\begin_layout Standard
+case ATT_UCHAR
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarCharArray uchar_att_value;
+\end_layout
+
+\begin_layout Standard
+case ATT_USHORT:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarUShortArray ushort_att_value;
+\end_layout
+
+\begin_layout Standard
+case ATT_ULONG:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarULongArray ulong_att_value;
+\end_layout
+
+\begin_layout Standard
+case ATT_ULONG64:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarULong64Array ulong64_att_value;
+\end_layout
+
+\begin_layout Standard
+case ATT_STRING:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarStringArray string_att_value;
+\end_layout
+
+\begin_layout Standard
+case ATT_STATE:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarStateArray state_att_value;
+\end_layout
+
+\begin_layout Standard
+case DEVICE_STATE:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevState dev_state_att;
+\end_layout
+
+\begin_layout Standard
+case ATT_ENCODED:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevVarEncodedArray encoded_att_value;
+\end_layout
+
+\begin_layout Standard
+case NO_DATA:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevBoolean union_no_data;
+\end_layout
+
+\begin_layout Standard
+};
+\series bold
+
+\newline
+
+\newline
+ClntIdent
+\end_layout
+
+\begin_layout Standard
+union ClntIdent switch (LockerLanguage)
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+case CPP:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+CppClntIdent cpp_clnt;
+\end_layout
+
+\begin_layout Standard
+case JAVA:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+JavaClntIdent java_clnt;
+\end_layout
+
+\begin_layout Standard
+};
+\end_layout
+
+\begin_layout Section
+Exceptions
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+DevFailed
+\end_layout
+
+\begin_layout Standard
+exception DevFailed
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+DevErrorList errors;
+\end_layout
+
+\begin_layout Standard
+};
+\series bold
+
+\newline
+
+\newline
+MultiDevFailed
+\end_layout
+
+\begin_layout Standard
+exception MultiDevFailed
+\end_layout
+
+\begin_layout Standard
+{
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+NamedDevErrorList errors;
+\end_layout
+
+\begin_layout Standard
+};
+\newline
+
+\end_layout
+
+\begin_layout Section
+Interface Tango::Device
+\end_layout
+
+\begin_layout Standard
+The fundamental interface for all TANGO objects.
+ Each Device is a network object which can be accessed locally or via network.
+ The network protocol on the wire will be IIOP.
+ The Device interface implements all the basic functions needed for doing
+ generic synchronous and asynchronous I/O on a device.
+ A Device object has data and actions.
+ Data are represented in the form of Attributes.
+ Actions are represented in the form of Commands.
+ The CORBA Device interface offers attributes and methods to access the
+ attributes and commands.
+ A client will either use these methods directly from C++ or Java or access
+ them via wrapper classes implemented in a API.
+ The Device interface describes only the remote network interface.
+ Implementation features like threads, command security, priority etc.
+ are dealt with in server side of the device server model.
+\end_layout
+
+\begin_layout Subsection
+Attributes
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+adm_name
+\end_layout
+
+\begin_layout Standard
+readonly attribute string adm_name;
+\end_layout
+
+\begin_layout Standard
+adm_name (readonly) - administrator device unique ascii identifier
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+description
+\end_layout
+
+\begin_layout Standard
+readonly attribute string description;
+\end_layout
+
+\begin_layout Standard
+description (readonly) - general description of device
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+name
+\end_layout
+
+\begin_layout Standard
+readonly attribute string name;
+\end_layout
+
+\begin_layout Standard
+name (readonly) - unique ascii identifier
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+state
+\end_layout
+
+\begin_layout Standard
+readonly attribute DevState state;
+\end_layout
+
+\begin_layout Standard
+state (readonly) - device state
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+status
+\end_layout
+
+\begin_layout Standard
+readonly attribute string status;
+\end_layout
+
+\begin_layout Standard
+status (readonly) - device state as ascii string
+\end_layout
+
+\begin_layout Subsection
+Operations
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+black_box
+\begin_inset LatexCommand index
+name "black-box"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+DevVarStringArray black_box(in long number)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+read list of last N commands executed by clients
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+number -- of commands to return
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+list of command and clients
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+command_inout
+\begin_inset LatexCommand index
+name "command-inout"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+any command_inout(in string command, in any argin)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+execute a command on a device synchronously with no input parameter and
+ one one output parameter
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+command -- ascii string e.g.
+ "On"
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+argin -- command input parameter e.g.
+ float
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+command result.
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+command_list_query
+\begin_inset LatexCommand index
+name "command-list-query"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+DevCmdInfoList command_list_query()
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+query device to see what commands it supports
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+list of commands and their types
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+command_query
+\begin_inset LatexCommand index
+name "command-query"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+DevCmdInfo command_query(in string command)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+query device to see command argument
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+command -- name
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+command and its types
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+get_attribute_config
+\begin_inset LatexCommand index
+name "get-attribute-config"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+AttributeConfigList get_attribute_config(in DevVarStringArray names)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+read the configuration for a variable list of attributes from a device
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+name -- list of attribute names to read
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+list of attribute configurations read
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+info
+\begin_inset LatexCommand index
+name "info"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+DevInfo info()
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+return general information about object e.g.
+ class, type, ...
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+device info
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+ping
+\begin_inset LatexCommand index
+name "ping"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+void ping()
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+ping a device to see if it alive
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+read_attributes
+\begin_inset LatexCommand index
+name "read-attributes"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+AttributeValueList read_attributes(in DevVarStringArray names)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+read a variable list of attributes from a device
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+name -- list of attribute names to read
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+list of attribute values read
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+set_attribute_config
+\begin_inset LatexCommand index
+name "set-attribute-config"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+void set_attribute_config(in AttributeConfigList new_conf)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+set the configuration for a variable list of attributes from the device
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+new_conf -- list of attribute configuration to be set
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+write_attributes
+\begin_inset LatexCommand index
+name "write-attributes"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+void write_attributes(in AttributeValueList values)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+write a variable list of attributes to a device
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+values -- list of attribute values to write
+\end_layout
+
+\begin_layout Section
+Interface Tango::Device_2
+\end_layout
+
+\begin_layout Standard
+interface Device_2 inherits from Tango::Device
+\newline
+
+\end_layout
+
+\begin_layout Standard
+The updated Tango device interface.
+ It inherits from Tango::Device and therefore supports all attribute/operation
+ defined in the Tango::Device interface.
+ Two CORBA operations have been modified to support more parameters (command_ino
+ut_2 and  read_attribute_2).
+ Three CORBA operations now retrun a different data type (command_list_query_2,
+ command_query_2 and get_attribute_config)
+\end_layout
+
+\begin_layout Subsection
+Operations
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+command_inout_2
+\end_layout
+
+\begin_layout Standard
+any command_inout_2(in string command, in any argin, in DevSource source)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+execute a command on a device synchronously with no input parameter and
+ one one output parameter
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+command -- ascii string e.g.
+ "On"
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+argin -- command input parameter
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+source -- data source
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+command result.
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+command_inout_history_2
+\begin_inset LatexCommand index
+name "command-inout-history-2"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+DevCmdHistoryList command_inout_history_2(in string command, in long n)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+Get command result history from polling buffer.
+ Obviously, the command must be polled.
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+command -- ascii string e.g.
+ "On"
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+n -- record number
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+list of command result (or exception parameters if the command failed).
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+command_list_query_2
+\end_layout
+
+\begin_layout Standard
+DevCmdInfoList_2 command_list_query_2()
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+query device to see what commands it supports
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+list of commands and their types
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+command_query_2
+\end_layout
+
+\begin_layout Standard
+DevCmdInfo_2 command_query_2(in string command)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+query device to see command argument
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+command -- name
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+command and its types
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+get_attribute_config_2
+\end_layout
+
+\begin_layout Standard
+AttributeConfigList_2 get_attribute_config_2(in DevVarStringArray names)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+read the configuration for a variable list of attributes from a device
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+name -- list of attribute names to read
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+list of attribute configurations read
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+read_attributes_2
+\end_layout
+
+\begin_layout Standard
+AttributeValueList read_attributes_2(in DevVarStringArray names, in DevSource
+ source)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed)
+\newline
+
+\end_layout
+
+\begin_layout Standard
+read a variable list of attributes from a device
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+name -- list of attribute names to read
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+list of attribute values read 
+\series bold
+
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+read_attribute_history_2
+\begin_inset LatexCommand index
+name "read-attribute-history-2"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+DevAttrHistoryList read_attributes_history_2(in string name, in long n)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed)
+\newline
+
+\end_layout
+
+\begin_layout Standard
+Get attribute value history from polling buffer.
+ Obviously, the attribute must be polled.
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+name -- Attribute name to read history
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+n -- Record number
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+list of attribute value (or exception parameters if the attribute failed).
+\newline
+
+\end_layout
+
+\begin_layout Section
+Interface Tango::Device_3
+\end_layout
+
+\begin_layout Standard
+interface Device_3 inherits from Tango::Device_2
+\newline
+
+\end_layout
+
+\begin_layout Standard
+The updated Tango device interface for Tango release 5.
+ It inherits from Tango::Device_2 and therefore supports all attribute/operation
+ defined in the Tango::Device_2 interface.
+ Six CORBA operations now return a different data type (read_attributes_3,
+ write_attributes_3, read_attribute_history_3, info_3, get_attribute_config_3
+ and set_attribute_config_3)
+\end_layout
+
+\begin_layout Subsection
+Operations
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+read_attributes_3
+\end_layout
+
+\begin_layout Standard
+AttributeValueList_3 read_attributes_3(in DevVarStringArray names, in DevSource
+ source)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+read a variable list of attributes from a device
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+name -- list of attribute names to read
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+source -- data source
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+list of attribute values read 
+\series bold
+
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+write_attributes_3
+\begin_inset LatexCommand index
+name "command-inout-history-2"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+void write_attributes_3(in AttributeValueList values)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed, MultiDevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+write a variable list of attributes to a device
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+values -- list of attribute values to write
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+read_attribute_history_3
+\begin_inset LatexCommand index
+name "read-attribute-history-2"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+DevAttrHistoryList_3 read_attributes_history_3(in string name, in long n)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed)
+\newline
+
+\end_layout
+
+\begin_layout Standard
+Get attribute value history from polling buffer.
+ Obviously, the attribute must be polled.
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+name -- Attribute name to read history
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+n -- Record number
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+list of attribute value (or exception parameters if the attribute failed).
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+info_3
+\begin_inset LatexCommand index
+name "info"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+DevInfo_3 info()
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+return general information about object e.g.
+ class, type, ...
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+device info
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+get_attribute_config_3
+\end_layout
+
+\begin_layout Standard
+AttributeConfigList_3 get_attribute_config_3(in DevVarStringArray names)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+read the configuration for a variable list of attributes from a device
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+name -- list of attribute names to read
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+list of attribute configurations read
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+set_attribute_config_3
+\begin_inset LatexCommand index
+name "set-attribute-config"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+void set_attribute_config_3(in AttributeConfigList_3 new_conf)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+set the configuration for a variable list of attributes from the device
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+new_conf -- list of attribute configuration to be set
+\newline
+
+\end_layout
+
+\begin_layout Section
+Interface Tango::Device_4
+\end_layout
+
+\begin_layout Standard
+interface Device_4 inherits from Tango::Device_3
+\newline
+
+\end_layout
+
+\begin_layout Standard
+The updated Tango device interface for Tango release 7.
+ It inherits from Tango::Device_3 and therefore supports all attribute/operation
+ defined in the Tango::Device_3 interface.
+\end_layout
+
+\begin_layout Subsection
+Operations
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+read_attributes_4
+\end_layout
+
+\begin_layout Standard
+AttributeValueList_4 read_attributes_4(in DevVarStringArray names, in DevSource
+ source,in ClntIdent cl_ident)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+read a variable list of attributes from a device
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+name -- list of attribute names to read
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+source -- data source
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+cl_ident -- client identificator
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+list of attribute values read 
+\series bold
+
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+write_attributes_4
+\end_layout
+
+\begin_layout Standard
+void write_attributes_3(in AttributeValueList_4 values, in ClniIdent cl_ident)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed, MultiDevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+write a variable list of attributes to a device
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+values -- list of attribute values to write
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+cl_ident -- client identificator
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+command_inout_4
+\begin_inset LatexCommand index
+name "command-inout-4"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+any command_inout_4(in string command, in any argin, in DevSource source,
+ In ClntIdent cl_ident)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+Execute a command on a device synchronously with one input parameter and
+ one one output parameter
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+command -- ascii string e.g.
+ "On"
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+argin -- command input parameter
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+source -- data source
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+cl_ident -- client identificator
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+command result
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+read_attribute_history_4
+\begin_inset LatexCommand index
+name "read-attribute-history-4"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+DevAttrHistory_4 read_attributes_history_4(in string name, in long n)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed)
+\newline
+
+\end_layout
+
+\begin_layout Standard
+Get attribute value history from polling buffer.
+ Obviously, the attribute must be polled.
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+name -- Attribute name to read history
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+n -- Record number
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+Attribute value (or exception parameters if the attribute failed) coded
+ in a structure.
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+command_inout_history_4
+\begin_inset LatexCommand index
+name "command-inout-history-4"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+DevCmdHistory_4 command_inout_history_4(in string command, in long n)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+Get command value history from polling buffer.
+ Obviously, the command must be polled.
+\newline
+
+\end_layout
+
+\begin_layout Standard
+Parameters:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+name -- Command name to read history
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+n -- Record number
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+Command value (or exception paramteters) coded in a structure
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+write_read_attribute_4
+\end_layout
+
+\begin_layout Standard
+AttributeValueList_4 write_read_attribute_4(in AttributeValueList_4 values,
+ in ClntIdent cl_ident)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed,MultiDevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+Write then read a variable list of attributes from a device
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+values -- list of attribute values to write
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+cl_ident -- client identificator
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Returns
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+list of attribute values read
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\align left
+
+\series bold
+set_attribute_config_4
+\begin_inset LatexCommand index
+name "set-attribute-config-4"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+void set_attribute_config_4(in AttributeConfigList_3 new_conf, in ClntIdent
+ cl_ident)
+\end_layout
+
+\begin_layout Standard
+raises(DevFailed);
+\newline
+
+\end_layout
+
+\begin_layout Standard
+set the configuration for a variable list of attributes from the device
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Parameters
+\emph default
+:
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+new_conf -- list of attribute configuration to be set
+\end_layout
+
+\begin_layout Standard
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+cl_ident -- client identificator
+\newline
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/doc/src/appendix/line.tex b/doc/src/appendix/line.tex
new file mode 100644
index 0000000..1ba963f
--- /dev/null
+++ b/doc/src/appendix/line.tex
@@ -0,0 +1,6 @@
+\begin{flushleft}
+\begin{picture}(0,0)
+\thicklines
+\put(0,0){\line(1,0){400}}
+\end{picture}
+\end{flushleft}
diff --git a/doc/src/appendix/naming.lyx b/doc/src/appendix/naming.lyx
new file mode 100644
index 0000000..48f6345
--- /dev/null
+++ b/doc/src/appendix/naming.lyx
@@ -0,0 +1,503 @@
+#LyX 1.3 created this file. For more info see http://www.lyx.org/
+\lyxformat 221
+\textclass Tango_book
+\language english
+\inputencoding latin1
+\fontscheme default
+\graphics default
+\paperfontsize default
+\spacing single 
+\papersize a4paper
+\paperpackage widemarginsa4
+\use_geometry 0
+\use_amsmath 0
+\use_natbib 0
+\use_numerical_citations 0
+\paperorientation portrait
+\secnumdepth 2
+\tocdepth 2
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\quotes_times 2
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+
+\layout Chapter
+
+Tango object naming (device, attribute and property)
+\layout Section
+
+Device name
+\begin_inset LatexCommand \label{DeviceNaming}
+
+\end_inset 
+
+
+\layout Standard
+
+A Tango device name is a three fields name.
+ The field separator is the 
+\series bold 
+/
+\series default 
+ character.
+ The first field is named 
+\series bold 
+domain
+\series default 
+, the second field is named 
+\series bold 
+family
+\series default 
+ and the last field is named 
+\series bold 
+member
+\series default 
+.A tango device name looks like
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+ 
+\backslash 
+begin{center}
+\end_inset 
+
+domain/family/member
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+end{center} 
+\end_inset 
+
+It is a hierarchical notation.
+ The member specifies which element within a family.
+ The family specifies which kind of equipment within a domain.
+ The domain groups devices related to which part of the accelerator/experiment
+ they belongs to.
+ At ESRF, some of the machine control system domain name are SR for the
+ storage ring, TL1 for the transfer line 1 or SY for the synchrotron booster.
+ For experiment, ID11 is the domain name for all devices belonging to the
+ experiment behind insertion device 11.
+ Here are some examples of Tango device name used at the ESRF :
+\layout Itemize
+
+
+\series bold 
+sr/d-ct/1
+\series default 
+ : The current transformer.
+ The domain part is sr for storage ring.
+ The family part is d-ct for diagnostic/current transformer and the member
+ part is 1
+\layout Itemize
+
+
+\series bold 
+fe/v-pen/id11-1
+\series default 
+ : A Penning gauge.
+ The domain part is fe for front-end.
+ The family part is v-pen for vacuum/penning and the member name is id11-1
+ to specify that this is the first gauge on the front-end part after the
+ insertion device 11
+\layout Section
+
+Full object name
+\layout Standard
+
+The device name as described above is not enough to cover all Tango usage
+ like device server without database or device access for multi control
+ system.
+ With the naming schema, we must also be able to name attribute and property.
+ Therefore, the full naming schema is
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+begin{center}
+\end_inset 
+
+
+\emph on 
+[protocol://][host:port/]device_name[/attribute][->property][#dbase=xx
+\emph default 
+
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+]
+\backslash 
+end{center}
+\end_inset 
+
+The protocol, host, port, attribute, property and dbase fields are optional.
+ The meaning of these fields are :
+\layout List
+\labelwidthstring 00.00.0000
+
+protocol : Specifies which protocol is used (Tango or Taco).
+ Tango is the default
+\layout List
+\labelwidthstring 00.00.0000
+
+dbase=xx : The supported value for xx is 
+\emph on 
+yes
+\emph default 
+ and 
+\emph on 
+no
+\emph default 
+.
+ This field is used to specify that the device is a device served by a device
+ server started with or without database usage.
+ The default value is 
+\emph on 
+dbase=yes
+\layout List
+\labelwidthstring 00.00.0000
+
+host:port : This field has different meaning according to the dbase value.
+ If 
+\emph on 
+dbase=yes
+\emph default 
+ (the default), the host is the host where the control system database server
+ is running and port is the database server port.
+ It has a higher priority than the value defined by the TANGO_HOST environment
+ variable.
+ If 
+\emph on 
+dbase=no
+\emph default 
+, host is the host name where the device server process serving the device
+ is running and port is the device server process port.
+\layout List
+\labelwidthstring 00.00.0000
+
+attribute : The attribute name
+\layout List
+\labelwidthstring 00.00.0000
+
+property : The property name
+\layout Standard
+
+The host:port and dbase=xx fields are necessary only when creating the DevicePro
+xy object used to remotely access the device.
+ The -> characters are used to specify a property name.
+\layout Subsection
+
+Some examples
+\layout Subsubsection
+
+Full device name examples
+\layout Itemize
+
+
+\series bold 
+gizmo:20000/sr/d-ct/1
+\series default 
+ : Device sr/d-ct/1 running in a specified control system with the database
+ server running on a host called gizmo and using the port number 20000.
+ The TANGO_HOST environment variable will not be used.
+\layout Itemize
+
+
+\series bold 
+tango://freak:2345/id11/rv/1#dbase=no
+\series default 
+ : Device served by a device server started without database.
+ The server is running on a host called freak and use port number 2345.
+ //freak:2345/id11/rv/1#dbase=no is also possible for the same device.
+\layout Itemize
+
+
+\series bold 
+Taco://sy/ps-ki/1
+\series default 
+ : Taco device sy/ps-ki/1
+\layout Subsubsection
+
+Attribute name examples
+\layout Itemize
+
+
+\series bold 
+id11/mot/1/Position
+\series default 
+ : Attribute position for device id11/mot/1 
+\layout Itemize
+
+
+\series bold 
+sr/d-ct/1/Lifetime
+\series default 
+ : Attribute lifetime for Tango device sr/d-ct/1
+\layout Subsubsection
+
+Attribute property name
+\layout Itemize
+
+
+\series bold 
+id11/rv/1/temp->label
+\series default 
+ : Property label for attribute temp for device id11/rv/1.
+\layout Itemize
+
+
+\series bold 
+sr/d-ct/1/Lifetime->unit
+\series default 
+ : The unit property for the Lifetime attribute of the sr/d-ct/1 device
+\layout Subsubsection
+
+Device property name
+\layout Itemize
+
+
+\series bold 
+sr/d-ct/1->address
+\series default 
+ : the address property for device sr/d-ct/1
+\layout Subsubsection
+
+Class property name
+\layout Itemize
+
+
+\series bold 
+Starter->doc_url
+\series default 
+ : The doc_url property for a class called Starter
+\layout Section
+
+Device and attribute name alias
+\begin_inset LatexCommand \index{alias}
+
+\end_inset 
+
+
+\layout Standard
+
+Within Tango, each device or attribute can have an alias name defined in
+ the database.
+ Every time a device or an attribute name is requested by the API's, it
+ is possible to use the alias.
+ The alias is simply an open string stored in the database.
+ The rule of the alias is to give device or attribute name a name more natural
+ from the physicist point of view.
+ Let's imagine that for experiment, the sample position is described by
+ angles called teta and psi in physics book.
+ It is more natural for physicist when they move the motor related to sample
+ position to use 
+\emph on 
+teta
+\emph default 
+ and 
+\emph on 
+psi
+\emph default 
+ rather device name like 
+\emph on 
+idxx/mot/1
+\emph default 
+ or 
+\emph on 
+idxx/mot/2
+\emph default 
+.
+ An attribute alias is a synonym for the four fields used to name an attribute.
+ For instance, the attribute 
+\emph on 
+Current
+\emph default 
+ of a power-supply device called 
+\emph on 
+sr/ps/dipole
+\emph default 
+ could have an alias 
+\emph on 
+DipoleCurrent
+\emph default 
+.
+ This alias can be used when creating an instance of a AttributeProxy class
+ instead of the full attribute name which is 
+\emph on 
+sr/ps/dipole/Current
+\emph default 
+.
+ Device alias name are uniq within a Tango control system.
+ Attribute alias name are also uniq within a Tango control system.
+\layout Section
+
+Reserved words and characters, limitations
+\layout Standard
+
+From the naming schema described above, the reserved characters are 
+\series bold 
+:
+\series default 
+,
+\series bold 
+#
+\series default 
+,
+\series bold 
+/
+\series default 
+ and the reserved string is :
+\series bold 
+ ->
+\series default 
+.
+ On top of that, the dbt_update tool (tool to fulfill database from the
+ content of a file) reserved the 
+\series bold 
+device
+\series default 
+ word
+\layout Standard
+
+The device name, its domain, member and family fields and its alias are
+ stored in the Tango database.
+ The default maximum size for these items are :
+\layout Standard
+\added_space_top 0.3cm \added_space_bottom 0.3cm \align center 
+
+\begin_inset  Tabular
+<lyxtabular version="3" rows="6" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" leftline="true" width="0pt">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Item
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+max length
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+device name
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+255
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+domain field
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+85
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+family field
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+85
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+member field
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+85
+\end_inset 
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+device alias name
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+255
+\end_inset 
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset 
+
+
+\layout Standard
+
+The device name, the command name, the attribute name, the property name,
+ the device alias name and the device server name are 
+\series bold 
+case insensitive
+\series default 
+.
+\the_end
diff --git a/doc/src/appendix/notifd2db.lyx b/doc/src/appendix/notifd2db.lyx
new file mode 100644
index 0000000..1aebb61
--- /dev/null
+++ b/doc/src/appendix/notifd2db.lyx
@@ -0,0 +1,151 @@
+#LyX 1.3 created this file. For more info see http://www.lyx.org/
+\lyxformat 221
+\textclass Tango_book
+\language english
+\inputencoding latin1
+\fontscheme default
+\graphics default
+\paperfontsize default
+\spacing single 
+\papersize a4paper
+\paperpackage widemarginsa4
+\use_geometry 0
+\use_amsmath 0
+\use_natbib 0
+\use_numerical_citations 0
+\paperorientation portrait
+\secnumdepth 2
+\tocdepth 2
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\quotes_times 2
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+
+\layout Chapter
+
+The notifd2db utility
+\layout Section
+
+The notifd2db utility usage
+\layout Standard
+
+The notifd2db utility is used to pass to Tango the necessary information
+ for the Tango servers or clients to build connection with the CORBA notificatio
+n service.
+ Its usage is:
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+begin{center}
+\end_inset 
+
+notifd2db [notifd2db_IOR_file] [host] [-o Device_server_database_file_name]
+ [-h]
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+end{center}
+\layout Standard
+
+\end_inset 
+
+
+\layout Standard
+
+The [notifd2db_IOR_file] parameter is used to specify the file name used
+ by the notification service to store its main IOR.
+ This parameter is not mandatoty.
+ Its default value is /tmp/rdfact.ior.
+ The [host] parameter is ued to specify on which host the notification service
+ should be exported.
+ The default value is the host on which the command is run.
+ The [-o Device_server_database_file_name] is used in case of event and
+ device server started with the file as database (the -file device server
+ command line option).
+ The file name used here must be the file name used by the device server
+ in its -file option.
+ The [-h] option is just to display an help message.
+ Notifd2db utility usage example:
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+begin{center}
+\end_inset 
+
+notifd2db
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+end{center}
+\end_inset 
+
+ to register notification service on the current host using the default
+ notifictaion service IOR file name.
+ 
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+begin{center}
+\end_inset 
+
+notifd C:
+\backslash 
+Temp
+\backslash 
+nd.ior
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+end{center}
+\end_inset 
+
+ to register a notification service with IOR file named C:
+\backslash 
+Temp
+\backslash 
+nd.ior.
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+begin{center}
+\layout Standard
+
+\end_inset 
+
+notifd -o /var/my_ds_file.res
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+end{center}
+\end_inset 
+
+ to register notification service in the /var/my_ds_file.res file used by
+ a device server started with the device server -file command line option.
+\the_end
diff --git a/doc/src/appendix/prop_file.lyx b/doc/src/appendix/prop_file.lyx
new file mode 100644
index 0000000..9b727ee
--- /dev/null
+++ b/doc/src/appendix/prop_file.lyx
@@ -0,0 +1,486 @@
+#LyX 1.6.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 345
+\begin_document
+\begin_header
+\textclass Tango_book
+\begin_preamble
+\usepackage{a4wide}
+\end_preamble
+\use_default_options false
+\language english
+\inputencoding latin1
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_amsmath 1
+\use_esint 0
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\secnumdepth 2
+\tocdepth 2
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\author "" 
+\end_header
+
+\begin_body
+
+\begin_layout Chapter
+The property file syntax
+\end_layout
+
+\begin_layout Section
+Property file usage
+\end_layout
+
+\begin_layout Standard
+A property file is a file where you store all the property(ies) related
+ to device(s) belonging to a specific device server process.
+ In this file, one can find:
+\end_layout
+
+\begin_layout Itemize
+Which device(s) has to be created for each Tango class embedded in the device
+ server process
+\end_layout
+
+\begin_layout Itemize
+Device(s) properties
+\end_layout
+
+\begin_layout Itemize
+Device(s) attribute properties
+\end_layout
+
+\begin_layout Standard
+This type of file is not required by a Tango control system.
+ These informations are stored in the Tango database and having them also
+ in a file could generate some data duplication issues.
+ Nevertheless, in some cases, it could very very helpful to generate this
+ type of file.
+ These cases are:
+\end_layout
+
+\begin_layout Enumerate
+If you want to run a device server process on a host which does not have
+ access to the Tango control system database.
+ In such a case, the user can generate the file from the database content
+ and run the device server process using this file as database (-file option
+ of device server process)
+\end_layout
+
+\begin_layout Enumerate
+In case of massive property changes where no tool will be more adapted than
+ your favorite text editor.
+ In such a case, the user can generate a file from the database content,
+ change/add/modify file contents using his favorite tool and then reload
+ file content into the database.
+\end_layout
+
+\begin_layout Standard
+Jive
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Jive doc"
+
+\end_inset
+
+ is the tool provided to generate and load a property file.
+ To generate a device server process properties file, select your device
+ server process in the "Server" tab, right click and select "Save Server
+ Data".
+ A file selection window pops up allowing you to choose your file name and
+ path.
+ To reload a file in the Tango database, click on "File" then "Load Property
+ File".
+ 
+\end_layout
+
+\begin_layout Section
+Property file syntax
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\series bold
+1 
+\series default
+#---------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+2 # SERVER TimeoutTest/manu, TimeoutTest device declaration
+\end_layout
+
+\begin_layout LyX-Code
+3 #---------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+4 
+\end_layout
+
+\begin_layout LyX-Code
+5 TimeoutTest/manu/DEVICE/TimeoutTest: "et/to/01",
+\backslash
+ 
+\end_layout
+
+\begin_layout LyX-Code
+6                                      "et/to/02",
+\backslash
+ 
+\end_layout
+
+\begin_layout LyX-Code
+7                                      "et/to/03"
+\end_layout
+
+\begin_layout LyX-Code
+8 
+\end_layout
+
+\begin_layout LyX-Code
+9 
+\end_layout
+
+\begin_layout LyX-Code
+10 # --- et/to/01 properties
+\end_layout
+
+\begin_layout LyX-Code
+11 
+\end_layout
+
+\begin_layout LyX-Code
+12 et/to/01->StringProp: Property
+\end_layout
+
+\begin_layout LyX-Code
+13 et/to/01->ArrayProp: 1,
+\backslash
+ 
+\end_layout
+
+\begin_layout LyX-Code
+14                      2,
+\backslash
+ 
+\end_layout
+
+\begin_layout LyX-Code
+15                      3
+\end_layout
+
+\begin_layout LyX-Code
+16 et/to/01->attr_min_poll_period: TheAttr,
+\backslash
+ 
+\end_layout
+
+\begin_layout LyX-Code
+17                                 1000
+\end_layout
+
+\begin_layout LyX-Code
+18 et/to/01->AnotherStringProp: "A long string"
+\end_layout
+
+\begin_layout LyX-Code
+19 et/to/01->ArrayStringProp: "the first prop",
+\backslash
+ 
+\end_layout
+
+\begin_layout LyX-Code
+20                            "the second prop"
+\end_layout
+
+\begin_layout LyX-Code
+21 
+\end_layout
+
+\begin_layout LyX-Code
+22 # --- et/to/01 attribute properties
+\end_layout
+
+\begin_layout LyX-Code
+23 
+\end_layout
+
+\begin_layout LyX-Code
+24 et/to/01/TheAttr->display_unit: 1.0
+\end_layout
+
+\begin_layout LyX-Code
+25 et/to/01/TheAttr->event_period: 1000
+\end_layout
+
+\begin_layout LyX-Code
+26 et/to/01/TheAttr->format: %4d
+\end_layout
+
+\begin_layout LyX-Code
+27 et/to/01/TheAttr->min_alarm: -2.0
+\end_layout
+
+\begin_layout LyX-Code
+28 et/to/01/TheAttr->min_value: -5.0
+\end_layout
+
+\begin_layout LyX-Code
+29 et/to/01/TheAttr->standard_unit: 1.0
+\end_layout
+
+\begin_layout LyX-Code
+30 et/to/01/TheAttr->__value: 111
+\end_layout
+
+\begin_layout LyX-Code
+31 et/to/01/BooAttr->event_period: 1000doc_url
+\end_layout
+
+\begin_layout LyX-Code
+32 et/to/01/TestAttr->display_unit: 1.0
+\end_layout
+
+\begin_layout LyX-Code
+33 et/to/01/TestAttr->event_period: 1000
+\end_layout
+
+\begin_layout LyX-Code
+34 et/to/01/TestAttr->format: %4d
+\end_layout
+
+\begin_layout LyX-Code
+35 et/to/01/TestAttr->standard_unit: 1.0
+\end_layout
+
+\begin_layout LyX-Code
+36 et/to/01/DbAttr->abs_change: 1.1
+\end_layout
+
+\begin_layout LyX-Code
+37 et/to/01/DbAttr->event_period: 1000
+\end_layout
+
+\begin_layout LyX-Code
+38
+\end_layout
+
+\begin_layout LyX-Code
+39 CLASS/TimeoutTest->InheritedFrom:   Device_4Impl
+\end_layout
+
+\begin_layout LyX-Code
+40 CLASS/TimeoutTest->doc_url:   "http://www.esrf.fr/some/path"
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 - 3: Comments.
+ Comment starts with the '#' character
+\end_layout
+
+\begin_layout Standard
+Line 4: Blanck line
+\end_layout
+
+\begin_layout Standard
+Line 5 - 7: Devices definition.
+ "DEVICE" is the keyword to declare a device(s) definition sequence.
+ The general syntax is:
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+<DS name>/<inst name>/DEVICE/<Class name>: dev1,dev2,dev3
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+Device(s) name can follow on next line if the last line character is '
+\backslash
+' (see line 5,6).
+ The '"' characters around device name are generated by the Jive tool and
+ are not mandatory.
+\end_layout
+
+\begin_layout Standard
+Line 12: Device property definition.
+ The general device property syntax is 
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+<device name>
+\series bold
+->
+\series default
+<property name>: <property value>
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+In case of array, the array element delimiter is the character ','.
+ Array definition can be splitted on several lines if the last line character
+ is '
+\backslash
+'.
+ Allowed characters after the ':' delimiter are space, tabulation or nothing.
+\end_layout
+
+\begin_layout Standard
+Line 13 - 15 and 16 - 17: Device property (array)
+\end_layout
+
+\begin_layout Standard
+Line 18: A device string property with special characters (spaces).
+ The '"' character is used to delimit the string
+\end_layout
+
+\begin_layout Standard
+Line 24 - 37: Device attribute property definition.
+ The general device attribute property syntax is 
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+<device name>/<attribute name>
+\series bold
+->
+\series default
+<property name>: <property value>
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+Allowed characters after the ':' delimiter are space, tabulation or nothing.
+\end_layout
+
+\begin_layout Standard
+Line 39 - 40: Class property definition.
+ The general class property syntax is 
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+CLASS/<class name>
+\series bold
+->
+\series default
+<property name>: <property value>
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+"CLASS" is the keyword to declare a class property definition.
+ Allowed characters after the ':' delimiter are space, tabulation or nothing.
+ On line 40, the '"' characters around the property value are mandatory
+ due to the '/' character contains in the property value.
+\end_layout
+
+\end_body
+\end_document
diff --git a/doc/src/appendix/starting_tango.lyx b/doc/src/appendix/starting_tango.lyx
new file mode 100644
index 0000000..5e4076f
--- /dev/null
+++ b/doc/src/appendix/starting_tango.lyx
@@ -0,0 +1,514 @@
+#LyX 1.5.6 created this file. For more info see http://www.lyx.org/
+\lyxformat 276
+\begin_document
+\begin_header
+\textclass Tango_book
+\begin_preamble
+\usepackage{a4wide}
+\end_preamble
+\language english
+\inputencoding latin1
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+\graphics default
+\paperfontsize default
+\spacing single
+\papersize default
+\use_geometry false
+\use_amsmath 1
+\use_esint 0
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\secnumdepth 2
+\tocdepth 2
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\author "" 
+\author "" 
+\end_header
+
+\begin_body
+
+\begin_layout Chapter
+Starting a Tango control system
+\end_layout
+
+\begin_layout Section
+Without database
+\end_layout
+
+\begin_layout Standard
+When used without database
+\begin_inset LatexCommand index
+name "database"
+
+\end_inset
+
+, there is no additional process to start.
+ Simply starts device server using the -nodb option (and eventually the
+ -dlist option) on specific port.
+ See 
+\begin_inset LatexCommand ref
+reference "sec:Device-server-without"
+
+\end_inset
+
+ to find informations on how to start/write Tango device server not using
+ the database.
+\end_layout
+
+\begin_layout Section
+With database
+\end_layout
+
+\begin_layout Standard
+Starting the Tango control system simply means starting its database device
+ server on a well defined host using a well defined port.
+ Use the host name and the port number to build the TANGO_HOST environment
+ variable.
+ See 
+\begin_inset LatexCommand ref
+reference "Env variable"
+
+\end_inset
+
+ to find how starting a device server on a specific host.
+ Obviously, the underlying database software (MySQL) must be started before
+ the Tango database device server.
+ The Tango database server connects to MySQL using a default logging name
+ set to "root".
+ You can change this behaviour with the MYSQL_USER
+\begin_inset LatexCommand index
+name "MYSQL-USER"
+
+\end_inset
+
+ and MYSQL_PASSWORD
+\begin_inset LatexCommand index
+name "MYSQL-PASSWORD"
+
+\end_inset
+
+ environment variables.
+ Define them before starting the database server.
+\end_layout
+
+\begin_layout Standard
+If you are using the Tango administration graphical tool called 
+\series bold
+Astor
+\series default
+
+\begin_inset LatexCommand index
+name "Astor"
+
+\end_inset
+
+, you also need to start a specific Tango device server called 
+\series bold
+Starter
+\begin_inset LatexCommand index
+name "Starter"
+
+\end_inset
+
+
+\series default
+ on each host where Tango device server(s) are running.
+ See 
+\begin_inset LatexCommand cite
+key "Astor_doc"
+
+\end_inset
+
+ for Astor documentation.
+ This starter device server is able to start even before the Tango database
+ device server is started.
+ In this case, it will enter a loop in which it periodically tries to access
+ the Tango database device.
+ The loop exits and the server starts only if the database device access
+ succeed.
+\end_layout
+
+\begin_layout Section
+With database and event
+\end_layout
+
+\begin_layout Standard
+On top of what is described in the previous chapter, using event means using
+ CORBA Notification service.
+ Start one Notification Service
+\begin_inset LatexCommand index
+name "Notification Service"
+
+\end_inset
+
+ daemon on each host where device server(s) used via events are running.
+ The Notification Service daemon event channel factory IOR has to be registered
+ in the Tango database.
+ This is done with the 
+\series bold
+notifd2db
+\begin_inset LatexCommand index
+name "notifd2db"
+
+\end_inset
+
+
+\series default
+ command.
+ The notification daemon is a process with a high thread number.
+ By default, Unix like operating systems reserve a big amount of memory
+ for each thread stack (8 MByte for Linux/Ubuntu and Solaris, 10 MByte for
+ Linux/RedHat 4).
+ If your process has several hundreds of threads, this could generate a
+ too high memory requirement on virtual memory and even exceed the maximun
+ allowed memory per process (3 GBytes on Linux for 32 bits computer).
+ The notification service daemon works very well with a value of only 2
+ Mybtes for thread stack.
+ The Unix command line "ulimit
+\begin_inset LatexCommand index
+name "ulimit"
+
+\end_inset
+
+ -s 2048" asks the operating system to give 2 Mbytes for each thread stack.
+ Example of starting and registering a Notification Service daemon on a
+ UNIX like operating system
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Standard
+
+
+\backslash
+input{line.tex}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  ulimit -s 2048
+\end_layout
+
+\begin_layout LyX-Code
+     2  notifd -n -DDeadFilterInterval=300 &
+\end_layout
+
+\begin_layout LyX-Code
+     3  notifd2db
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Standard
+
+
+\backslash
+input{line.tex}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The Notification Service daemon is started at line 2.
+ Its "-DDeadFilterInterval"
+\begin_inset LatexCommand index
+name "DeadFilterInterval"
+
+\end_inset
+
+ option is used to specify some internal cleaning of dead objects within
+ the notification service.
+ The "-n" option is used to disable the use of the CORBA Naming Service
+ for registering the default event channel factory.
+ The registration of the Notification Service daemon in the Tango database
+ is done at line 2.
+\end_layout
+
+\begin_layout Standard
+It differs on a Windows computer
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Standard
+
+
+\backslash
+input{line.tex}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  notifd -n -DDeadFilterInterval=300 -DFactoryIORFileName=C:
+\backslash
+Temp
+\backslash
+evfact.ior &
+\end_layout
+
+\begin_layout LyX-Code
+     2  notifd2db C:
+\backslash
+Temp
+\backslash
+evfact.ior
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Standard
+
+
+\backslash
+input{line.tex}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+With file used as database
+\end_layout
+
+\begin_layout Standard
+When used with database
+\begin_inset LatexCommand index
+name "database"
+
+\end_inset
+
+ on file, there is no additional process to start.
+ Simply starts device server using the -file option specifying file name
+ port.
+ See 
+\begin_inset LatexCommand ref
+reference "sec:Device-server-file"
+
+\end_inset
+
+ to find informations on how to start Tango device server using database
+ on file.
+\end_layout
+
+\begin_layout Section
+With file used as database and event
+\end_layout
+
+\begin_layout Standard
+Using event means using CORBA Notification service.
+ Start one Notification Service
+\begin_inset LatexCommand index
+name "Notification Service"
+
+\end_inset
+
+ daemon on the host where device server(s) using events are running.
+ The Notification Service daemon event channel factory IOR has to be registered
+ in the file(s) use as database.
+ This is done with the 
+\series bold
+notifd2db
+\begin_inset LatexCommand index
+name "notifd2db"
+
+\end_inset
+
+
+\series default
+ command.
+ Example of starting and registering a Notification Service daemon on a
+ UNIX like operating system
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Standard
+
+
+\backslash
+input{line.tex}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  notifd -n -DDeadFilterInterval=300 &
+\end_layout
+
+\begin_layout LyX-Code
+     2  notifd2db -o /var/myfile.res
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Standard
+
+
+\backslash
+input{line.tex}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The Notification Service daemon is started at line 1.
+ Its "-n" option is used to disable the use of the CORBA Naming Service
+ for registering the default event channel factory.
+ The registration of the Notification Service daemon in the file used as
+ database is done at line 2 with its 
+\series bold
+-o
+\series default
+ command line option.
+\end_layout
+
+\begin_layout Standard
+It differs on a Windows computer because the name of the file used by the
+ CORBA notification service to store its channel factory IOR must be specified
+ using its -D command line option.
+ This file name has also to be passed to the notifd2db command.
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Standard
+
+
+\backslash
+input{line.tex}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  notifd -n -DDeadFilterInterval=300 -DFactoryIORFileName=C:
+\backslash
+Temp
+\backslash
+evfact.ior &
+\end_layout
+
+\begin_layout LyX-Code
+     2  notifd2db C:
+\backslash
+Temp
+\backslash
+evfact.ior -o C:
+\backslash
+Temp
+\backslash
+myfile.res
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Standard
+
+
+\backslash
+input{line.tex}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+With the controlled access
+\end_layout
+
+\begin_layout Standard
+Using the Tango controlled access means starting a specific device server
+ called TangoAccessControl
+\begin_inset LatexCommand index
+name "TangoAccessControl"
+
+\end_inset
+
+.
+ By default, this server has to be started with the instance name set to
+ "1" and its device name is "sys/access_control/1".
+ The command line to start this device server is:
+\end_layout
+
+\begin_layout LyX-Code
+TangoAccessControl 1
+\end_layout
+
+\begin_layout Standard
+This server connects to MySQL using a default logging name set to "root".
+ You can change this behaviour with the MYSQL_USER
+\begin_inset LatexCommand index
+name "MYSQL-USER"
+
+\end_inset
+
+ and MYSQL_PASSWORD
+\begin_inset LatexCommand index
+name "MYSQL-PASSWORD"
+
+\end_inset
+
+ environment variables.
+ Define them before starting the controlled access device server.
+ This controlled access system uses the Tango database to retrieve user
+ rights and it is not possible to run it in a Tango control system running
+ without database.
+\end_layout
+
+\end_body
+\end_document
diff --git a/doc/src/atk/img/core-widget.eps b/doc/src/atk/img/core-widget.eps
new file mode 100644
index 0000000..e103bf5
--- /dev/null
+++ b/doc/src/atk/img/core-widget.eps
@@ -0,0 +1,553 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: Untitled-1
+%%Creator: Dia v0.88.1
+%%CreationDate: Wed Jul 24 12:56:48 2002
+%%For: a user
+%%Magnification: 1.0000
+%%Orientation: Portrait
+%%BoundingBox: 0 0 419 203
+%%Pages: 1
+%%BeginSetup
+%%EndSetup
+%%EndComments
+%%BeginProlog
+[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright
+/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one
+/two /three /four /five /six /seven /eight /nine /colon /semicolon
+/less /equal /greater /question /at /A /B /C /D /E
+/F /G /H /I /J /K /L /M /N /O
+/P /Q /R /S /T /U /V /W /X /Y
+/Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c
+/d /e /f /g /h /i /j /k /l /m
+/n /o /p /q /r /s /t /u /v /w
+/x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright
+/ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior
+/acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf
+/threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
+/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde
+/Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex
+/Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring
+/ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis
+/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave
+/uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /isolatin1encoding exch def
+/Times-Roman-latin1
+    /Times-Roman findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Times-Italic-latin1
+    /Times-Italic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Times-Bold-latin1
+    /Times-Bold findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Times-BoldItalic-latin1
+    /Times-BoldItalic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/AvantGarde-Book-latin1
+    /AvantGarde-Book findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/AvantGarde-BookOblique-latin1
+    /AvantGarde-BookOblique findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/AvantGarde-Demi-latin1
+    /AvantGarde-Demi findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/AvantGarde-DemiOblique-latin1
+    /AvantGarde-DemiOblique findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Bookman-Light-latin1
+    /Bookman-Light findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Bookman-LightItalic-latin1
+    /Bookman-LightItalic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Bookman-Demi-latin1
+    /Bookman-Demi findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Bookman-DemiItalic-latin1
+    /Bookman-DemiItalic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Courier-latin1
+    /Courier findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Courier-Oblique-latin1
+    /Courier-Oblique findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Courier-Bold-latin1
+    /Courier-Bold findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Courier-BoldOblique-latin1
+    /Courier-BoldOblique findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Helvetica-latin1
+    /Helvetica findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Helvetica-Oblique-latin1
+    /Helvetica-Oblique findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Helvetica-Bold-latin1
+    /Helvetica-Bold findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Helvetica-BoldOblique-latin1
+    /Helvetica-BoldOblique findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Helvetica-Narrow-latin1
+    /Helvetica-Narrow findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Helvetica-Narrow-Oblique-latin1
+    /Helvetica-Narrow-Oblique findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Helvetica-Narrow-Bold-latin1
+    /Helvetica-Narrow-Bold findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Helvetica-Narrow-BoldOblique-latin1
+    /Helvetica-Narrow-BoldOblique findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/NewCenturySchoolbook-Roman-latin1
+    /NewCenturySchoolbook-Roman findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/NewCenturySchoolbook-Italic-latin1
+    /NewCenturySchoolbook-Italic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/NewCenturySchoolbook-Bold-latin1
+    /NewCenturySchoolbook-Bold findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/NewCenturySchoolbook-BoldItalic-latin1
+    /NewCenturySchoolbook-BoldItalic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Palatino-Roman-latin1
+    /Palatino-Roman findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Palatino-Italic-latin1
+    /Palatino-Italic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Palatino-Bold-latin1
+    /Palatino-Bold findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Palatino-BoldItalic-latin1
+    /Palatino-BoldItalic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Symbol-latin1
+    /Symbol findfont
+definefont pop
+/ZapfChancery-MediumItalic-latin1
+    /ZapfChancery-MediumItalic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/ZapfDingbats-latin1
+    /ZapfDingbats findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/cp {closepath} bind def
+/c {curveto} bind def
+/f {fill} bind def
+/a {arc} bind def
+/ef {eofill} bind def
+/ex {exch} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth pop} bind def
+/tr {translate} bind def
+
+/ellipsedict 8 dict def
+ellipsedict /mtrx matrix put
+/ellipse
+{ ellipsedict begin
+   /endangle exch def
+   /startangle exch def
+   /yrad exch def
+   /xrad exch def
+   /y exch def
+   /x exch def   /savematrix mtrx currentmatrix def
+   x y tr xrad yrad sc
+   0 0 1 startangle endangle arc
+   savematrix setmatrix
+   end
+} def
+
+/mergeprocs {
+dup length
+3 -1 roll
+dup
+length
+dup
+5 1 roll
+3 -1 roll
+add
+array cvx
+dup
+3 -1 roll
+0 exch
+putinterval
+dup
+4 2 roll
+putinterval
+} bind def
+28.346000 -28.346000 scale
+-15.579133 -17.035000 translate
+%%EndProlog
+
+
+0.069570 0.512979 1.000000 srgb
+n 23.764133 11.010000 m 23.764133 16.985000 l 29.789133 16.985000 l 29.789133 11.010000 l f
+n 23.764133 11.510000 m 23.764133 11.510000 0.500000 0.500000 180.000000 270.000000 ellipse f
+n 29.789133 11.510000 m 29.789133 11.510000 0.500000 0.500000 270.000000 360.000000 ellipse f
+n 23.264133 11.510000 m 23.264133 16.485000 l 30.289133 16.485000 l 30.289133 11.510000 l f
+n 23.764133 16.485000 m 23.764133 16.485000 0.500000 0.500000 90.000000 180.000000 ellipse f
+n 29.789133 16.485000 m 29.789133 16.485000 0.500000 0.500000 0.000000 90.000000 ellipse f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 23.764133 11.010000 m 29.789133 11.010000 l s
+n 23.764133 16.985000 m 29.789133 16.985000 l s
+n 23.764133 11.510000 0.500000 0.500000 180.000000 270.000000 ellipse s
+n 29.789133 11.510000 0.500000 0.500000 270.000000 360.000000 ellipse s
+n 23.264133 11.510000 m 23.264133 16.485000 l s
+n 30.289133 11.510000 m 30.289133 16.485000 l s
+n 23.764133 16.485000 0.500000 0.500000 90.000000 180.000000 ellipse s
+n 29.789133 16.485000 0.500000 0.500000 0.000000 90.000000 ellipse s
+0.069570 0.512979 1.000000 srgb
+n 16.129133 10.950000 m 16.129133 16.925000 l 22.154133 16.925000 l 22.154133 10.950000 l f
+n 16.129133 11.450000 m 16.129133 11.450000 0.500000 0.500000 180.000000 270.000000 ellipse f
+n 22.154133 11.450000 m 22.154133 11.450000 0.500000 0.500000 270.000000 360.000000 ellipse f
+n 15.629133 11.450000 m 15.629133 16.425000 l 22.654133 16.425000 l 22.654133 11.450000 l f
+n 16.129133 16.425000 m 16.129133 16.425000 0.500000 0.500000 90.000000 180.000000 ellipse f
+n 22.154133 16.425000 m 22.154133 16.425000 0.500000 0.500000 0.000000 90.000000 ellipse f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 16.129133 10.950000 m 22.154133 10.950000 l s
+n 16.129133 16.925000 m 22.154133 16.925000 l s
+n 16.129133 11.450000 0.500000 0.500000 180.000000 270.000000 ellipse s
+n 22.154133 11.450000 0.500000 0.500000 270.000000 360.000000 ellipse s
+n 15.629133 11.450000 m 15.629133 16.425000 l s
+n 22.654133 11.450000 m 22.654133 16.425000 l s
+n 16.129133 16.425000 0.500000 0.500000 90.000000 180.000000 ellipse s
+n 22.154133 16.425000 0.500000 0.500000 0.000000 90.000000 ellipse s
+/Courier-latin1 ff 0.800000 scf sf
+(Core) dup sw 2 div 19.054133 ex sub 10.475000 m gs 1 -1 sc sh gr
+/Courier-latin1 ff 0.800000 scf sf
+(Widget) dup sw 2 div 26.879133 ex sub 10.550000 m gs 1 -1 sc sh gr
+0.787651 0.871212 0.798553 srgb
+n 24.239133 11.250000 m 24.239133 13.775000 l 26.079133 13.775000 l 26.079133 11.250000 l f
+n 24.239133 11.750000 m 24.239133 11.750000 0.500000 0.500000 180.000000 270.000000 ellipse f
+n 26.079133 11.750000 m 26.079133 11.750000 0.500000 0.500000 270.000000 360.000000 ellipse f
+n 23.739133 11.750000 m 23.739133 13.275000 l 26.579133 13.275000 l 26.579133 11.750000 l f
+n 24.239133 13.275000 m 24.239133 13.275000 0.500000 0.500000 90.000000 180.000000 ellipse f
+n 26.079133 13.275000 m 26.079133 13.275000 0.500000 0.500000 0.000000 90.000000 ellipse f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 24.239133 11.250000 m 26.079133 11.250000 l s
+n 24.239133 13.775000 m 26.079133 13.775000 l s
+n 24.239133 11.750000 0.500000 0.500000 180.000000 270.000000 ellipse s
+n 26.079133 11.750000 0.500000 0.500000 270.000000 360.000000 ellipse s
+n 23.739133 11.750000 m 23.739133 13.275000 l s
+n 26.579133 11.750000 m 26.579133 13.275000 l s
+n 24.239133 13.275000 0.500000 0.500000 90.000000 180.000000 ellipse s
+n 26.079133 13.275000 0.500000 0.500000 0.000000 90.000000 ellipse s
+/Courier-latin1 ff 0.500000 scf sf
+(State) dup sw 2 div 25.154133 ex sub 12.400000 m gs 1 -1 sc sh gr
+(viewer) dup sw 2 div 25.154133 ex sub 12.900000 m gs 1 -1 sc sh gr
+0.049637 0.742424 0.077347 srgb
+n 24.289133 14.060000 m 24.289133 16.735000 l 26.139133 16.735000 l 26.139133 14.060000 l f
+n 24.289133 14.560000 m 24.289133 14.560000 0.500000 0.500000 180.000000 270.000000 ellipse f
+n 26.139133 14.560000 m 26.139133 14.560000 0.500000 0.500000 270.000000 360.000000 ellipse f
+n 23.789133 14.560000 m 23.789133 16.235000 l 26.639133 16.235000 l 26.639133 14.560000 l f
+n 24.289133 16.235000 m 24.289133 16.235000 0.500000 0.500000 90.000000 180.000000 ellipse f
+n 26.139133 16.235000 m 26.139133 16.235000 0.500000 0.500000 0.000000 90.000000 ellipse f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 24.289133 14.060000 m 26.139133 14.060000 l s
+n 24.289133 16.735000 m 26.139133 16.735000 l s
+n 24.289133 14.560000 0.500000 0.500000 180.000000 270.000000 ellipse s
+n 26.139133 14.560000 0.500000 0.500000 270.000000 360.000000 ellipse s
+n 23.789133 14.560000 m 23.789133 16.235000 l s
+n 26.639133 14.560000 m 26.639133 16.235000 l s
+n 24.289133 16.235000 0.500000 0.500000 90.000000 180.000000 ellipse s
+n 26.139133 16.235000 0.500000 0.500000 0.000000 90.000000 ellipse s
+/Courier-latin1 ff 0.500000 scf sf
+(Attribute) dup sw 2 div 25.254133 ex sub 15.425000 m gs 1 -1 sc sh gr
+(viewer) dup sw 2 div 25.254133 ex sub 15.925000 m gs 1 -1 sc sh gr
+1.000000 0.962677 0.066859 srgb
+n 27.514133 14.060000 m 27.514133 16.735000 l 29.364133 16.735000 l 29.364133 14.060000 l f
+n 27.514133 14.560000 m 27.514133 14.560000 0.500000 0.500000 180.000000 270.000000 ellipse f
+n 29.364133 14.560000 m 29.364133 14.560000 0.500000 0.500000 270.000000 360.000000 ellipse f
+n 27.014133 14.560000 m 27.014133 16.235000 l 29.864133 16.235000 l 29.864133 14.560000 l f
+n 27.514133 16.235000 m 27.514133 16.235000 0.500000 0.500000 90.000000 180.000000 ellipse f
+n 29.364133 16.235000 m 29.364133 16.235000 0.500000 0.500000 0.000000 90.000000 ellipse f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 27.514133 14.060000 m 29.364133 14.060000 l s
+n 27.514133 16.735000 m 29.364133 16.735000 l s
+n 27.514133 14.560000 0.500000 0.500000 180.000000 270.000000 ellipse s
+n 29.364133 14.560000 0.500000 0.500000 270.000000 360.000000 ellipse s
+n 27.014133 14.560000 m 27.014133 16.235000 l s
+n 29.864133 14.560000 m 29.864133 16.235000 l s
+n 27.514133 16.235000 0.500000 0.500000 90.000000 180.000000 ellipse s
+n 29.364133 16.235000 0.500000 0.500000 0.000000 90.000000 ellipse s
+/Courier-latin1 ff 0.500000 scf sf
+(Command) dup sw 2 div 28.404133 ex sub 15.325000 m gs 1 -1 sc sh gr
+(Viewer) dup sw 2 div 28.404133 ex sub 15.825000 m gs 1 -1 sc sh gr
+0.886364 0.036715 0.191547 srgb
+n 27.489133 11.160000 m 27.489133 13.835000 l 29.339133 13.835000 l 29.339133 11.160000 l f
+n 27.489133 11.660000 m 27.489133 11.660000 0.500000 0.500000 180.000000 270.000000 ellipse f
+n 29.339133 11.660000 m 29.339133 11.660000 0.500000 0.500000 270.000000 360.000000 ellipse f
+n 26.989133 11.660000 m 26.989133 13.335000 l 29.839133 13.335000 l 29.839133 11.660000 l f
+n 27.489133 13.335000 m 27.489133 13.335000 0.500000 0.500000 90.000000 180.000000 ellipse f
+n 29.339133 13.335000 m 29.339133 13.335000 0.500000 0.500000 0.000000 90.000000 ellipse f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 27.489133 11.160000 m 29.339133 11.160000 l s
+n 27.489133 13.835000 m 29.339133 13.835000 l s
+n 27.489133 11.660000 0.500000 0.500000 180.000000 270.000000 ellipse s
+n 29.339133 11.660000 0.500000 0.500000 270.000000 360.000000 ellipse s
+n 26.989133 11.660000 m 26.989133 13.335000 l s
+n 29.839133 11.660000 m 29.839133 13.335000 l s
+n 27.489133 13.335000 0.500000 0.500000 90.000000 180.000000 ellipse s
+n 29.339133 13.335000 0.500000 0.500000 0.000000 90.000000 ellipse s
+/Courier-latin1 ff 0.500000 scf sf
+(Error) dup sw 2 div 28.329133 ex sub 12.275000 m gs 1 -1 sc sh gr
+(viewer) dup sw 2 div 28.329133 ex sub 12.775000 m gs 1 -1 sc sh gr
+1.000000 0.962677 0.066859 srgb
+n 19.839133 13.785000 m 19.839133 16.460000 l 21.689133 16.460000 l 21.689133 13.785000 l f
+n 19.839133 14.285000 m 19.839133 14.285000 0.500000 0.500000 180.000000 270.000000 ellipse f
+n 21.689133 14.285000 m 21.689133 14.285000 0.500000 0.500000 270.000000 360.000000 ellipse f
+n 19.339133 14.285000 m 19.339133 15.960000 l 22.189133 15.960000 l 22.189133 14.285000 l f
+n 19.839133 15.960000 m 19.839133 15.960000 0.500000 0.500000 90.000000 180.000000 ellipse f
+n 21.689133 15.960000 m 21.689133 15.960000 0.500000 0.500000 0.000000 90.000000 ellipse f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 19.839133 13.785000 m 21.689133 13.785000 l s
+n 19.839133 16.460000 m 21.689133 16.460000 l s
+n 19.839133 14.285000 0.500000 0.500000 180.000000 270.000000 ellipse s
+n 21.689133 14.285000 0.500000 0.500000 270.000000 360.000000 ellipse s
+n 19.339133 14.285000 m 19.339133 15.960000 l s
+n 22.189133 14.285000 m 22.189133 15.960000 l s
+n 19.839133 15.960000 0.500000 0.500000 90.000000 180.000000 ellipse s
+n 21.689133 15.960000 0.500000 0.500000 0.000000 90.000000 ellipse s
+/Courier-latin1 ff 0.500000 scf sf
+(Command) dup sw 2 div 20.729133 ex sub 14.975000 m gs 1 -1 sc sh gr
+(list) dup sw 2 div 20.729133 ex sub 15.475000 m gs 1 -1 sc sh gr
+0.049637 0.742424 0.077347 srgb
+n 16.579133 13.775000 m 16.579133 16.450000 l 18.429133 16.450000 l 18.429133 13.775000 l f
+n 16.579133 14.275000 m 16.579133 14.275000 0.500000 0.500000 180.000000 270.000000 ellipse f
+n 18.429133 14.275000 m 18.429133 14.275000 0.500000 0.500000 270.000000 360.000000 ellipse f
+n 16.079133 14.275000 m 16.079133 15.950000 l 18.929133 15.950000 l 18.929133 14.275000 l f
+n 16.579133 15.950000 m 16.579133 15.950000 0.500000 0.500000 90.000000 180.000000 ellipse f
+n 18.429133 15.950000 m 18.429133 15.950000 0.500000 0.500000 0.000000 90.000000 ellipse f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 16.579133 13.775000 m 18.429133 13.775000 l s
+n 16.579133 16.450000 m 18.429133 16.450000 l s
+n 16.579133 14.275000 0.500000 0.500000 180.000000 270.000000 ellipse s
+n 18.429133 14.275000 0.500000 0.500000 270.000000 360.000000 ellipse s
+n 16.079133 14.275000 m 16.079133 15.950000 l s
+n 18.929133 14.275000 m 18.929133 15.950000 l s
+n 16.579133 15.950000 0.500000 0.500000 90.000000 180.000000 ellipse s
+n 18.429133 15.950000 0.500000 0.500000 0.000000 90.000000 ellipse s
+/Courier-latin1 ff 0.500000 scf sf
+(Attribute) dup sw 2 div 17.504133 ex sub 15.225000 m gs 1 -1 sc sh gr
+(list) dup sw 2 div 17.504133 ex sub 15.725000 m gs 1 -1 sc sh gr
+0.787651 0.871212 0.798553 srgb
+n 16.529133 11.425000 m 16.529133 13.300000 l 21.679133 13.300000 l 21.679133 11.425000 l f
+n 16.529133 11.925000 m 16.529133 11.925000 0.500000 0.500000 180.000000 270.000000 ellipse f
+n 21.679133 11.925000 m 21.679133 11.925000 0.500000 0.500000 270.000000 360.000000 ellipse f
+n 16.029133 11.925000 m 16.029133 12.800000 l 22.179133 12.800000 l 22.179133 11.925000 l f
+n 16.529133 12.800000 m 16.529133 12.800000 0.500000 0.500000 90.000000 180.000000 ellipse f
+n 21.679133 12.800000 m 21.679133 12.800000 0.500000 0.500000 0.000000 90.000000 ellipse f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 16.529133 11.425000 m 21.679133 11.425000 l s
+n 16.529133 13.300000 m 21.679133 13.300000 l s
+n 16.529133 11.925000 0.500000 0.500000 180.000000 270.000000 ellipse s
+n 21.679133 11.925000 0.500000 0.500000 270.000000 360.000000 ellipse s
+n 16.029133 11.925000 m 16.029133 12.800000 l s
+n 22.179133 11.925000 m 22.179133 12.800000 l s
+n 16.529133 12.800000 0.500000 0.500000 90.000000 180.000000 ellipse s
+n 21.679133 12.800000 0.500000 0.500000 0.000000 90.000000 ellipse s
+/Courier-latin1 ff 0.500000 scf sf
+(Device) dup sw 2 div 19.054133 ex sub 12.450000 m gs 1 -1 sc sh gr
+showpage
diff --git a/doc/src/atk/img/listpanel.eps b/doc/src/atk/img/listpanel.eps
new file mode 100644
index 0000000..882ca6c
--- /dev/null
+++ b/doc/src/atk/img/listpanel.eps
@@ -0,0 +1,566 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: Untitled-2
+%%Creator: Dia v0.88.1
+%%CreationDate: Wed Jul 24 13:14:06 2002
+%%For: a user
+%%Magnification: 1.0000
+%%Orientation: Portrait
+%%BoundingBox: 0 0 424 367
+%%Pages: 1
+%%BeginSetup
+%%EndSetup
+%%EndComments
+%%BeginProlog
+[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright
+/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one
+/two /three /four /five /six /seven /eight /nine /colon /semicolon
+/less /equal /greater /question /at /A /B /C /D /E
+/F /G /H /I /J /K /L /M /N /O
+/P /Q /R /S /T /U /V /W /X /Y
+/Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c
+/d /e /f /g /h /i /j /k /l /m
+/n /o /p /q /r /s /t /u /v /w
+/x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright
+/ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior
+/acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf
+/threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
+/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde
+/Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex
+/Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring
+/ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis
+/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave
+/uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /isolatin1encoding exch def
+/Times-Roman-latin1
+    /Times-Roman findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Times-Italic-latin1
+    /Times-Italic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Times-Bold-latin1
+    /Times-Bold findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Times-BoldItalic-latin1
+    /Times-BoldItalic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/AvantGarde-Book-latin1
+    /AvantGarde-Book findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/AvantGarde-BookOblique-latin1
+    /AvantGarde-BookOblique findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/AvantGarde-Demi-latin1
+    /AvantGarde-Demi findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/AvantGarde-DemiOblique-latin1
+    /AvantGarde-DemiOblique findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Bookman-Light-latin1
+    /Bookman-Light findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Bookman-LightItalic-latin1
+    /Bookman-LightItalic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Bookman-Demi-latin1
+    /Bookman-Demi findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Bookman-DemiItalic-latin1
+    /Bookman-DemiItalic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Courier-latin1
+    /Courier findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Courier-Oblique-latin1
+    /Courier-Oblique findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Courier-Bold-latin1
+    /Courier-Bold findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Courier-BoldOblique-latin1
+    /Courier-BoldOblique findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Helvetica-latin1
+    /Helvetica findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Helvetica-Oblique-latin1
+    /Helvetica-Oblique findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Helvetica-Bold-latin1
+    /Helvetica-Bold findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Helvetica-BoldOblique-latin1
+    /Helvetica-BoldOblique findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Helvetica-Narrow-latin1
+    /Helvetica-Narrow findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Helvetica-Narrow-Oblique-latin1
+    /Helvetica-Narrow-Oblique findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Helvetica-Narrow-Bold-latin1
+    /Helvetica-Narrow-Bold findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Helvetica-Narrow-BoldOblique-latin1
+    /Helvetica-Narrow-BoldOblique findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/NewCenturySchoolbook-Roman-latin1
+    /NewCenturySchoolbook-Roman findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/NewCenturySchoolbook-Italic-latin1
+    /NewCenturySchoolbook-Italic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/NewCenturySchoolbook-Bold-latin1
+    /NewCenturySchoolbook-Bold findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/NewCenturySchoolbook-BoldItalic-latin1
+    /NewCenturySchoolbook-BoldItalic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Palatino-Roman-latin1
+    /Palatino-Roman findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Palatino-Italic-latin1
+    /Palatino-Italic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Palatino-Bold-latin1
+    /Palatino-Bold findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Palatino-BoldItalic-latin1
+    /Palatino-BoldItalic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/Symbol-latin1
+    /Symbol findfont
+definefont pop
+/ZapfChancery-MediumItalic-latin1
+    /ZapfChancery-MediumItalic findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/ZapfDingbats-latin1
+    /ZapfDingbats findfont
+    dup length dict begin
+	{1 index /FID ne {def} {pop pop} ifelse} forall
+	/Encoding isolatin1encoding def
+    currentdict end
+definefont pop
+/cp {closepath} bind def
+/c {curveto} bind def
+/f {fill} bind def
+/a {arc} bind def
+/ef {eofill} bind def
+/ex {exch} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth pop} bind def
+/tr {translate} bind def
+
+/ellipsedict 8 dict def
+ellipsedict /mtrx matrix put
+/ellipse
+{ ellipsedict begin
+   /endangle exch def
+   /startangle exch def
+   /yrad exch def
+   /xrad exch def
+   /y exch def
+   /x exch def   /savematrix mtrx currentmatrix def
+   x y tr xrad yrad sc
+   0 0 1 startangle endangle arc
+   savematrix setmatrix
+   end
+} def
+
+/mergeprocs {
+dup length
+3 -1 roll
+dup
+length
+dup
+5 1 roll
+3 -1 roll
+add
+array cvx
+dup
+3 -1 roll
+0 exch
+putinterval
+dup
+4 2 roll
+putinterval
+} bind def
+28.346000 -28.346000 scale
+-15.400000 -18.300000 translate
+%%EndProlog
+
+
+0.121383 0.803030 0.233482 srgb
+n 24.800000 7.125000 m 24.800000 18.175000 l 29.800000 18.175000 l 29.800000 7.125000 l f
+n 24.800000 7.625000 m 24.800000 7.625000 0.500000 0.500000 180.000000 270.000000 ellipse f
+n 29.800000 7.625000 m 29.800000 7.625000 0.500000 0.500000 270.000000 360.000000 ellipse f
+n 24.300000 7.625000 m 24.300000 17.675000 l 30.300000 17.675000 l 30.300000 7.625000 l f
+n 24.800000 17.675000 m 24.800000 17.675000 0.500000 0.500000 90.000000 180.000000 ellipse f
+n 29.800000 17.675000 m 29.800000 17.675000 0.500000 0.500000 0.000000 90.000000 ellipse f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 24.800000 7.125000 m 29.800000 7.125000 l s
+n 24.800000 18.175000 m 29.800000 18.175000 l s
+n 24.800000 7.625000 0.500000 0.500000 180.000000 270.000000 ellipse s
+n 29.800000 7.625000 0.500000 0.500000 270.000000 360.000000 ellipse s
+n 24.300000 7.625000 m 24.300000 17.675000 l s
+n 30.300000 7.625000 m 30.300000 17.675000 l s
+n 24.800000 17.675000 0.500000 0.500000 90.000000 180.000000 ellipse s
+n 29.800000 17.675000 0.500000 0.500000 0.000000 90.000000 ellipse s
+1.000000 1.000000 1.000000 srgb
+n 25.046473 7.380445 m 25.046473 10.155445 l 28.971473 10.155445 l 28.971473 7.380445 l f
+n 25.046473 7.880445 m 25.046473 7.880445 0.500000 0.500000 180.000000 270.000000 ellipse f
+n 28.971473 7.880445 m 28.971473 7.880445 0.500000 0.500000 270.000000 360.000000 ellipse f
+n 24.546473 7.880445 m 24.546473 9.655445 l 29.471473 9.655445 l 29.471473 7.880445 l f
+n 25.046473 9.655445 m 25.046473 9.655445 0.500000 0.500000 90.000000 180.000000 ellipse f
+n 28.971473 9.655445 m 28.971473 9.655445 0.500000 0.500000 0.000000 90.000000 ellipse f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 25.046473 7.380445 m 28.971473 7.380445 l s
+n 25.046473 10.155445 m 28.971473 10.155445 l s
+n 25.046473 7.880445 0.500000 0.500000 180.000000 270.000000 ellipse s
+n 28.971473 7.880445 0.500000 0.500000 270.000000 360.000000 ellipse s
+n 24.546473 7.880445 m 24.546473 9.655445 l s
+n 29.471473 7.880445 m 29.471473 9.655445 l s
+n 25.046473 9.655445 0.500000 0.500000 90.000000 180.000000 ellipse s
+n 28.971473 9.655445 0.500000 0.500000 0.000000 90.000000 ellipse s
+1.000000 1.000000 1.000000 srgb
+n 25.296473 7.755445 m 25.296473 10.530445 l 29.221473 10.530445 l 29.221473 7.755445 l f
+n 25.296473 8.255445 m 25.296473 8.255445 0.500000 0.500000 180.000000 270.000000 ellipse f
+n 29.221473 8.255445 m 29.221473 8.255445 0.500000 0.500000 270.000000 360.000000 ellipse f
+n 24.796473 8.255445 m 24.796473 10.030445 l 29.721473 10.030445 l 29.721473 8.255445 l f
+n 25.296473 10.030445 m 25.296473 10.030445 0.500000 0.500000 90.000000 180.000000 ellipse f
+n 29.221473 10.030445 m 29.221473 10.030445 0.500000 0.500000 0.000000 90.000000 ellipse f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 25.296473 7.755445 m 29.221473 7.755445 l s
+n 25.296473 10.530445 m 29.221473 10.530445 l s
+n 25.296473 8.255445 0.500000 0.500000 180.000000 270.000000 ellipse s
+n 29.221473 8.255445 0.500000 0.500000 270.000000 360.000000 ellipse s
+n 24.796473 8.255445 m 24.796473 10.030445 l s
+n 29.721473 8.255445 m 29.721473 10.030445 l s
+n 25.296473 10.030445 0.500000 0.500000 90.000000 180.000000 ellipse s
+n 29.221473 10.030445 0.500000 0.500000 0.000000 90.000000 ellipse s
+1.000000 1.000000 1.000000 srgb
+n 25.621473 8.155445 m 25.621473 10.930445 l 29.546473 10.930445 l 29.546473 8.155445 l f
+n 25.621473 8.655445 m 25.621473 8.655445 0.500000 0.500000 180.000000 270.000000 ellipse f
+n 29.546473 8.655445 m 29.546473 8.655445 0.500000 0.500000 270.000000 360.000000 ellipse f
+n 25.121473 8.655445 m 25.121473 10.430445 l 30.046473 10.430445 l 30.046473 8.655445 l f
+n 25.621473 10.430445 m 25.621473 10.430445 0.500000 0.500000 90.000000 180.000000 ellipse f
+n 29.546473 10.430445 m 29.546473 10.430445 0.500000 0.500000 0.000000 90.000000 ellipse f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 25.621473 8.155445 m 29.546473 8.155445 l s
+n 25.621473 10.930445 m 29.546473 10.930445 l s
+n 25.621473 8.655445 0.500000 0.500000 180.000000 270.000000 ellipse s
+n 29.546473 8.655445 0.500000 0.500000 270.000000 360.000000 ellipse s
+n 25.121473 8.655445 m 25.121473 10.430445 l s
+n 30.046473 8.655445 m 30.046473 10.430445 l s
+n 25.621473 10.430445 0.500000 0.500000 90.000000 180.000000 ellipse s
+n 29.546473 10.430445 0.500000 0.500000 0.000000 90.000000 ellipse s
+0.258946 0.251912 1.000000 srgb
+n 25.386473 14.805445 m 25.386473 17.580445 l 29.311473 17.580445 l 29.311473 14.805445 l f
+n 25.386473 15.305445 m 25.386473 15.305445 0.500000 0.500000 180.000000 270.000000 ellipse f
+n 29.311473 15.305445 m 29.311473 15.305445 0.500000 0.500000 270.000000 360.000000 ellipse f
+n 24.886473 15.305445 m 24.886473 17.080445 l 29.811473 17.080445 l 29.811473 15.305445 l f
+n 25.386473 17.080445 m 25.386473 17.080445 0.500000 0.500000 90.000000 180.000000 ellipse f
+n 29.311473 17.080445 m 29.311473 17.080445 0.500000 0.500000 0.000000 90.000000 ellipse f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 25.386473 14.805445 m 29.311473 14.805445 l s
+n 25.386473 17.580445 m 29.311473 17.580445 l s
+n 25.386473 15.305445 0.500000 0.500000 180.000000 270.000000 ellipse s
+n 29.311473 15.305445 0.500000 0.500000 270.000000 360.000000 ellipse s
+n 24.886473 15.305445 m 24.886473 17.080445 l s
+n 29.811473 15.305445 m 29.811473 17.080445 l s
+n 25.386473 17.080445 0.500000 0.500000 90.000000 180.000000 ellipse s
+n 29.311473 17.080445 0.500000 0.500000 0.000000 90.000000 ellipse s
+/Courier-latin1 ff 0.500000 scf sf
+(Refresher) dup sw 2 div 27.286473 ex sub 16.330445 m gs 1 -1 sc sh gr
+/Courier-latin1 ff 0.500000 scf sf
+(Attribute) dup sw 2 div 27.236473 ex sub 9.555445 m gs 1 -1 sc sh gr
+0.666667 0.666667 0.666667 srgb
+n 15.950000 7.200000 m 15.950000 18.250000 l 20.950000 18.250000 l 20.950000 7.200000 l f
+n 15.950000 7.700000 m 15.950000 7.700000 0.500000 0.500000 180.000000 270.000000 ellipse f
+n 20.950000 7.700000 m 20.950000 7.700000 0.500000 0.500000 270.000000 360.000000 ellipse f
+n 15.450000 7.700000 m 15.450000 17.750000 l 21.450000 17.750000 l 21.450000 7.700000 l f
+n 15.950000 17.750000 m 15.950000 17.750000 0.500000 0.500000 90.000000 180.000000 ellipse f
+n 20.950000 17.750000 m 20.950000 17.750000 0.500000 0.500000 0.000000 90.000000 ellipse f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 15.950000 7.200000 m 20.950000 7.200000 l s
+n 15.950000 18.250000 m 20.950000 18.250000 l s
+n 15.950000 7.700000 0.500000 0.500000 180.000000 270.000000 ellipse s
+n 20.950000 7.700000 0.500000 0.500000 270.000000 360.000000 ellipse s
+n 15.450000 7.700000 m 15.450000 17.750000 l s
+n 21.450000 7.700000 m 21.450000 17.750000 l s
+n 15.950000 17.750000 0.500000 0.500000 90.000000 180.000000 ellipse s
+n 20.950000 17.750000 0.500000 0.500000 0.000000 90.000000 ellipse s
+1.000000 1.000000 1.000000 srgb
+n 16.146473 13.980445 m 16.146473 17.405445 l 20.846473 17.405445 l 20.846473 13.980445 l f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 16.146473 13.980445 m 16.146473 17.405445 l 20.846473 17.405445 l 20.846473 13.980445 l cp s
+/Courier-latin1 ff 0.500000 scf sf
+(Error...) dup sw 2 div 17.636473 ex sub 14.830445 m gs 1 -1 sc sh gr
+1.000000 1.000000 1.000000 srgb
+n 16.146473 12.380445 m 16.146473 13.180445 l 20.846473 13.180445 l 20.846473 12.380445 l f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 16.146473 12.380445 m 16.146473 13.180445 l 20.846473 13.180445 l 20.846473 12.380445 l cp s
+/Courier-latin1 ff 0.500000 scf sf
+(5.98) dup sw 2 div 19.961473 ex sub 12.955445 m gs 1 -1 sc sh gr
+1.000000 1.000000 1.000000 srgb
+n 16.096473 10.355445 m 16.096473 11.155445 l 20.796473 11.155445 l 20.796473 10.355445 l f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 16.096473 10.355445 m 16.096473 11.155445 l 20.796473 11.155445 l 20.796473 10.355445 l cp s
+/Courier-latin1 ff 0.500000 scf sf
+(modify) dup sw 2 div 19.761473 ex sub 10.880445 m gs 1 -1 sc sh gr
+1.000000 1.000000 1.000000 srgb
+n 16.050000 8.375000 m 16.050000 9.175000 l 20.750000 9.175000 l 20.750000 8.375000 l f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slj
+0.000000 0.000000 0.000000 srgb
+n 16.050000 8.375000 m 16.050000 9.175000 l 20.750000 9.175000 l 20.750000 8.375000 l cp s
+/Courier-latin1 ff 0.500000 scf sf
+(3.14159) dup sw 2 div 19.611473 ex sub 8.930445 m gs 1 -1 sc sh gr
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slc
+0.977273 0.025858 0.096629 srgb
+n 25.121473 9.542945 m 20.846473 17.405445 l s
+0 slj
+n 20.877201 16.511546 m 20.846473 17.405445 l 21.580029 16.893688 l f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slc
+n 24.796473 9.142945 m 20.846473 15.692945 l s
+0 slj
+n 20.917072 14.801309 m 20.846473 15.692945 l 21.602142 15.214442 l f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slc
+0.000000 0.000000 0.000000 srgb
+n 25.121473 9.542945 m 20.846473 12.780445 l s
+0 slj
+n 21.242739 11.978589 m 20.846473 12.780445 l 21.725718 12.616344 l f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slc
+n 24.796473 9.142945 m 20.796473 10.755445 l s
+0 slj
+n 21.388897 10.085345 m 20.796473 10.755445 l 21.688008 10.827324 l f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slc
+n 24.546473 8.767945 m 20.750000 8.775000 l s
+0 slj
+n 21.549255 8.373514 m 20.750000 8.775000 l 21.550742 9.173513 l f
+0.100000 slw
+[] 0 sd
+[] 0 sd
+0 slc
+0.977273 0.025858 0.096629 srgb
+n 24.546473 8.767945 m 20.846473 13.980445 l s
+0 slj
+n 20.983359 13.096555 m 20.846473 13.980445 l 21.635717 13.559619 l f
+/Courier-latin1 ff 0.500000 scf sf
+0.000000 0.000000 0.000000 srgb
+(Events) dup sw 2 div 22.886473 ex sub 8.180445 m gs 1 -1 sc sh gr
+/Courier-latin1 ff 0.800000 scf sf
+(Panel) dup sw 2 div 17.961473 ex sub 6.205445 m gs 1 -1 sc sh gr
+/Courier-latin1 ff 0.800000 scf sf
+(Attribute) dup sw 2 div 27.186473 ex sub 5.955445 m gs 1 -1 sc sh gr
+(list) dup sw 2 div 27.186473 ex sub 6.755445 m gs 1 -1 sc sh gr
+showpage
diff --git a/doc/src/atk/img/prog_guide_exple1.jpg b/doc/src/atk/img/prog_guide_exple1.jpg
new file mode 100644
index 0000000..9511bc9
Binary files /dev/null and b/doc/src/atk/img/prog_guide_exple1.jpg differ
diff --git a/doc/src/atk/img/prog_guide_exple2.jpg b/doc/src/atk/img/prog_guide_exple2.jpg
new file mode 100644
index 0000000..d57628b
Binary files /dev/null and b/doc/src/atk/img/prog_guide_exple2.jpg differ
diff --git a/doc/src/atk/img/prog_guide_exple3.jpg b/doc/src/atk/img/prog_guide_exple3.jpg
new file mode 100644
index 0000000..982d704
Binary files /dev/null and b/doc/src/atk/img/prog_guide_exple3.jpg differ
diff --git a/doc/src/atk/line.tex b/doc/src/atk/line.tex
new file mode 100644
index 0000000..1ba963f
--- /dev/null
+++ b/doc/src/atk/line.tex
@@ -0,0 +1,6 @@
+\begin{flushleft}
+\begin{picture}(0,0)
+\thicklines
+\put(0,0){\line(1,0){400}}
+\end{picture}
+\end{flushleft}
diff --git a/doc/src/atk/programmersguid.lyx b/doc/src/atk/programmersguid.lyx
new file mode 100644
index 0000000..f89a996
--- /dev/null
+++ b/doc/src/atk/programmersguid.lyx
@@ -0,0 +1,4373 @@
+#LyX 1.6.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 345
+\begin_document
+\begin_header
+\textclass Tango_book
+\begin_preamble
+\usepackage{a4wide}
+\end_preamble
+\use_default_options false
+\language english
+\inputencoding latin1
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_amsmath 1
+\use_esint 0
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\secnumdepth 5
+\tocdepth 4
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\author "" 
+\author "" 
+\end_header
+
+\begin_body
+
+\begin_layout Chapter
+TangoATK Programmer's Guide
+\end_layout
+
+\begin_layout Standard
+This chapter is only a brief Tango ATK (Application ToolKit) programmer's
+ guide.
+ You can find a reference guide with a full description of TangoATK classes
+ and methods in the ATK JavaDoc 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "ATK-doc"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+A tutorial document 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "ATK-Tutorial"
+
+\end_inset
+
+ is also provided and includes the detailed description of the ATK architecture
+ and the ATK components.
+ In the ATK Tutorial 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "ATK-Tutorial"
+
+\end_inset
+
+ you can find some code examples and also Flash Demos which explain how
+ to start using Tango ATK.
+\end_layout
+
+\begin_layout Section
+Introduction
+\end_layout
+
+\begin_layout Standard
+This document describes how to develop applications using the Tango Application
+ Toolkit, TangoATK for short.
+ It will start with a brief description of the main concepts behind the
+ toolkit, and then continue with more practical, real-life examples to explain
+ key parts.
+\end_layout
+
+\begin_layout Subsection
+Assumptions
+\end_layout
+
+\begin_layout Standard
+The author assumes that the reader has a good knowledge of the Java programming
+ language, and a thorough understanding of object-oriented programming.
+ Also, it is expected that the reader is fluent in all aspects regarding
+ Tango devices, attributes, and commands.
+\end_layout
+
+\begin_layout Section
+The key concepts of TangoATK
+\end_layout
+
+\begin_layout Standard
+TangoATK was developed with these goals in mind
+\end_layout
+
+\begin_layout Itemize
+TangoATK should help minimize development time 
+\end_layout
+
+\begin_layout Itemize
+TangoATK should help minimize bugs in applications 
+\end_layout
+
+\begin_layout Itemize
+TangoATK should support applications that contain attributes and commands
+ from several different devices.
+ 
+\end_layout
+
+\begin_layout Itemize
+TangoATK should help avoid code duplication.
+ 
+\end_layout
+
+\begin_layout Standard
+Since most Tango-applications were foreseen to be displayed on some sort
+ of graphic terminal, TangoATK needed to provide support for some sort of
+ graphic building blocks.
+ To enable this, and since the toolkit was to be written in Java, we looked
+ to Swing to figure out how to do this.
+\end_layout
+
+\begin_layout Standard
+Swing is developed using a variant over a design-pattern the Model-View-Controll
+er
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Model-View-Controller
+\end_layout
+
+\end_inset
+
+ (MVC
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+MVC
+\end_layout
+
+\end_inset
+
+) pattern called 
+\emph on
+model-delegate
+\emph default
+, where the view and the controller of the MVC-pattern are merged into one
+ object.
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Graphics
+	filename img/core-widget.eps
+	scale 60
+
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This pattern made the choice of labor division quite easy: all non-graphic
+ parts of TangoATK reside in the packages beneath 
+\family typewriter
+fr.esrf.tangoatk.core
+\family default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+model
+\end_layout
+
+\end_inset
+
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+core
+\end_layout
+
+\end_inset
+
+, and anything remotely graphic are located beneath 
+\family typewriter
+fr.esrf.tangoatk.widge
+\family default
+t
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+viewer
+\end_layout
+
+\end_inset
+
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+widget
+\end_layout
+
+\end_inset
+
+.
+ More on the content and organization of this will follow.
+\end_layout
+
+\begin_layout Standard
+The communication between the non-graphic and graphic objects are done by
+ having the graphic object registering itself as a listener to the non-graphic
+ object, and the non-graphic object emmiting events telling the listeners
+ that its state has changed.
+\end_layout
+
+\begin_layout Subsection
+Minimize development time
+\end_layout
+
+\begin_layout Standard
+For TangoATK to help minimize the development time of graphic applications,
+ the toolkit has been developed along two lines of thought
+\end_layout
+
+\begin_layout Itemize
+Things that are needed in most applications are included, eg 
+\family typewriter
+Splash
+\family default
+, a splash
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+splash
+\end_layout
+
+\end_inset
+
+ window which gives a graphical way for the application to show the progress
+ of a long operation.
+ The splash window is moslty used in the startup phase of the application.
+\end_layout
+
+\begin_layout Itemize
+Building blocks provided by TangoATK should be easy to use and follow certain
+ patterns, eg every graphic widget has a 
+\family typewriter
+setModel
+\family default
+ method which is used to connect the widget with its non-graphic model.
+ 
+\end_layout
+
+\begin_layout Standard
+In addition to this, TangoATK provides a framework for error handling, something
+ that is often a time consuming task.
+\end_layout
+
+\begin_layout Subsection
+Minimize bugs in applications
+\end_layout
+
+\begin_layout Standard
+Together with the Tango API, TangoATK takes care of most of the hard things
+ related to programming with Tango.
+ Using TangoATK the developer can focus on developing her application, not
+ on understanding Tango.
+\end_layout
+
+\begin_layout Subsection
+Attributes and commands from different devices
+\end_layout
+
+\begin_layout Standard
+To be able to create applications with attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attributes
+\end_layout
+
+\end_inset
+
+ and commands
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+commands
+\end_layout
+
+\end_inset
+
+ from different devices, it was decided that the central objects of TangoATK
+ were not to be the device
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+device
+\end_layout
+
+\end_inset
+
+, but rather the 
+\emph on
+attributes and the commands
+\emph default
+.
+ This will certainly feel a bit awkward at first, but trust me, the design
+ holds.
+\end_layout
+
+\begin_layout Standard
+For this design to be feasible, a structure was needed to keep track of
+ the commands and attributes, so the 
+\emph on
+command-list
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-list
+\end_layout
+
+\end_inset
+
+ and the attribute-list
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribte-list
+\end_layout
+
+\end_inset
+
+
+\emph default
+ was introduced.
+ These two objects can hold commands and attributes from any number of devices.
+\end_layout
+
+\begin_layout Subsection
+Avoid code duplication
+\end_layout
+
+\begin_layout Standard
+When writing applications for a control-system without a framework much
+ code is duplicated.
+ Anything from simple widgets for showing numeric values to error handling
+ has to be implemented each time.
+ TangoATK supplies a number of frequently used widgets along with a framework
+ for connecting these widgets with their non-graphic counterparts.
+ Because of this, the developer only needs to write the 
+\emph on
+glue
+\emph default
+ - the code which connects these objects in a manner that suits the specified
+ application.
+\end_layout
+
+\begin_layout Section
+The real getting started
+\end_layout
+
+\begin_layout Standard
+Generally there are two kinds of end-user applications: Applications that
+ only know how to treat one device, and applications that treat many devices.
+\end_layout
+
+\begin_layout Subsection
+Single device applications
+\end_layout
+
+\begin_layout Standard
+Single device applications are quite easy to write, even with a gui.
+ The following steps are required
+\end_layout
+
+\begin_layout Enumerate
+Instantiate an AttributeList
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AttributeList
+\end_layout
+
+\end_inset
+
+ and fill it with the attributes you want.
+ 
+\end_layout
+
+\begin_layout Enumerate
+Instantiate a CommandList
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CommandList
+\end_layout
+
+\end_inset
+
+ and fill it with the commands you want.
+ 
+\end_layout
+
+\begin_layout Enumerate
+Connect the whole 
+\emph on
+AttributeList
+\emph default
+ with a 
+\emph on
+list viewer
+\emph default
+ and / or each 
+\emph on
+individual attribute
+\emph default
+ with an 
+\emph on
+attribute viewer
+\emph default
+.
+ 
+\end_layout
+
+\begin_layout Enumerate
+Connect the whole 
+\emph on
+CommandList
+\emph default
+ to a 
+\emph on
+command list viewer
+\emph default
+ and / or connect each 
+\emph on
+individual command
+\emph default
+ in the command list with a 
+\emph on
+command viewer
+\emph default
+.
+ 
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Graphics
+	filename img/listpanel.eps
+	scale 60
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The following program (FirstApplication)
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ScalarListViewer
+\end_layout
+
+\end_inset
+
+ shows an implementation of the list mentioned above.
+ It should be rather self-explanatory with the comments.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+package examples;
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+import javax.swing.JFrame;
+\end_layout
+
+\begin_layout LyX-Code
+import javax.swing.JMenuItem;
+\end_layout
+
+\begin_layout LyX-Code
+import javax.swing.JMenuBar;
+\end_layout
+
+\begin_layout LyX-Code
+import javax.swing.JMenu;
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+import java.awt.event.ActionListener;
+\end_layout
+
+\begin_layout LyX-Code
+import java.awt.event.ActionEvent;
+\end_layout
+
+\begin_layout LyX-Code
+import java.awt.BorderLayout;
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.core.AttributeList;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.core.ConnectionException;
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.core.CommandList;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.widget.util.ErrorHistory;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.widget.util.ATKGraphicsUtils;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.widget.attribute.ScalarListViewer;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.widget.command.CommandComboViewer;
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+public class FirstApplication extends JFrame
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+JMenuBar menu;                    // So that our application looks
+\end_layout
+
+\begin_layout LyX-Code
+                                  // halfway decent.
+\end_layout
+
+\begin_layout LyX-Code
+AttributeList attributes;         // The list that will contain our
+\end_layout
+
+\begin_layout LyX-Code
+                                  // attributes
+\end_layout
+
+\begin_layout LyX-Code
+CommandList commands;             // The list that will contain our
+\end_layout
+
+\begin_layout LyX-Code
+                                  // commands
+\end_layout
+
+\begin_layout LyX-Code
+ErrorHistory errorHistory;        // A window that displays errors
+\end_layout
+
+\begin_layout LyX-Code
+ScalarListViewer sListViewer;     // A viewer which knows how to
+\end_layout
+
+\begin_layout LyX-Code
+                                  // display a list of scalar attributes.
+\end_layout
+
+\begin_layout LyX-Code
+                                  // If you want to display other types
+\end_layout
+
+\begin_layout LyX-Code
+                                  // than scalars, you'll have to wait
+\end_layout
+
+\begin_layout LyX-Code
+                                  // for the next example.
+\end_layout
+
+\begin_layout LyX-Code
+CommandComboViewer commandViewer; // A viewer which knows how to display
+\end_layout
+
+\begin_layout LyX-Code
+                                  // a combobox of commands and execute
+\end_layout
+
+\begin_layout LyX-Code
+                                  // them.
+\end_layout
+
+\begin_layout LyX-Code
+String device;                    // The name of our device.
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+public FirstApplication()
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   // The swing stuff to create the menu bar and its pulldown menus
+\end_layout
+
+\begin_layout LyX-Code
+   menu = new JMenuBar();
+\end_layout
+
+\begin_layout LyX-Code
+   JMenu fileMenu = new JMenu();
+\end_layout
+
+\begin_layout LyX-Code
+   fileMenu.setText("File");   
+\end_layout
+
+\begin_layout LyX-Code
+   JMenu viewMenu = new JMenu();
+\end_layout
+
+\begin_layout LyX-Code
+   viewMenu.setText("View");
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+   JMenuItem quitItem = new JMenuItem();
+\end_layout
+
+\begin_layout LyX-Code
+   quitItem.setText("Quit");
+\end_layout
+
+\begin_layout LyX-Code
+   quitItem.addActionListener(new 
+\end_layout
+
+\begin_layout LyX-Code
+      java.awt.event.ActionListener()
+\end_layout
+
+\begin_layout LyX-Code
+      {                 
+\end_layout
+
+\begin_layout LyX-Code
+       public void
+\end_layout
+
+\begin_layout LyX-Code
+       actionPerformed(ActionEvent evt)
+\end_layout
+
+\begin_layout LyX-Code
+       {quitItemActionPerformed(evt);}
+\end_layout
+
+\begin_layout LyX-Code
+      });
+\end_layout
+
+\begin_layout LyX-Code
+   fileMenu.add(quitItem);
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+   JMenuItem errorHistItem = new JMenuItem();
+\end_layout
+
+\begin_layout LyX-Code
+   errorHistItem.setText("Error History");
+\end_layout
+
+\begin_layout LyX-Code
+   errorHistItem.addActionListener(new 
+\end_layout
+
+\begin_layout LyX-Code
+           java.awt.event.ActionListener()
+\end_layout
+
+\begin_layout LyX-Code
+           {                 
+\end_layout
+
+\begin_layout LyX-Code
+            public void 
+\end_layout
+
+\begin_layout LyX-Code
+            actionPerformed(ActionEvent evt)
+\end_layout
+
+\begin_layout LyX-Code
+            {errHistItemActionPerformed(evt);}
+\end_layout
+
+\begin_layout LyX-Code
+           });
+\end_layout
+
+\begin_layout LyX-Code
+   viewMenu.add(errorHistItem);
+\end_layout
+
+\begin_layout LyX-Code
+   menu.add(fileMenu);
+\end_layout
+
+\begin_layout LyX-Code
+   menu.add(viewMenu);
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+   //
+\end_layout
+
+\begin_layout LyX-Code
+   // Here we create ATK objects to handle attributes, commands and errors.
+\end_layout
+
+\begin_layout LyX-Code
+   //
+\end_layout
+
+\begin_layout LyX-Code
+   attributes = new AttributeList(); 
+\end_layout
+
+\begin_layout LyX-Code
+   commands = new CommandList();
+\end_layout
+
+\begin_layout LyX-Code
+   errorHistory = new ErrorHistory();
+\end_layout
+
+\begin_layout LyX-Code
+   device = "id14/eh3_mirror/1";
+\end_layout
+
+\begin_layout LyX-Code
+   sListViewer = new ScalarListViewer();
+\end_layout
+
+\begin_layout LyX-Code
+   commandViewer = new CommandComboViewer();
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+// 
+\end_layout
+
+\begin_layout LyX-Code
+// A feature of the command and attribute list is that if you
+\end_layout
+
+\begin_layout LyX-Code
+// supply an errorlistener to these lists, they'll add that
+\end_layout
+
+\begin_layout LyX-Code
+// errorlistener to all subsequently created attributes or
+\end_layout
+
+\begin_layout LyX-Code
+// commands.
+ So it is important to do this _before_ you
+\end_layout
+
+\begin_layout LyX-Code
+// start adding attributes or commands.
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+   attributes.addErrorListener(errorHistory);
+\end_layout
+
+\begin_layout LyX-Code
+   commands.addErrorListener(errorHistory);
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+// Sometimes we're out of luck and the device or the attributes
+\end_layout
+
+\begin_layout LyX-Code
+// are not available.
+ In that case a ConnectionException is thrown.
+\end_layout
+
+\begin_layout LyX-Code
+// This is why we add the attributes in a try/catch
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+   try
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+// Another feature of the attribute and command list is that they
+\end_layout
+
+\begin_layout LyX-Code
+// can add wildcard names, currently only `*' is supported.
+\end_layout
+
+\begin_layout LyX-Code
+// When using a wildcard, the lists will add all commands or
+\end_layout
+
+\begin_layout LyX-Code
+// attributes available on the device.
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+   attributes.add(device + "/*");
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+   catch (ConnectionException ce)
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+      System.out.println("Error fetching " + 
+\end_layout
+
+\begin_layout LyX-Code
+                         "attributes from " +
+\end_layout
+
+\begin_layout LyX-Code
+                         device + " " + ce);
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+// See the comments for attributelist
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+   try
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+      commands.add(device + "/*");
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+   catch (ConnectionException ce)
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+      System.out.println("Error fetching " +
+\end_layout
+
+\begin_layout LyX-Code
+                         "commands from " +
+\end_layout
+
+\begin_layout LyX-Code
+                         device + " " + ce);
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+// Here we tell the scalarViewer what it's to show.
+ The
+\end_layout
+
+\begin_layout LyX-Code
+// ScalarListViewer loops through the attribute-list and picks out
+\end_layout
+
+\begin_layout LyX-Code
+// the ones which are scalars and show them.
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+   sListViewer.setModel(attributes);
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+// This is where the CommandComboViewer is told what it's to
+\end_layout
+
+\begin_layout LyX-Code
+// show.
+ It knows how to show and execute most commands.
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+   commandViewer.setModel(commands);
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+// add the menubar to the frame
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+   setJMenuBar(menu);
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+// Make the layout nice.
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+   getContentPane().setLayout(new BorderLayout());
+\end_layout
+
+\begin_layout LyX-Code
+   getContentPane().add(commandViewer, BorderLayout.NORTH);
+\end_layout
+
+\begin_layout LyX-Code
+   getContentPane().add(sListViewer, BorderLayout.SOUTH);
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+// A third feature of the attributelist is that it knows how
+\end_layout
+
+\begin_layout LyX-Code
+// to refresh its attributes.
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+   attributes.startRefresher();
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+// JFrame stuff to make the thing show.
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+   pack();
+\end_layout
+
+\begin_layout LyX-Code
+   ATKGraphicsUtils.centerFrameOnScreen(this); //ATK utility to center window
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+   setVisible(true);
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+   public static void main(String [] args)
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+      new FirstApplication();
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+   public void quitItemActionPerformed(ActionEvent evt)
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+      System.exit(0);
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+   public void errHistItemActionPerformed(ActionEvent evt)
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+      errorHistory.setVisible(true);
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The program should look something like this (depending on your platform
+ and your device)
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Graphics
+	filename img/prog_guide_exple1.jpg
+	scale 75
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Multi device applications
+\end_layout
+
+\begin_layout Standard
+Multi device applications are quite similar to the single device applications,
+ the only difference is that it does not suffice to add the attributes by
+ wildcard, you need to add them explicitly, like this: 
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+try
+\end_layout
+
+\begin_layout LyX-Code
+{ 
+\end_layout
+
+\begin_layout LyX-Code
+    // a StringScalar attribute from the device one
+\end_layout
+
+\begin_layout LyX-Code
+   attributes.add("jlp/test/1/att_cinq");
+\end_layout
+
+\begin_layout LyX-Code
+   // a NumberSpectrum attribute from the device one
+\end_layout
+
+\begin_layout LyX-Code
+   attributes.add("jlp/test/1/att_spectrum");
+\end_layout
+
+\begin_layout LyX-Code
+   // a NumberImage attribute from the device two
+\end_layout
+
+\begin_layout LyX-Code
+   attributes.add("sr/d-ipc/id25-1n/Image");
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+catch (ConnectionException ce)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   System.out.println("Error fetching " + 
+\end_layout
+
+\begin_layout LyX-Code
+       "attributes" + ce);
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The same goes for commands.
+\end_layout
+
+\begin_layout Subsection
+More on displaying attributes
+\end_layout
+
+\begin_layout Standard
+So far, we've only considered scalar
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+scalar
+\end_layout
+
+\end_inset
+
+ attributes, and not only that, we've also cheated quite a bit since we
+ just passed the attribute list to the 
+\family typewriter
+fr.esrf.tangoatk.widget.attribute.ScalarListViewer
+\family default
+ and let it do all the magic.
+ The attribute list viewers are only available for scalar attributes (NumberScal
+arListViewer
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+NumberScalarListViewer
+\end_layout
+
+\end_inset
+
+ and ScalarListViewer
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ScalarListViewer
+\end_layout
+
+\end_inset
+
+).
+ If you have one or several spectrum
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+spectrum
+\end_layout
+
+\end_inset
+
+ or image
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+image
+\end_layout
+
+\end_inset
+
+ attributes you must connect each spectrum or image attribute to it's correspond
+ing attribute viewer individually.
+ So let's take a look at how you can connect individual attributes (and
+ not a whole attribute list) to an individual attribute viewer (and not
+ to an attribute list viewer).
+\end_layout
+
+\begin_layout Subsubsection
+Connecting an attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+model
+\end_layout
+
+\end_inset
+
+ to a viewer
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+viewer
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Generally it is done in the following way:
+\end_layout
+
+\begin_layout Enumerate
+You retrieve the attribute from the attribute list 
+\end_layout
+
+\begin_layout Enumerate
+You instantiate the viewer 
+\end_layout
+
+\begin_layout Enumerate
+Your call the 
+\family typewriter
+setModel
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+setModel
+\end_layout
+
+\end_inset
+
+
+\family default
+ method on the viewer with the attribute as argument.
+ 
+\end_layout
+
+\begin_layout Enumerate
+You add your viewer to some panel
+\end_layout
+
+\begin_layout Standard
+The following example (SecondApplication)
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SimpleScalarViewer
+\end_layout
+
+\end_inset
+
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+NumberImageViewer
+\end_layout
+
+\end_inset
+
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+NumberSpectrumViewer
+\end_layout
+
+\end_inset
+
+, is a Multi-device application.
+ Since this application uses individual attribute viewers and not an attribute
+ list viewer, it shows an implementation of the list mentioned above.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+package examples;
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+import javax.swing.JFrame;
+\end_layout
+
+\begin_layout LyX-Code
+import javax.swing.JMenuItem;
+\end_layout
+
+\begin_layout LyX-Code
+import javax.swing.JMenuBar;
+\end_layout
+
+\begin_layout LyX-Code
+import javax.swing.JMenu;
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+import java.awt.event.ActionListener;
+\end_layout
+
+\begin_layout LyX-Code
+import java.awt.event.ActionEvent;
+\end_layout
+
+\begin_layout LyX-Code
+import java.awt.BorderLayout;
+\end_layout
+
+\begin_layout LyX-Code
+import java.awt.Color;
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.core.AttributeList;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.core.ConnectionException;
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.core.IStringScalar;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.core.INumberSpectrum;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.core.INumberImage;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.widget.util.ErrorHistory;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.widget.util.Gradient;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.widget.util.ATKGraphicsUtils;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.widget.attribute.NumberImageViewer;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.widget.attribute.NumberSpectrumViewer;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.widget.attribute.SimpleScalarViewer;
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+public class SecondApplication extends JFrame
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+     JMenuBar            menu;
+\end_layout
+
+\begin_layout LyX-Code
+     AttributeList       attributes;   // The list that will contain our
+ attributes
+\end_layout
+
+\begin_layout LyX-Code
+     ErrorHistory        errorHistory; // A window that displays errors
+\end_layout
+
+\begin_layout LyX-Code
+     IStringScalar        ssAtt;
+\end_layout
+
+\begin_layout LyX-Code
+     INumberSpectrum      nsAtt;
+\end_layout
+
+\begin_layout LyX-Code
+     INumberImage         niAtt;
+\end_layout
+
+\begin_layout LyX-Code
+     public SecondApplication()
+\end_layout
+
+\begin_layout LyX-Code
+     {
+\end_layout
+
+\begin_layout LyX-Code
+        // Swing stuff to create the menu bar and its pulldown menus
+\end_layout
+
+\begin_layout LyX-Code
+        menu = new JMenuBar();
+\end_layout
+
+\begin_layout LyX-Code
+        JMenu fileMenu = new JMenu();
+\end_layout
+
+\begin_layout LyX-Code
+        fileMenu.setText("File");   
+\end_layout
+
+\begin_layout LyX-Code
+        JMenu viewMenu = new JMenu();
+\end_layout
+
+\begin_layout LyX-Code
+        viewMenu.setText("View");
+\end_layout
+
+\begin_layout LyX-Code
+        JMenuItem quitItem = new JMenuItem();
+\end_layout
+
+\begin_layout LyX-Code
+        quitItem.setText("Quit");
+\end_layout
+
+\begin_layout LyX-Code
+        quitItem.addActionListener(new java.awt.event.ActionListener()
+\end_layout
+
+\begin_layout LyX-Code
+                                      {                 
+\end_layout
+
+\begin_layout LyX-Code
+                                       public void actionPerformed(ActionEvent
+ evt)
+\end_layout
+
+\begin_layout LyX-Code
+                                       {quitItemActionPerformed(evt);}
+\end_layout
+
+\begin_layout LyX-Code
+                                      });
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+        fileMenu.add(quitItem);
+\end_layout
+
+\begin_layout LyX-Code
+        JMenuItem errorHistItem = new JMenuItem();
+\end_layout
+
+\begin_layout LyX-Code
+        errorHistItem.setText("Error History");
+\end_layout
+
+\begin_layout LyX-Code
+        errorHistItem.addActionListener(new java.awt.event.ActionListener()
+\end_layout
+
+\begin_layout LyX-Code
+                {                 
+\end_layout
+
+\begin_layout LyX-Code
+                 public void actionPerformed(ActionEvent evt)
+\end_layout
+
+\begin_layout LyX-Code
+                 {errHistItemActionPerformed(evt);}
+\end_layout
+
+\begin_layout LyX-Code
+                });
+\end_layout
+
+\begin_layout LyX-Code
+        viewMenu.add(errorHistItem);
+\end_layout
+
+\begin_layout LyX-Code
+        menu.add(fileMenu);
+\end_layout
+
+\begin_layout LyX-Code
+        menu.add(viewMenu);
+\end_layout
+
+\begin_layout LyX-Code
+      //
+\end_layout
+
+\begin_layout LyX-Code
+      // Here we create TangoATK objects to view attributes and errors.
+\end_layout
+
+\begin_layout LyX-Code
+      //
+\end_layout
+
+\begin_layout LyX-Code
+        attributes = new AttributeList(); 
+\end_layout
+
+\begin_layout LyX-Code
+        errorHistory = new ErrorHistory();
+\end_layout
+
+\begin_layout LyX-Code
+      //
+\end_layout
+
+\begin_layout LyX-Code
+      // We create a SimpleScalarViewer, a NumberSpectrumViewer and
+\end_layout
+
+\begin_layout LyX-Code
+      // a NumberImageViewer, since we already knew that we were
+\end_layout
+
+\begin_layout LyX-Code
+      // playing with a scalar attribute, a number spectrum attribute
+\end_layout
+
+\begin_layout LyX-Code
+      // and a number image attribute this time.
+\end_layout
+
+\begin_layout LyX-Code
+      //
+\end_layout
+
+\begin_layout LyX-Code
+      SimpleScalarViewer     ssViewer = new SimpleScalarViewer();
+\end_layout
+
+\begin_layout LyX-Code
+        NumberSpectrumViewer   nSpectViewer = new NumberSpectrumViewer();
+\end_layout
+
+\begin_layout LyX-Code
+        NumberImageViewer      nImageViewer = new NumberImageViewer();
+\end_layout
+
+\begin_layout LyX-Code
+        attributes.addErrorListener(errorHistory);
+\end_layout
+
+\begin_layout LyX-Code
+     //
+\end_layout
+
+\begin_layout LyX-Code
+     // The attribute (and command) list has the feature of returning the
+ last
+\end_layout
+
+\begin_layout LyX-Code
+     // attribute that was added to it.
+ Just remember that it is returned as an
+\end_layout
+
+\begin_layout LyX-Code
+     // IEntity object, so you need to cast it into a more specific object,
+ like
+\end_layout
+
+\begin_layout LyX-Code
+     // IStringScalar, which is the interface which defines a string scalar
+\end_layout
+
+\begin_layout LyX-Code
+     //
+\end_layout
+
+\begin_layout LyX-Code
+       try
+\end_layout
+
+\begin_layout LyX-Code
+        {
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+           ssAtt = (IStringScalar) attributes.add("jlp/test/1/att_cinq");
+\end_layout
+
+\begin_layout LyX-Code
+           nsAtt = (INumberSpectrum) attributes.add("jlp/test/1/att_spectrum");
+\end_layout
+
+\begin_layout LyX-Code
+           niAtt = (INumberImage) attributes.add("sr/d-ipc/id25-1n/Image");
+\end_layout
+
+\begin_layout LyX-Code
+        }
+\end_layout
+
+\begin_layout LyX-Code
+        catch (ConnectionException ce)
+\end_layout
+
+\begin_layout LyX-Code
+        {
+\end_layout
+
+\begin_layout LyX-Code
+           System.out.println("Error fetching one of the attributes  "+" "
+ + ce);
+\end_layout
+
+\begin_layout LyX-Code
+           System.out.println("Application Aborted.");
+\end_layout
+
+\begin_layout LyX-Code
+           System.exit(0);
+\end_layout
+
+\begin_layout LyX-Code
+        }        
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        // Pay close attention to the following three lines!! This is how
+ it's done!
+\end_layout
+
+\begin_layout LyX-Code
+        // This is how it's always done! The setModel
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+setModel
+\end_layout
+
+\end_inset
+
+ method of any viewer takes care
+\end_layout
+
+\begin_layout LyX-Code
+       // of connecting the viewer to the attribute (model) it's in charge
+ of displaying.
+\end_layout
+
+\begin_layout LyX-Code
+       // This is the way to tell each viewer what (which attribute) it
+ has to show.
+\end_layout
+
+\begin_layout LyX-Code
+       // Note that we use a viewer adapted to each type of attribute
+\end_layout
+
+\begin_layout LyX-Code
+       //
+\end_layout
+
+\begin_layout LyX-Code
+        ssViewer.setModel(ssAtt);
+\end_layout
+
+\begin_layout LyX-Code
+        nSpectViewer.setModel(nsAtt);
+\end_layout
+
+\begin_layout LyX-Code
+        nImageViewer.setModel(niAtt);
+\end_layout
+
+\begin_layout LyX-Code
+     //
+\end_layout
+
+\begin_layout LyX-Code
+        nSpectViewer.setPreferredSize(new java.awt.Dimension(400, 300));
+\end_layout
+
+\begin_layout LyX-Code
+        nImageViewer.setPreferredSize(new java.awt.Dimension(500, 300));
+\end_layout
+
+\begin_layout LyX-Code
+        Gradient  g = new Gradient();
+\end_layout
+
+\begin_layout LyX-Code
+        g.buidColorGradient();
+\end_layout
+
+\begin_layout LyX-Code
+        g.setColorAt(0,Color.black);
+\end_layout
+
+\begin_layout LyX-Code
+        nImageViewer.setGradient(g);
+\end_layout
+
+\begin_layout LyX-Code
+        nImageViewer.setBestFit(true);
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        // Add the viewers into the frame to show them
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        getContentPane().setLayout(new BorderLayout());
+\end_layout
+
+\begin_layout LyX-Code
+        getContentPane().add(ssViewer, BorderLayout.SOUTH);
+\end_layout
+
+\begin_layout LyX-Code
+        getContentPane().add(nSpectViewer, BorderLayout.CENTER);
+\end_layout
+
+\begin_layout LyX-Code
+        getContentPane().add(nImageViewer, BorderLayout.EAST);
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        // To have the attributes values refreshed we should start the
+\end_layout
+
+\begin_layout LyX-Code
+        // attribute list's refresher.
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        attributes.startRefresher();
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        // add the menubar to the frame
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        setJMenuBar(menu);
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        // JFrame stuff to make the thing show.
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        pack();
+\end_layout
+
+\begin_layout LyX-Code
+        ATKGraphicsUtils.centerFrameOnScreen(this); //ATK utility to center
+ window
+\end_layout
+
+\begin_layout LyX-Code
+        setVisible(true);
+\end_layout
+
+\begin_layout LyX-Code
+     }
+\end_layout
+
+\begin_layout LyX-Code
+     public static void main(String [] args)
+\end_layout
+
+\begin_layout LyX-Code
+     {
+\end_layout
+
+\begin_layout LyX-Code
+        new SecondApplication();
+\end_layout
+
+\begin_layout LyX-Code
+     }
+\end_layout
+
+\begin_layout LyX-Code
+     public void quitItemActionPerformed(ActionEvent evt)
+\end_layout
+
+\begin_layout LyX-Code
+     {
+\end_layout
+
+\begin_layout LyX-Code
+        System.exit(0);
+\end_layout
+
+\begin_layout LyX-Code
+     }
+\end_layout
+
+\begin_layout LyX-Code
+     public void errHistItemActionPerformed(ActionEvent evt)
+\end_layout
+
+\begin_layout LyX-Code
+     {
+\end_layout
+
+\begin_layout LyX-Code
+        errorHistory.setVisible(true);
+\end_layout
+
+\begin_layout LyX-Code
+     }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This program (SeondApplication) should look something like this (depending
+ on your platform and your device attributes)
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Graphics
+	filename img/prog_guide_exple2.jpg
+	lyxscale 75
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Subsubsection
+Synoptic
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Synoptic
+\end_layout
+
+\end_inset
+
+ viewer
+\end_layout
+
+\begin_layout Standard
+TangoATK provides a generic class to view and to animate the synoptics.
+ The name of this class is fr.esrf.tangoatk.widget.jdraw.SynopticFileViewer
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SynopticFileViewer
+\end_layout
+
+\end_inset
+
+.
+ This class is based on a 
+\begin_inset Quotes eld
+\end_inset
+
+home-made
+\begin_inset Quotes erd
+\end_inset
+
+ graphical layer called jdraw
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+jdraw
+\end_layout
+
+\end_inset
+
+.
+ The jdraw package is also included inside TangoATK distribution.
+\end_layout
+
+\begin_layout Standard
+SynopticFileViewer is a sub-class of the class TangoSynopticHandler.
+ All the work for connection to tango devices and run time animation is
+ done inside the TangoSynopticHandler.
+\end_layout
+
+\begin_layout Standard
+The recipe for using the TangoATK synoptic viewer is the following
+\end_layout
+
+\begin_layout Enumerate
+You use Jdraw graphical editor to draw your synoptic 
+\end_layout
+
+\begin_layout Enumerate
+During drawing phase don't forget to associate parts of the drawing to tango
+ attributes or commands.
+ Use the 
+\begin_inset Quotes eld
+\end_inset
+
+name
+\begin_inset Quotes erd
+\end_inset
+
+ in the property window to do this
+\end_layout
+
+\begin_layout Enumerate
+During drawing phase you can also aasociate a class (frequently a 
+\begin_inset Quotes eld
+\end_inset
+
+specific panel
+\begin_inset Quotes erd
+\end_inset
+
+ class) which will be displayed when the user clicks on some part of the
+ drawing.
+ Use the 
+\begin_inset Quotes eld
+\end_inset
+
+extension
+\begin_inset Quotes erd
+\end_inset
+
+ tab in the property window to do this.
+\end_layout
+
+\begin_layout Enumerate
+Test the run-time behaviour of your synoptic.
+ Use 
+\begin_inset Quotes eld
+\end_inset
+
+Tango Synoptic view
+\begin_inset Quotes erd
+\end_inset
+
+ command in the 
+\begin_inset Quotes eld
+\end_inset
+
+views
+\begin_inset Quotes erd
+\end_inset
+
+ pulldown menu to do this.
+\end_layout
+
+\begin_layout Enumerate
+Save the drawing file.
+\end_layout
+
+\begin_layout Enumerate
+There is a simple synoptic application (SynopticAppli) which is provided
+ ready to use.
+ If this generic application is enough for you, you can forget about the
+ step 7.
+\end_layout
+
+\begin_layout Enumerate
+You can now develop a specific TangoATK based application which instantiates
+ the SynopticFileViewer.
+ To load the synoptic file in the SynopticFileViewer you have the choice
+ : either you load it by giving the absolute path name of the synoptic file
+ or you load the synoptic file using Java input streams.
+ The second solution is used when the synoptic file is included inside the
+ application jarfile.
+\end_layout
+
+\begin_layout Standard
+The SynopticFilerViewer will browse the objects in the synoptic file at
+ run time.
+ It discovers if some parts of the drawing is associated with an attribute
+ or a command.
+ In this case it will automatically connect to the corresponding attribute
+ or command.
+ Once the connection is successfull SynopticFileViewer will animate the
+ synoptic according to the default behaviour described below :
+\end_layout
+
+\begin_layout Itemize
+For 
+\emph on
+tango state attributes
+\emph default
+ : the colour of the drawing object reflects the value of the state.
+ A mouse click on the drawing object associated with the tango state attribute
+ will instantiate and display the class specified during the drawing phase.
+ If no class is specified the atkpanel generic device panel is displayed.
+\end_layout
+
+\begin_layout Itemize
+For 
+\emph on
+tango attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attributes
+\end_layout
+
+\end_inset
+
+
+\emph default
+ : the current value of the attribute is displayed through the drawing object
+\end_layout
+
+\begin_layout Itemize
+For 
+\emph on
+tango commands
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+commands
+\end_layout
+
+\end_inset
+
+
+\emph default
+ : the mouse click on the drawing object associated with the command will
+ launch the device command.
+\end_layout
+
+\begin_layout Itemize
+If the tooltip
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+tooltip
+\end_layout
+
+\end_inset
+
+ property is set to 
+\begin_inset Quotes eld
+\end_inset
+
+name
+\begin_inset Quotes erd
+\end_inset
+
+ when the mouse enters 
+\emph on
+any tango object
+\emph default
+ ( attribute or command), inside the synoptic drawing the name of the tango
+ object is displayed in a tooltip.
+\end_layout
+
+\begin_layout Standard
+The following example (ThirdApplication), is a Synoptic
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SynopticFileViewer
+\end_layout
+
+\end_inset
+
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Synoptic
+\end_layout
+
+\end_inset
+
+ application.
+ We assume that the synoptic has already been drawn using Jdraw graphical
+ editor.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+package examples;
+\end_layout
+
+\begin_layout LyX-Code
+import java.io.*;
+\end_layout
+
+\begin_layout LyX-Code
+import java.util.*;
+\end_layout
+
+\begin_layout LyX-Code
+import javax.swing.JFrame;
+\end_layout
+
+\begin_layout LyX-Code
+import javax.swing.JMenuItem;
+\end_layout
+
+\begin_layout LyX-Code
+import javax.swing.JMenuBar;
+\end_layout
+
+\begin_layout LyX-Code
+import javax.swing.JMenu;
+\end_layout
+
+\begin_layout LyX-Code
+import java.awt.event.ActionListener;
+\end_layout
+
+\begin_layout LyX-Code
+import java.awt.event.ActionEvent;
+\end_layout
+
+\begin_layout LyX-Code
+import java.awt.BorderLayout;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.widget.util.ErrorHistory;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.widget.util.ATKGraphicsUtils;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.widget.jdraw.SynopticFileViewer;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.tangoatk.widget.jdraw.TangoSynopticHandler;
+\end_layout
+
+\begin_layout LyX-Code
+public class ThirdApplication extends JFrame
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+     JMenuBar              menu;
+\end_layout
+
+\begin_layout LyX-Code
+     ErrorHistory          errorHistory;  // A window that displays errors
+\end_layout
+
+\begin_layout LyX-Code
+     SynopticFileViewer    sfv;           // TangoATK generic synoptic viewer
+\end_layout
+
+\begin_layout LyX-Code
+     
+\end_layout
+
+\begin_layout LyX-Code
+     
+\end_layout
+
+\begin_layout LyX-Code
+     public ThirdApplication()
+\end_layout
+
+\begin_layout LyX-Code
+     {
+\end_layout
+
+\begin_layout LyX-Code
+        // Swing stuff to create the menu bar and its pulldown menus
+\end_layout
+
+\begin_layout LyX-Code
+        menu = new JMenuBar();
+\end_layout
+
+\begin_layout LyX-Code
+        JMenu fileMenu = new JMenu();
+\end_layout
+
+\begin_layout LyX-Code
+        fileMenu.setText("File");   
+\end_layout
+
+\begin_layout LyX-Code
+        JMenu viewMenu = new JMenu();
+\end_layout
+
+\begin_layout LyX-Code
+        viewMenu.setText("View");
+\end_layout
+
+\begin_layout LyX-Code
+        JMenuItem quitItem = new JMenuItem();
+\end_layout
+
+\begin_layout LyX-Code
+        quitItem.setText("Quit");
+\end_layout
+
+\begin_layout LyX-Code
+        quitItem.addActionListener(new java.awt.event.ActionListener()
+\end_layout
+
+\begin_layout LyX-Code
+                                      {                 
+\end_layout
+
+\begin_layout LyX-Code
+                                       public void actionPerformed(ActionEvent
+ evt)
+\end_layout
+
+\begin_layout LyX-Code
+                                       {quitItemActionPerformed(evt);}
+\end_layout
+
+\begin_layout LyX-Code
+                                      });
+\end_layout
+
+\begin_layout LyX-Code
+        fileMenu.add(quitItem);
+\end_layout
+
+\begin_layout LyX-Code
+        JMenuItem errorHistItem = new JMenuItem();
+\end_layout
+
+\begin_layout LyX-Code
+        errorHistItem.setText("Error History");
+\end_layout
+
+\begin_layout LyX-Code
+        errorHistItem.addActionListener(new java.awt.event.ActionListener()
+\end_layout
+
+\begin_layout LyX-Code
+                {                 
+\end_layout
+
+\begin_layout LyX-Code
+                 public void actionPerformed(ActionEvent evt)
+\end_layout
+
+\begin_layout LyX-Code
+                 {errHistItemActionPerformed(evt);}
+\end_layout
+
+\begin_layout LyX-Code
+                });
+\end_layout
+
+\begin_layout LyX-Code
+        viewMenu.add(errorHistItem);
+\end_layout
+
+\begin_layout LyX-Code
+        menu.add(fileMenu);
+\end_layout
+
+\begin_layout LyX-Code
+        menu.add(viewMenu);
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        // Here we create TangoATK synoptic viewer and error window.
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        errorHistory = new ErrorHistory();
+\end_layout
+
+\begin_layout LyX-Code
+        sfv = new SynopticFileViewer();
+\end_layout
+
+\begin_layout LyX-Code
+        try
+\end_layout
+
+\begin_layout LyX-Code
+        {
+\end_layout
+
+\begin_layout LyX-Code
+            sfv.setErrorWindow(errorHistory);
+\end_layout
+
+\begin_layout LyX-Code
+        }
+\end_layout
+
+\begin_layout LyX-Code
+        catch (Exception setErrwExcept)
+\end_layout
+
+\begin_layout LyX-Code
+        {
+\end_layout
+
+\begin_layout LyX-Code
+            System.out.println("Cannot set Error History Window");
+\end_layout
+
+\begin_layout LyX-Code
+        }
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+        //      
+\end_layout
+
+\begin_layout LyX-Code
+        // Here we define the name of the synoptic file to show and the
+ tooltip mode to use
+\end_layout
+
+\begin_layout LyX-Code
+        //        
+\end_layout
+
+\begin_layout LyX-Code
+        try
+\end_layout
+
+\begin_layout LyX-Code
+        {     
+\end_layout
+
+\begin_layout LyX-Code
+          sfv.setJdrawFileName("/users/poncet/ATK_OLD/jdraw_files/id14.jdw");
+\end_layout
+
+\begin_layout LyX-Code
+          sfv.setToolTipMode (TangoSynopticHandler.TOOL_TIP_NAME);
+\end_layout
+
+\begin_layout LyX-Code
+        }
+\end_layout
+
+\begin_layout LyX-Code
+        catch (FileNotFoundException  fnfEx)
+\end_layout
+
+\begin_layout LyX-Code
+        {
+\end_layout
+
+\begin_layout LyX-Code
+           javax.swing.JOptionPane.showMessageDialog(
+\end_layout
+
+\begin_layout LyX-Code
+              null, "Cannot find the synoptic file : id14.jdw.
+\backslash
+n"
+\end_layout
+
+\begin_layout LyX-Code
+                   + "Check the file name you entered;"
+\end_layout
+
+\begin_layout LyX-Code
+                   + " Application will abort ...
+\backslash
+n"
+\end_layout
+
+\begin_layout LyX-Code
+                   + fnfEx,
+\end_layout
+
+\begin_layout LyX-Code
+                   "No such file",
+\end_layout
+
+\begin_layout LyX-Code
+                   javax.swing.JOptionPane.ERROR_MESSAGE);
+\end_layout
+
+\begin_layout LyX-Code
+           System.exit(-1);
+\end_layout
+
+\begin_layout LyX-Code
+        }
+\end_layout
+
+\begin_layout LyX-Code
+        catch (IllegalArgumentException  illEx)
+\end_layout
+
+\begin_layout LyX-Code
+        {
+\end_layout
+
+\begin_layout LyX-Code
+           javax.swing.JOptionPane.showMessageDialog(
+\end_layout
+
+\begin_layout LyX-Code
+              null, "Cannot parse the synoptic file : id14.jdw.
+\backslash
+n"
+\end_layout
+
+\begin_layout LyX-Code
+                   + "Check if the file is a Jdraw file."
+\end_layout
+
+\begin_layout LyX-Code
+                   + " Application will abort ...
+\backslash
+n"
+\end_layout
+
+\begin_layout LyX-Code
+                   + illEx,
+\end_layout
+
+\begin_layout LyX-Code
+                   "Cannot parse the file",
+\end_layout
+
+\begin_layout LyX-Code
+                   javax.swing.JOptionPane.ERROR_MESSAGE);
+\end_layout
+
+\begin_layout LyX-Code
+           System.exit(-1);
+\end_layout
+
+\begin_layout LyX-Code
+        }
+\end_layout
+
+\begin_layout LyX-Code
+        catch (MissingResourceException  mrEx)
+\end_layout
+
+\begin_layout LyX-Code
+        {
+\end_layout
+
+\begin_layout LyX-Code
+           javax.swing.JOptionPane.showMessageDialog(
+\end_layout
+
+\begin_layout LyX-Code
+              null, "Cannot parse the synoptic file : id14.jdw.
+\backslash
+n"
+\end_layout
+
+\begin_layout LyX-Code
+                   + " Application will abort ...
+\backslash
+n"
+\end_layout
+
+\begin_layout LyX-Code
+                   + mrEx,
+\end_layout
+
+\begin_layout LyX-Code
+                   "Cannot parse the file",
+\end_layout
+
+\begin_layout LyX-Code
+                   javax.swing.JOptionPane.ERROR_MESSAGE);
+\end_layout
+
+\begin_layout LyX-Code
+           System.exit(-1);
+\end_layout
+
+\begin_layout LyX-Code
+        }
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        // Add the viewers into the frame to show them
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        getContentPane().setLayout(new BorderLayout());
+\end_layout
+
+\begin_layout LyX-Code
+        getContentPane().add(sfv, BorderLayout.CENTER);
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        // add the menubar to the frame
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        setJMenuBar(menu);
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        // JFrame stuff to make the thing show.
+\end_layout
+
+\begin_layout LyX-Code
+        //
+\end_layout
+
+\begin_layout LyX-Code
+        pack();
+\end_layout
+
+\begin_layout LyX-Code
+        ATKGraphicsUtils.centerFrameOnScreen(this); //TangoATK utility to
+ center window
+\end_layout
+
+\begin_layout LyX-Code
+        setVisible(true);
+\end_layout
+
+\begin_layout LyX-Code
+     }
+\end_layout
+
+\begin_layout LyX-Code
+     public static void main(String [] args)
+\end_layout
+
+\begin_layout LyX-Code
+     {
+\end_layout
+
+\begin_layout LyX-Code
+        new ThirdApplication();
+\end_layout
+
+\begin_layout LyX-Code
+     }
+\end_layout
+
+\begin_layout LyX-Code
+     public void quitItemActionPerformed(ActionEvent evt)
+\end_layout
+
+\begin_layout LyX-Code
+     {
+\end_layout
+
+\begin_layout LyX-Code
+        System.exit(0);
+\end_layout
+
+\begin_layout LyX-Code
+     }
+\end_layout
+
+\begin_layout LyX-Code
+     public void errHistItemActionPerformed(ActionEvent evt)
+\end_layout
+
+\begin_layout LyX-Code
+     {
+\end_layout
+
+\begin_layout LyX-Code
+        errorHistory.setVisible(true);
+\end_layout
+
+\begin_layout LyX-Code
+     }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The synoptic
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+synoptic
+\end_layout
+
+\end_inset
+
+ application (ThirdApplication) should look something like this (depending
+ on your synoptic drawing file)
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Graphics
+	filename img/prog_guide_exple3.jpg
+	lyxscale 75
+	scale 40
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+A short note on the relationship between models and viewers
+\end_layout
+
+\begin_layout Standard
+As seen in the examples above, the connection between a model
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+model
+\end_layout
+
+\end_inset
+
+ and its viewer
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+viewer
+\end_layout
+
+\end_inset
+
+ is generally done by calling 
+\family typewriter
+setModel
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+setModel
+\end_layout
+
+\end_inset
+
+(model
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+model
+\end_layout
+
+\end_inset
+
+)
+\family default
+ on the viewer
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+viewer
+\end_layout
+
+\end_inset
+
+, it is never explained what happens behind the scenes when this is done.
+\end_layout
+
+\begin_layout Subsubsection
+Listeners
+\end_layout
+
+\begin_layout Standard
+Most of the viewers
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+viewer
+\end_layout
+
+\end_inset
+
+ implement some sort of 
+\emph on
+listener
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+listener
+\end_layout
+
+\end_inset
+
+
+\emph default
+ interface, eg INumberScalarListener
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+INumberScalarListener
+\end_layout
+
+\end_inset
+
+.
+ An object implementing such a listener interface has the capability of
+ receiving and treating 
+\emph on
+events
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+event
+\end_layout
+
+\end_inset
+
+
+\emph default
+ from a model
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+model
+\end_layout
+
+\end_inset
+
+ which emits events.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+// this is the setModel of a SimpleScalarViewer
+\end_layout
+
+\begin_layout LyX-Code
+  public void setModel
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+setModel
+\end_layout
+
+\end_inset
+
+(INumberScalar scalar) {
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+    clearModel();
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+    if (scalar != null) {
+\end_layout
+
+\begin_layout LyX-Code
+      format = scalar.getProperty("format").getPresentation();
+\end_layout
+
+\begin_layout LyX-Code
+      numberModel = scalar;
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+   // this is where the viewer connects itself to the 
+\end_layout
+
+\begin_layout LyX-Code
+   // model.
+ After this the viewer will (hopefully) receive 
+\end_layout
+
+\begin_layout LyX-Code
+   // events through its numberScalarChange() method
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+   numberModel.addNumberScalarListener(this);
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+      
+\end_layout
+
+\begin_layout LyX-Code
+        numberModel.getProperty("format").addPresentationListener(this);
+\end_layout
+
+\begin_layout LyX-Code
+      numberModel.getProperty("unit").addPresentationListener(this);
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+  }
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+// Each time the model of this viewer (the numberscalar attribute) decides
+ it is time, it 
+\end_layout
+
+\begin_layout LyX-Code
+// calls the numberScalarChange method of all its registered listeners
+\end_layout
+
+\begin_layout LyX-Code
+// with a NumberScalarEvent object which contains the 
+\end_layout
+
+\begin_layout LyX-Code
+// the new value of the numberscalar attribute.
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  public void numberScalarChange(NumberScalarEvent evt) {
+\end_layout
+
+\begin_layout LyX-Code
+    String val;
+\end_layout
+
+\begin_layout LyX-Code
+    val = getDisplayString(evt);
+\end_layout
+
+\begin_layout LyX-Code
+    if (unitVisible) {
+\end_layout
+
+\begin_layout LyX-Code
+      setText(val + " " + numberModel.getUnit());
+\end_layout
+
+\begin_layout LyX-Code
+    } else {
+\end_layout
+
+\begin_layout LyX-Code
+      setText(val);
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+  }
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+All listeners in TangoATK implement the 
+\family typewriter
+IErrorListener
+\family default
+ interface which specifies the 
+\family typewriter
+errorChange(ErrorEvent e)
+\family default
+ method.
+ This means that all listeners are forced to handle errors in some way or
+ another.
+\end_layout
+
+\begin_layout Section
+The key objects of TangoATK
+\end_layout
+
+\begin_layout Standard
+As seen from the examples above, the key objects of TangoATK are the 
+\family typewriter
+CommandList
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CommandList
+\end_layout
+
+\end_inset
+
+
+\family default
+ and the 
+\family typewriter
+AttributeList
+\family default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AttributeList
+\end_layout
+
+\end_inset
+
+.
+ These two classes inherit from the abstract class 
+\family typewriter
+AEntityList
+\family default
+ which implements all of the common functionality between the two lists.
+ These lists use the functionality of the 
+\family typewriter
+CommandFactory
+\family default
+, the 
+\family typewriter
+AttributeFactory
+\family default
+, which both derive from 
+\family typewriter
+AEntityFactory,
+\family default
+ and the 
+\family typewriter
+DeviceFactory
+\family default
+.
+\end_layout
+
+\begin_layout Standard
+In addition to these factories and lists there is one (for the time being)
+ other important functionality lurking around, the refreshers.
+\end_layout
+
+\begin_layout Subsection
+The Refreshers
+\end_layout
+
+\begin_layout Standard
+The refreshers
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+refresher
+\end_layout
+
+\end_inset
+
+, represented in TangoATK by the 
+\family typewriter
+Refresher
+\family default
+ object, is simply a subclass of 
+\family typewriter
+java.lang.Thread
+\family default
+ which will sleep for a given amount of time and then call a method refresh
+ on whatever kind of 
+\family typewriter
+IRefreshee
+\family default
+ it has been given as parameter, as shown below
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+// This is an example from DeviceFactory.
+\end_layout
+
+\begin_layout LyX-Code
+// We create a new Refresher with the name "device"
+\end_layout
+
+\begin_layout LyX-Code
+// We add ourself to it, and start the thread
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+Refresher refresher = new Refresher("device");
+\end_layout
+
+\begin_layout LyX-Code
+refresher.addRefreshee(this).start();
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Both the 
+\family typewriter
+AttributeList
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AttributeList
+\end_layout
+
+\end_inset
+
+
+\family default
+ and the 
+\family typewriter
+DeviceFactory
+\family default
+ implement the 
+\family typewriter
+IRefreshee
+\family default
+ interface which specify only one method, 
+\family typewriter
+refresh()
+\family default
+, and can thus be refreshed by the 
+\family typewriter
+Refresher
+\family default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+refresher
+\end_layout
+
+\end_inset
+
+.
+ Even if the new release of TangoATK is based on the Tango Events
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+event
+\end_layout
+
+\end_inset
+
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango-Event
+\end_layout
+
+\end_inset
+
+, the refresher mecanisme will not be removed.
+ As a matter of fact, the method refresh() implemented in 
+\noun on
+AttributeList
+\noun default
+ skips all attributes (members of the list) for which the subscribe
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+subscribe
+\end_layout
+
+\end_inset
+
+ to the tango event has succeeded and calls the old refresh() method for
+ the others (for which subscribe to tango events has failed).
+ 
+\end_layout
+
+\begin_layout Standard
+In a first stage this will allow the TangoATK applications to mix the use
+ of the old tango device servers (which do not implement tango events) and
+ the new ones in the same code.
+ In other words, TangoATK subscribes for tango events if possible otherwise
+ TangoATK will refresh the attributes through the old refresher mecanisme.
+\end_layout
+
+\begin_layout Standard
+Another reason for keeping the refresher is that the subscribe event can
+ fail even for the attributes of the new Tango device servers.
+ As soon as the specified attribute is not polled the Tango events cannot
+ be generated for that attribute.
+ Therefore the event subscription will fail.
+ In this case the attribute will be refreshed thanks to the ATK attribute
+ list refresher.
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+AttributePolledList
+\family default
+ class allows the application programmer to force explicitly the use of
+ the refresher method for all attributes added in an AttributePolledList
+ even if the corresponding device servers implement tango events.
+ Some viewers (fr.esrf.tangoatk.widget.attribute.Trend) need an AttributePolledList
+ in order to force the refresh of the attribute without using tango events.
+\end_layout
+
+\begin_layout Subsubsection
+What happens on a refresh
+\end_layout
+
+\begin_layout Standard
+When 
+\family typewriter
+refresh
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+refresh
+\end_layout
+
+\end_inset
+
+
+\family default
+ is called on the 
+\family typewriter
+AttributeList
+\family default
+ and the 
+\family typewriter
+DeviceFactory
+\family default
+, they loop through their objects, 
+\family typewriter
+IAttributes
+\family default
+ and 
+\family typewriter
+IDevices
+\family default
+, respectively, and ask them to refresh themselves if they are not event
+ driven.
+\end_layout
+
+\begin_layout Standard
+When 
+\noun on
+AttributeFactory
+\noun default
+, creates an 
+\family typewriter
+IAttribute
+\family default
+, TangoATK tries to subscribe for Tango Change event for that attribute.
+ If the subscription succeeds then the attribute is marked as event driven.
+ If the subscription for Tango Change event fails, TangoATK tries to subscribe
+ for Tango Periodic event.
+ If the subscription succeeds then the attribute is marked as event driven.
+ If the subscription fails then the attribute is marked as to be 
+\begin_inset Quotes eld
+\end_inset
+
+ without events
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+In the 
+\noun on
+refresh()
+\noun default
+ method of the 
+\noun on
+AttributeList
+\noun default
+ during the loop through the objects if the object is marked event driven
+ then the object is simply skipped.
+ But if the object (attribute) is not marked as event driven, the 
+\noun on
+refresh()
+\noun default
+ method of the 
+\noun on
+AttributeList
+\noun default
+, asks the object to refresh itself by calling the 
+\begin_inset Quotes eld
+\end_inset
+
+
+\noun on
+refresh()
+\noun default
+
+\begin_inset Quotes erd
+\end_inset
+
+ method of that object (attribute or device).
+ The 
+\noun on
+refresh()
+\noun default
+ method of an attribute will in turn call the 
+\begin_inset Quotes eld
+\end_inset
+
+readAttribute
+\begin_inset Quotes erd
+\end_inset
+
+ on the Tango device.
+\end_layout
+
+\begin_layout Standard
+The result of this is that the 
+\family typewriter
+IAttributes
+\family default
+ fire off events to their registered listeners
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+listener
+\end_layout
+
+\end_inset
+
+ containing snapshots of their state.
+ The events are fired either because the 
+\noun on
+IAttribute
+\noun default
+ has received a Tango Change event, respectively a Tango Periodic event
+ (event driven objects), or because the 
+\noun on
+refresh()
+\noun default
+ method of the object has issued a readAttribute on the Tango device.
+\end_layout
+
+\begin_layout Subsection
+The DeviceFactory
+\end_layout
+
+\begin_layout Standard
+The device factory is responsible for two things
+\end_layout
+
+\begin_layout Enumerate
+Creating new devices (Tango device proxies) when needed 
+\end_layout
+
+\begin_layout Enumerate
+Refreshing the state and status of these devices 
+\end_layout
+
+\begin_layout Standard
+Regarding the first point, new devices are created when they are asked for
+ and only if they have not already been created.
+ If a programmer asks for the same device twice, she is returned a reference
+ to the same device-object.
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+DeviceFactory
+\family default
+ contains a Refresher as described above, which makes sure that the all
+ 
+\family sans
+Devices
+\family default
+ in the 
+\family sans
+DeviceFactory
+\family default
+ updates their state and status and fire events to its listeners.
+\end_layout
+
+\begin_layout Subsection
+The AttributeFactory and the CommandFactory
+\end_layout
+
+\begin_layout Standard
+These factories are responsible for taking a name of an attribute or command
+ and returning an object representing the attribute or command.
+ It is also responsible for making sure that the appropriate 
+\family typewriter
+IDevice
+\family default
+ is already available.
+ Normally the programmer does not want to use these factory classes directly.
+ They are used by TangoATK classes indirectly when the application programmer
+ calls the AttributeList's (or CommandList's) 
+\noun on
+add()
+\noun default
+ method.
+\end_layout
+
+\begin_layout Subsection
+The AttributeList
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AttributeList
+\end_layout
+
+\end_inset
+
+ and the CommandList
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CommandList
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+These lists are containers for attributes and commands.
+ They delegate the construction-work to the factories mentioned above, and
+ generally do not do much more, apart from containing refreshers, and thus
+ being able to make the objects they contain refresh their listeners.
+\end_layout
+
+\begin_layout Subsection
+The Attributes
+\end_layout
+
+\begin_layout Standard
+The attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attributes
+\end_layout
+
+\end_inset
+
+ come in several flavors.
+ Tango supports the following types:
+\end_layout
+
+\begin_layout Itemize
+Short 
+\end_layout
+
+\begin_layout Itemize
+Long 
+\end_layout
+
+\begin_layout Itemize
+Double
+\end_layout
+
+\begin_layout Itemize
+String 
+\end_layout
+
+\begin_layout Itemize
+Unsigned Char
+\end_layout
+
+\begin_layout Itemize
+Boolean
+\end_layout
+
+\begin_layout Itemize
+Unsigned Short
+\end_layout
+
+\begin_layout Itemize
+Float
+\end_layout
+
+\begin_layout Itemize
+Unsigned Long
+\end_layout
+
+\begin_layout Standard
+According to Tango specifications, all these types can be of the following
+ formats:
+\end_layout
+
+\begin_layout Itemize
+Scalar, a single value 
+\end_layout
+
+\begin_layout Itemize
+Spectrum, a single array 
+\end_layout
+
+\begin_layout Itemize
+Image, a two dimensional array 
+\end_layout
+
+\begin_layout Standard
+For the sake of simplicity, TangoATK has combined all the numeric types
+ into one, presenting all of them as doubles.
+ So the TangoATK classes which handle the numeric attributes are : NumberScalar,
+ NumberSpectrum and NumberImage (Number can be short, long, double, float,
+ ...).
+\end_layout
+
+\begin_layout Subsubsection
+The hierarchy
+\end_layout
+
+\begin_layout Standard
+The numeric attribute hierarchy is expressed in the following interfaces:
+\end_layout
+
+\begin_layout Description
+INumberScalar extends 
+\series bold
+INumber
+\end_layout
+
+\begin_layout Description
+INumberSpectrum extends 
+\series bold
+INumber
+\end_layout
+
+\begin_layout Description
+INumberImage extends 
+\series bold
+INumber
+\end_layout
+
+\begin_layout Description
+
+\series medium
+and
+\series bold
+ INumber
+\series default
+ in turn extends 
+\series bold
+IAttribute
+\series default
+ 
+\begin_inset space ~
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Each of these types emit their proper events and have their proper listeners.
+ Please consult the javadoc for further information.
+\end_layout
+
+\begin_layout Subsection
+The Commands
+\end_layout
+
+\begin_layout Standard
+The commands
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+commands
+\end_layout
+
+\end_inset
+
+ in Tango are rather ugly beasts.
+ There exists the following kinds of commands
+\end_layout
+
+\begin_layout Itemize
+Those which take input 
+\end_layout
+
+\begin_layout Itemize
+Those which do not take input 
+\end_layout
+
+\begin_layout Itemize
+Those which do output 
+\end_layout
+
+\begin_layout Itemize
+Those which do not do output 
+\end_layout
+
+\begin_layout Standard
+Now, for both input and output we have the following types:
+\end_layout
+
+\begin_layout Itemize
+Double 
+\end_layout
+
+\begin_layout Itemize
+Float
+\end_layout
+
+\begin_layout Itemize
+Unsigned Long
+\end_layout
+
+\begin_layout Itemize
+Long 
+\end_layout
+
+\begin_layout Itemize
+Unsigned Short
+\end_layout
+
+\begin_layout Itemize
+Short 
+\end_layout
+
+\begin_layout Itemize
+String
+\end_layout
+
+\begin_layout Standard
+These types can appear in scalar or array formats.
+ In addition to this, there are also four other types of parameters:
+\end_layout
+
+\begin_layout Enumerate
+Boolean
+\end_layout
+
+\begin_layout Enumerate
+Unsigned Char Array
+\end_layout
+
+\begin_layout Enumerate
+The StringLongArray 
+\end_layout
+
+\begin_layout Enumerate
+The StringDoubleArray 
+\end_layout
+
+\begin_layout Standard
+The last two types mentioned above are two-dimensional arrays containing
+ a string array in the first dimension and a long or double array in the
+ second dimension, respectively.
+\end_layout
+
+\begin_layout Standard
+As for the attributes, all numeric types have been converted into doubles,
+ but there has been made little or no effort to create an hierarchy of types
+ for the commands.
+\end_layout
+
+\begin_layout Subsubsection
+Events
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+event
+\end_layout
+
+\end_inset
+
+ and listeners
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+listener
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The commands publish results to their 
+\family typewriter
+IResultListener
+\family default
+s, by the means of a 
+\family typewriter
+ResultEvent
+\family default
+.
+ The 
+\family typewriter
+IResultListener
+\family default
+ extends 
+\family typewriter
+IErrorListener
+\family default
+, any viewer
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+viewer
+\end_layout
+
+\end_inset
+
+ of command-results should also know how to handle errors.
+ So a viewer of command-results implements IResultListener interface and
+ registers itself as a resultListener for the command it has to show the
+ results.
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset CommandInset label
+LatexCommand label
+name "TwoRicardo"
+
+\end_inset
+
+
+\begin_inset Graphics
+	filename ../dance/0046-reduc.jpg
+	scale 400
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/doc/src/cpp_api/cppapi.lyx b/doc/src/cpp_api/cppapi.lyx
new file mode 100644
index 0000000..9a94c2e
--- /dev/null
+++ b/doc/src/cpp_api/cppapi.lyx
@@ -0,0 +1,20536 @@
+#LyX 1.6.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 345
+\begin_document
+\begin_header
+\textclass Tango_book
+\begin_preamble
+\usepackage{a4wide}
+\end_preamble
+\use_default_options false
+\language english
+\inputencoding latin1
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_amsmath 1
+\use_esint 0
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\secnumdepth 5
+\tocdepth 4
+\paragraph_separation skip
+\defskip medskip
+\quotes_language english
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\author "" 
+\author "" 
+\end_header
+
+\begin_body
+
+\begin_layout Chapter
+The TANGO C++ Application Programmer Interface
+\begin_inset CommandInset label
+LatexCommand label
+name "cha:The-TANGO-C++"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Tango::DeviceProxy()
+\end_layout
+
+\begin_layout Standard
+The high level object which provides the client with an easy-to-use interface
+ to TANGO devices.
+ DeviceProxy is a handle to the real Device (hence the name Proxy) and is
+ not the real Device (of course).
+ DeviceProxy provides interfaces to all TANGO Device interfaces.
+ The DeviceProxy manages timeouts, stateless connections (new DeviceProxy()
+ nearly always works), and reconnection if the device server is restarted.
+\end_layout
+
+\begin_layout Subsection
+Constructors
+\end_layout
+
+\begin_layout Subsubsection
+DeviceProxy::DeviceProxy(string &name, CORBA::ORB *orb=NULL)
+\end_layout
+
+\begin_layout Standard
+Create a DeviceProxy to a device of the specified name.
+ The TANGO_HOST environment variable is used to determine which TANGO database
+ to connect to.
+ The client can specify an ORB as argument if she wants to.
+ The constructor will connect to the TANGO database, query for the client's
+ network address and build a connection to the device.
+ If the device is defined in the TANGO database but the device server is
+ not running DeviceProxy will try to build a connection every time the client
+ tries to access the device.
+ If the device is not defined an exception is thrown.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+DeviceProxy *my_device = new DeviceProxy(
+\begin_inset Quotes eld
+\end_inset
+
+my/own/device
+\begin_inset Quotes erd
+\end_inset
+
+);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+See appendix on device naming for all details about Tango device naming
+ syntax.
+ If an alias
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+alias
+\end_layout
+
+\end_inset
+
+ name is defined for the device, this alias name can be used to create the
+ DeviceProxy instance.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: WrongNameSyntax, ConnectionFailed
+\end_layout
+
+\begin_layout Subsubsection
+DeviceProxy::DeviceProxy(const char *name, CORBA::ORB *orb = NULL)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsection
+Miscellaneous methods
+\end_layout
+
+\begin_layout Subsubsection
+DeviceInfo DeviceProxy::info()
+\end_layout
+
+\begin_layout Standard
+A method which returns information on the device in a DeviceInfo structure.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+cout << " device info : " << endl 
+\end_layout
+
+\begin_layout LyX-Code
+DeviceInfo dev_info = my_device->info() << endl;
+\end_layout
+
+\begin_layout LyX-Code
+cout << " dev_class " << dev_info.dev_class;
+\end_layout
+
+\begin_layout LyX-Code
+cout << " server_id " << dev_info.server_id;
+\end_layout
+
+\begin_layout LyX-Code
+cout << " server_host " << dev_info.server_host;
+\end_layout
+
+\begin_layout LyX-Code
+cout << " server_version " << dev_info.server_version;
+\end_layout
+
+\begin_layout LyX-Code
+cout << " doc_url " << dev_info.doc_url;
+\end_layout
+
+\begin_layout LyX-Code
+cout << " device_type " << dev_info.dev_type;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+All DeviceInfo fields are strings except for the server_version server_version
+ which is a long integer.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: Connection Failed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+DevState DeviceProxy::state()
+\end_layout
+
+\begin_layout Standard
+A method which return the state of the device as a Tango::DevState type.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+dev_state = my_device->state() << endl;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed
+\end_layout
+
+\begin_layout Subsubsection
+string DeviceProxy::status()
+\end_layout
+
+\begin_layout Standard
+A method which return the status of the device as a string.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+cout << "device status " << my_device->status() << endl;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed
+\end_layout
+
+\begin_layout Subsubsection
+int DeviceProxy::ping()
+\end_layout
+
+\begin_layout Standard
+A method which sends a ping to the device and returns the time elapsed as
+ microseconds.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+cout << " device ping took " << my_device->ping() << " microseconds" <<
+ endl;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::set_timeout_millis(int timeout)
+\end_layout
+
+\begin_layout Standard
+Set client side timeout for device in milliseconds.
+ Any method which takes longer than this time to execute will throw an exception.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: none
+\end_layout
+
+\begin_layout Subsubsection
+int DeviceProxy::get_timeout_millis()
+\end_layout
+
+\begin_layout Standard
+Get the client side timeout in milliseconds.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: none
+\end_layout
+
+\begin_layout Subsubsection
+int DeviceProxy::get_idl_version()
+\end_layout
+
+\begin_layout Standard
+Get the version of the Tango Device IDL interface implemented by the device
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: none
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::set_source(DevSource source)
+\end_layout
+
+\begin_layout Standard
+Set the data source (device, polling buffer, polling buffer than device)
+ for command_inout and read_attribute methods.
+ The DevSource is an enumerated type which can be one of {DEV, CACHE, CACHE_DEV}.
+ The default value is CACHE_DEV.
+ See chapter on Advanced Feature for all details regarding polling.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: none
+\end_layout
+
+\begin_layout Subsubsection
+DevSource DeviceProxy::get_source()
+\end_layout
+
+\begin_layout Standard
+Get the device data source used by command_inout or read_attribute methods.
+ The DevSource is an enumerated type which can be one of {DEV, CACHE, CACHE_DEV}.
+ See chapter on Advanced Feature for all details regarding polling.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: none
+\end_layout
+
+\begin_layout Subsubsection
+vector<string> *DeviceProxy::black_box(int n)
+\end_layout
+
+\begin_layout Standard
+Get the last n commands executed on the device server and return a pointer
+ to a vector of strings containing the date, time, command, and from which
+ client computer the command was executed.
+ This method allocates memory for the vector of strings returned to the
+ caller.
+ It is the caller responsibility to delete this memory.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+string DeviceProxy::name()
+\end_layout
+
+\begin_layout Standard
+Return the device name (from the device itself)
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed
+\end_layout
+
+\begin_layout Subsubsection
+string DeviceProxy::adm_name()
+\end_layout
+
+\begin_layout Standard
+Returns the name of the corresponding administrator device.
+ This is useful if you need to send an administration command to the device
+ server e.g.
+ restart it.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed
+\end_layout
+
+\begin_layout Subsubsection
+string DeviceProxy::dev_name()
+\end_layout
+
+\begin_layout Standard
+Return the device name as it is stored locally
+\end_layout
+
+\begin_layout Subsubsection
+string DeviceProxy::description()
+\end_layout
+
+\begin_layout Standard
+Returns the device description as a string.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Subsubsection
+DbDevImportInfo DeviceProxy::import_info()
+\end_layout
+
+\begin_layout Standard
+Query the device for import info from the database.
+ This method returns a DbDevImprtInfo type.
+ The DbDevImportInfo type is a struct defined as follows :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+class DbDevImportInfo { 
+\end_layout
+
+\begin_layout LyX-Code
+public : 
+\end_layout
+
+\begin_layout LyX-Code
+    string name; 
+\end_layout
+
+\begin_layout LyX-Code
+    long exported; 
+\end_layout
+
+\begin_layout LyX-Code
+    string ior; 
+\end_layout
+
+\begin_layout LyX-Code
+    string version; }; 
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: NonDbDevice
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::set_transparency_reconnection(bool flag)
+\end_layout
+
+\begin_layout Standard
+If flag is true, no exception will be thrown in case of network communication
+ error between client and server.
+ The API will try to re-build the network connection between client and
+ server as soon as an error is detected.
+ See 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Reconnection-and-exception"
+
+\end_inset
+
+ more more details on reconnection and exception
+\end_layout
+
+\begin_layout Subsubsection
+bool DeviceProxy::get_transparency_reconnection()
+\end_layout
+
+\begin_layout Standard
+Returns the transparency reconnection flag.
+\end_layout
+
+\begin_layout Subsubsection
+string DeviceProxy::alias()
+\end_layout
+
+\begin_layout Standard
+Returns the device alias name if one is defined otherwise, throws a DevFailed
+ exception with the reason field set to Db_AliasNotDefined.
+\end_layout
+
+\begin_layout Subsection
+Synchronous command oriented methods
+\end_layout
+
+\begin_layout Subsubsection
+CommandInfo DeviceProxy::command_query(string command)
+\end_layout
+
+\begin_layout Standard
+Query the device for information about a single command.
+ This command returns a single CommandInfo type.
+ The CommandInfo type is a struct described in command_list_query().
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+CommandInfoList *DeviceProxy::command_list_query()
+\end_layout
+
+\begin_layout Standard
+Query the device for info on all commands.
+ This method returns a vector of CommandInfo types.
+ This method allocates memory for the vector of CommandInfo returned to
+ the caller.
+ It is the caller responsibility to delete this memory.
+ The CommandInfo type is a struct defined as follows :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+typedef _CommandInfo
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+    string           cmd_name;      /* command name as ascii string */
+\end_layout
+
+\begin_layout LyX-Code
+    long             cmd_tag;       /* command as binary value (for TACO)
+ */
+\end_layout
+
+\begin_layout LyX-Code
+    long             in_type;       /* in type as binary value */
+\end_layout
+
+\begin_layout LyX-Code
+    long             out_type;      /* out type as binary value */
+\end_layout
+
+\begin_layout LyX-Code
+    string           in_type_desc;  /* description of in type (optional)
+ */
+\end_layout
+
+\begin_layout LyX-Code
+    string           out_type_desc; /* description of out type (optional)
+ */
+\end_layout
+
+\begin_layout LyX-Code
+    Tango::DispLevel disp_level;    /* Command display level */
+\end_layout
+
+\begin_layout LyX-Code
+} CommandInfo;
+\end_layout
+
+\begin_layout LyX-Code
+typedef CommandInfoList vector<CommandInfo>;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+DeviceData DeviceProxy::command_inout(string)
+\end_layout
+
+\begin_layout Standard
+Execute a command on a device which takes no input arguments (void).
+ The result is returned in a DeviceData object (cf.
+ below how to insert and extract data from DeviceData).
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DeviceUnlocked, DevFailed
+ from device
+\end_layout
+
+\begin_layout Subsubsection
+DeviceData DeviceProxy::command_inout(const char *)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+DeviceData Deviceproxy::command_inout(string, DeviceData &)
+\end_layout
+
+\begin_layout Standard
+Execute a command on a device.
+ Input arguments are passed in a DeviceData object, output is returned as
+ a DeviceData object (see below on how to insert and extract data from DeviceDat
+a).
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DeviceUnlocked, DevFailed
+ from device
+\end_layout
+
+\begin_layout Subsubsection
+DeviceData DeviceProxy::command_inout(const char *, DeviceData &)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+vector<DeviceDataHistory> *command_history(string &, int)
+\end_layout
+
+\begin_layout Standard
+Retrieve command history from the command polling buffer.
+ The first argument is the command name.
+ The second argument is the wanted history depth.
+ This method returns a vector of DeviceDataHistory types.
+ This method allocates memory for the vector of DeviceDataHistory returned
+ to the caller.
+ It is the caller responsibility to delete this memory.
+ Class DeviceDataHistory is detailed on chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "DataHistory"
+
+\end_inset
+
+.
+ See chapter on Advanced Feature for all details regarding polling.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DeviceProxy dev = new DeviceProxy("..."); 
+\end_layout
+
+\begin_layout LyX-Code
+vector<DeviceDataHistory> *hist;
+\end_layout
+
+\begin_layout LyX-Code
+hist = dev->command_history("Status",5);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+for (int i = 0;i < 5;i++) 
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+{
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+
+\end_layout
+
+\begin_layout LyX-Code
+    bool fail = (*hist)[i].failed();
+\end_layout
+
+\begin_layout LyX-Code
+    if (fail == false)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+        string str;
+\end_layout
+
+\begin_layout LyX-Code
+        (*hist)[i] >> str;
+\end_layout
+
+\begin_layout LyX-Code
+        cout << "Status = " << str << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    else
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+        cout << "Command failed !" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+        cout << "Error level 0 desc = " << ((*hist)[i].errors())[0].desc <<
+ endl;
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    cout << "Date = " << (*hist)[i].date().tv_sec << endl;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+}
+\end_layout
+
+\begin_layout LyX-Code
+delete hist;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+NonSupportedFeature, ConnectionFailed, CommunicationFailed, DevFailed from
+ device
+\end_layout
+
+\begin_layout Subsubsection
+DeviceDataHistoryList *command_history(const char *, int)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsection
+Synchronous attribute related methods
+\end_layout
+
+\begin_layout Subsubsection
+Compatibility between Tango release 4 and release 5 regarding attribute
+ properties
+\end_layout
+
+\begin_layout Standard
+Between Tango V4 and Tango V5, attribute configuration has been modified
+ to incorporate alarm and event related parameters.
+ This explains why it exists two structure types for attribute configuration
+ parameters.
+ All Tango V4 parameters are defined in a structure called 
+\series bold
+AttributeInfo
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AttributeInfo
+\end_layout
+
+\end_inset
+
+
+\series default
+ and a new structure called 
+\series bold
+AttributeInfoEx
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AttributeInfoEx
+\end_layout
+
+\end_inset
+
+ has been defined for all Tango V5 parameters.
+ Nevertheless, AttributeInfoEx inherits from AttributeInfo and it is always
+ possible to call the Tango V5 
+\emph on
+DeviceProxy::attribute_query()
+\emph default
+ method and to store its result in one AttributeInfo structure thus allowing
+ compatibility
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+compatibility
+\end_layout
+
+\end_inset
+
+ for client written for Tango V4 but linked with Tango V5.
+ It is also possible for a client written and linked with Tango V5 to call
+ Tango V5 
+\emph on
+DeviceProxy::attribute_query()
+\emph default
+ method to all kind of Tango devices.
+ For device using Tango V4, the alarm and event related parameters will
+ be retrieved from the database instead of from the device.
+\end_layout
+
+\begin_layout Subsubsection
+AttributeInfoEx DeviceProxy::attribute_query(string attribute)
+\end_layout
+
+\begin_layout Standard
+Query the device for information about a single attribute.
+ This command returns a single AttributeInfoEx type which inherits from
+ the AttributeInfo type.
+ The AttributeInfoEx and AttributeInfo types are structures described in
+ get_attribute_config() and get_attribute_config_ex().
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+AttributeInfoList * DeviceProxy::attribute_list_query()
+\end_layout
+
+\begin_layout Standard
+Query the device for info on all attributes.
+ This method returns a vector of AttributeInfo types.
+ The AttributeInfo type is a structure described in get_attribute_config().
+ This method allocates memory for the vector of AttributeInfo structures
+ returned to the caller.
+ It is the caller responsibility to delete this memory.
+\end_layout
+
+\begin_layout Subsubsection
+AttributeInfoListEx * DeviceProxy::attribute_list_query_ex()
+\end_layout
+
+\begin_layout Standard
+Query the device for info on all attributes.
+ This method returns a vector of AttributeInfoEx types.
+ The AttributeInfoEx type is a structure described in get_attribute_config_ex().
+ This method allocates memory for the vector of AttributeInfoEx structures
+ returned to the caller.
+ It is the caller responsibility to delete this memory.
+\end_layout
+
+\begin_layout Subsubsection
+vector<string> *DeviceProxy::get_attribute_list()
+\end_layout
+
+\begin_layout Standard
+Return the names of all attributes implemented for this device as a vector
+ of strings.
+ This method allocates memory for the vector of strings returned to the
+ caller.
+ It is the caller responsibility to delete this memory.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+AttributeInfoList *DeviceProxy::get_attribute_config(vector<string>&)
+\end_layout
+
+\begin_layout Standard
+Return the attribute configuration for the list of specified attributes.
+ To get all the attributes pass a vector containing the string AllAttr (defined
+ in tango_const.h).
+ This method allocates memory for the vector of AttributeInfo returned to
+ the caller.
+ It is the caller responsibility to delete this memory.
+ AttributeInfo is a struct defined as follows :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+typedef struct _AttributeInfo
+\end_layout
+
+\begin_layout LyX-Code
+{ 
+\end_layout
+
+\begin_layout LyX-Code
+   string             name; 
+\end_layout
+
+\begin_layout LyX-Code
+   AttrWriteType      writable; 
+\end_layout
+
+\begin_layout LyX-Code
+   AttrDataFormat     data_format; 
+\end_layout
+
+\begin_layout LyX-Code
+   int                data_type; 
+\end_layout
+
+\begin_layout LyX-Code
+   int                max_dim_x; 
+\end_layout
+
+\begin_layout LyX-Code
+   int                max_dim_y; 
+\end_layout
+
+\begin_layout LyX-Code
+   string             description; 
+\end_layout
+
+\begin_layout LyX-Code
+   string             label; 
+\end_layout
+
+\begin_layout LyX-Code
+   string             unit; 
+\end_layout
+
+\begin_layout LyX-Code
+   string             standard_unit; 
+\end_layout
+
+\begin_layout LyX-Code
+   string             display_unit; 
+\end_layout
+
+\begin_layout LyX-Code
+   string             format; 
+\end_layout
+
+\begin_layout LyX-Code
+   string             min_value; 
+\end_layout
+
+\begin_layout LyX-Code
+   string             max_value; 
+\end_layout
+
+\begin_layout LyX-Code
+   string             min_alarm; 
+\end_layout
+
+\begin_layout LyX-Code
+   string             max_alarm; 
+\end_layout
+
+\begin_layout LyX-Code
+   string             writable_attr_name; 
+\end_layout
+
+\begin_layout LyX-Code
+   vector<string>     extensions; 
+\end_layout
+
+\begin_layout LyX-Code
+   Tango::DispLevel   disp_level;
+\end_layout
+
+\begin_layout LyX-Code
+} AttributeInfo; 
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+AttributeInfoListEx *DeviceProxy::get_attribute_config_ex(vector<string>&)
+\end_layout
+
+\begin_layout Standard
+Return the extended attribute configuration for the list of specified attributes.
+ To get all the attributes pass a vector containing the string AllAttr (defined
+ in tango_const.h).
+ This method allocates memory for the vector of AttributeInfoEx returned
+ to the caller.
+ It is the caller responsibility to delete this memory.
+ AttributeInfoEx is a structure defined as follows :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+struct AttributeInfoEx: public AttributeInfo
+\end_layout
+
+\begin_layout LyX-Code
+{ 
+\end_layout
+
+\begin_layout LyX-Code
+   AttributeAlarmInfo alarms; 
+\end_layout
+
+\begin_layout LyX-Code
+   AttributeEventInfo events;
+\end_layout
+
+\begin_layout LyX-Code
+   vector<string>     sys_extensions; 
+\end_layout
+
+\begin_layout LyX-Code
+};
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+ 
+\end_layout
+
+\begin_layout LyX-Code
+struct AttributeAlarmInfo
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   string           min_alarm;
+\end_layout
+
+\begin_layout LyX-Code
+   string           max_alarm;
+\end_layout
+
+\begin_layout LyX-Code
+   string           min_warning;
+\end_layout
+
+\begin_layout LyX-Code
+   string           max_warning;
+\end_layout
+
+\begin_layout LyX-Code
+   string           delta_t;
+\end_layout
+
+\begin_layout LyX-Code
+   string           delta_val;
+\end_layout
+
+\begin_layout LyX-Code
+   vector<string>   extensions;
+\end_layout
+
+\begin_layout LyX-Code
+};
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+ 
+\end_layout
+
+\begin_layout LyX-Code
+struct AttributeEventInfo
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   ChangeEventInfo     ch_event;
+\end_layout
+
+\begin_layout LyX-Code
+   PeriodicEventInfo   per_event;
+\end_layout
+
+\begin_layout LyX-Code
+   ArchiveEventInfo    arch_event;
+\end_layout
+
+\begin_layout LyX-Code
+};
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+ 
+\end_layout
+
+\begin_layout LyX-Code
+struct ChangeEventInfo
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   string           rel_change;
+\end_layout
+
+\begin_layout LyX-Code
+   string           abs_change;
+\end_layout
+
+\begin_layout LyX-Code
+   vector<string>   extensions;
+\end_layout
+
+\begin_layout LyX-Code
+};
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+ 
+\end_layout
+
+\begin_layout LyX-Code
+struct PeriodicEventInfo
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   string           period;
+\end_layout
+
+\begin_layout LyX-Code
+   vector<string>   extensions;
+\end_layout
+
+\begin_layout LyX-Code
+};
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+ 
+\end_layout
+
+\begin_layout LyX-Code
+struct ArchiveEventInfo
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   string           archive_rel_change;
+\end_layout
+
+\begin_layout LyX-Code
+   string           archive_abs_change;
+\end_layout
+
+\begin_layout LyX-Code
+   string           archive_period;
+\end_layout
+
+\begin_layout LyX-Code
+   vector<string>   extensions;
+\end_layout
+
+\begin_layout LyX-Code
+};
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+AttributeInfoEx DeviceProxy::get_attribute_config(string&)
+\end_layout
+
+\begin_layout Standard
+Return the attribute configuration for a single attributes.
+ The AttributeInfoEx is a structure defined above.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::set_attribute_config(AttributeInfoList &)
+\end_layout
+
+\begin_layout Standard
+Change the attribute configuration for the specified attributes.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DeviceUnlocked, DevFailed
+ from device
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::set_attribute_config(AttributeInfoListEx &)
+\end_layout
+
+\begin_layout Standard
+Change the attribute configuration for the specified attributes.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DeviceUnlocked, DevFailed
+ from device
+\end_layout
+
+\begin_layout Subsubsection
+vector<DeviceAttribute> *DeviceProxy::read_attributes(vector<string>&)
+\end_layout
+
+\begin_layout Standard
+Read the list of specified attributes.
+ To extract the value you have to use the operator of the class DeviceAttribute
+ which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the attribute native type
+ to user type e.g.
+ if an attribute returns a short you cannot extract it as a double, you
+ have to extract it as a short.
+ By default, if the server reports error for one of the attribute in the
+ list, this error will be passed to the user using exception when he (she)
+ will try to extract the data form the corresponding See sub-chapter on
+ DeviceAttribute to learn how to change this default behaviour.
+ DeviceAttribute object.
+ This method allocates memory for the vector of DeviceAttribute objects
+ returned to the caller.
+ This is the caller responsibility to delete this memory.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+vector<DeviceAttribute> *devattr;
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> attr_names;
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+attr_names.push_back("attribute_1");
+\end_layout
+
+\begin_layout LyX-Code
+attr_names.push_back("attribute_2");
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+devattr = device->read_attributes(attr_names);
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+short short_attr_1;
+\end_layout
+
+\begin_layout LyX-Code
+long long_attr_2;
+\end_layout
+
+\begin_layout LyX-Code
+(*devattr)[0] >> short_attr_1;
+\end_layout
+
+\begin_layout LyX-Code
+(*devattr)[1] >> long_attr_2;
+\end_layout
+
+\begin_layout LyX-Code
+cout << "my_attribute value " << short_attr;
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+delete devattr;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed
+\end_layout
+
+\begin_layout Subsubsection
+DeviceAttribute DeviceProxy::read_attribute(string&)
+\end_layout
+
+\begin_layout Standard
+Read a single attribute.
+ To extract the value you have to use the operator of the class DeviceAttribute
+ which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the attribute native type
+ to user type e.g.
+ if an attribute returns a short you cannot extract it as a double (this
+ will return 0) you have to extract it as a short.
+ See example above.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed
+\end_layout
+
+\begin_layout Subsubsection
+DeviceAttribute DeviceProxy::read_attribute(const char *)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::write_attributes(vector<DeviceAttribute>&)
+\end_layout
+
+\begin_layout Standard
+Write the specified attributes.
+ To insert the values to write you have to use the operator of the DeviceAttribu
+te class which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the user type to the attribute
+ native type e.g.
+ if an attribute expects a short you cannot insert it as a double (this
+ will throw an exception) you have to insert it as a short.
+ Note that this is the only API call which could throw a NamedDevFailedList
+ exception.
+ See 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:The-NamedDevFailedList-exception"
+
+\end_inset
+
+ to get all the details on this exception.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+vector<DeviceAttribute> attr_in;
+\end_layout
+
+\begin_layout LyX-Code
+string att1_name("First_attr");
+\end_layout
+
+\begin_layout LyX-Code
+string att2_name("Second_attr");
+\end_layout
+
+\begin_layout LyX-Code
+short short_attr;
+\end_layout
+
+\begin_layout LyX-Code
+double double_attr; attr_in.push_back(DeviceAttribute(att1_name,short_attr));
+\end_layout
+
+\begin_layout LyX-Code
+attr_in.push_back(DeviceAttribute(att2_name,double_attr));
+\end_layout
+
+\begin_layout LyX-Code
+device->write_attributes(attr_in);
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DeviceUnlocked, DevFailed
+ or NamedDevFailedList
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+NamedDevFailedList
+\end_layout
+
+\end_inset
+
+ from device
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::write_attribute(DeviceAttribute&)
+\end_layout
+
+\begin_layout Standard
+Write a single attribute.
+ To insert the value to write you have to use the operator of the class
+ DeviceAttribute which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the user type to the attribute
+ native type e.g.
+ if an attribute expects a short you cannot insert it as a double (this
+ will throw an exception) you have to insert it as a short.
+ See example above.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DeviceUnlocked, DevFailed
+ from device
+\end_layout
+
+\begin_layout Subsubsection
+DeviceAttribute DeviceProxy::write_read_attribute(DeviceAttribute&)
+\end_layout
+
+\begin_layout Standard
+Write then read a single attribute in a single network call.
+ By default (serialisation by device), the execution of this call in the
+ server can't be interrupted by other clients.
+ To insert/extract the value to write/read you have to use the operator
+ of the class DeviceAttribute which corresponds to the data type of the
+ attribute.
+ NOTE: There is no automatic type conversion from the user type to the attribute
+ native type e.g.
+ if an attribute expects a short you cannot insert it as a double (this
+ will throw an exception) you have to insert it as a short.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DeviceUnlocked, DevFailed
+ from device
+\end_layout
+
+\begin_layout Subsubsection
+vector<DeviceAttributeHistory> *DeviceProxy::attribute_history(string &,
+ int)
+\end_layout
+
+\begin_layout Standard
+Retrieve attribute history from the attribute polling buffer.
+ The first argument is the attribute name.
+ The second argument is the wanted history depth.
+ This method returns a vector of DeviceAttributeHistory types.
+ This method allocates memory for the vector of DeviceAttributeHistory returned
+ to the caller.
+ It is the caller responsibility to delete this memory.
+ Class DeviceAttributeHistory is detailed on chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "AttributeHistory"
+
+\end_inset
+
+See also chapter on Advanced Feature for all details regarding polling.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DeviceProxy dev = new DeviceProxy("..."); 
+\end_layout
+
+\begin_layout LyX-Code
+vector<DeviceAttributeHistory> *hist;
+\end_layout
+
+\begin_layout LyX-Code
+hist = dev->attribute_history("Current",5);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+for (int i = 0;i < 5;i++) 
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+{
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+
+\end_layout
+
+\begin_layout LyX-Code
+    bool fail = (*hist)[i].has_failed();
+\end_layout
+
+\begin_layout LyX-Code
+    if (fail == false)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+        cout << "Attribute name = " << (*hist)[i].get_name() << endl;
+\end_layout
+
+\begin_layout LyX-Code
+        cout << "Attribute quality factor = " << (*hist)[i].get_quality()
+ << endl;
+\end_layout
+
+\begin_layout LyX-Code
+        long value;
+\end_layout
+
+\begin_layout LyX-Code
+        (*hist)[i] >> value;
+\end_layout
+
+\begin_layout LyX-Code
+        cout << "Current = " << value << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    else
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+        cout << "Attribute failed !" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+        cout << "Error level 0 desc = " << ((*hist)[i].get_err_stack())[0].desc
+ << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    cout << "Date = " << (*hist)[i].get_date().tv_sec << endl;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+}
+\end_layout
+
+\begin_layout LyX-Code
+delete hist;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+NonSupportedFeature, ConnectionFailed, CommunicationFailed, DevFailed from
+ device
+\end_layout
+
+\begin_layout Subsubsection
+vector<DeviceAttributeHistory> *DeviceProxy::attribute_history(const char
+ *, int)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsection
+Asynchronous command oriented methods
+\end_layout
+
+\begin_layout Subsubsection
+long DeviceProxy::command_inout_asynch(string &name, bool forget)
+\end_layout
+
+\begin_layout Standard
+Execute asynchronously (polling model) a command on a device which takes
+ no input argument.
+ The last argument is a 
+\emph on
+fire and forget
+\emph default
+ flag.
+ If this flag is set to true, this means that the client does not care at
+ all about the server answer and will even not try to get it.
+ A false default value is provided.
+ Please, note that device re-connection will not take place (in case it
+ is needed) if the fire and forget mode is used.
+ Therefore, an application using only fire and forget requests is not able
+ to automatically re-connnect to device.
+ This call returns an 
+\emph on
+asynchronous call identifier
+\emph default
+ which is needed to get the command result.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed
+\end_layout
+
+\begin_layout Subsubsection
+long DeviceProxy::command_inout_asynch(const char *name, bool forget)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+long DeviceProxy::command_inout_asynch(string &name, DeviceData &argin,
+ bool forget)
+\end_layout
+
+\begin_layout Standard
+Execute asynchronously (polling model) a command on a device.
+ Input arguments are passed in a DeviceData object (see following chapters
+ on how to insert data into DeviceData object).
+ The last argument is a 
+\emph on
+fire and forget
+\emph default
+ flag.
+ If this flag is set to true, this means that the client does not care at
+ all about the server answer and will even not try to get it.
+ A false default value is provided.
+ Please, note that device re-connection will not take place (in case it
+ is needed) if the fire and forget mode is used.
+ Therefore, an application using only fire and forget requests is not able
+ to automatically re-connnect to device.
+ This call returns an 
+\emph on
+asynchronous call identifier
+\emph default
+ which is needed to get the command result.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed
+\end_layout
+
+\begin_layout Subsubsection
+long DeviceProxy::command_inout_asynch(const char *name, Devicedata &argin,
+ bool forget)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+DeviceData DeviceProxy::command_inout_reply(long id)
+\end_layout
+
+\begin_layout Standard
+Check if the answer of an asynchronous command_inout is arrived (polling
+ model).
+ id is the asynchronous call identifier.
+ If the reply is arrived and if it is a valid reply, it is returned to the
+ caller in a DeviceData object.
+ If the reply is an exception, it is re-thrown by this call.
+ An exception is also thrown in case of the reply is not yet arrived.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+        Tango::DeviceProxy dev("...");
+\end_layout
+
+\begin_layout LyX-Code
+        long asyn_id;
+\end_layout
+
+\begin_layout LyX-Code
+        asyn_id = dev.command_inout_asynch("MyCmd");
+\end_layout
+
+\begin_layout LyX-Code
+        ...
+\end_layout
+
+\begin_layout LyX-Code
+        ...
+\end_layout
+
+\begin_layout LyX-Code
+        ...
+\end_layout
+
+\begin_layout LyX-Code
+        Tango::DeviceData arg;
+\end_layout
+
+\begin_layout LyX-Code
+        try
+\end_layout
+
+\begin_layout LyX-Code
+        {
+\end_layout
+
+\begin_layout LyX-Code
+                arg = dev.command_inout_reply(asyn_id);
+\end_layout
+
+\begin_layout LyX-Code
+        }
+\end_layout
+
+\begin_layout LyX-Code
+        catch(Tango::AsynReplyNotArrived)
+\end_layout
+
+\begin_layout LyX-Code
+        {
+\end_layout
+
+\begin_layout LyX-Code
+                cerr << "Command not arrived !" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+        }
+\end_layout
+
+\begin_layout LyX-Code
+        catch (Tango::DevFailed &e)
+\end_layout
+
+\begin_layout LyX-Code
+        {
+\end_layout
+
+\begin_layout LyX-Code
+                Tango::Except::print_exception(e);
+\end_layout
+
+\begin_layout LyX-Code
+        } 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: AsynCall, AsynReplyNotArrived, CommunicationFailed, DevFailed
+ from device
+\end_layout
+
+\begin_layout Subsubsection
+DeviceData DeviceProxy::command_inout_reply(long id, long timeout)
+\end_layout
+
+\begin_layout Standard
+Check if the answer of an asynchronous command_inout is arrived (polling
+ model).
+ id is the asynchronous call identifier.
+ If the reply is arrived and if it is a valid reply, it is returned to the
+ caller in a DeviceData object.
+ If the reply is an exception, it is re-thrown by this call.
+ If the reply is not yet arrived, the call will wait (blocking the process)
+ for the time specified in timeout.
+ If after timeout milliseconds, the reply is still not there, an exception
+ is thrown.
+ If timeout is set to 0, the call waits until the reply arrived.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: AsynCall, AsynReplyNotArrived, CommunicationFailed, DevFailed
+ from device
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::command_inout_asynch(string &name, CallBack &cb)
+\end_layout
+
+\begin_layout Standard
+Execute asynchronously (callback model) a command on a device which takes
+ no input argument.
+ The last argument is a reference to a callback object.
+ This callback object should be an instance of a user class inheriting from
+ the 
+\emph on
+Tango::CallBack
+\emph default
+ class with the 
+\emph on
+cmd_ended()
+\emph default
+ method overloaded.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::command_inout_asynch(const char *name, CallBack &cb)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::command_inout_asynch(string &name, DeviceData &argin,
+ CallBack &cb)
+\end_layout
+
+\begin_layout Standard
+Execute asynchronously (callback model) a command on a device.
+ Input arguments are passed in a DeviceData object (see following chapters
+ on how to insert data into DeviceData object).
+ The last argument is a reference to a callback object.
+ This callback object should be an instance of a user class inheriting from
+ the 
+\emph on
+Tango::CallBack
+\emph default
+ class with the 
+\emph on
+cmd_ended()
+\emph default
+ method overloaded.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::command_inout_asynch(const char *name, DeviceData &argin,
+ Callback &cb)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Subsection
+Asynchronous attribute related methods
+\end_layout
+
+\begin_layout Subsubsection
+long DeviceProxy::read_attribute_asynch(string &name)
+\end_layout
+
+\begin_layout Standard
+Read asynchronously (polling model) a single attribute.
+ This call returns an 
+\emph on
+asynchronous call identifier
+\emph default
+ which is needed to get the attribute value.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed
+\end_layout
+
+\begin_layout Subsubsection
+long DeviceProxy::read_attribute_asynch(const char *name)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+long DeviceProxy::read_attributes_asynch(vector<string> &names)
+\end_layout
+
+\begin_layout Standard
+Read asynchronously (polling model) the list of specified attributes.
+ This call returns an 
+\emph on
+asynchronous call identifier
+\emph default
+ which is needed to get attributes value.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed
+\end_layout
+
+\begin_layout Subsubsection
+DeviceAttribute *DeviceProxy::read_attribute_reply(long id)
+\end_layout
+
+\begin_layout Standard
+Check if the answer of an asynchronous read_attribute is arrived (polling
+ model).
+ id is the asynchronous call identifier.
+ If the reply is arrived and if it is a valid reply, it is returned to the
+ caller in a DeviceAttribute object.
+ If the reply is an exception, it is re-thrown by this call.
+ An exception is also thrown in case of the reply is not yet arrived.
+ To extract attribute value, you have to use the operator of the class DeviceAtt
+ribute which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the attribute native type
+ to user type e.g.
+ if an attribute returns a short you cannot extract it as a double, you
+ have to extract it as a short.
+ Memory has been allocated for the DeviceAttribute object returned to the
+ caller.
+ This is the caller responsibility to delete this memory.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+AsynCall, AsynReplyNotArrived, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+DeviceAttribute *DeviceProxy::read_attribute_reply(long id, long timeout)
+\end_layout
+
+\begin_layout Standard
+Check if the answer of an asynchronous read_attribute is arrived (polling
+ model).
+ id is the asynchronous call identifier.
+ If the reply is arrived and if it is a valid reply, it is returned to the
+ caller in a DeviceAttribute object.
+ If the reply is an exception, it is re-thrown by this call.
+ If the reply is not yet arrived, the call will wait (blocking the process)
+ for the time specified in timeout.
+ If after timeout milliseconds, the reply is still not there, an exception
+ is thrown.
+ If timeout is set to 0, the call waits until the reply arrived.
+ To extract attribute value, you have to use the operator of the class DeviceAtt
+ribute which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the attribute native type
+ to user type e.g.
+ if an attribute returns a short you cannot extract it as a double, you
+ have to extract it as a short.
+ Memory has been allocated for the DeviceAttribute object returned to the
+ caller.
+ This is the caller responsibility to delete this memory.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+AsynCall, AsynReplyNotArrived, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+vector<DeviceAttribute> *DeviceProxy::read_attributes_reply(long id)
+\end_layout
+
+\begin_layout Standard
+Check if the answer of an asynchronous read_attributes is arrived (polling
+ model).
+ id is the asynchronous call identifier.
+ If the reply is arrived and if it is a valid reply, it is returned to the
+ caller in a vector<DeviceAttribute>.
+ If the reply is an exception, it is re-thrown by this call.
+ An exception is also thrown in case of the reply is not yet arrived.
+ To extract attribute value, you have to use the operator of the class DeviceAtt
+ribute which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the attribute native type
+ to user type e.g.
+ if an attribute returns a short you cannot extract it as a double, you
+ have to extract it as a short.
+ Memory has been allocated for the vector<DeviceAttribute> object returned
+ to the caller.
+ This is the caller responsibility to delete this memory.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+AsynCall, AsynReplyNotArrived, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+vector<DeviceAttribute> *DeviceProxy::read_attributes_reply(long id, long
+ timeout)
+\end_layout
+
+\begin_layout Standard
+Check if the answer of an asynchronous read_attributes is arrived (polling
+ model).
+ id is the asynchronous call identifier.
+ If the reply is arrived and if it is a valid reply, it is returned to the
+ caller in a vector<DeviceAttribute>.
+ If the reply is an exception, it is re-thrown by this call.
+ If the reply is not yet arrived, the call will wait (blocking the process)
+ for the time specified in timeout.
+ If after timeout milliseconds, the reply is still not there, an exception
+ is thrown.
+ If timeout is set to 0, the call waits until the reply arrived.
+ To extract attribute value, you have to use the operator of the class DeviceAtt
+ribute which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the attribute native type
+ to user type e.g.
+ if an attribute returns a short you cannot extract it as a double, you
+ have to extract it as a short.
+ Memory has been allocated for the vector<DeviceAttribute> object returned
+ to the caller.
+ This is the caller responsibility to delete this memory.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+AsynCall, AsynReplyNotArrived, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+long DeviceProxy::write_attribute_asynch(DeviceAttribute &argin)
+\end_layout
+
+\begin_layout Standard
+Write asynchronously (polling model) a single attribute.
+ To insert the value to write you have to use the operator of the class
+ DeviceAttribute which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the user type to the attribute
+ native type e.g.
+ if an attribute expects a short you cannot insert it as a double (this
+ will throw an exception) you have to insert it as a short.
+ This call returns an 
+\emph on
+asynchronous call identifier
+\emph default
+ which is needed to get the server reply.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+ConnectionFailed
+\end_layout
+
+\begin_layout Subsubsection
+long DeviceProxy::write_attributes_asynch(vector<DeviceAttribute> &argin)
+\end_layout
+
+\begin_layout Standard
+Write asynchronously (polling model) the specified attributes.
+ To insert the value to write you have to use the operator of the class
+ DeviceAttribute which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the user type to the attribute
+ native type e.g.
+ if an attribute expects a short you cannot insert it as a double (this
+ will throw an exception) you have to insert it as a short.
+ This call returns an 
+\emph on
+asynchronous call identifier
+\emph default
+ which is needed to get the server reply.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+ConnectionFailed
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::write_attribute_reply(long id)
+\end_layout
+
+\begin_layout Standard
+Check if the answer of an asynchronous write_attribute is arrived (polling
+ model).
+ id is the asynchronous call identifier.
+ If the reply is arrived and if it is a valid reply, the call returned.
+ If the reply is an exception, it is re-thrown by this call.
+ An exception is also thrown in case of the reply is not yet arrived.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+AsynCall, AsynReplyNotArrived, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::write_attribute_reply(long id, long timeout)
+\end_layout
+
+\begin_layout Standard
+Check if the answer of an asynchronous write_attribute is arrived (polling
+ model).
+ id is the asynchronous call identifier.
+ If the reply is arrived and if it is a valid reply, the call returned.
+ If the reply is an exception, it is re-thrown by this call.
+ If the reply is not yet arrived, the call will wait (blocking the process)
+ for the time specified in timeout.
+ If after timeout milliseconds, the reply is still not there, an exception
+ is thrown.
+ If timeout is set to 0, the call waits until the reply arrived.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+AsynCall, AsynReplyNotArrived, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::write_attributes_reply(long id)
+\end_layout
+
+\begin_layout Standard
+Check if the answer of an asynchronous write_attributes is arrived (polling
+ model).
+ id is the asynchronous call identifier.
+ If the reply is arrived and if it is a valid reply, the call returned.
+ If the reply is an exception, it is re-thrown by this call.
+ An exception is also thrown in case of the reply is not yet arrived.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+AsynCall, AsynReplyNotArrived, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::write_attributes_reply(long id, long timeout)
+\end_layout
+
+\begin_layout Standard
+Check if the answer of an asynchronous write_attributes is arrived (polling
+ model).
+ id is the asynchronous call identifier.
+ If the reply is arrived and if it is a valid reply, the call returned.
+ If the reply is an exception, it is re-thrown by this call.
+ If the reply is not yet arrived, the call will wait (blocking the process)
+ for the time specified in timeout.
+ If after timeout milliseconds, the reply is still not there, an exception
+ is thrown.
+ If timeout is set to 0, the call waits until the reply arrived.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+AsynCall, AsynReplyNotArrived, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::read_attribute_asynch(string &name, CallBack &cb)
+\end_layout
+
+\begin_layout Standard
+Read asynchronously (callback model) a single attribute.
+ The last argument is a reference to a callback object.
+ This callback object should be an instance of a user class inheriting from
+ the 
+\emph on
+Tango::CallBack
+\emph default
+ class with the 
+\emph on
+attr_read()
+\emph default
+ method overloaded.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+ConnectionFailed
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::read_attribute_asynch(const char *name, CallBack &cb)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::read_attributes_asynch(vector<string> &names, CallBack
+ &cb)
+\end_layout
+
+\begin_layout Standard
+Read asynchronously (callback model) an attribute list.
+ The last argument is a reference to a callback object.
+ This callback object should be an instance of a user class inheriting from
+ the 
+\emph on
+Tango::CallBack
+\emph default
+ class with the 
+\emph on
+attr_read()
+\emph default
+ method overloaded.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+ConnectionFailed
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::write_attribute_asynch(DeviceAttribute &argin, CallBack
+ &cb)
+\end_layout
+
+\begin_layout Standard
+Write asynchronously (callback model) a single attribute.
+ The last argument is a reference to a callback object.
+ This callback object should be an instance of a user class inheriting from
+ the 
+\emph on
+Tango::CallBack
+\emph default
+ class with the 
+\emph on
+attr_written()
+\emph default
+ method overloaded.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+ConnectionFailed
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::write_attributes_asynch(vector<DeviceAttribute> &argin,
+ CallBack &cb)
+\end_layout
+
+\begin_layout Standard
+Write asynchronously (callback model) an attribute list.
+ The last argument is a reference to a callback object.
+ This callback object should be an instance of a user class inheriting from
+ the 
+\emph on
+Tango::CallBack
+\emph default
+ class with the 
+\emph on
+attr_written()
+\emph default
+ method overloaded.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+ConnectionFailed
+\end_layout
+
+\begin_layout Subsection
+Miscellaneous asynchronous related methods
+\end_layout
+
+\begin_layout Subsubsection
+long DeviceProxy::pending_asynch_call(asyn_req_type req)
+\end_layout
+
+\begin_layout Standard
+Return number of device asynchronous pending requests.
+ The input parameter is an enumeration with three values which are:
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+POLLING : Returns only device polling model asynchronous request number
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+CALLBACK : Returns only device callback model asynchronous request number
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+ALL_ASYNCH : Returns device asynchronous request number
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: None
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::get_asynch_replies()
+\end_layout
+
+\begin_layout Standard
+Fire callback methods for device asynchronous requests with already arrived
+ replied.
+ Returns immediately if there is no replies already arrived or if there
+ is no asynchronous request for the device.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+class MyCallBack: Tango::CallBack
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+public:
+\end_layout
+
+\begin_layout LyX-Code
+   MyCallback(double d):data(d) {};
+\end_layout
+
+\begin_layout LyX-Code
+   virtual void cmd_ended(Tango::CmdDoneEvent *);
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+private:
+\end_layout
+
+\begin_layout LyX-Code
+   double data;
+\end_layout
+
+\begin_layout LyX-Code
+};
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+void MyCallBack::cmd_ended(Tango CmdDoneEvent *cmd)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   if (cmd->err == true)
+\end_layout
+
+\begin_layout LyX-Code
+      Tango::Except::print_error_stack(cmd->errors);
+\end_layout
+
+\begin_layout LyX-Code
+   else
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+      short cmd_result;
+\end_layout
+
+\begin_layout LyX-Code
+      cmd->argout >> cmd_result;
+\end_layout
+
+\begin_layout LyX-Code
+      cout << "Command result = " << cmd_result << endl;
+\end_layout
+
+\begin_layout LyX-Code
+      cout << "Callback personal data = " << data << endl;
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+int main(int argc, char *argv[])
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   ....
+\end_layout
+
+\begin_layout LyX-Code
+   ....
+ 
+\end_layout
+
+\begin_layout LyX-Code
+   Tango::DeviceProxy dev("...");
+\end_layout
+
+\begin_layout LyX-Code
+   double my_data = ...;
+\end_layout
+
+\begin_layout LyX-Code
+   MyCallBack cb(my_data);
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+   dev.command_inout_asynch("MyCmd",cb);
+\end_layout
+
+\begin_layout LyX-Code
+   ...
+\end_layout
+
+\begin_layout LyX-Code
+   ...
+\end_layout
+
+\begin_layout LyX-Code
+   ...
+\end_layout
+
+\begin_layout LyX-Code
+   dev.get_asynch_replies();
+\end_layout
+
+\begin_layout LyX-Code
+   ...
+\end_layout
+
+\begin_layout LyX-Code
+   ...
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: None, all errors are reported using the err and errors fields
+ of the parameter passed to the callback method.
+ See chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Asynchronous-callback-related"
+
+\end_inset
+
+ for details.
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::get_asynch_replies(long timeout)
+\end_layout
+
+\begin_layout Standard
+Fire callback methods for device asynchronous requests (command and attributes)
+ with already arrived replied.
+ Wait and block the caller for timeout milliseconds if they are some device
+ asynchronous requests which are not yet arrived.
+ Returns immediately if there is no asynchronous request for the device.
+ If timeout is set to 0, the call waits until all the asynchronous requests
+ sent to the device has received a reply.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: AsynReplyNotArrived.
+ All other errors are reported using the err and errors fields of the object
+ passed to the callback methods.
+ See chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Asynchronous-callback-related"
+
+\end_inset
+
+ for details.
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::cancel_asynch_request(long id)
+\end_layout
+
+\begin_layout Standard
+Cancel a pending asynchronous request.
+ id is the asynchronous call identifier.
+ This is a call local to the client.
+ It simply allows the caller not to get the answer of the asynchronous request.
+ It does not interrupt the call execution on the remote device.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: AsynCall
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::cancel_all_polling_asynch_request()
+\end_layout
+
+\begin_layout Standard
+Cancel all pending polling asynchronous requests.
+ This is a call local to the client.
+ It simply allows the caller not to get the answers of the asynchronous
+ requests.
+ It does not interrupt the call execution on the remote devices.
+\end_layout
+
+\begin_layout Subsection
+Polling related methods
+\end_layout
+
+\begin_layout Subsubsection
+bool DeviceProxy::is_command_polled(string &cmd_name)
+\end_layout
+
+\begin_layout Standard
+Returns true if the command "cmd_name" is polled.
+ Otherwise, returns false.
+\end_layout
+
+\begin_layout Subsubsection
+bool DeviceProxy::is_command_polled(const char *cmd_name)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+bool DeviceProxy::is_attribute_polled(string &attr_name)
+\end_layout
+
+\begin_layout Standard
+Returns true if the attribute "attr_name" is polled.
+ Otherwise, returns false.
+\end_layout
+
+\begin_layout Subsubsection
+bool Deviceproxy::is_attribute_polled(const char *attr_name)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+int DeviceProxy::get_command_poll_period(string &cmd_name)
+\end_layout
+
+\begin_layout Standard
+Returns the command "cmd_name" polling period in mS.
+ If the command is not polled, it returns 0.
+\end_layout
+
+\begin_layout Subsubsection
+int DeviceProxy::get_command_poll_period(const char *cmd_name)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+int DeviceProxy::get_attribute_poll_period(string &attr_name)
+\end_layout
+
+\begin_layout Standard
+Returns the attribute "attr_name" polling period in mS.
+ If the attribute is not polled, it returns 0.
+\end_layout
+
+\begin_layout Subsubsection
+int Deviceproxy::get_attribute_poll_period(const char *attr_name)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+vector<string> *DeviceProxy::polling_status()
+\end_layout
+
+\begin_layout Standard
+Returns the device polling status.
+ There is one string for each polled command/attribute.
+ Each string is multi-line string with :
+\end_layout
+
+\begin_layout Itemize
+The attribute/command name
+\end_layout
+
+\begin_layout Itemize
+The attribute/command polling period (in mS)
+\end_layout
+
+\begin_layout Itemize
+The attribute/command polling ring buffer depth
+\end_layout
+
+\begin_layout Itemize
+The time needed for the last command/attribute execution (in mS)
+\end_layout
+
+\begin_layout Itemize
+The time since data in the ring buffer has not been updated
+\end_layout
+
+\begin_layout Itemize
+The delta time between the last records in the ring buffer
+\end_layout
+
+\begin_layout Itemize
+The exception parameters in case of the last command/attribute execution
+ failed
+\end_layout
+
+\begin_layout Standard
+This method allocates memory for the vector of string(s) returned to the
+ caller.
+ It is the caller responsibility to delete this memory.
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::poll_command(string &cmd_name,int period)
+\end_layout
+
+\begin_layout Standard
+Add the command "cmd_name" to the list of polled command.
+ The polling period is specified by "period" (in mS).
+ If the command is already polled, this method will update the polling period
+ according to "period".
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::poll_command(const char *cmd_name, int period)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::poll_attribute(string &attr_name, int period)
+\end_layout
+
+\begin_layout Standard
+Add the attribute "attr_name" to the list of polled attributes.
+ The polling period is specified by "period" (in mS).
+ If the attribute is already polled, this method will update the polling
+ period according to "period".
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::poll_attribute(const char *attr_name, int period)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::stop_poll_command(string &cmd_name)
+\end_layout
+
+\begin_layout Standard
+Remove command "cmd_name" from the list of polled command.
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::stop_poll_command(const char *cmd_name)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::stop_poll_attribute(string &attr_name)
+\end_layout
+
+\begin_layout Standard
+Remove attribute "attr_name" from the list of polled attributes.
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::stop_poll_attribute(const char *attr_name)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsection
+Event related methods
+\end_layout
+
+\begin_layout Subsubsection
+int DeviceProxy::subscribe_event(const string &attribute, EventType event,
+ CallBack *cb, const vector<string> &filters)
+\end_layout
+
+\begin_layout Standard
+The client call to subscribe for event reception in the 
+\series bold
+push model
+\series default
+.
+ The client implements a callback method which is triggered when the event
+ is received.
+ Filtering is done based on the reason specified and the event type.
+ For example when reading the state and the reason specified is "change"
+ the event will be fired only when the state changes.
+ Events consist of an attribute name and the event reason.
+ A standard set of reasons are implemented by the system, additional device
+ specific reasons can be implemented by device servers programmers.
+\end_layout
+
+\begin_layout Standard
+The 
+\emph on
+attribute
+\emph default
+ parameter is the device attribute name which will be sent as an event e.g.
+ 
+\begin_inset Quotes eld
+\end_inset
+
+current
+\begin_inset Quotes erd
+\end_inset
+
+, 
+\emph on
+event
+\emph default
+ parameter is the event reason and must be on the enumerated values:
+\end_layout
+
+\begin_layout Itemize
+Tango::CHANGE_EVENT
+\end_layout
+
+\begin_layout Itemize
+Tango::PERIODIC_EVENT
+\end_layout
+
+\begin_layout Itemize
+Tango::ARCHIVE_EVENT
+\end_layout
+
+\begin_layout Itemize
+Tango::ATTR_CONF_EVENT
+\end_layout
+
+\begin_layout Itemize
+Tango::DATA_READY_EVENT
+\end_layout
+
+\begin_layout Itemize
+Tango::USER_EVENT
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+cb
+\emph default
+ is a pointer to a class inheriting from the Tango CallBack class and implementi
+ng a 
+\emph on
+push_event()
+\emph default
+ method, 
+\emph on
+filters
+\emph default
+ is a variable list of name,value pairs which define additional filters
+ for events.
+\end_layout
+
+\begin_layout Standard
+The 
+\emph on
+subscribe_event()
+\emph default
+ call returns an event id which has to be specified when unsubscribing from
+ this event.
+ Please, note that the 
+\emph on
+cb
+\emph default
+ parameter is a pointer.
+ The lifetime of the pointed to object must at least be equal to the time
+ when events are requested because only the pointer is stored into the event
+ machinery.
+ The same thing is true for the DeviceProxy instance on which the 
+\emph on
+subscribe_event()
+\emph default
+ method is called.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+int DeviceProxy::subscribe_event(const string &attribute, EventType event,
+ CallBack *cb, const vector<string> &filters, bool stateless)
+\end_layout
+
+\begin_layout Standard
+This subscribe event method has the same functionality as described in the
+ last section.
+ It adds an additional flag called 
+\emph on
+stateless.
+
+\emph default
+ When the 
+\emph on
+stateless
+\emph default
+ flag is set to 
+\emph on
+false
+\emph default
+, an exception will be thrown when the event subscription encounters a problem.
+ 
+\end_layout
+
+\begin_layout Standard
+With the 
+\emph on
+stateless
+\emph default
+ flag set to 
+\emph on
+true
+\emph default
+, the event subscription will always succeed, even if the corresponding
+ device server is not running.
+ The keep alive thread will try every 10 seconds to subscribe for the specified
+ event.
+ At every subscription retry, a callback is executed which contains the
+ corresponding exception.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+int DeviceProxy::subscribe_event(const string &attribute, EventType event,
+ int event_queue_size, const vector<string> &filters, bool stateless)
+\end_layout
+
+\begin_layout Standard
+The client call to subscribe for event reception in the 
+\series bold
+pull model
+\series default
+.
+ Instead of a callback method the client has to specify the size of the
+ event reception buffer.
+\end_layout
+
+\begin_layout Standard
+The event reception buffer is implemented as a round robin buffer.
+ This way the client can set-up different ways to receive events.
+\end_layout
+
+\begin_layout Itemize
+Event reception buffer size = 1 : The client is interested only in the value
+ of the last event received.
+ All other events that have been received since the last reading are discarded.
+\end_layout
+
+\begin_layout Itemize
+Event reception buffer size > 1 : The client has chosen to keep an event
+ history of a given size.
+ When more events arrive since the last reading, older events will be discarded.
+\end_layout
+
+\begin_layout Itemize
+Event reception buffer size = ALL_EVENTS : The client buffers all received
+ events.
+ The buffer size is unlimited and only restricted by the available memory
+ for the client.
+\end_layout
+
+\begin_layout Standard
+All other parameters are similar to the descriptions given in the last two
+ sections.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::unsubscribe_event(int event_id)
+\end_layout
+
+\begin_layout Standard
+Unsubscribe a client from receiving the event specified by 
+\emph on
+event_id
+\emph default
+.
+ 
+\emph on
+event_id
+\emph default
+ is the event identifier returned by the 
+\emph on
+DeviceProxy::subscribe_event()
+\emph default
+ method.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::get_events(int event_id, CallBack *cb)
+\end_layout
+
+\begin_layout Standard
+The method extracts all waiting events from the event reception buffer and
+ executes the callback method 
+\emph on
+cb
+\emph default
+ for every event.
+ During event subscription the client must have chosen the 
+\series bold
+pull model
+\series default
+ for this event.
+ 
+\emph on
+event_id
+\emph default
+ is the event identifier returned by the 
+\emph on
+DeviceProxy::subscribe_event()
+\emph default
+ method.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::get_events(int event_id, EventDataList &event_list)
+\end_layout
+
+\begin_layout Standard
+The method extracts all waiting events from the event reception buffer.
+ The returned 
+\emph on
+event_list
+\emph default
+ is a vector of EventData pointers.
+ The EventData object contains the event information as for the callback
+ methods.
+ 
+\end_layout
+
+\begin_layout Standard
+During event subscription the client must have chosen the 
+\series bold
+pull model
+\series default
+ for this event.
+ 
+\emph on
+event_id
+\emph default
+ is the event identifier returned by the 
+\emph on
+DeviceProxy::subscribe_event()
+\emph default
+ method.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::get_events(int event_id, AttrConfEventDataList &event_list)
+\end_layout
+
+\begin_layout Standard
+The method extracts all waiting attribute configuration events from the
+ event reception buffer.
+ The returned 
+\emph on
+event_list
+\emph default
+ is a vector of AttrConfEventData pointers.
+ The AttrConfEventData object contains the event information as for the
+ callback methods.
+ 
+\end_layout
+
+\begin_layout Standard
+During event subscription the client must have chosen the 
+\series bold
+pull model
+\series default
+ for this event.
+ 
+\emph on
+event_id
+\emph default
+ is the event identifier returned by the 
+\emph on
+DeviceProxy::subscribe_event()
+\emph default
+ method.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::get_events(int event_id, DataReadyEventDataList &event_list)
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DataReadyEventDataList
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The method extracts all waiting attribute configuration events from the
+ event reception buffer.
+ The returned 
+\emph on
+event_list
+\emph default
+ is a vector of DataReadyEventData
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DataReadyEventData
+\end_layout
+
+\end_inset
+
+ pointers.
+ The DataReadyEventData object contains the event information as for the
+ callback methods.
+ 
+\end_layout
+
+\begin_layout Standard
+During event subscription the client must have chosen the 
+\series bold
+pull model
+\series default
+ for this event.
+ 
+\emph on
+event_id
+\emph default
+ is the event identifier returned by the 
+\emph on
+DeviceProxy::subscribe_event()
+\emph default
+ method.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+int DeviceProxy::event_queue_size(int event_id)
+\end_layout
+
+\begin_layout Standard
+Returns the number of stored events in the event reception buffer.
+ After every call to 
+\emph on
+DeviceProxy:get_events()
+\emph default
+, the event queue size is 0.
+\end_layout
+
+\begin_layout Standard
+During event subscription the client must have chosen the 
+\series bold
+pull model
+\series default
+ for this event.
+ 
+\emph on
+event_id
+\emph default
+ is the event identifier returned by the 
+\emph on
+DeviceProxy::subscribe_event()
+\emph default
+ method.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+TimeVal DeviceProxy::get_last_event_date(int event_id)
+\end_layout
+
+\begin_layout Standard
+Returns the arrival time of the last event stored in the event reception
+ buffer.
+ After every call to 
+\emph on
+DeviceProxy:get_events()
+\emph default
+, the event reception buffer is empty.
+ In this case an exception will be returned.
+\end_layout
+
+\begin_layout Standard
+During event subscription the client must have chosen the 
+\series bold
+pull model
+\series default
+ for this event.
+ 
+\emph on
+event_id
+\emph default
+ is the event identifier returned by the 
+\emph on
+DeviceProxy::subscribe_event()
+\emph default
+ method.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+bool DeviceProxy::is_event_queue_empty(int event_id)
+\end_layout
+
+\begin_layout Standard
+Returns true when the event reception buffer is empty.
+\end_layout
+
+\begin_layout Standard
+During event subscription the client must have chosen the 
+\series bold
+pull model
+\series default
+ for this event.
+ 
+\emph on
+event_id
+\emph default
+ is the event identifier returned by the 
+\emph on
+DeviceProxy::subscribe_event()
+\emph default
+ method.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+EventSystemFailed
+\end_layout
+
+\begin_layout Subsection
+Property related methods
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::get_property (string&, DbData&)
+\end_layout
+
+\begin_layout Standard
+Get a single property for a device.
+ The property to get is specified as a string.
+ Refer to DbDevice::get_property() and DbData sections below for details
+ on the DbData type.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: NonDbDevice, ConnectionFailed (with database), CommunicationFailed
+ (with database), DevFailed from database device
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::get_property (vector<string>&, DbData&)
+\end_layout
+
+\begin_layout Standard
+Get a list of properties for a device.
+ The properties to get are specified as a vector of strings.
+ Refer to DbDevice::get_property() and DbData sections below for details
+ on the DbData type.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: NonDbDevice, ConnectionFailed (with database), CommunicationFailed
+ (with database), DevFailed from database device
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::get_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+Get property(ies) for a device.
+ Properties to get are specified using the DbData type.
+ Refer to DbDevice::get_property() and DbData sections below for details.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: NonDbDevice, ConnectionFailed (with database), CommunicationFailed
+ (with database), DevFailed from database device
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::put_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+Put property(ies) for a device.
+ Properties to put are specified using the DbData type.
+ Refer to DbDevice::put_property() and DbData sections below for details.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: NonDbDevice, ConnectionFailed (with database), CommunicationFailed
+ (with database), DevFailed from database device
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::delete_property (string&)
+\end_layout
+
+\begin_layout Standard
+Delete a single property for a device.
+ The property to delete is specified as a string.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: NonDbDevice, ConnectionFailed (with database), CommunicationFailed
+ (with database), DevFailed from database device
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::delete_property (vector<string>&)
+\end_layout
+
+\begin_layout Standard
+Delete a list of properties for a device.
+ The properties to delete are specified as a vector of strings.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: NonDbDevice, ConnectionFailed (with database), CommunicationFailed
+ (with database), DevFailed from database device
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::delete_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+Delete property(ies) for a device.
+ Properties to delete are specified using the DbData type.
+ Refer to DbDevice::get_property() and DbData sections below for details.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: NonDbDevice, ConnectionFailed (with database), CommunicationFailed
+ (with database), DevFailed from database device
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::get_property_list(const string &filter,vector<string>
+ &prop_list)
+\end_layout
+
+\begin_layout Standard
+Get the list of property names for the device.
+ The parameter 
+\emph on
+filter
+\emph default
+ allows the user to filter the returned name list.
+ The wildcard character is '*'.
+ Only one wildcard character is allowed in the filter parameter.
+ The name list is returned in the vector of strings passed as the method
+ second argument.
+ 
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: NonDbDevice, WrongNameSyntax, ConnectionFailed (with database),
+ CommunicationFailed (with database), DevFailed from database device
+\end_layout
+
+\begin_layout Subsection
+Logging related methods 
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::add_logging_target(const string &target_type_target_name)
+\end_layout
+
+\begin_layout Standard
+Adds a new logging target to the device.
+ The target_type_target_name input parameter must follow the format: target_type
+::target_name.
+ Supported target types are: 
+\emph on
+console
+\emph default
+, 
+\emph on
+file
+\emph default
+ and 
+\emph on
+device
+\emph default
+.
+ For a device target, the target_name part of the target_type_target_name
+ parameter must contain the name of a log consumer device (as defined in
+ 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Tango-log-consumer"
+
+\end_inset
+
+).
+ For a file target, target_name is the full path to the file to log to.
+ If omitted, the device's name is used to build the file name (which is
+ something like domain_family_member.log).
+ Finally, the target_name part of the target_type_target_name input parameter
+ is ignored in case of a console target and can be omitted.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::add_logging_target (const char *target_type_target_name)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::remove_logging_target(const string &target_type_target_name)
+\end_layout
+
+\begin_layout Standard
+Removes a logging target from the device's target list.
+ The target_type_target_name input parameter must follow the format: target_type
+::target_name.
+ Supported target types are: 
+\emph on
+console
+\emph default
+, 
+\emph on
+file
+\emph default
+ and 
+\emph on
+device
+\emph default
+.
+ For a device target, the target_name part of the target_type_target_name
+ parameter must contain the name of a log consumer device (as defined in
+ ).
+ For a file target, target_name is the full path to the file to remove.
+ If omitted, the default log file is removed.
+ Finally, the target_name part of the target_type_target_name input parameter
+ is ignored in case of a console target and can be omitted.
+\end_layout
+
+\begin_layout Standard
+If target_name is set to "*", all targets of the specified target_type are
+ removed.
+ 
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::remove_logging_target (const char *target_type_target_name)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsubsection
+vector<string> DeviceProxy::get_logging_target ()
+\end_layout
+
+\begin_layout Standard
+Returns a vector of string containing the current device's logging targets.
+ Each vector element has the following format: target_type::target_name.
+ An empty vector is returned is the device has no logging targets.
+\end_layout
+
+\begin_layout Subsubsection
+int DeviceProxy::get_logging_level ()
+\end_layout
+
+\begin_layout Standard
+Returns the current device's logging level (0=OFF, 1=FATAL, 2=ERROR, 3=WARNING,
+ 4=INFO, 5=DEBUG).
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::set_logging_level (int level)
+\end_layout
+
+\begin_layout Standard
+Changes the device's logging level.
+ (0=OFF, 1=FATAL, 2=ERROR, 3=WARNING, 4=INFO, 5=DEBUG).
+\end_layout
+
+\begin_layout Subsection
+Locking
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Locking
+\end_layout
+
+\end_inset
+
+ related methods
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::lock
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+lock
+\end_layout
+
+\end_inset
+
+(int lock_validity = 10)
+\end_layout
+
+\begin_layout Standard
+Lock a device.
+ The lock_validity is the time (in seconds) the lock is kept valid after
+ the previous lock call.
+ A default value of 10 seconds is provided and should be fine in most cases.
+ In case it is necessary to change the lock validity, it's not possible
+ to ask for a validity less than a minimum value set to 2 seconds.
+ The library provided an automatic system to periodically re lock the device
+ until an unlock call.
+ No code is needed to start/stop this automatic re-locking system.
+ The locking system is re-entrant.
+ It is then allowed to call this method on a device already locked by the
+ same process.
+ The locking system has the following features:
+\end_layout
+
+\begin_layout Itemize
+It is impossible to lock the database device or any device server process
+ admin device
+\end_layout
+
+\begin_layout Itemize
+Destroying a locked DeviceProxy unlocks the device
+\end_layout
+
+\begin_layout Itemize
+Restarting a locked device keeps the lock
+\end_layout
+
+\begin_layout Itemize
+It is impossible to restart a device locked by someone else
+\end_layout
+
+\begin_layout Itemize
+Restarting a server breaks the lock
+\end_layout
+
+\begin_layout Standard
+A locked device is protected against the following calls when executed by
+ another client:
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+command_inout
+\emph default
+ call except for device state and status requested via command and for the
+ set of commands defined as allowed following the definition of allowed
+ command in the Tango control access schema.
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+write_attribute
+\emph default
+ call
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+write_read_attribute
+\emph default
+ call
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+set_attribute_config
+\emph default
+ call
+\end_layout
+
+\begin_layout Subsubsection
+void DeviceProxy::unlock
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+unlock
+\end_layout
+
+\end_inset
+
+(bool force = false)
+\end_layout
+
+\begin_layout Standard
+Unlock a device.
+ If used, the method argument provides a back door on the locking system.
+ If this argument is set to true, the device will be unlocked even if the
+ caller is not the locker.
+ This feature is provided for administration purpopse and should be used
+ very carefully.
+ If this feature is used, the locker will receive a 
+\emph on
+DeviceUnlocked
+\emph default
+ during the next call which is normally protected by the locking Tango system.
+\end_layout
+
+\begin_layout Subsubsection
+string DeviceProxy::locking_status
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+locking-status
+\end_layout
+
+\end_inset
+
+()
+\end_layout
+
+\begin_layout Standard
+This method returns a plain string describing the device locking status.
+ This string can be:
+\end_layout
+
+\begin_layout Itemize
+"Device <device name> is not locked" in case the device is not locked
+\end_layout
+
+\begin_layout Itemize
+"Device <device name> is locked by CPP or Python client with PID <pid> from
+ host <host name>" in case the device is locked by a CPP client
+\end_layout
+
+\begin_layout Itemize
+"Device <device name> is locked by JAVA client class <main class> from host
+ <host name>" in case the device is locked by a JAVA client
+\end_layout
+
+\begin_layout Subsubsection
+bool DeviceProxy::is_locked
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-locked
+\end_layout
+
+\end_inset
+
+()
+\end_layout
+
+\begin_layout Standard
+Returns true if the device is locked.
+ Otherwise, returns false.
+\end_layout
+
+\begin_layout Subsubsection
+bool DeviceProxy::is_locked_by_me
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-locked-by-me
+\end_layout
+
+\end_inset
+
+()
+\end_layout
+
+\begin_layout Standard
+Returns true if the device is locked by the caller.
+ Otherwise, returns false (device not locked or locked by someone else)
+\end_layout
+
+\begin_layout Subsubsection
+bool DeviceProxy::get_locker
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+get-locker
+\end_layout
+
+\end_inset
+
+(LockerInfo &li)
+\end_layout
+
+\begin_layout Standard
+If the device is locked, this method returns true an set some locker process
+ informations in the structure passed as argument.
+ If the device is not locked, the method returns false.
+ The LockerInfo structure definition is
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+typedef union
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   pid_t           LockerPid;
+\end_layout
+
+\begin_layout LyX-Code
+   unsigned long   UUID[4];
+\end_layout
+
+\begin_layout LyX-Code
+}LockerId;
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+enum LockerLanguage
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   CPP,
+\end_layout
+
+\begin_layout LyX-Code
+   JAVA
+\end_layout
+
+\begin_layout LyX-Code
+};
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+struct LockerInfo
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   LockerLanguage  ll;
+\end_layout
+
+\begin_layout LyX-Code
+   LockerId        li;
+\end_layout
+
+\begin_layout LyX-Code
+   string          locker_host;
+\end_layout
+
+\begin_layout LyX-Code
+   string          locker_class;
+\end_layout
+
+\begin_layout LyX-Code
+};
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The structure 
+\emph on
+ll
+\emph default
+ field is set to either CPP or JAVA depending on the locker process language.
+ In case of CPP client, the 
+\emph on
+li
+\emph default
+ union is set to the locker process pid (
+\emph on
+LockerPid
+\emph default
+ field).
+ In case of Java client, it is set to the Java client UUID (Universal Uniq
+ IDentifier) in the 
+\emph on
+UUID
+\emph default
+ field.
+ The 
+\emph on
+locker_host
+\emph default
+ field is initialised with the host name where the locker process is running
+ (or its IP adress as a string if it is not possiblr to get the name associated
+ with this address).
+ The 
+\emph on
+locker_class
+\emph default
+ field is set to the Java virtual machine main class name when the locker
+ client process is written in Java.
+ For CPP client, it is set to the string "Not defined".
+\end_layout
+
+\begin_layout Section
+\noindent
+Tango::DeviceData
+\end_layout
+
+\begin_layout Standard
+\noindent
+This is the fundamental type for sending and receiving data from device
+ commands.
+ The values can be inserted and extracted using the operators << and >>
+ respectively and insert() for mixed data types.
+ A status flag indicates if there is data in the DbDatum object or not.
+ An additional flag allows the user to activate exceptions.
+ 
+\end_layout
+
+\begin_layout Subsection
+\noindent
+Operators
+\end_layout
+
+\begin_layout Standard
+\noindent
+The insert and extract operators are specified for the following C++ types
+ :
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+bool
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+short
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+unsigned short
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+DevLong
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+DevULong
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+DevLong64
+\end_layout
+
+\begin_layout Enumerate
+DevULong64
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+float
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+double
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+string
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+char* (insert only)
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+const char *
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<unsigned char>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<string>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<short>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<unsigned short>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<DevLong>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<DevULong>
+\end_layout
+
+\begin_layout Enumerate
+vector<DevLong64>
+\end_layout
+
+\begin_layout Enumerate
+vector<DevULong64>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<float>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<double>
+\end_layout
+
+\begin_layout Standard
+Operators exist for inserting and extracting the native TANGO CORBA sequence
+ types.
+ These can be useful for programmers who want to use the TANGO api internally
+ in their device servers and do not want to convert from CORBA to C++ types.
+ Insert and extract operators exist for the following types :
+\end_layout
+
+\begin_layout Enumerate
+DevVarUCharArray * (const DevVarUCharArray * for extraction)
+\end_layout
+
+\begin_layout Enumerate
+DevVarShortArray * (const DevVarShortArray * for extraction)
+\end_layout
+
+\begin_layout Enumerate
+DevVarUShortArray * (const DevVarUShortArray * for extraction)
+\end_layout
+
+\begin_layout Enumerate
+DevVarLongArray * (const DevVarLongArray * for extraction)
+\end_layout
+
+\begin_layout Enumerate
+DevVarULongArray * (const DevVarULongArray * for extraction)
+\end_layout
+
+\begin_layout Enumerate
+DevVarLong64Array * (const DevVarLong64Array * for extraction)
+\end_layout
+
+\begin_layout Enumerate
+DevVarULong64Array * (const DevVarULong64Array * for extraction)
+\end_layout
+
+\begin_layout Enumerate
+DevVarFloatArray * (const DevVarFloatArray * for extraction)
+\end_layout
+
+\begin_layout Enumerate
+DevVarDoubleArray * (const DevVarDoubleArray * for extraction)
+\end_layout
+
+\begin_layout Enumerate
+DevVarStringArray * (const DevVarStringArray * for extraction)
+\end_layout
+
+\begin_layout Enumerate
+DevVarLongStringArray * (const DevVarLongStringArray * for extraction)
+\end_layout
+
+\begin_layout Enumerate
+DevVarDoubleStringArray * (const DevVarDoubleStringArray * for extraction)
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+Note :
+\begin_inset Newline newline
+\end_inset
+
+Insertion by pointers takes full ownership of the pointed to memory.
+ The insertion copy the data in the DeviceData object and delete the pointed
+ to memory.
+ Therefore, the memory is not more usable after the insertion.
+ Also note that when using extraction by pointers, the pointed to memory
+ is inside the DeviceData object and its lifetime is the same than the DeviceDat
+a object lifetime.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Operators also exist for inserting TANGO CORBA sequence type by reference.
+ The insertion copy the data into the DeviceData object.
+ Insert operator exist for the following types :
+\end_layout
+
+\begin_layout Enumerate
+DevVarUCharArray &
+\end_layout
+
+\begin_layout Enumerate
+DevVarShortArray &
+\end_layout
+
+\begin_layout Enumerate
+DevVarUShortArray &
+\end_layout
+
+\begin_layout Enumerate
+DevVarLongArray &
+\end_layout
+
+\begin_layout Enumerate
+DevVarULongArray &
+\end_layout
+
+\begin_layout Enumerate
+DevVarLong64Array &
+\end_layout
+
+\begin_layout Enumerate
+DevVarULong64Array &
+\end_layout
+
+\begin_layout Enumerate
+DevVarFloatArray &
+\end_layout
+
+\begin_layout Enumerate
+DevVarDoubleArray &
+\end_layout
+
+\begin_layout Enumerate
+DevVarStringArray &
+\end_layout
+
+\begin_layout Enumerate
+DevVarLongStringArray &
+\end_layout
+
+\begin_layout Enumerate
+DevVarDoubleStringArray &
+\end_layout
+
+\begin_layout Standard
+Additional methods exist for inserting a mixture of strings and long (Tango::Dev
+VarLongStringArray) and string and doubles (Tango::DevVarDoubleStringArray).
+ These are :
+\end_layout
+
+\begin_layout Enumerate
+insert(vector<long>&, vector<string>&)
+\end_layout
+
+\begin_layout Enumerate
+insert(vector<double>&, vector<string>&)
+\end_layout
+
+\begin_layout Enumerate
+extract(vector<long>&, vector<string>&)
+\end_layout
+
+\begin_layout Enumerate
+extract(vector<double>&, vector<string>&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+All the extraction methods returns a boolean set to false if the extraction
+ has failed (empty DeviceData, wrong data type...)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Special care has been taken to avoid memory copy between the network layer
+ and the user application.
+ Nevertheless, C++ vector types are not the CORBA native type and one copy
+ is unavoidable when using vectors.
+ Using the native TANGO CORBA sequence types avoid any copy.
+ When using these TANGO CORBA sequence types, insertion into the DeviceData
+ object consumes the memory pointed to by the pointer.
+ After the insertion, it is not necessary to delete the memory.
+ It will be done by the destruction of the DeviceData object.
+ For extraction, the pointer used for the extraction points into memory
+ inside the DeviceData object and you should not delete it
+\end_layout
+
+\begin_layout Standard
+\noindent
+Here is an example of creating, inserting and extracting some data type
+ from/into DeviceData object :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DeviceData my_short, my_long, my_string;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DeviceData my_float_vector, my_double_vector;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+string a_string;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+short a_short;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DevLong a_long;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+vector<float> a_float_vector;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+vector<double> a_double_vector;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_short << 100; // insert a short
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_short >> a_short; // extract a short
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_long << 1000; // insert a long
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_long >> a_long; // extract a long
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_string << string(
+\begin_inset Quotes eld
+\end_inset
+
+estas lista a bailar el tango ?
+\begin_inset Quotes erd
+\end_inset
+
+); // insert a string
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_string >> a_string; // extract a string
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_float_vector << a_float_vector // insert a vector of floats
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_float_vector >> a_float_vector; // extract a vector of floats
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_double_vector << a_double_vector; // insert a vector of doubles
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_double_vector >> a_double_vector; // extract a vector of doubles
+\begin_inset Newline newline
+\end_inset
+
+//
+\end_layout
+
+\begin_layout LyX-Code
+// Example of memory management with TANGO sequence types without memory
+ leaks
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+for (int i = 0;i < 10;i++)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+    DeviceData din,dout;
+\end_layout
+
+\begin_layout LyX-Code
+    DevVarLongArray *in = new DevVarLongArray();
+\end_layout
+
+\begin_layout LyX-Code
+    in->length(2);
+\end_layout
+
+\begin_layout LyX-Code
+    (*in)[0] = 2;
+\end_layout
+
+\begin_layout LyX-Code
+    (*in)[1] = 4;
+\end_layout
+
+\begin_layout LyX-Code
+    din << in;
+\end_layout
+
+\begin_layout LyX-Code
+    try
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+        dout = device->command_inout(
+\begin_inset Quotes eld
+\end_inset
+
+Cmd
+\begin_inset Quotes erd
+\end_inset
+
+,din);
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    catch(DevFailed &e)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+       ....
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    const DevVarLongArray *out;
+\end_layout
+
+\begin_layout LyX-Code
+    dout >> out;
+\end_layout
+
+\begin_layout LyX-Code
+    cout << 
+\begin_inset Quotes eld
+\end_inset
+
+Received value = 
+\begin_inset Quotes eld
+\end_inset
+
+ << (*out)[0];
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exception: WrongData if requested
+\end_layout
+
+\begin_layout Subsection
+\noindent
+bool DeviceData::is_empty()
+\end_layout
+
+\begin_layout Standard
+\noindent
+is_empty() is a boolean method which returns true or false depending on
+ whether the DeviceData object contains data or not.
+ It can be used to test whether the DeviceData has been initialized or not
+ e.g.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+string string_read;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DeviceData sl_read = my_device->command_inout(
+\begin_inset Quotes eld
+\end_inset
+
+ReadLine
+\begin_inset Quotes erd
+\end_inset
+
+);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+if (! sl_read.is_empty()) 
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+{
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+    sl_read >> string_read;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+}
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+else
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+{
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+    cout << 
+\begin_inset Quotes eld
+\end_inset
+
+ no data read from serial line !
+\begin_inset Quotes erd
+\end_inset
+
+ << endl;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: WrongData if requested
+\end_layout
+
+\begin_layout Subsection
+int DeviceData::get_type()
+\end_layout
+
+\begin_layout Standard
+\noindent
+This method returns the Tango data type of the data inside the DeviceData
+ object
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DeviceData::exceptions(bitset<DeviceData::numFlags> )
+\end_layout
+
+\begin_layout Standard
+\noindent
+Is a method which allows the user to switch on/off exception throwing when
+ trying to extract data from an empty DeviceData object or using a wrong
+ data type.
+ The default is to not throw exception.
+ The following flags are supported :
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+
+\series bold
+isempty_flag
+\series default
+ - throw a WrongData exception (reason = API_EmptyDeviceData) if user tries
+ to extract data from an empty DeviceData object
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+wrongtype_flag
+\series default
+ - throw a WrongData exception (reason = API_IncompatibleCmdArgumentType)
+ if user tries to extract data with a type different than the type used
+ for insertion
+\end_layout
+
+\begin_layout Subsection
+bitset<DeviceData::numFlags> exceptions()
+\end_layout
+
+\begin_layout Standard
+Returns the whole exception flags.
+\end_layout
+
+\begin_layout Subsection
+void DeviceData::reset_exceptions(DeviceData::except_flags fl)
+\end_layout
+
+\begin_layout Standard
+Resets one exception flag
+\end_layout
+
+\begin_layout Subsection
+void DeviceData::set_exceptions(DeviceData::except_flags fl)
+\end_layout
+
+\begin_layout Standard
+Sets one exception flag
+\end_layout
+
+\begin_layout Standard
+The following is an example of how to use these exceptions related methods
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+     1          DeviceData da;
+\end_layout
+
+\begin_layout LyX-Code
+     2  
+\end_layout
+
+\begin_layout LyX-Code
+     3          bitset<DeviceData::numFlags> bs = da.exceptions();
+\end_layout
+
+\begin_layout LyX-Code
+     4          cout << "bs = " << bs << endl;
+\end_layout
+
+\begin_layout LyX-Code
+     5                  
+\end_layout
+
+\begin_layout LyX-Code
+     6          da.set_exceptions(DeviceData::wrongtype_flag);
+\end_layout
+
+\begin_layout LyX-Code
+     7          bs = da.exceptions();
+\end_layout
+
+\begin_layout LyX-Code
+     8                  
+\end_layout
+
+\begin_layout LyX-Code
+     9          cout << "bs = " << bs << endl;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+ostream &operator<<(ostream &, DeviceData &)
+\end_layout
+
+\begin_layout Standard
+Is an utility function to easily print the contents of a DeviceData object.
+ This function knows all types which could be inserted in a DeviceData object
+ and print them accordingly.
+ A special string is printed if the DeviceData object is empty
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DeviceProxy *dev = new DeviceProxy(
+\begin_inset Quotes eld
+\end_inset
+
+...
+\begin_inset Quotes erd
+\end_inset
+
+);
+\end_layout
+
+\begin_layout LyX-Code
+DeviceData out;
+\end_layout
+
+\begin_layout LyX-Code
+out = dev->command_inout(
+\begin_inset Quotes eld
+\end_inset
+
+MyCommand
+\begin_inset Quotes erd
+\end_inset
+
+);
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+cout << 
+\begin_inset Quotes eld
+\end_inset
+
+Command returned: 
+\begin_inset Quotes erd
+\end_inset
+
+ << out << endl;
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Tango::DeviceDataHistory
+\begin_inset CommandInset label
+LatexCommand label
+name "DataHistory"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This is the fundamental type for receiving data from device command polling
+ buffers.
+ This class inherits from the Tango::DeviceData class.
+ One instance of this class is created for each command result history.
+ Within this class, you find the command result data or the exception parameters
+, a flag indicating if the command has failed when it was invoked by the
+ device server polling thread and the date when the command was executed.
+ For history calls, it is not possible to returns command error as exception.
+ See chapter on Advanced Features for all details regarding device polling.
+ On top of the methods inherited from the DeviceData class, it offers the
+ following methods
+\end_layout
+
+\begin_layout Subsection
+bool DeviceDataHistory::has_failed()
+\end_layout
+
+\begin_layout Standard
+Returns true if the corresponding command has failed when it was executed
+ by the device server polling thread.
+ Otherwise returns false (amazing!)
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: none
+\end_layout
+
+\begin_layout Subsection
+TimeVal &DeviceDataHistory::get_date()
+\end_layout
+
+\begin_layout Standard
+Returns the date when the device server polling thread has executed the
+ command.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: none
+\end_layout
+
+\begin_layout Subsection
+const DevErrorList &DeviceDataHistory::get_err_stack()
+\end_layout
+
+\begin_layout Standard
+Return the error stack recorded by the device server polling thread in case
+ of the command failed when it was invoked.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: none
+\end_layout
+
+\begin_layout Subsection
+ostream &operator<<(ostream &, DeviceDataHistory &)
+\end_layout
+
+\begin_layout Standard
+Is an utility function to easily print the contents of a DeviceDataHistory
+ object.
+ This function knows all types which could be inserted in a DeviceDataHistory
+ object and print them accordingly.
+ It also prints date and error stack in case the command returned an error.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DeviceProxy *dev = new DeviceProxy(
+\begin_inset Quotes eld
+\end_inset
+
+...
+\begin_inset Quotes erd
+\end_inset
+
+);
+\end_layout
+
+\begin_layout LyX-Code
+int hist_depth = 4;
+\end_layout
+
+\begin_layout LyX-Code
+vector<DeviceDataHistory> *hist;
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+hist = dev->command_history(
+\begin_inset Quotes eld
+\end_inset
+
+MyCommand
+\begin_inset Quotes erd
+\end_inset
+
+,hist_depth);
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+for (int i = 0;i < hist_depth;i++)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+    cout << (*hist)[i] << endl;
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+delete hist;
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+\noindent
+Tango::DeviceAttribute
+\end_layout
+
+\begin_layout Standard
+\noindent
+This is the fundamental type for sending and receiving data to and from
+ device attributes.
+ The values can be inserted and extracted using the operators << and >>
+ respectively and insert() for mixed data types.
+ There are two ways to check if the extraction operator succeed :
+\end_layout
+
+\begin_layout Enumerate
+By testing the extractor operators return value.
+ All the extractors operator returns a boolean value set to false in case
+ of problem.
+\end_layout
+
+\begin_layout Enumerate
+By asking the DeviceAttribute object to throw exception in case of problem.
+ By default, DeviceAttribute throws exception :
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+when the user try to extract data and the server reported an error when
+ the attribute was read.
+\end_layout
+
+\begin_layout Enumerate
+When the user try to extract data from an empty DeviceAttribute
+\end_layout
+
+\end_deeper
+\begin_layout Subsection
+Constructors
+\end_layout
+
+\begin_layout Standard
+Many constructors have been written for this class.
+ The following constructors exist :
+\end_layout
+
+\begin_layout Enumerate
+The C++ basic constructors
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+DeviceAttribute();
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const DeviceAttribute&)
+\series bold
+;
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Constructors for scalar type with name as C++ string or "const char *"
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+DeviceAttribute(string &, bool);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, short)
+\series bold
+;
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, DevLong);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, DevLong64);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, float);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, double);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, unsigned char);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, unsigned short);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, DevULong);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, DevULong64);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, string &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, DevState);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, DevEncoded &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, bool);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, short)
+\series bold
+;
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, DevLong);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, DevLong64);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, float)
+\series bold
+;
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, double);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, unsigned char)
+\series bold
+;
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, unsigned short);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, DevULong);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, DevULong64);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, string &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, DevState);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *,DevEncoded &);
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Constructors for C++ vector types (for spectrum attribute) with name as
+ C++ string or "const char *"
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<bool> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector
+\series bold
+<
+\series default
+short
+\series bold
+>
+\series default
+ &)
+\series bold
+;
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<DevLong> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<DevLong64> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<float> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<double> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<unsigned char> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<unsigned short> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<DevULong> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<DevULong64> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<string> & );
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<DevState> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<bool> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<short> &)
+\series bold
+;
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<DevLong> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<DevLong64> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<float> &)
+\series bold
+;
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<double> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<unsigned char> &)
+\series bold
+;
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<unsigned short> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<DevULong> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<DevULong64> &);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<string> & );
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<DevState> &);
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Constructors for C++ vector types (for image attribute) with name as C++
+ string or "const char *".
+ These constructors have two more parameters allowing the user to define
+ the x and y image dimensions.
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<bool> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<short> &, int, int
+\series bold
+)
+\series default
+;
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<DevLong> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<DevLong64> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<float> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<double> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<unsigned char> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<unsigned short> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<DevULong> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<DevULong64> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<string> &, int, int );
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(string &, vector<DevState> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<bool> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<short> &, int, int)
+\series bold
+;
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<DevLong> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<DevLong64> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<float> &, int, int)
+\series bold
+;
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<double> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<unsigned char> &, int, int)
+\series bold
+;
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<unsigned short> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<DevULong> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<DevULong64> &, int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<string> & , int, int);
+\end_layout
+
+\begin_layout Enumerate
+DeviceAttribute(const char *, vector<DevState) &, int, int);
+\end_layout
+
+\end_deeper
+\begin_layout Subsection
+\noindent
+Data Extraction and Insertion : Operators and Methods
+\end_layout
+
+\begin_layout Standard
+\noindent
+Special care has been taken to avoid memory copy between the network layer
+ and the user application.
+ Nevertheless, C++ vector types are not the CORBA native type and one copy
+ is unavoidable when using vectors.
+ Using the native TANGO CORBA sequence types in most cases avoid any copy
+ but needs some more care about memory usage.
+ 
+\end_layout
+
+\begin_layout Itemize
+\noindent
+
+\series bold
+For insertion into DeviceAttribute instance from TANGO CORBA sequence pointers,
+ the DeviceAttribute object takes ownership of the pointed to memory.
+ This means that the pointed to memory will be freed when the DeviceAttribute
+ object is destroyed or when another data is inserted into it.
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+The insertion into DeviceAttribute instance from TANGO CORBA sequence reference
+ copy the data into the DeviceAttribute object.
+\end_layout
+
+\begin_layout Itemize
+\noindent
+
+\series bold
+For extraction into TANGO CORBA sequence types, the extraction method consumes
+ the memory allocated to store the data and it is the caller responsibility
+ to delete this memory.
+\end_layout
+
+\begin_layout Standard
+\noindent
+As it has been done for constructors, a lot of insertors operator for classical
+ C++ data types have been defined :
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+Insert operators for the following scalar C++ types :
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+\noindent
+bool
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+short
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+DevLong
+\end_layout
+
+\begin_layout Enumerate
+DevLong64
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+float
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+double
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+unsigned char
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+unsigned short
+\end_layout
+
+\begin_layout Enumerate
+DevULong
+\end_layout
+
+\begin_layout Enumerate
+DevULong64
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+string
+\end_layout
+
+\begin_layout Enumerate
+DevState
+\end_layout
+
+\begin_layout Enumerate
+DevEncoded
+\end_layout
+
+\begin_layout Enumerate
+DevString
+\end_layout
+
+\begin_layout Enumerate
+const char *
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Insert operators for the following C++ vector types for spectrum attributes
+ :
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+\noindent
+vector<bool>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<short>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<DevLong>
+\end_layout
+
+\begin_layout Enumerate
+vector<DevLong64>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<float>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<double>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<unsigned char>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<unsigned short>
+\end_layout
+
+\begin_layout Enumerate
+vector<DevULong>
+\end_layout
+
+\begin_layout Enumerate
+vector<DevULong64>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<string>
+\end_layout
+
+\begin_layout Enumerate
+vector<DevState>
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Insert methods for the DevEncoded
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevEncoded
+\end_layout
+
+\end_inset
+
+ data type
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+insert(char *&, unsigned char *&, unsigned int)
+\begin_inset Newline newline
+\end_inset
+
+The last argument is the size of the buffer passed to the method as its
+ second argument
+\end_layout
+
+\begin_layout Enumerate
+insert(string &, vector<unsigned char &>)
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Insert methods for the following C++ vector types for image attributes allowing
+ the specification of the x and y image dimensions :
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+\noindent
+insert(vector<bool> &,int, int)
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+insert(vector<short> &,int, int)
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+insert(vector<DevLong> &,int, int)
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+insert(vector<DevLong64> &,int, int)
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+insert(vector<float> &,int, int)
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+insert(vector<double> &,int, int)
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+insert(vector<unsigned char> &,int, int)
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+insert(vector<unsigned short> &,int, int)
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+insert(vector<DevULong> &,int, int)
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+insert(vector<DevULong64> &,int, int)
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+insert(vector<string> &,int, int)
+\end_layout
+
+\begin_layout Enumerate
+insert(vector<DevState> &,int, int)
+\end_layout
+
+\end_deeper
+\begin_layout Standard
+Extractor operators are specified for the following C++ basic types
+\end_layout
+
+\begin_layout Enumerate
+Extract operators for the following scalar C++ types :
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+\noindent
+bool
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+short
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+DevLong
+\end_layout
+
+\begin_layout Enumerate
+DevLong64
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+float
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+double
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+unsigned char
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+unsigned short
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+DevULong
+\end_layout
+
+\begin_layout Enumerate
+DevULong64
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+string
+\end_layout
+
+\begin_layout Enumerate
+Tango::DevState
+\end_layout
+
+\begin_layout Enumerate
+Tango::DevEncoded
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Extract operators for the following C++ vector types for spectrum and image
+ attributes :
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+\noindent
+vector<bool>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<short>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<DevLong>
+\end_layout
+
+\begin_layout Enumerate
+vector<DevLong64>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<float>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<double>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<unsigned char>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<unsigned short>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<DevULong>
+\end_layout
+
+\begin_layout Enumerate
+vector<DevULong64>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<string>
+\end_layout
+
+\begin_layout Enumerate
+vector<DevState>
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Extract methods to extract only the read value of an attribute into a C++
+ vector.
+ The dimension of the read value can be read by using the methods get_dim_x()
+ and get_dim_y() or get_r_dimension().
+ The methods use the same return values as the extraction operators with
+ exceptions triggered by the exception flags:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+bool DeviceAttribute::extract_read (vector<bool>&);
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+bool DeviceAttribute::extract_read (vector<short>&);
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+bool DeviceAttribute::extract_read (vector<DevLong>&);
+\end_layout
+
+\begin_layout Enumerate
+bool DeviceAttribute::extract_read (vector<DevLong64>&);
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+bool DeviceAttribute::extract_read (vector<float>&);
+\end_layout
+
+\begin_layout Enumerate
+bool DeviceAttribute::extract_read (vector<double>&);
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+bool DeviceAttribute::extract_read (vector<unsigned char>&);
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+bool DeviceAttribute::extract_read (vector<unsigned short>&);
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+bool DeviceAttribute::extract_read (vector<DevULong>&);
+\end_layout
+
+\begin_layout Enumerate
+bool DeviceAttribute::extract_read (vector<DevULong64>&);
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+bool DeviceAttribute::extract_read (vector<string>&);
+\end_layout
+
+\begin_layout Enumerate
+bool DeviceAttribute::extract_read (vector<DevState>&);
+\end_layout
+
+\begin_layout Enumerate
+bool DeviceAttribute::extract_read(string &, vector<unsigned char> &);
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Extract methods to extract only the set value of an attribute into a C++
+ vector.
+ The dimension of the set value can be read by using the methods get_written_dim
+_x() and get_written_dim_y() or get_w_dimension().
+ The methods use the same return values as the extraction operators with
+ exceptions triggered by the exception flags:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+bool DeviceAttribute::extract_set (vector<bool>&);
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+bool DeviceAttribute::extract_set (vector<short>&);
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+bool DeviceAttribute::extract_set (vector<DevLong>&);
+\end_layout
+
+\begin_layout Enumerate
+bool DeviceAttribute::extract_set (vector<DevLong64>&);
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+bool DeviceAttribute::extract_set (vector<float>&);
+\end_layout
+
+\begin_layout Enumerate
+bool DeviceAttribute::extract_set (vector<double>&);
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+bool DeviceAttribute::extract_set (vector<unsigned char>&);
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+bool DeviceAttribute::extract_set (vector<unsigned short>&);
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+bool DeviceAttribute::extract_set (vector<DevULong>&);
+\end_layout
+
+\begin_layout Enumerate
+bool DeviceAttribute::extract_set (vector<DevULong64>&);
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+bool DeviceAttribute::extract_set (vector<string>&);
+\end_layout
+
+\begin_layout Enumerate
+bool DeviceAttribute::extract_set (vector<DevState>&);
+\end_layout
+
+\begin_layout Enumerate
+bool DeviceAttribute::extract_set(string &, vector<unsigned char> &);
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Special extract method for the Tango::DevEncoded data type
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+bool DeviceAttribute::extract(const char *&, unsigned char *&, unsigned
+ int &);
+\begin_inset Newline newline
+\end_inset
+
+The last argument is the size of the buffer passed to the method as its
+ second argument
+\end_layout
+
+\begin_layout Enumerate
+bool DeviceAttribute::extract(string &, vector<unsigned char> &);
+\end_layout
+
+\end_deeper
+\begin_layout Standard
+\noindent
+Operators also exist for extracting some native TANGO CORBA sequence types.
+ These can be useful for programmers who want to use the TANGO api internally
+ in their device servers and do not want to convert from CORBA to C++ types.
+ 
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+Insert operators for spectrum attribute and for the following types by pointer
+ :
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+DevVarBooleanArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarShortArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarLongArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarLong64Array *
+\end_layout
+
+\begin_layout Enumerate
+DevVarFloatArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarDoubleArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarUCharArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarUShortArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarULongArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarULong64Array *
+\end_layout
+
+\begin_layout Enumerate
+DevVarStringArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarStateArray *
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Insert operators for spectrum attribute and for the following types by reference
+ :
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+const DevVarBooleanArray &
+\end_layout
+
+\begin_layout Enumerate
+const DevVarShortArray &
+\end_layout
+
+\begin_layout Enumerate
+const DevVarLongArray &
+\end_layout
+
+\begin_layout Enumerate
+const DevVarLong64Array &
+\end_layout
+
+\begin_layout Enumerate
+const DevVarFloatArray &
+\end_layout
+
+\begin_layout Enumerate
+const DevVarDoubleArray &
+\end_layout
+
+\begin_layout Enumerate
+const DevVarUCharArray &
+\end_layout
+
+\begin_layout Enumerate
+const DevVarUShortArray &
+\end_layout
+
+\begin_layout Enumerate
+const DevVarULongArray &
+\end_layout
+
+\begin_layout Enumerate
+const DevVarULong64Array &
+\end_layout
+
+\begin_layout Enumerate
+const DevVarStringArray &
+\end_layout
+
+\begin_layout Enumerate
+const DevVarStateArray &
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Insert methods for image attribute and pointers.
+ These method allow the programmer to define the x and y image dimensions.
+ The following methods are defined :
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+insert(DevVarBooleanArray *, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(DevVarShortArray *, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(DevVarLongArray *, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(DevVarLong64Array *, int, int )
+\end_layout
+
+\begin_layout Enumerate
+insert(DevVarFloatArray *, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(DevVarDoubleArray *, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(DevVarUCharArray *, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(DevVarUShortArray *, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(DevVarULongArray *, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(DevVarULong64Array *, int, int )
+\end_layout
+
+\begin_layout Enumerate
+insert(DevVarStringArray *, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(DevVarStateArray *, int, int)
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Insert methods for image attribute and reference.
+ These method allow the programmer to define the x and y image dimensions.
+ The following methods are defined :
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+insert(const DevVarBooleanArray &, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(const DevVarShortArray &, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(const DevVarLongArray &, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(const DevVarLong64Array &, int, int )
+\end_layout
+
+\begin_layout Enumerate
+insert(const DevVarFloatArray &, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(const DevVarDoubleArray &, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(const DevVarUCharArray &, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(const DevVarUShortArray &, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(const DevVarULongArray &, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(const DevVarULong64Array &, int, int )
+\end_layout
+
+\begin_layout Enumerate
+insert(const DevVarStringArray &, int , int )
+\end_layout
+
+\begin_layout Enumerate
+insert(const DevVarStateArray &, int, int )
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Extract operators for the following types :
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+DevVarBooleanArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarShortArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarLongArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarLong64Array *
+\end_layout
+
+\begin_layout Enumerate
+DevVarFloatArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarDoubleArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarUCharArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarUShortArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarULongArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarULong64Array *
+\end_layout
+
+\begin_layout Enumerate
+DevVarStringArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarStateArray *
+\end_layout
+
+\begin_layout Enumerate
+DevVarEncodedArray *
+\end_layout
+
+\end_deeper
+\begin_layout Standard
+\noindent
+Here is an example of creating, inserting and extracting some DeviceAttribute
+ types :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DeviceAttribute my_short, my_long, my_string;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DeviceAttribute my_float_vector, my_double_vector;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+string a_string;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+short a_short;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DevLong a_long;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+vector<float> a_float_vector;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+vector<double> a_double_vector;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_short << 100; // insert a short
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_short >> a_short; // extract a short
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_long << 1000; // insert a long
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_long >> a_long; // extract a DevLong
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_string << string("estas lista a bailar el tango ?"); // insert a string
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_string >> a_string; // extract a string
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_float_vector << a_float_vector // insert a vector of floats
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_float_vector >> a_float_vector; // extract a vector of floats
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_double_vector << a_double_vector; // insert a vector of doubles
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_double_vector >> a_double_vector; // extract a vector of doubles
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+// Extract read and set value of an attribute separately
+\end_layout
+
+\begin_layout LyX-Code
+// and get their dimensions
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+vector<float> r_float_vector, w_float_vector;
+\end_layout
+
+\begin_layout LyX-Code
+my_float_vector.extract_read (r_float_vector) // extract read values
+\end_layout
+
+\begin_layout LyX-Code
+int dim_x = my_float_vector.get_dim_x();      // get x dimension
+\end_layout
+
+\begin_layout LyX-Code
+int dim_y = my_float_vector.get_dim_y();      // get y dimension
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+my_float_vector.extract_set  (w_float_vector) // extract set values
+\end_layout
+
+\begin_layout LyX-Code
+int w_dim_x = my_float_vector.get_written_dim_x();  // get x dimension
+\end_layout
+
+\begin_layout LyX-Code
+int W_dim_y = my_float_vector.get_written_dim_y();  // get y dimension
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+// Example of memory management with TANGO sequence types without memory
+ leaks
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+for (int i = 0;i < 10;i++)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+    DeviceAttribute da;
+\end_layout
+
+\begin_layout LyX-Code
+    DevVarLongArray *out;
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+    try
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+        da = device->read_attribute("Attr");
+\end_layout
+
+\begin_layout LyX-Code
+        da >> out;
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    catch(DevFailed &e)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+       ....
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+    cout << "Received value = " << (*out)[0];
+\end_layout
+
+\begin_layout LyX-Code
+    delete out;
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exception: WrongData if requested
+\end_layout
+
+\begin_layout Subsection
+\noindent
+bool DeviceAttribute::is_empty()
+\end_layout
+
+\begin_layout Standard
+\noindent
+is_empty() is a boolean method which returns true or false depending on
+ whether the DeviceAttribute object contains data or not.
+ It can be used to test whether the DeviceAttribute has been initialized
+ or not e.g.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+string parity;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DeviceAttribute sl_parity = my_device->read_attribute("parity");
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+if (! sl_read.is_empty()) 
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+{
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+    sl_parity >> parity;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+}
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+else
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+{
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+    cout << " no parity attribute defined for serial line !" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: WrongData if requested
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DeviceAttribute::exceptions(bitset<DeviceAttribute::numFlags>)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Is a method which allows the user to switch on/off exception throwing when
+ trying to extract data from an empty DeviceAttribute object or with a wrong
+ data type.
+ The following flags are supported :
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+
+\series bold
+isempty_flag
+\series default
+ - throw a WrongData exception (reason= API_EmptyDeviceAttribute) if user
+ tries to extract data from an empty DeviceAttribute object.
+ By default, this flag is set.
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+wrongtype_flag
+\series default
+ - throw a WrongData exception (reason = API_IncompatibleAttrArgumentType)
+ if user tries to extract data with a type different than the type used
+ for insertion.
+ By default, this flag is not set.
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+failed_flag
+\series default
+ - throw an exception when the user try to extract data from the DeviceAttribute
+ object and an error was reported by the server when the user try to read
+ the attribute.
+ The type of the exception thrown is the type of the error reported by the
+ server.
+ By default, this flag is set.
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+unknown_format_flag
+\series default
+ - throw an exception when the user try to get the attribute data format
+ from the DeviceAttribute object when this information is not yet available.
+ This information is available only after the 
+\emph on
+read_attribute
+\emph default
+ call has been sucessfully executed.
+ The type of the exception thrown is WrongData exception (reason = API_EmptyDevi
+ceAttribute).
+ By default, this flag is not set.
+\end_layout
+
+\begin_layout Subsection
+bitset<DeviceAttribute::numFlags> exceptions()
+\end_layout
+
+\begin_layout Standard
+Return the whole exception flags.
+\end_layout
+
+\begin_layout Subsection
+void DeviceAttribute::reset_exceptions(DeviceAttribute::except_flags fl)
+\end_layout
+
+\begin_layout Standard
+Reset one exception flag
+\end_layout
+
+\begin_layout Subsection
+void DeviceAttribute::set_exceptions(DeviceAttribute::except_flags fl)
+\end_layout
+
+\begin_layout Standard
+Set one exception flag
+\end_layout
+
+\begin_layout Standard
+The following is an example of how to use these exceptions related methods
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+     1          DeviceAttribute da;
+\end_layout
+
+\begin_layout LyX-Code
+     2  
+\end_layout
+
+\begin_layout LyX-Code
+     3          bitset<DeviceAttribute::numFlags> bs = da.exceptions();
+\end_layout
+
+\begin_layout LyX-Code
+     4          cout << "bs = " << bs << endl;
+\end_layout
+
+\begin_layout LyX-Code
+     5                  
+\end_layout
+
+\begin_layout LyX-Code
+     6          da.set_exceptions(DeviceAttribute::wrongtype_flag);
+\end_layout
+
+\begin_layout LyX-Code
+     7          bs = da.exceptions();
+\end_layout
+
+\begin_layout LyX-Code
+     8                  
+\end_layout
+
+\begin_layout LyX-Code
+     9          cout << "bs = " << bs << endl;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+bool DeviceAttribute::has_failed()
+\end_layout
+
+\begin_layout Standard
+Returns a boolean set to true if the server report an error when the attribute
+ was read.
+\end_layout
+
+\begin_layout Subsection
+const DevErrorList &DeviceAttribute::get_err_stack()
+\end_layout
+
+\begin_layout Standard
+Returns the error stack reported by the server when the attribute was read.
+\end_layout
+
+\begin_layout Standard
+The following is an example of the three available ways to get data out
+ of a DeviceAttribute object.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+     1          DeviceAttribute da;
+\end_layout
+
+\begin_layout LyX-Code
+     2          vector<short> attr_data;
+\end_layout
+
+\begin_layout LyX-Code
+     3  
+\end_layout
+
+\begin_layout LyX-Code
+     4          try
+\end_layout
+
+\begin_layout LyX-Code
+     5          {
+\end_layout
+
+\begin_layout LyX-Code
+     6                  da = device->read_attribute("Attr");
+\end_layout
+
+\begin_layout LyX-Code
+     7                  da >> attr_data;
+\end_layout
+
+\begin_layout LyX-Code
+     8          }
+\end_layout
+
+\begin_layout LyX-Code
+     9          catch (DevFailed &e)
+\end_layout
+
+\begin_layout LyX-Code
+    10          {
+\end_layout
+
+\begin_layout LyX-Code
+    11                  ....
+\end_layout
+
+\begin_layout LyX-Code
+    12          }
+\end_layout
+
+\begin_layout LyX-Code
+    13  
+\end_layout
+
+\begin_layout LyX-Code
+    14  
+\end_layout
+
+\begin_layout LyX-Code
+    15  ------------------------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+    16  
+\end_layout
+
+\begin_layout LyX-Code
+    17          DeviceAttribute da;
+\end_layout
+
+\begin_layout LyX-Code
+    18          vector<short> attr_data;
+\end_layout
+
+\begin_layout LyX-Code
+    19  
+\end_layout
+
+\begin_layout LyX-Code
+    20          da.reset_exceptions(DeviceAttribute::failed_flag);
+\end_layout
+
+\begin_layout LyX-Code
+    21  
+\end_layout
+
+\begin_layout LyX-Code
+    22          try
+\end_layout
+
+\begin_layout LyX-Code
+    23          {
+\end_layout
+
+\begin_layout LyX-Code
+    24                  da = device->read_attribute("Attr");
+\end_layout
+
+\begin_layout LyX-Code
+    25          }
+\end_layout
+
+\begin_layout LyX-Code
+    26          catch (DevFailed &e)
+\end_layout
+
+\begin_layout LyX-Code
+    27          {
+\end_layout
+
+\begin_layout LyX-Code
+    28                  .....
+\end_layout
+
+\begin_layout LyX-Code
+    29          }
+\end_layout
+
+\begin_layout LyX-Code
+    30  
+\end_layout
+
+\begin_layout LyX-Code
+    31          if (!(da >> attr_data))
+\end_layout
+
+\begin_layout LyX-Code
+    32          {
+\end_layout
+
+\begin_layout LyX-Code
+    33                  DevErrorList &err = da.get_err_stack();
+\end_layout
+
+\begin_layout LyX-Code
+    34                  .....
+\end_layout
+
+\begin_layout LyX-Code
+    35          }
+\end_layout
+
+\begin_layout LyX-Code
+    36          else
+\end_layout
+
+\begin_layout LyX-Code
+    37          {
+\end_layout
+
+\begin_layout LyX-Code
+    38                  .....
+\end_layout
+
+\begin_layout LyX-Code
+    39          }
+\end_layout
+
+\begin_layout LyX-Code
+    40  
+\end_layout
+
+\begin_layout LyX-Code
+    41  ----------------------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+    42  
+\end_layout
+
+\begin_layout LyX-Code
+    43          DeviceAttribute da;
+\end_layout
+
+\begin_layout LyX-Code
+    44          vector<short> attr_data;
+\end_layout
+
+\begin_layout LyX-Code
+    45  
+\end_layout
+
+\begin_layout LyX-Code
+    46          try
+\end_layout
+
+\begin_layout LyX-Code
+    47          {
+\end_layout
+
+\begin_layout LyX-Code
+    48                  da = device->read_attribute("Attr");
+\end_layout
+
+\begin_layout LyX-Code
+    49          }
+\end_layout
+
+\begin_layout LyX-Code
+    50          catch (DevFailed &e)
+\end_layout
+
+\begin_layout LyX-Code
+    51          {
+\end_layout
+
+\begin_layout LyX-Code
+    52                  ......
+\end_layout
+
+\begin_layout LyX-Code
+    53          }
+\end_layout
+
+\begin_layout LyX-Code
+    54  
+\end_layout
+
+\begin_layout LyX-Code
+    55          if (da.has_failed())
+\end_layout
+
+\begin_layout LyX-Code
+    56          {
+\end_layout
+
+\begin_layout LyX-Code
+    57                  DevErrorList &err = da.get_err_stack();
+\end_layout
+
+\begin_layout LyX-Code
+    58                  ....
+\end_layout
+
+\begin_layout LyX-Code
+    59          }
+\end_layout
+
+\begin_layout LyX-Code
+    60          else
+\end_layout
+
+\begin_layout LyX-Code
+    61          {
+\end_layout
+
+\begin_layout LyX-Code
+    62                  da >> attr_data;        
+\end_layout
+
+\begin_layout LyX-Code
+    63          }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The first way is coded between lines 1 and 13.
+ It uses the default behaviour of the DeviceAttribute object which is to
+ throw an exception when the user try to extract data when the server reports
+ an error when the attribute was read.
+ The second way is coded between line 17 and 40.
+ The DeviceAttribute object now does not throw "failed" exception any more
+ and the return value of the extractor operator is checked.
+ The third way is coded between line 43 and 63.
+ In this case, the attribute data validity is checked before trying to extract
+ them.
+\end_layout
+
+\begin_layout Subsection
+string &DeviceAttribute::get_name()
+\end_layout
+
+\begin_layout Standard
+Returns the name of the attribute
+\end_layout
+
+\begin_layout Subsection
+void DeviceAttribute::set_name(string &)
+\end_layout
+
+\begin_layout Standard
+Sets attribute name
+\end_layout
+
+\begin_layout Subsection
+void DeviceAttribute::set_name(const char *)
+\end_layout
+
+\begin_layout Standard
+Sets attribute name
+\end_layout
+
+\begin_layout Subsection
+AttrQuality &DeviceAttribute::get_quality()
+\end_layout
+
+\begin_layout Standard
+Returns the quality of the attribute: an enumerate type which can be one
+ of {ATTR_VALID, ATTR_INVALID, ATTR_ALARM, ATTR_CHANGING or ATTR_WARNING}.
+\end_layout
+
+\begin_layout Subsection
+int DeviceAttribute::get_dim_x()
+\end_layout
+
+\begin_layout Standard
+Returns the attribute read x dimension
+\end_layout
+
+\begin_layout Subsection
+int DeviceAttribute::get_dim_y()
+\end_layout
+
+\begin_layout Standard
+Returns the attribute read y dimension
+\end_layout
+
+\begin_layout Subsection
+int DeviceAttribute::get_written_dim_x()
+\end_layout
+
+\begin_layout Standard
+Returns the attribute write x dimension
+\end_layout
+
+\begin_layout Subsection
+int DeviceAttribute::get_written_dim_y()
+\end_layout
+
+\begin_layout Standard
+Returns the attribute write y dimension
+\end_layout
+
+\begin_layout Subsection
+AttributeDimension DeviceAttribute::get_r_dimension()
+\end_layout
+
+\begin_layout Standard
+Returns the attribute read dimension
+\end_layout
+
+\begin_layout Subsection
+AttributeDimension DeviceAttribute::get_w_dimension()
+\end_layout
+
+\begin_layout Standard
+Returns the attribute write dimension
+\end_layout
+
+\begin_layout Subsection
+long DeviceAttribute::get_nb_read()
+\end_layout
+
+\begin_layout Standard
+Returns the number of read values
+\end_layout
+
+\begin_layout Subsection
+long DeviceAttribute::get_nb_written()
+\end_layout
+
+\begin_layout Standard
+Returns the number of written values.
+ Here is an example of these last methods usage.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+     1  DeviceAttribute da;
+\end_layout
+
+\begin_layout LyX-Code
+     2  vector<short> attr_data;
+\end_layout
+
+\begin_layout LyX-Code
+     3  
+\end_layout
+
+\begin_layout LyX-Code
+     4  try
+\end_layout
+
+\begin_layout LyX-Code
+     5  {
+\end_layout
+
+\begin_layout LyX-Code
+     6     da = device->read_attribute("Attr");
+\end_layout
+
+\begin_layout LyX-Code
+     7     da >> attr_data;
+\end_layout
+
+\begin_layout LyX-Code
+     8  }
+\end_layout
+
+\begin_layout LyX-Code
+     9  catch (DevFailed &e)
+\end_layout
+
+\begin_layout LyX-Code
+    10  {
+\end_layout
+
+\begin_layout LyX-Code
+    11     ....
+\end_layout
+
+\begin_layout LyX-Code
+    12  }
+\end_layout
+
+\begin_layout LyX-Code
+    13  
+\end_layout
+
+\begin_layout LyX-Code
+    14  long read = da.get_nb_read();
+\end_layout
+
+\begin_layout LyX-Code
+    15  long written = da.get_nb_written();
+\end_layout
+
+\begin_layout LyX-Code
+    16  
+\end_layout
+
+\begin_layout LyX-Code
+    17  for (long i = 0;i < read;i++)
+\end_layout
+
+\begin_layout LyX-Code
+    18     cout << "Read value " << i+1 << " = " << attr_data[i] << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    19  
+\end_layout
+
+\begin_layout LyX-Code
+    20  for (long j = 0; j < written;j++)
+\end_layout
+
+\begin_layout LyX-Code
+    21     cout << "Last written value " << j+1 << " = " << attr_data[j
+ + read] << endl;
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+TimeVal &DeviceAttribute::get_date()
+\end_layout
+
+\begin_layout Standard
+Returns a reference to the time when the attribute was read in server
+\end_layout
+
+\begin_layout Subsection
+int DeviceAttribute::get_type()
+\end_layout
+
+\begin_layout Standard
+Returns the type of the attribute data.
+\end_layout
+
+\begin_layout Subsection
+AttrDataFormat DeviceAttribute::get_data_format()
+\end_layout
+
+\begin_layout Standard
+Returns the attribute data format.
+ Note that this information is valid only after the call to the device has
+ been executed.
+ Otherwise the FMT_UNKNOWN value of the AttrDataFormat enumeration is returned
+ or an exception is thrown according to the object exception flags.
+\end_layout
+
+\begin_layout Subsection
+ostream &operator<<(ostream &, DeviceAttribute &)
+\end_layout
+
+\begin_layout Standard
+Is an utility function to easily print the contents of a DeviceAttribute
+ object.
+ This function knows all types which could be inserted in a DeviceAttribute
+ object and print them accordingly if the data are valid.
+ It also prints the date returned within the attribute, the attribute name,
+ the dim_x and dim_y attribute parameter and its quality factor.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DeviceProxy *dev = new DeviceProxy("...");
+\end_layout
+
+\begin_layout LyX-Code
+DeviceAttribute attr;
+\end_layout
+
+\begin_layout LyX-Code
+attr = dev->read_attribute("MyAttribute");
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+cout << "Attribute returned: " << attr << endl;
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Tango::DeviceAttributeHistory
+\begin_inset CommandInset label
+LatexCommand label
+name "AttributeHistory"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This is the fundamental type for receiving data from device attribute polling
+ buffers.
+ This class inherits from the Tango::DeviceAttribute class.
+ One instance of this class is created for each attribute result history.
+ Within this class, you find the attribute result data or the exception
+ parameters and a flag indicating if the attribute has failed when it was
+ invoked by the device server polling thread.
+ For history calls, it is not possible to returns attribute error as exception.
+ See chapter on Advanced Features for all details regarding device polling.
+ On top of the methods inherited from the DeviceAttribute class, it offers
+ the following methods
+\end_layout
+
+\begin_layout Subsection
+ostream &operator<<(ostream &, DeviceAttributeHistory &)
+\end_layout
+
+\begin_layout Standard
+Is an utility function to easily print the contents of a DeviceAttributeHistory
+ object.
+ This function knows all types which could be inserted in a DeviceAttributeHisto
+ry object and print them accordingly.
+ It also prints date, attribute name, attribute dim_x and dim_y parameters,
+ attribute quality factor and error stack in case the attribute returned
+ an error.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DeviceProxy *dev = new DeviceProxy(
+\begin_inset Quotes eld
+\end_inset
+
+...
+\begin_inset Quotes erd
+\end_inset
+
+);
+\end_layout
+
+\begin_layout LyX-Code
+int hist_depth = 4;
+\end_layout
+
+\begin_layout LyX-Code
+vector<DeviceAttributeHistory> *hist;
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+hist = dev->attribute_history(
+\begin_inset Quotes eld
+\end_inset
+
+MyAttribute
+\begin_inset Quotes erd
+\end_inset
+
+,hist_depth);
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+for (int i = 0;i < hist_depth;i++)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+    cout << (*hist)[i] << endl;
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+delete hist;
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Tango::AttributeProxy()
+\end_layout
+
+\begin_layout Standard
+The high level object which provides the client with an easy-to-use interface
+ to TANGO device attributes.
+ AttributeProxy is a handle to the real Attribute (hence the name Proxy)
+ and is not the real Attribute (of course).
+ The AttributeProxy manages timeouts, stateless connections (new AttributeProxy(
+) nearly always works), and reconnection if the device server is restarted.
+\end_layout
+
+\begin_layout Subsection
+Constructors
+\end_layout
+
+\begin_layout Subsubsection
+AttributeProxy::AttributeProxy(string &name)
+\end_layout
+
+\begin_layout Standard
+Create an AttributeProxy to an attribute of the specified name.
+ The constructor will connect to the TANGO database, query for the device
+ to which the attribute belongs to network address and build a connection
+ to this device.
+ If the device to which the attribute belongs to is defined in the TANGO
+ database but the device server is not running, AttributeProxy will try
+ to build a connection every time the client tries to access the attribute.
+ If an alias
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+alias
+\end_layout
+
+\end_inset
+
+ name is defined for the attribute, this alias name can be used to create
+ the AttributeProxy instance.
+ If a device name alias is defined for the device, it can be used instead
+ of the three fields device name.
+ If the device to which the attribute belongs to is not defined in the database,
+ an exception is thrown.
+ Examples :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+AttributeProxy *my_attr = new AttributeProxy("my/own/device/attr");
+\end_layout
+
+\begin_layout LyX-Code
+AttributeProxy *my_attr_bis = new AttributeProxy("attr_alias");
+\end_layout
+
+\begin_layout LyX-Code
+AttributeProxy *my_attr_ter = new AttributeProxy("dev_alias/attr");
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+See appendix on device/attribute naming for all details about Tango device
+ or attribute naming syntax.
+ 
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: WrongNameSyntax, ConnectionFailed
+\end_layout
+
+\begin_layout Subsubsection
+AttributeProxy::AttributeProxy(const char *name)
+\end_layout
+
+\begin_layout Standard
+Idem previous call
+\end_layout
+
+\begin_layout Subsection
+Miscellaneous methods
+\end_layout
+
+\begin_layout Subsubsection
+DevState AttributeProxy::state()
+\end_layout
+
+\begin_layout Standard
+A method which returns the state of the device to which the attribute belongs
+ to.
+ This state is returned as a Tango::DevState type.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+dev_state = my_attr->state() << endl;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed
+\end_layout
+
+\begin_layout Subsubsection
+string AttributeProxy::status()
+\end_layout
+
+\begin_layout Standard
+A method which return the status of the device to which the attribute belongs
+ to.
+ The status is returned as a string.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+cout << "device status" << my_attr->status() << endl;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed
+\end_layout
+
+\begin_layout Subsubsection
+int AttributeProxy::ping()
+\end_layout
+
+\begin_layout Standard
+A method which sends a ping to the device to which the attribute belongs
+ and returns the time elapsed in microseconds.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+cout << "device ping took " << my_device->ping() << 
+\begin_inset Quotes eld
+\end_inset
+
+ microseconds
+\begin_inset Quotes erd
+\end_inset
+
+ << endl;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed
+\end_layout
+
+\begin_layout Subsubsection
+string AttributeProxy::name()
+\end_layout
+
+\begin_layout Standard
+Returns the attribute name
+\end_layout
+
+\begin_layout Subsubsection
+DeviceProxy *get_device_proxy()
+\end_layout
+
+\begin_layout Standard
+Returns the DeviceProxy instance used to communicate with the device to
+ which the attributes belongs.
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+
+\end_layout
+
+\begin_layout Subsection
+Synchronous related methods
+\end_layout
+
+\begin_layout Subsubsection
+AttributeInfo AttributeProxy::get_config()
+\end_layout
+
+\begin_layout Standard
+Return the attribute configuration.
+ AttributeInfo is a struct defined as follows :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+typedef struct _AttributeInfo { 
+\end_layout
+
+\begin_layout LyX-Code
+   string name; 
+\end_layout
+
+\begin_layout LyX-Code
+   AttrWriteType writable; 
+\end_layout
+
+\begin_layout LyX-Code
+   AttrDataFormat data_format; 
+\end_layout
+
+\begin_layout LyX-Code
+   int data_type; 
+\end_layout
+
+\begin_layout LyX-Code
+   int max_dim_x; 
+\end_layout
+
+\begin_layout LyX-Code
+   int max_dim_y; 
+\end_layout
+
+\begin_layout LyX-Code
+   string description; 
+\end_layout
+
+\begin_layout LyX-Code
+   string label; 
+\end_layout
+
+\begin_layout LyX-Code
+   string unit; 
+\end_layout
+
+\begin_layout LyX-Code
+   string standard_unit; 
+\end_layout
+
+\begin_layout LyX-Code
+   string display_unit; 
+\end_layout
+
+\begin_layout LyX-Code
+   string format; 
+\end_layout
+
+\begin_layout LyX-Code
+   string min_value; 
+\end_layout
+
+\begin_layout LyX-Code
+   string max_value; 
+\end_layout
+
+\begin_layout LyX-Code
+   string min_alarm; 
+\end_layout
+
+\begin_layout LyX-Code
+   string max_alarm; 
+\end_layout
+
+\begin_layout LyX-Code
+   string writable_attr_name; 
+\end_layout
+
+\begin_layout LyX-Code
+   vector<string> extensions; 
+\end_layout
+
+\begin_layout LyX-Code
+   Tango::DispLevel disp_level;
+\end_layout
+
+\begin_layout LyX-Code
+} AttributeInfo; 
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::set_config(AttributeInfo &)
+\end_layout
+
+\begin_layout Standard
+Change the attribute configuration.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DeviceUnlocked, DevFailed
+ from device
+\end_layout
+
+\begin_layout Subsubsection
+DeviceAttribute AttributeProxy::read()
+\end_layout
+
+\begin_layout Standard
+Read the attribute.
+ To extract the value you have to use the operator of the class DeviceAttribute
+ which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the attribute native type
+ to user type e.g.
+ if an attribute returns a short you cannot extract it as a double (this
+ will return 0) you have to extract it as a short.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::write(DeviceAttribute&)
+\end_layout
+
+\begin_layout Standard
+Write the attribute.
+ To insert the value to write you have to use the operator of the class
+ DeviceAttribute which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the user type to the attribute
+ native type e.g.
+ if an attribute expects a short you cannot insert it as a double (this
+ will throw an exception) you have to insert it as a short.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DeviceUnlocked, DevFailed
+ from device
+\end_layout
+
+\begin_layout Subsubsection
+DeviceAttribute AttributeProxy::write_read(DeviceAttribute&)
+\end_layout
+
+\begin_layout Standard
+Write then read a single attribute in a single network call.
+ By default (serialisation by device), the execution of this call in the
+ server can't be interrupted by other clients.
+ To insert/extract the value to write/read you have to use the operator
+ of the class DeviceAttribute which corresponds to the data type of the
+ attribute.
+ NOTE: There is no automatic type conversion from the user type to the attribute
+ native type e.g.
+ if an attribute expects a short you cannot insert it as a double (this
+ will throw an exception) you have to insert it as a short.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DeviceUnlocked, DevFailed
+ from device
+\end_layout
+
+\begin_layout Subsubsection
+vector<DeviceAttributeHistory> *AttributeProxy::history(int)
+\end_layout
+
+\begin_layout Standard
+Retrieve attribute history from the attribute polling buffer.
+ The argument is the wanted history depth.
+ This method returns a vector of DeviceAttributeHistory types.
+ This method allocates memory for the vector of DeviceAttributeHistory returned
+ to the caller.
+ It is the caller responsibility to delete this memory.
+ Class DeviceAttributeHistory is detailed on chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "AttributeHistory"
+
+\end_inset
+
+See chapter on Advanced Feature for all details regarding polling.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+AttributeProxy attr = new AttributeProxy("my/own/device/Current"); 
+\end_layout
+
+\begin_layout LyX-Code
+vector<DeviceAttributeHistory> *hist;
+\end_layout
+
+\begin_layout LyX-Code
+hist = attr->history(5);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+for (int i = 0;i < 5;i++) 
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+{
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+
+\end_layout
+
+\begin_layout LyX-Code
+    bool fail = (*hist)[i].has_failed();
+\end_layout
+
+\begin_layout LyX-Code
+    if (fail == false)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+        cout << "Attribute name = " << (*hist)[i].get_name() << endl;
+\end_layout
+
+\begin_layout LyX-Code
+        cout << "Attribute quality factor = " << (*hist)[i].get_quality()
+ << endl;
+\end_layout
+
+\begin_layout LyX-Code
+        long value;
+\end_layout
+
+\begin_layout LyX-Code
+        (*hist)[i] >> value;
+\end_layout
+
+\begin_layout LyX-Code
+        cout << "Current = " << value << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    else
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+        cout << "Attribute failed !" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+        cout << "Error level 0 desc = " << ((*hist)[i].get_err_stack())[0].desc
+ << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    cout << "Date = " << (*hist)[i].get_date().tv_sec << endl;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+}
+\end_layout
+
+\begin_layout LyX-Code
+delete hist;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+NonSupportedFeature, ConnectionFailed, CommunicationFailed, DevFailed from
+ device
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Subsection
+Asynchronous methods
+\end_layout
+
+\begin_layout Subsubsection
+long AttributeProxy::read_asynch()
+\end_layout
+
+\begin_layout Standard
+Read the attribute asynchronously (polling model).
+ This call returns an 
+\emph on
+asynchronous call identifier
+\emph default
+ which is needed to get the attribute value.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed
+\end_layout
+
+\begin_layout Subsubsection
+DeviceAttribute *AttributeProxy::read_reply(long id)
+\end_layout
+
+\begin_layout Standard
+Check if the answer of an asynchronous read is arrived (polling model).
+ id is the asynchronous call identifier.
+ If the reply is arrived and if it is a valid reply, it is returned to the
+ caller in a DeviceAttribute object.
+ If the reply is an exception, it is re-thrown by this call.
+ An exception is also thrown in case of the reply is not yet arrived.
+ To extract attribute value, you have to use the operator of the class DeviceAtt
+ribute which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the attribute native type
+ to user type e.g.
+ if an attribute returns a short you cannot extract it as a double, you
+ have to extract it as a short.
+ Memory has been allocated for the DeviceAttribute object returned to the
+ caller.
+ This is the caller responsibility to delete this memory.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+AsynCall, AsynReplyNotArrived, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+DeviceAttribute *AttributeProxy::read_reply(long id, long timeout)
+\end_layout
+
+\begin_layout Standard
+Check if the answer of an asynchronous read is arrived (polling model).
+ id is the asynchronous call identifier.
+ If the reply is arrived and if it is a valid reply, it is returned to the
+ caller in a DeviceAttribute object.
+ If the reply is an exception, it is re-thrown by this call.
+ If the reply is not yet arrived, the call will wait (blocking the process)
+ for the time specified in timeout.
+ If after timeout milliseconds, the reply is still not there, an exception
+ is thrown.
+ If timeout is set to 0, the call waits until the reply arrived.
+ To extract attribute value, you have to use the operator of the class DeviceAtt
+ribute which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the attribute native type
+ to user type e.g.
+ if an attribute returns a short you cannot extract it as a double, you
+ have to extract it as a short.
+ Memory has been allocated for the DeviceAttribute object returned to the
+ caller.
+ This is the caller responsibility to delete this memory.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+AsynCall, AsynReplyNotArrived, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+long AttributeProxy::write_asynch(DeviceAttribute &argin)
+\end_layout
+
+\begin_layout Standard
+Write the attribute asynchronously (polling model).
+ To insert the value to write you have to use the operator of the class
+ DeviceAttribute which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the user type to the attribute
+ native type e.g.
+ if an attribute expects a short you cannot insert it as a double (this
+ will throw an exception) you have to insert it as a short.
+ This call returns an 
+\emph on
+asynchronous call identifier
+\emph default
+ which is needed to get the server reply.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+ConnectionFailed
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::write_reply(long id)
+\end_layout
+
+\begin_layout Standard
+Check if the answer of an asynchronous write is arrived (polling model).
+ id is the asynchronous call identifier.
+ If the reply is arrived and if it is a valid reply, the call returned.
+ If the reply is an exception, it is re-thrown by this call.
+ An exception is also thrown in case of the reply is not yet arrived.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+AsynCall, AsynReplyNotArrived, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::write_reply(long id, long timeout)
+\end_layout
+
+\begin_layout Standard
+Check if the answer of an asynchronous write is arrived (polling model).
+ id is the asynchronous call identifier.
+ If the reply is arrived and if it is a valid reply, the call returned.
+ If the reply is an exception, it is re-thrown by this call.
+ If the reply is not yet arrived, the call will wait (blocking the process)
+ for the time specified in timeout.
+ If after timeout milliseconds, the reply is still not there, an exception
+ is thrown.
+ If timeout is set to 0, the call waits until the reply arrived.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+AsynCall, AsynReplyNotArrived, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::read_asynch(CallBack &cb)
+\end_layout
+
+\begin_layout Standard
+Read the attribute asynchronously using the callback model.
+ The argument is a reference to a callback object.
+ This callback object should be an instance of a user class inheriting from
+ the 
+\emph on
+Tango::CallBack
+\emph default
+ class with the 
+\emph on
+attr_read()
+\emph default
+ method overloaded.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+ConnectionFailed
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::write_asynch(DeviceAttribute &argin, CallBack &cb)
+\end_layout
+
+\begin_layout Standard
+Write the attribute asynchronously using the callback model.
+ The argument is a reference to a callback object.
+ This callback object should be an instance of a user class inheriting from
+ the 
+\emph on
+Tango::CallBack
+\emph default
+ class with the 
+\emph on
+attr_written()
+\emph default
+ method overloaded.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+ConnectionFailed
+\end_layout
+
+\begin_layout Subsection
+Polling related methods
+\end_layout
+
+\begin_layout Subsubsection
+bool AttributeProxy::is_polled()
+\end_layout
+
+\begin_layout Standard
+Returns true if the attribute is polled.
+ Otherwise, returns false.
+\end_layout
+
+\begin_layout Subsubsection
+int AttributeProxy::get_poll_period()
+\end_layout
+
+\begin_layout Standard
+Returns the attribute polling period in mS.
+ If the attribute is not polled, it returns 0.
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::poll(int period)
+\end_layout
+
+\begin_layout Standard
+Add the attribute to the list of polled attributes.
+ The polling period is specified by "period" (in mS).
+ If the attribute is already polled, this method will update the polling
+ period according to "period".
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::stop_poll()
+\end_layout
+
+\begin_layout Standard
+Remove attribute from the list of polled attributes.
+\end_layout
+
+\begin_layout Subsection
+Event related methods
+\end_layout
+
+\begin_layout Subsubsection
+int AttributeProxy::subscribe_event(EventType event, CallBack *cb, const
+ vector<string> &filters)
+\end_layout
+
+\begin_layout Standard
+The client call to subscribe for event reception in the 
+\series bold
+push model
+\series default
+.
+ The client implements a callback method which is triggered when the event
+ is received either by polling or a dedicated thread.
+ Filtering is done based on the reason specified and the event type.
+ For example when reading the state and the reason specified is "change"
+ the event will be fired only when the state changes.
+ Events consist of an attribute name and the event reason.
+ A standard set of reasons are implemented by the system, additional device
+ specific reasons can be implemented by device servers programmers.
+\end_layout
+
+\begin_layout Standard
+The 
+\emph on
+event
+\emph default
+ parameter is the event reason and must be on the enumerated values:
+\end_layout
+
+\begin_layout Itemize
+Tango::CHANGE_EVENT
+\end_layout
+
+\begin_layout Itemize
+Tango::PERIODIC_EVENT
+\end_layout
+
+\begin_layout Itemize
+Tango::ARCHIVE_EVENT
+\end_layout
+
+\begin_layout Itemize
+Tango::ATTR_CONF_EVENT
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+cb
+\emph default
+ is a pointer to a class inheriting from the Tango CallBack class and implementi
+ng a 
+\emph on
+push_event()
+\emph default
+ method, 
+\emph on
+filters
+\emph default
+ is a variable list of name,value pairs which define additional filters
+ for events.
+ The 
+\emph on
+subscribe_event()
+\emph default
+ call returns an event id which has to be specified when unsubscribing from
+ this event.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+int AttributeProxy::subscribe_event(EventType event, CallBack *cb, const
+ vector<string> &filters, bool stateless)
+\end_layout
+
+\begin_layout Standard
+This subscribe event method has the same functionality as described in the
+ last section.
+ It adds an additional flag called 
+\emph on
+stateless
+\emph default
+.
+ When the 
+\emph on
+stateless
+\emph default
+ flag is set to 
+\emph on
+false
+\emph default
+, an exception will be thrown when the event subscription encounters a problem.
+ 
+\end_layout
+
+\begin_layout Standard
+With the 
+\emph on
+stateless
+\emph default
+ flag set to 
+\emph on
+true
+\emph default
+, the event subscription will always succeed, even if the corresponding
+ device server is not running.
+ The keep alive thread will try every 10 seconds to subscribe for the specified
+ event.
+ At every subscription retry, a callback is executed which contains the
+ corresponding exception.
+\end_layout
+
+\begin_layout Standard
+Exception: EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+int AttributeProxy::subscribe_event(EventType event, int event_queue_size,
+ const vector<string> &filters, bool stateless)
+\end_layout
+
+\begin_layout Standard
+The client call to subscribe for event reception in the 
+\series bold
+pull model
+\series default
+.
+ Instead of a callback method the client has to specify the size of the
+ event reception buffer.
+\end_layout
+
+\begin_layout Standard
+The event reception buffer is implemented as a round robin buffer.
+ This way the client can set-up different ways to receive events.
+\end_layout
+
+\begin_layout Standard
+Event reception buffer size = 1 : The client is interested only in the value
+ of the last event received.
+ All other events that have been received since the last reading are discarded.
+\end_layout
+
+\begin_layout Standard
+Event reception buffer size > 1 : The client has chosen to keep an event
+ history of a given size.
+ When more events arrive since the last reading, older events will be discarded.
+\end_layout
+
+\begin_layout Standard
+Event reception buffer size = ALL_EVENTS : The client buffers all received
+ events.
+ The buffer size is unlimited and only restricted by the available memory
+ for the client.
+\end_layout
+
+\begin_layout Standard
+All other parameters are similar to the descriptions given in the last two
+ sections.
+\end_layout
+
+\begin_layout Standard
+Exception: EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::unsubscribe_event(int event_id)
+\end_layout
+
+\begin_layout Standard
+Unsubscribe a client from receiving the event specified by 
+\emph on
+event_id
+\emph default
+.
+ 
+\emph on
+event_id
+\emph default
+ is the event identifier returned by the 
+\emph on
+AttributeProxy::subscribe_event()
+\emph default
+ method.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception:
+\emph default
+ 
+\emph on
+EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::get_events(int event_id, CallBack *cb)
+\end_layout
+
+\begin_layout Standard
+The method extracts all waiting events from the event reception buffer and
+ executes the callback method cb for every event.
+ During event subscription the client must have chosen the pull model for
+ this event.
+ event_id is the event identifier returned by the AttributeProxy::subscribe_even
+t() method.
+\end_layout
+
+\begin_layout Standard
+Exception: EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::get_events(int event_id, EventDataList &event_list)
+\end_layout
+
+\begin_layout Standard
+The method extracts all waiting events from the event reception buffer.
+ The returned event_list is a vector of EventData pointers.
+ The EventData object contains the event information as for the callback
+ methods.
+ 
+\end_layout
+
+\begin_layout Standard
+During event subscription the client must have chosen the pull model for
+ this event.
+ event_id is the event identifier returned by the AttributeProxy::subscribe_even
+t() method.
+\end_layout
+
+\begin_layout Standard
+Exception: EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::get_events(int event_id, AttrConfEventDataList &event_list)
+\end_layout
+
+\begin_layout Standard
+The method extracts all waiting attribute configuration events from the
+ event reception buffer.
+ The returned event_list is a vector of AttrConfEventData pointers.
+ The AttrConfEventData object contains the event information as for the
+ callback methods.
+ 
+\end_layout
+
+\begin_layout Standard
+During event subscription the client must have chosen the pull model for
+ this event.
+ event_id is the event identifier returned by the AttributeProxy::subscribe_even
+t() method.
+\end_layout
+
+\begin_layout Standard
+Exception: EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+int AttributeProxy::event_queue_size(int event_id)
+\end_layout
+
+\begin_layout Standard
+Returns the number of stored events in the event reception buffer.
+ After every call to DeviceProxy:get_events(), the event queue size is 0.
+\end_layout
+
+\begin_layout Standard
+During event subscription the client must have chosen the pull model for
+ this event.
+ event_id is the event identifier returned by the AttributeProxy::subscribe_even
+t() method.
+\end_layout
+
+\begin_layout Standard
+Exception: EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+TimeVal AttributeProxy::get_last_event_date(int event_id)
+\end_layout
+
+\begin_layout Standard
+Returns the arrival time of the last event stored in the event reception
+ buffer.
+ After every call to DeviceProxy:get_events(), the event reception buffer
+ is empty.
+ In this case an exception will be returned.
+\end_layout
+
+\begin_layout Standard
+During event subscription the client must have chosen the pull model for
+ this event.
+ event_id is the event identifier returned by the AttributeProxy::subscribe_even
+t() method.
+\end_layout
+
+\begin_layout Standard
+Exception: EventSystemFailed
+\end_layout
+
+\begin_layout Subsubsection
+bool AttributeProxy::is_event_queue_empty(int event_id)
+\end_layout
+
+\begin_layout Standard
+Returns true when the event reception buffer is empty.
+\end_layout
+
+\begin_layout Standard
+During event subscription the client must have chosen the pull model for
+ this event.
+ event_id is the event identifier returned by the AttributeProxy::subscribe_even
+t() method.
+\end_layout
+
+\begin_layout Standard
+Exception: EventSystemFailed
+\end_layout
+
+\begin_layout Subsection
+Property related methods
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::get_property (string&, DbData&)
+\end_layout
+
+\begin_layout Standard
+Get a single property for the attribute.
+ The property to get is specified as a string.
+ Refer to DbDevice::get_property() and DbData sections below for details
+ on the DbData type.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: NonDbDevice, ConnectionFailed (with database), CommunicationFailed
+ (with database), DevFailed from database device
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::get_property (vector<string>&, DbData&)
+\end_layout
+
+\begin_layout Standard
+Get a list of properties for the attribute.
+ The properties to get are specified as a vector of strings.
+ Refer to DbDevice::get_property() and DbData sections below for details
+ on the DbData type.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: NonDbDevice, ConnectionFailed (with database), CommunicationFailed
+ (with database), DevFailed from database device
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::get_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+Get property(ies) for the attribute.
+ Properties to get are specified using the DbData type.
+ Refer to DbDevice::get_property() and DbData sections below for details.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: NonDbDevice, ConnectionFailed (with database), CommunicationFailed
+ (with database), DevFailed from database device
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::put_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+Put property(ies) for an attribute.
+ Properties to put are specified using the DbData type.
+ Refer to DbDevice::put_property() and DbData sections below for details.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: NonDbDevice, ConnectionFailed (with database), CommunicationFailed
+ (with database), DevFailed from database device
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::delete_property (string&, DbData&)
+\end_layout
+
+\begin_layout Standard
+Delete a single property for an attribute.
+ The property to delete is specified as a string.
+ Refer to DbDevice::delete_property() and DbData sections below for details
+ on the DbData type.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: NonDbDevice, ConnectionFailed (with database), CommunicationFailed
+ (with database), DevFailed from database device
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::delete_property (vector<string>&, DbData&)
+\end_layout
+
+\begin_layout Standard
+Delete a list of properties for an attribute.
+ The properties to delete are specified as a vector of strings.
+ Refer to DbDevice::get_property() and DbData sections below for details
+ on the DbData type.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: NonDbDevice, ConnectionFailed (with database), CommunicationFailed
+ (with database), DevFailed from database device
+\end_layout
+
+\begin_layout Subsubsection
+void AttributeProxy::delete_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+Delete property(ies) for an attribute.
+ Properties to delete are specified using the DbData type.
+ Refer to DbDevice::get_property() and DbData sections below for details.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: NonDbDevice, ConnectionFailed (with database), CommunicationFailed
+ (with database), DevFailed from database device
+\end_layout
+
+\begin_layout Section
+Tango::ApiUtil
+\end_layout
+
+\begin_layout Standard
+This class is a singleton.
+ Therefore, it is not necessary to create it.
+ It will be automatically done.
+ A static method allows a user to retrieve the instance
+\end_layout
+
+\begin_layout Subsection
+static ApiUtil *ApiUtil::instance()
+\end_layout
+
+\begin_layout Standard
+Return the ApiUtil singleton instance.
+\end_layout
+
+\begin_layout Subsection
+static void ApiUtil::cleanup()
+\end_layout
+
+\begin_layout Standard
+Destroy the ApiUtil singleton instance.
+\end_layout
+
+\begin_layout Subsection
+long ApiUtil::pending_asynch_call(asyn_req_type req)
+\end_layout
+
+\begin_layout Standard
+Return number of asynchronous pending requests (any device).
+ The input parameter is an enumeration with three values which are:
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+POLLING : Return only polling model asynchronous request number
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+CALL_BACK : Return only callback model asynchronous request number
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+ALL_ASYNCH : Return all asynchronous request number
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: None
+\end_layout
+
+\begin_layout Subsection
+void ApiUtil::get_asynch_replies()
+\end_layout
+
+\begin_layout Standard
+Fire callback methods for all (any device) asynchronous requests (command
+ and attribute) with already arrived replied.
+ Returns immediately if there is no replies already arrived or if there
+ is no asynchronous requests.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: None, all errors are reported using the err and errors fields
+ of the parameter passed to the callback method.
+ See chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Asynchronous-callback-related"
+
+\end_inset
+
+ for details.
+\end_layout
+
+\begin_layout Subsection
+void ApiUtil::get_asynch_replies(long timeout)
+\end_layout
+
+\begin_layout Standard
+Fire callback methods for all (any device) asynchronous requests (command
+ and attributes) with already arrived replied.
+ Wait and block the caller for timeout milliseconds if they are some device
+ asynchronous requests which are not yet arrived.
+ Returns immediately if there is no asynchronous request.
+ If timeout is set to 0, the call waits until all the asynchronous requests
+ sent has received a reply.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: AsynReplyNotArrived.
+ All other errors are reported using the err and errors fields of the object
+ passed to the callback methods.
+ See chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Asynchronous-callback-related"
+
+\end_inset
+
+ for details.
+\end_layout
+
+\begin_layout Subsection
+void ApiUtil::set_asynch_cb_sub_model(cb_sub_model model)
+\end_layout
+
+\begin_layout Standard
+Set the asynchronous callback sub-model between the pull and push sub-model.
+ See chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Request-model"
+
+\end_inset
+
+ to read the definition of these sub-model.
+ The cb_sub_model data type is an enumeration with two values which are
+ :
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+PUSH_CALLBACK : The push sub-model
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+PULL_CALLBACK : The pull sub-model
+\end_layout
+
+\begin_layout Standard
+By default, all Tango client using asynchronous callback model are in pull
+ sub-model.
+ This call must be used to switch to the push sub-model.
+ NOTE that in push sub-model, a separate thread is spawned to deal with
+ server replies.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: None
+\end_layout
+
+\begin_layout Subsection
+cb_sub_model ApiUtil::get_asynch_cb_sub_model()
+\end_layout
+
+\begin_layout Standard
+Get the asynchronous callback sub-model.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: None
+\end_layout
+
+\begin_layout Subsection
+static int ApiUtil::get_env_var(const char *name,string &value);
+\end_layout
+
+\begin_layout Standard
+Get environment variable.
+ On Unixes OS, this call tries to get the variable in the caller environment
+ then in a file 
+\emph on
+.tangorc
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+tangorc
+\end_layout
+
+\end_inset
+
+
+\emph default
+ in the user home directory and finally in a file 
+\emph on
+/etc/tangorc
+\emph default
+.
+ On Windows, this call looks in the user environment then in a file stored
+ in %TANGO_HOME%/tangorc.
+ This method returns 0 of the environment variable is found.
+ Otherwise, it returns -1.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: None
+\end_layout
+
+\begin_layout Section
+Asynchronous callback related classes
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Asynchronous-callback-related"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Tango::CallBack
+\end_layout
+
+\begin_layout Standard
+When using the event push model (callback automatically executed), there
+ are some cases (same callback used for events coming from different devices
+ hosted in device server process running on different hosts) where the callback
+ method could be executed concurently by different threads started by the
+ ORB.
+ The user has to code his callback method in a 
+\series bold
+thread
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+thread
+\end_layout
+
+\end_inset
+
+ 
+\series bold
+safe
+\series default
+ manner.
+\end_layout
+
+\begin_layout Subsubsection
+void CallBack::cmd_ended(CmdDoneEvent *event)
+\end_layout
+
+\begin_layout Standard
+This method is defined as being empty and must be overloaded by the user
+ when the asynchronous callback model is used.
+ This is the method which will be executed when the server reply from a
+ command_inout is received in both push and pull sub-mode.
+\end_layout
+
+\begin_layout Subsubsection
+void CallBack::attr_read(AttrReadEvent *event)
+\end_layout
+
+\begin_layout Standard
+This method is defined as being empty and must be overloaded by the user
+ when the asynchronous callback model is used.
+ This is the method which will be executed when the server reply from a
+ read_attribute(s) is received in both push and pull sub-mode.
+\end_layout
+
+\begin_layout Subsubsection
+void CallBack::attr_written(AttrWrittenEvent *event)
+\end_layout
+
+\begin_layout Standard
+This method is defined as being empty and must be overloaded by the user
+ when the asynchronous callback model is used.
+ This is the method which will be executed when the server reply from a
+ write_attribute(s) is received in both push and pull sub-mode.
+\end_layout
+
+\begin_layout Subsubsection
+void CallBack::push_event(EventData *event)
+\end_layout
+
+\begin_layout Standard
+This method is defined as being empty and must be overloaded by the user
+ when events are used.
+ This is the method which will be executed when the server send event(s)
+ to the client.
+\end_layout
+
+\begin_layout Subsubsection
+void CallBack::push_event(AttrConfEventData *event)
+\end_layout
+
+\begin_layout Standard
+This method is defined as being empty and must be overloaded by the user
+ when events are used.
+ This is the method which will be executed when the server send attribute
+ configuration change event(s) to the client.
+\end_layout
+
+\begin_layout Subsubsection
+void CallBack::push_event(DataReadyEventData *event)
+\end_layout
+
+\begin_layout Standard
+This method is defined as being empty and must be overloaded by the user
+ when events are used.
+ This is the method which will be executed when the server send attribute
+ data ready event(s) to the client.
+\end_layout
+
+\begin_layout Subsection
+Tango::CmdDoneEvent
+\end_layout
+
+\begin_layout Standard
+This class is used to pass data to the callback method in asynchronous callback
+ model for command execution.
+ It contains the following public field
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+device : The DeviceProxy object on which the call was executed (Tango::DevicePro
+xy *)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+cmd_name : The command name (string &)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+argout : The command argout (DeviceData &)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+err : A boolean flag set to true if the command failed.
+ False otherwise (bool)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+errors : The error stack (DevErrorList &)
+\end_layout
+
+\begin_layout Subsection
+Tango::AttrReadEvent
+\end_layout
+
+\begin_layout Standard
+This class is used to pass data to the callback method in asynchronous callback
+ model for read_attribute(s) execution.
+ It contains the following public field
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+device : The DeviceProxy object on which the call was executed (Tango::DevicePro
+xy *)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+attr_names : The attribute name list (vector<string> &)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+argout : The attribute data (vector<DeviceAttribute> *)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+err : A boolean flag set to true if the request failed.
+ False otherwise (bool)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+errors : The error stack (DevErrorList &)
+\end_layout
+
+\begin_layout Standard
+To extract attribute value(s), you have to use the operator of the class
+ DeviceAttribute which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the attribute native type
+ to user type e.g.
+ if an attribute returns a short you cannot extract it as a double, you
+ have to extract it as a short.
+ Memory has been allocated for the vector of DeviceAttribute objects passed
+ to the caller.
+ This is the caller responsibility to delete this memory.
+\end_layout
+
+\begin_layout Subsection
+Tango::AttrWrittenEvent
+\end_layout
+
+\begin_layout Standard
+This class is used to pass data to the callback method in asynchronous callback
+ model for write_attribute(s) execution.
+ It contains the following public field
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+device : The DeviceProxy object on which the call was executed (Tango::DevicePro
+xy *)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+attr_names : The attribute name list (vector<string> &)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+err : A boolean flag set to true if the request failed.
+ False otherwise (bool)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+errors : The error stack (DevErrorList &)
+\end_layout
+
+\begin_layout Subsection
+Tango::EventData
+\end_layout
+
+\begin_layout Standard
+This class is used to pass data to the callback method when an event is
+ sent to the client.
+ It contains the following public field
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+device : The DeviceProxy object on which the call was executed (Tango::DevicePro
+xy *)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+attr_name : The attribute name (std::string &)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+event : The event name (std::string &)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+attr_value : The attribute data (DeviceAttribute *)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+err : A boolean flag set to true if the request failed.
+ False otherwise (bool)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+errors : The error stack (DevErrorList &)
+\end_layout
+
+\begin_layout Standard
+To extract attribute value(s), you have to use the operator of the class
+ DeviceAttribute which corresponds to the data type of the attribute.
+ NOTE: There is no automatic type conversion from the attribute native type
+ to user type e.g.
+ if an attribute returns a short you cannot extract it as a double, you
+ have to extract it as a short.
+ Memory has been allocated for the vector of DeviceAttribute objects passed
+ to the caller.
+ This is the caller responsibility to delete this memory.
+\end_layout
+
+\begin_layout Subsection
+Tango::AttrConfEventData
+\end_layout
+
+\begin_layout Standard
+This class is used to pass data to the callback method when an attribute
+ configuration event is sent to the client.
+ It contains the following public field
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+device : The DeviceProxy object on which the call was executed (Tango::DevicePro
+xy *)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+attr_name : The attribute name (std::string &)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+event : The event name (std::string &)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+attr_conf : The attribute configuration (AttributeInfoEx *)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+err : A boolean flag set to true if the request failed.
+ False otherwise (bool)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+errors : The error stack (DevErrorList &)
+\end_layout
+
+\begin_layout Subsection
+Tango::DataReadyEventData
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DataReadyEventData
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This class is used to pass data to the callback method when an attribute
+ data ready event is sent to the client.
+ It contains the following public field
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+device : The DeviceProxy object on which the call was executed (Tango::DevicePro
+xy *)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+attr_name : The attribute name (std::string &)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+event : The event name (std::string &)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+attr_data_type :The attribute data type (int)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+ctr : The user counter.
+ Set to 0 if not defined when sent by the server (int)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+err : A boolean flag set to true if the request failed.
+ False otherwise (bool)
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+errors : The error stack (DevErrorList &)
+\end_layout
+
+\begin_layout Section
+Tango::Group
+\end_layout
+
+\begin_layout Subsection
+Constructor and Destructor
+\end_layout
+
+\begin_layout Subsubsection
+Group::Group (const std::string& name)
+\end_layout
+
+\begin_layout Standard
+Instanciate an empty group.
+ The group name allows retrieving a sub-group in the hierarchy.
+ 
+\end_layout
+
+\begin_layout Standard
+See also: Group::~Group(), Group::get_group().
+ 
+\end_layout
+
+\begin_layout Subsubsection
+Group::~Group ()
+\end_layout
+
+\begin_layout Standard
+Delete a group and all its elements.
+ 
+\end_layout
+
+\begin_layout Standard
+Be aware that a group always gets the ownership of its children and deletes
+ them when it is itself deleted.
+ Therefore, never try to delete a Group (respectively a DeviceProxy) returned
+ by a call to 
+\emph on
+Tango::Group::get_group()
+\emph default
+ (respectively to 
+\emph on
+Tango::Group::get_device()
+\emph default
+).
+ Use the 
+\emph on
+Tango::Group::remove()
+\emph default
+ method instead.
+\end_layout
+
+\begin_layout Standard
+See also: Group::Group(), Group::remove(), Group::remove_all().
+ 
+\end_layout
+
+\begin_layout Subsection
+Group Management Related Methods
+\end_layout
+
+\begin_layout Subsubsection
+void Group::add (Group* group, int timeout_ms = -1)
+\end_layout
+
+\begin_layout Standard
+Attaches a (sub)group.
+ 
+\end_layout
+
+\begin_layout Standard
+Be aware that a group always gets the ownership of its children and deletes
+ them when it is itself deleted.
+ Therefore, never try to delete a Group attached to a Group.
+ Use the 
+\emph on
+Group::remove()
+\emph default
+ method instead.
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+timeout_ms
+\emph default
+ parameter is different from -1, the client side timeout associated to each
+ device composing the group added is set to 
+\emph on
+timeout_ms
+\emph default
+ milliseconds.
+ If 
+\emph on
+timeout_ms
+\emph default
+ is -1, timeouts are not changed.
+\end_layout
+
+\begin_layout Standard
+This method does nothing if the specified group is already attached (i.e.
+ it is silently ignored) and 
+\emph on
+timeout_ms
+\emph default
+ = -1.
+\end_layout
+
+\begin_layout Standard
+If the specified group is already attached and 
+\emph on
+timeout_ms
+\emph default
+ is different from -1, the client side timeout of each device composing
+ the group given in parameter is set to 
+\emph on
+timeout_ms
+\emph default
+ milliseconds.
+\end_layout
+
+\begin_layout Standard
+See also: all other forms of Group::add() and Group::set_timeout_millis().
+\end_layout
+
+\begin_layout Subsubsection
+void Group::add (const std::string& pattern, int timeout_ms = -1)
+\end_layout
+
+\begin_layout Standard
+Attaches any device which name matches the specified 
+\emph on
+pattern
+\emph default
+.
+ 
+\end_layout
+
+\begin_layout Standard
+The pattern parameter can be a simple device name or a device name pattern
+ (e.g.
+ domain_*/ family/member_*).
+\end_layout
+
+\begin_layout Standard
+This method first asks to the Tango database the list of device names matching
+ the pattern.
+ Devices are then attached to the group in the order in which they are returned
+ by the database.
+\end_layout
+
+\begin_layout Standard
+Any device already present in the hierarchy (i.e.
+ a device belonging to the group or to one of its subgroups) is silently
+ ignored but its client side timeout is set to 
+\emph on
+timeout_ms
+\emph default
+ milliseconds if 
+\emph on
+timeout_ms
+\emph default
+ is different from -1.
+\end_layout
+
+\begin_layout Standard
+Set the client side timeout of each device matching the specified 
+\emph on
+pattern
+\emph default
+ to 
+\emph on
+timeout_ms
+\emph default
+ milliseconds if 
+\emph on
+timeout_ms
+\emph default
+ is different from -1.
+\end_layout
+
+\begin_layout Standard
+See also: all other forms of Group::add() and Group::set_timeout_millis().
+\end_layout
+
+\begin_layout Subsubsection
+void Group::add (const std::vector<std::string>& patterns, int timeout_ms
+ = -1)
+\end_layout
+
+\begin_layout Standard
+Attaches any device which name matches one of the specified patterns.
+ 
+\end_layout
+
+\begin_layout Standard
+The 
+\emph on
+patterns
+\emph default
+ parameter can be an array of device names and/or device name patterns.
+\end_layout
+
+\begin_layout Standard
+This method first asks to the Tango database the list of device names matching
+ one the patterns.
+ Devices are then attached to the group in the order in which they are returned
+ by the database.
+\end_layout
+
+\begin_layout Standard
+Any device already present in the hierarchy (i.e.
+ a device belonging to the group or to one of its subgroups), is silently
+ ignored but its client side timeout is set to 
+\emph on
+timeout_ms
+\emph default
+ milliseconds if 
+\emph on
+timeout_ms
+\emph default
+ is different from -1.
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+timeout_ms
+\emph default
+ is different from -1, the client side timeouts of all devices matching
+ the specified 
+\emph on
+patterns
+\emph default
+ are set to 
+\emph on
+timeout_ms
+\emph default
+ milliseconds.
+\end_layout
+
+\begin_layout Standard
+See also: all other forms of Group::add() and Group::set_timeout_millis().
+\end_layout
+
+\begin_layout Subsubsection
+void Group::remove (const std::string& pattern, bool fwd = true)
+\end_layout
+
+\begin_layout Standard
+Removes any group or device which name matches the specified pattern.
+ 
+\end_layout
+
+\begin_layout Standard
+The 
+\emph on
+pattern
+\emph default
+ parameter can be a group name, a device name or a device name pattern (e.g
+ domain_*/family/member_*).
+ 
+\end_layout
+
+\begin_layout Standard
+Since we can have groups with the same name in the hierarchy, a group name
+ can be fully qualified to specify which group should be removed.
+ Considering the following group:
+\end_layout
+
+\begin_layout LyX-Code
+-> gauges 
+\end_layout
+
+\begin_layout LyX-Code
+   | -> cell-01 
+\end_layout
+
+\begin_layout LyX-Code
+   |     |-> penning 
+\end_layout
+
+\begin_layout LyX-Code
+   |     |    |-> ...
+\end_layout
+
+\begin_layout LyX-Code
+   |     |-> pirani
+\end_layout
+
+\begin_layout LyX-Code
+   |          |-> ...
+\end_layout
+
+\begin_layout LyX-Code
+   | -> cell-02
+\end_layout
+
+\begin_layout LyX-Code
+   |     |-> penning
+\end_layout
+
+\begin_layout LyX-Code
+   |     |    |-> ...
+\end_layout
+
+\begin_layout LyX-Code
+   |     |-> pirani
+\end_layout
+
+\begin_layout LyX-Code
+   |          |-> ...
+\end_layout
+
+\begin_layout LyX-Code
+   | -> cell-03
+\end_layout
+
+\begin_layout LyX-Code
+   |     |-> ...
+ 
+\end_layout
+
+\begin_layout LyX-Code
+   |     
+\end_layout
+
+\begin_layout LyX-Code
+   | -> ...
+ 
+\end_layout
+
+\begin_layout Standard
+A call to gauges->remove("penning") will remove any group named "penning"
+ in the hierarchy while gauges->remove("gauges.cell-02.penning") will only
+ remove the specified group.
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default), the remove request is also forwarded to subgroups.
+ Otherwise, it is only applied to the local set of elements.
+ For instance, the following code remove any stepper motor in the hierarchy:
+\end_layout
+
+\begin_layout LyX-Code
+root_group->remove("*/stepper_motor/*");
+\end_layout
+
+\begin_layout Standard
+See also: all other forms of Group::remove().
+ 
+\end_layout
+
+\begin_layout Subsubsection
+void Group::remove (const std::vector<std::string>& patterns, bool fwd =
+ true)
+\end_layout
+
+\begin_layout Standard
+Removes any group or device which name matches the specified patterns.
+ 
+\end_layout
+
+\begin_layout Standard
+The 
+\emph on
+patterns
+\emph default
+ parameter can be an array of group names and/or device names and/or device
+ name patterns.
+\end_layout
+
+\begin_layout Standard
+Since we can have groups with the same name in the hierarchy, a group name
+ can be fully qualified to specify which group should be removed.
+ See previous method for details.
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default), the remove request is also forwarded to subgroups.
+ Otherwise, it is only applied to the local set of elements.
+ 
+\end_layout
+
+\begin_layout Standard
+See also: all other forms of Group::remove().
+ 
+\end_layout
+
+\begin_layout Subsubsection
+void Group::remove_all (void)
+\end_layout
+
+\begin_layout Standard
+Removes all elements in the group.
+ After such a call, the group is empty.
+\end_layout
+
+\begin_layout Standard
+See also: all forms of Group::remove().
+ 
+\end_layout
+
+\begin_layout Subsubsection
+bool Group::contains (const std::string& pattern, bool fwd = true)
+\end_layout
+
+\begin_layout Standard
+Returns true if the hierarchy contains groups and/or devices which name
+ matches the specified 
+\emph on
+pattern
+\emph default
+.
+ Returns false otherwise.
+ 
+\end_layout
+
+\begin_layout Standard
+The pattern can be a fully qualified or simple group name, a device name
+ or a device name pattern.
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default), the request is also forwarded to subgroups.
+ Otherwise, it is only applied to the local set of elements.
+ 
+\end_layout
+
+\begin_layout Standard
+See also: Group::get_device(), Group::get_group().
+ 
+\end_layout
+
+\begin_layout Subsubsection
+DeviceProxy* Group::get_device (const std::string& device_name)
+\end_layout
+
+\begin_layout Standard
+Returns a reference to the specified device or NULL if there is no device
+ by that name in the group.
+ This method may throw an exception in case the specified device belongs
+ to the group but can't be reached (not registered, down...).
+ See example below.
+ See also the Tango::DeviceProxy class documentation for details.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+try
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+  Tango::DeviceProxy *dp = g->get_device("my/device/01");
+\end_layout
+
+\begin_layout LyX-Code
+  if (dp == 0)
+\end_layout
+
+\begin_layout LyX-Code
+  {
+\end_layout
+
+\begin_layout LyX-Code
+// my/device/01 doe snot belongs to the group
+\end_layout
+
+\begin_layout LyX-Code
+  {
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+catch (const Tango::DevFailed &df)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+// my/device/01 belongs to the group but can't be reached
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The request is systematically forwarded to subgroups (i.e.
+ if no device named device_name could be found in the local set of devices,
+ the request is forwarded to subgroups).
+ 
+\end_layout
+
+\begin_layout Standard
+Be aware that a group always gets the ownership of its children and deletes
+ them when it is itself deleted.
+ Therefore, never try to delete a DeviceProxy returned by the 
+\emph on
+Group::get_device()
+\emph default
+ method.
+ Use the 
+\emph on
+Tango::Group::remove()
+\emph default
+ method instead.
+\end_layout
+
+\begin_layout Standard
+See also: other form of Group::get_device(), Group::get_size(), Group::get_group
+(), Group::contains().
+ 
+\end_layout
+
+\begin_layout Subsubsection
+DeviceProxy* Group::get_device (long idx)
+\end_layout
+
+\begin_layout Standard
+Returns a reference to the "idx-th" device in the hierarchy or NULL if the
+ hierarchy contains less than "
+\emph on
+idx
+\emph default
+" devices.
+ This method may throw an exception in case the specified device belongs
+ to the group but can't be reached (not registered, down...).
+ See previous example.
+ See also the Tango::DeviceProxy class documentation for details.
+\end_layout
+
+\begin_layout Standard
+The request is systematically forwarded to subgroups (i.e.
+ if the local set of devices contains less than "idx" devices, the request
+ is forwarded to subgroups).
+ 
+\end_layout
+
+\begin_layout Standard
+Be aware that a group always gets the ownership of its children and deletes
+ them when it is itself deleted.
+ Therefore, never try to delete a DeviceProxy returned by the 
+\emph on
+Group::get_device()
+\emph default
+ method.
+ Use the 
+\emph on
+Tango::Group::remove()
+\emph default
+ method instead.
+\end_layout
+
+\begin_layout Standard
+See also: other form of Group::get_device(), Group::get_size(), Group::get_group
+, Group::contains().
+ 
+\end_layout
+
+\begin_layout Subsubsection
+DeviceProxy* Group::operator[] (long i)
+\end_layout
+
+\begin_layout Standard
+Returns a reference to the "idx-th" device in the hierarchy or NULL if the
+ hierarchy contains less than "idx" devices.
+ See the Tango::DeviceProxy class documentation for details.
+\end_layout
+
+\begin_layout Standard
+The request is systematically forwarded to subgroups (i.e.
+ if the local set of devices contains less than "idx" devices, the request
+ is forwarded to subgroups).
+\end_layout
+
+\begin_layout Standard
+Be aware that a group always gets the ownership of its children and deletes
+ them when it is itself deleted.
+ Therefore, never try to delete a DeviceProxy returned by the 
+\emph on
+Group::get_device()
+\emph default
+ method.
+ Use the 
+\emph on
+Tango::Group::remove()
+\emph default
+ method instead.
+\end_layout
+
+\begin_layout Standard
+See also: other form of Group::get_device(), Group::get_size(), Group::get_group
+(), Group::contains().
+ 
+\end_layout
+
+\begin_layout Subsubsection
+Group* Group::get_group (const std::string& group_name)
+\end_layout
+
+\begin_layout Standard
+Returns a reference to the specified group or NULL if there is no group
+ by that name.
+ The group_name can be a fully qualified name.
+ 
+\end_layout
+
+\begin_layout Standard
+Considering the following group:
+\end_layout
+
+\begin_layout LyX-Code
+-> gauges
+\end_layout
+
+\begin_layout LyX-Code
+    |-> cell-01
+\end_layout
+
+\begin_layout LyX-Code
+    |    |-> penning
+\end_layout
+
+\begin_layout LyX-Code
+    |    |    |-> ...
+ 
+\end_layout
+
+\begin_layout LyX-Code
+    |    |-> pirani
+\end_layout
+
+\begin_layout LyX-Code
+    |    |-> ...
+ 
+\end_layout
+
+\begin_layout LyX-Code
+    |-> cell-02
+\end_layout
+
+\begin_layout LyX-Code
+    |    |-> penning
+\end_layout
+
+\begin_layout LyX-Code
+    |    |    |-> ...
+\end_layout
+
+\begin_layout LyX-Code
+    |    |-> pirani
+\end_layout
+
+\begin_layout LyX-Code
+    |    |-> ...
+\end_layout
+
+\begin_layout LyX-Code
+    | -> cell-03
+\end_layout
+
+\begin_layout LyX-Code
+    |    |-> ...
+\end_layout
+
+\begin_layout LyX-Code
+    |
+\end_layout
+
+\begin_layout LyX-Code
+    | -> ...
+ 
+\end_layout
+
+\begin_layout Standard
+A call to gauges->get_group("penning") returns the first group named "penning"
+ in the hierarchy (i.e.
+ gauges.cell-01.penning) while gauges->get_group("gauges.cell-02.penning
+\begin_inset Quotes erd
+\end_inset
+
+) returns the specified group.
+\end_layout
+
+\begin_layout Standard
+The request is systematically forwarded to subgroups (i.e.
+ if no group named group_name could be found in the local set of elements,
+ the request is forwarded to subgroups).
+ 
+\end_layout
+
+\begin_layout Standard
+Be aware that a group always gets the ownership of its children and deletes
+ them when it is itself deleted.
+ Therefore, never try to delete a Group returned by the 
+\emph on
+Group::get_group()
+\emph default
+ method.
+ Use the 
+\emph on
+Tango::Group::remove()
+\emph default
+ method instead.
+\end_layout
+
+\begin_layout Standard
+See also: Group::get_device(), Group::contains().
+ 
+\end_layout
+
+\begin_layout Subsubsection
+long Group::get_size (bool fwd = true)
+\end_layout
+
+\begin_layout Standard
+Return the number of devices in the hierarchy (respectively the number of
+ device in the group) if the forward option is set to true (respectively
+ set to false).
+ 
+\end_layout
+
+\begin_layout Subsubsection
+std::vector<std::string> Group::get_device_list (bool fwd = true)
+\end_layout
+
+\begin_layout Standard
+Returns the list of devices currently in the hierarchy.
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default) the request is forwarded to subgroups.
+ Otherwise, it is only applied to the local set of devices.
+ 
+\end_layout
+
+\begin_layout Standard
+Considering the following hierarchy:
+\end_layout
+
+\begin_layout LyX-Code
+g2->add("my/device/04"); g2->add("my/device/05");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+g4->add("my/device/08"); g4->add("my/device/09");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+g3->add("my/device/06");
+\end_layout
+
+\begin_layout LyX-Code
+g3->addg(g4);
+\end_layout
+
+\begin_layout LyX-Code
+g3->add("my/device/07");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+g1->add("my/device/01");
+\end_layout
+
+\begin_layout LyX-Code
+g1->add(g2);
+\end_layout
+
+\begin_layout LyX-Code
+g1->add("my/device/03");
+\end_layout
+
+\begin_layout LyX-Code
+g1->add(g3);
+\end_layout
+
+\begin_layout LyX-Code
+g1->add("my/device/02");
+\end_layout
+
+\begin_layout Standard
+The returned vector content depends on the value of the forward option.
+ If set to true, the results will be organized as follows:
+\end_layout
+
+\begin_layout LyX-Code
+std::vector<std::string> dl = g1->get_device_list(true);
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+dl[0]
+\emph default
+ contains "my/device/01" which belongs to g1
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+dl[1]
+\emph default
+ contains "my/device/04" which belongs to g1.g2
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+dl[2]
+\emph default
+ contains "my/device/05" which belongs to g1.g2
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+dl[3]
+\emph default
+ contains "my/device/03" which belongs to g1
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+dl[4]
+\emph default
+ contains "my/device/06" which belongs to g1.g3
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+dl[5]
+\emph default
+ contains "my/device/08" which belongs to g1.g3.g4
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+dl[6]
+\emph default
+ contains "my/device/09" which belongs to g1.g3.g4
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+dl[7]
+\emph default
+ contains "my/device/07" which belongs to g1.g3
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+dl[8]
+\emph default
+ contains "my/device/02" which belongs to g1
+\end_layout
+
+\begin_layout Standard
+If the forward option is set to false, the results are:
+\end_layout
+
+\begin_layout LyX-Code
+std::vector<std::string> dl = g1->get_device_list(false);
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+dl[0]
+\emph default
+ contains "my/device/01" which belongs to g1
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+dl[1]
+\emph default
+ contains "my/device/03" which belongs to g1
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+dl[2]
+\emph default
+ contains "my/device/02" which belongs to g1
+\end_layout
+
+\begin_layout Subsection
+"A la" DeviceProxy Methods
+\end_layout
+
+\begin_layout Subsubsection
+bool Group::ping (bool fwd = true)
+\end_layout
+
+\begin_layout Standard
+Ping all devices in a group.
+ This method returns true if all devices in the group are alive, false otherwise.
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default), the request is also forwarded to subgroups.
+ Otherwise, it is only applied to the local set of devices.
+\end_layout
+
+\begin_layout Subsubsection
+void Group::set_timeout_millis(int timeout_ms)
+\end_layout
+
+\begin_layout Standard
+Set client side timeout for all devices composing the group in milliseconds.
+ Any method which takes longer than this time to execute will throw an exception.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: none (errors are ignored).
+\end_layout
+
+\begin_layout Subsubsection
+GroupCmdReplyList Group::command_inout (const std::string& c, bool fwd =
+ true)
+\end_layout
+
+\begin_layout Standard
+Executes a Tango command on a group.
+ This method is synchronous and does not return until replies are obtained
+ or timeouts occurred.
+\end_layout
+
+\begin_layout Standard
+The parameter 
+\emph on
+c
+\emph default
+ is the name of the command.
+ 
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default), the request is also forwarded to subgroups.
+ Otherwise, it is only applied to the local set of devices.
+ 
+\end_layout
+
+\begin_layout Standard
+Command results are returned in a GroupCmdReplyList.
+ See Obtaining command result for details (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Obt-cmd-results"
+
+\end_inset
+
+).
+ See also Case 1 of executing a command (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Case-1"
+
+\end_inset
+
+) for an example.
+ 
+\end_layout
+
+\begin_layout Subsubsection
+GroupCmdReplyList Group::command_inout (const std::string& c, const DeviceData&
+ d, bool fwd = true)
+\end_layout
+
+\begin_layout Standard
+Executes a Tango command on each device in the group.
+ This method is synchronous and does not return until replies are obtained
+ or timeouts occurred.
+\end_layout
+
+\begin_layout Standard
+The parameter 
+\emph on
+c
+\emph default
+ is the name of the command.
+ 
+\end_layout
+
+\begin_layout Standard
+The second parameter 
+\emph on
+d
+\emph default
+ is a Tango generic container for command carrying the command argument.
+ See the Tango::DeviceData documentation.
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default), the request is also forwarded to subgroups.
+ Otherwise, it is only applied to the local set of devices.
+ 
+\end_layout
+
+\begin_layout Standard
+Command results are returned in a GroupCmdReplyList.
+ See Obtaining command results (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Obt-cmd-results"
+
+\end_inset
+
+) for details.
+ See also Case 2 of executing a command (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Case-2"
+
+\end_inset
+
+) for an example.
+ 
+\end_layout
+
+\begin_layout Subsubsection
+template<typename T> GroupCmdReplyList Group::command_inout (const std::string&
+ c, const std::vector<T>& d, bool fwd = true)
+\end_layout
+
+\begin_layout Standard
+Executes a Tango command on each device in the group.
+ This method is synchronous and does not return until replies are obtained
+ or timeouts occurred.
+\end_layout
+
+\begin_layout Standard
+This implementation of command_inout allows passing a specific input argument
+ to each device in the group.
+ In order to use this form of command_inout, the user must have an "a priori"
+ and "perfect" knowledge of the devices order in the group.
+\end_layout
+
+\begin_layout Standard
+The parameter 
+\emph on
+c
+\emph default
+ is the name of the command.
+ 
+\end_layout
+
+\begin_layout Standard
+The std::vector 
+\emph on
+d
+\emph default
+ contains a specific argument value for each device in the group.
+ Since this method is a template, d is able to contain any Tango command
+ argument type.
+ Its size must equal Group::get_size(fwd).
+ Otherwise, an exception is thrown.
+ The order of the argument values must follows the order of the devices
+ in the group (d[0] => 1st device, d[1] => 2nd device and so on).
+ 
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default), the request is also forwarded to subgroups.
+ Otherwise, it is only applied to the local set of devices.
+\end_layout
+
+\begin_layout Standard
+Command results are returned in a GroupCmdReplyList.
+ See Obtaining command results (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Obt-cmd-results"
+
+\end_inset
+
+) for details.
+ See also Case 3 of executing a command (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Case-3"
+
+\end_inset
+
+) for an example of this special form of command_inout.
+\end_layout
+
+\begin_layout Subsubsection
+long Group::command_inout_asynch (const std::string& c, bool fgt = false,
+ bool fwd = true, long rsv = -1) 
+\end_layout
+
+\begin_layout Standard
+Executes a Tango command on each device in the group asynchronously.
+ The method sends the request to all devices and returns immediately.
+ Pass the returned request id to 
+\emph on
+Group::command_inout_reply()
+\emph default
+ to obtain the results.
+ 
+\end_layout
+
+\begin_layout Standard
+The parameter 
+\emph on
+c
+\emph default
+ is the name of the command.
+ 
+\end_layout
+
+\begin_layout Standard
+The parameter 
+\emph on
+fgt
+\emph default
+ is a fire and forget flag.
+ If set to true, it means that no reply is expected (i.e.
+ the caller does not care about it and will not even try to get it).
+ A false default value is provided.
+ 
+\end_layout
+
+\begin_layout Standard
+If the parameter 
+\emph on
+fwd
+\emph default
+ is set to true (the default) request is forwarded to subgroups.
+ Otherwise, it is only applied to the local set of devices.
+ 
+\end_layout
+
+\begin_layout Standard
+Finally, 
+\emph on
+rsv
+\emph default
+ is reserved for internal purpose and should not be modify.
+ This parameter may disappear in a near future.
+ 
+\end_layout
+
+\begin_layout Standard
+See Case 1 of Executing a command (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Case-1"
+
+\end_inset
+
+) for an example.
+\end_layout
+
+\begin_layout Subsubsection
+long Group::command_inout_asynch (const std::string& c, const DeviceData&
+ d, bool fgt = false, bool fwd = true, long rsv = -1)
+\end_layout
+
+\begin_layout Standard
+Executes a Tango command on each device in the group asynchronously.
+ The method sends the request to all devices and returns immediately.
+ Pass the returned request id to 
+\emph on
+Group::command_inout_reply()
+\emph default
+ to obtain the results.
+ 
+\end_layout
+
+\begin_layout Standard
+The parameter 
+\emph on
+c
+\emph default
+ is the name of the command.
+ 
+\end_layout
+
+\begin_layout Standard
+The second parameter 
+\emph on
+d
+\emph default
+ is a Tango generic container for command carrying the command argument.
+ See the Tango::DeviceData documentation for details.
+\end_layout
+
+\begin_layout Standard
+The parameter 
+\emph on
+fgt
+\emph default
+ is a fire and forget flag.
+ If set to true, it means that no reply is expected (i.e.
+ the caller does not care about it and will not even try to get it).
+ A false default value is provided.
+ 
+\end_layout
+
+\begin_layout Standard
+If the parameter 
+\emph on
+fwd
+\emph default
+ is set to true (the default) request is forwarded to subgroups.
+ Otherwise, it is only applied to the local set of devices.
+ 
+\end_layout
+
+\begin_layout Standard
+Finally, 
+\emph on
+rsv
+\emph default
+ is reserved for internal purpose and should not be modify.
+ This parameter may disappear in a near future.
+ 
+\end_layout
+
+\begin_layout Standard
+See Case 2 of Executing a command (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Case-2"
+
+\end_inset
+
+) for an example.
+\end_layout
+
+\begin_layout Subsubsection
+long Group::command_inout_asynch (const std::string& c, const std::vector<T>&
+ d, fgt = false, bool fwd = true)
+\end_layout
+
+\begin_layout Standard
+Executes a Tango command on each device in the group asynchronously.
+ The method send the request to all devices and return immediately.
+ Pass the returned request id to Group::command_inout_reply to obtain the
+ results.
+ 
+\end_layout
+
+\begin_layout Standard
+This implementation of command_inout allows passing a specific input argument
+ to each device in the group.
+ In order to use this form of command_inout_asynch, the user must have an
+ "a priori" and "perfect" knowledge of the devices order in the group.
+\end_layout
+
+\begin_layout Standard
+The parameter 
+\emph on
+c
+\emph default
+ is the name of the command.
+ 
+\end_layout
+
+\begin_layout Standard
+The std::vector 
+\emph on
+d
+\emph default
+ contains a specific argument value for each device in the group.
+ d is able to contain any Tango command argument type.
+ Its size must equal Group::get_size(fwd).
+ Otherwise, an exception is thrown.
+ The order of the argument values must follows the order of the devices
+ in the group (d[0] => 1st device, d[1] => 2nd device and so on).
+ 
+\end_layout
+
+\begin_layout Standard
+The parameter 
+\emph on
+fgt
+\emph default
+ is a fire and forget flag.
+ If set to true, it means that no reply is expected (i.e.
+ the caller does not care about it and will not even try to get it).
+ A false default value is provided.
+ 
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default), the request is also forwarded to subgroups.
+ Otherwise, it is only applied to the local set of devices.
+\end_layout
+
+\begin_layout Standard
+See Case 3 of Executing a command (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Case-3"
+
+\end_inset
+
+) for an example of this special form of command_inout.
+\end_layout
+
+\begin_layout Subsubsection
+GroupCmdReplyList Group::command_inout_reply (long req_id, long timeout_ms
+ = 0)
+\end_layout
+
+\begin_layout Standard
+Returns the results of an asynchronous command.
+ 
+\end_layout
+
+\begin_layout Standard
+The first parameter 
+\emph on
+req_id
+\emph default
+ is a request identifier previously returned by one of the command_inout_asynch
+ methods.
+ 
+\end_layout
+
+\begin_layout Standard
+For each device in the hierarchy, if the command result is not yet available,
+ command_inout_reply wait 
+\emph on
+timeout_ms
+\emph default
+ milliseconds before throwing an exception.
+ This exception will be part of the global reply.
+ If 
+\emph on
+timeout_ms
+\emph default
+ is set to 0, command_inout_reply waits "indefinitely".
+\end_layout
+
+\begin_layout Standard
+Command results are returned in a GroupCmdReplyList.
+ See Obtaining command results (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Obt-cmd-results"
+
+\end_inset
+
+) for details.
+\end_layout
+
+\begin_layout Subsubsection
+GroupAttrReplyList Group::read_attribute (const std::string& a, bool fwd
+ = true)
+\end_layout
+
+\begin_layout Standard
+Reads an attribute on each device in the group.
+ This method is synchronous and does not return until replies are obtained
+ or timeouts occurred.
+ 
+\end_layout
+
+\begin_layout Standard
+The parameter 
+\emph on
+a
+\emph default
+ is the name of the attribute to read.
+ 
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default) request is forwarded to subgroups.
+ Otherwise, it is only applied to the local set of devices.
+ 
+\end_layout
+
+\begin_layout Standard
+Attribute values are returned in a GroupAttrReplyList.
+ See Obtaining attribute values (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:O-attr-values"
+
+\end_inset
+
+) for details.
+ See also Reading an attribute (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Read-attr"
+
+\end_inset
+
+) for an example.
+\end_layout
+
+\begin_layout Subsubsection
+long Group::read_attribute_asynch (const std::string& a, bool fwd = true,
+ long rsv = -1)
+\end_layout
+
+\begin_layout Standard
+Reads an attribute on each device in the group asynchronously.
+ The method sends the request to all devices and returns immediately.
+ Pass the returned request id to 
+\emph on
+Group::read_attribute_reply()
+\emph default
+ to obtain the results.
+ 
+\end_layout
+
+\begin_layout Standard
+The parameter 
+\emph on
+a
+\emph default
+ is the name of the attribute to read.
+ 
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default) request is forwarded to subgroups.
+ Otherwise, it is only applied to the local set of devices.
+ 
+\end_layout
+
+\begin_layout Standard
+The last parameter (rsv) is reserved for internal purpose and should not
+ be modify.
+ It may disappear in a near future.
+ 
+\end_layout
+
+\begin_layout Standard
+See Reading an attribute (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Read-attr"
+
+\end_inset
+
+) for an example.
+\end_layout
+
+\begin_layout Subsubsection
+GroupAttrReplyList Group::read_attribute_reply (long req_id, long timeout_ms
+ = 0)
+\end_layout
+
+\begin_layout Standard
+Returns the results of an asynchronous attribute reading.
+ 
+\end_layout
+
+\begin_layout Standard
+The first parameter 
+\emph on
+req_id
+\emph default
+ is a request identifier previously returned by read_attribute_asynch.
+ 
+\end_layout
+
+\begin_layout Standard
+For each device in the hierarchy, if the attribute value is not yet available,
+ read_attribute_reply wait 
+\emph on
+timeout_ms
+\emph default
+ milliseconds before throwing an exception.
+ This exception will be part of the global reply.
+ If 
+\emph on
+timeout_ms
+\emph default
+ is set to 0, read_attribute_reply waits "indefinitely".
+\end_layout
+
+\begin_layout Standard
+Replies are returned in a GroupAttrReplyList.
+ See Obtaining attribute values (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:O-attr-values"
+
+\end_inset
+
+) for details.
+\end_layout
+
+\begin_layout Subsubsection
+GroupReplyList Group::write_attribute (const DeviceAttribute& d, bool fwd
+ = true)
+\end_layout
+
+\begin_layout Standard
+Writes an attribute on each device in the group.
+ This method is synchronous and does not return until acknowledgements are
+ obtained or timeouts occurred.
+ 
+\end_layout
+
+\begin_layout Standard
+The first parameter 
+\emph on
+d
+\emph default
+ is a Tango generic container for attribute carrying both the attribute
+ name and the value.
+ See the Tango::DeviceAttribute documentation for details.
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default) request is forwarded to subgroups.
+ Otherwise, it is only applied to the local set of devices.
+ 
+\end_layout
+
+\begin_layout Standard
+Acknowledgements are returned in a GroupReplyList.
+ See Obtaining acknowledgements (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:O-ack"
+
+\end_inset
+
+) for details.
+ See also Case 1 of Writing an attribute (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Case-1-writing"
+
+\end_inset
+
+) for an example.
+\end_layout
+
+\begin_layout Subsubsection
+GroupReplyList Group::write_attribute (const std::string& a, const std::vector<T
+>& d, bool fwd = true)
+\end_layout
+
+\begin_layout Standard
+Writes an attribute on each device in the group.
+ This method is synchronous and does not return until replies are obtained
+ or timeouts occurred.
+\end_layout
+
+\begin_layout Standard
+This implementation of write_attribute allows writing a specific value to
+ each device in the group.
+ In order to use this form of write_attribute, the user must have an "a
+ priori" and "perfect" knowledge of the devices order in the group.
+\end_layout
+
+\begin_layout Standard
+The parameter 
+\emph on
+a
+\emph default
+ is the name of the attribute.
+ 
+\end_layout
+
+\begin_layout Standard
+The std::vector 
+\emph on
+d
+\emph default
+ contains a specific value for each device in the group.
+ Since this method is a template, d is able to contain any Tango attribute
+ type.
+ Its size must equal 
+\emph on
+Group::get_size(fwd)
+\emph default
+.
+ Otherwise, an exception is thrown.
+ The order of the attribute values must follows the order of the devices
+ in the group (d[0] => 1st device, d[1] => 2nd device and so on).
+ 
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default) request is forwarded to subgroups.
+ Otherwise, it is only applied to the local set of devices.
+\end_layout
+
+\begin_layout Standard
+Acknowledgements are returned in a GroupReplyList.
+ See Obtaining acknowledgements (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:O-ack"
+
+\end_inset
+
+) for details.
+ See also Case 2 of Writing an attribute (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Case-2-writing"
+
+\end_inset
+
+) for an example.
+\end_layout
+
+\begin_layout Subsubsection
+long Group::write_attribute_asynch (const DeviceAttribute& d, bool fwd =
+ true, long rsv = -1)
+\end_layout
+
+\begin_layout Standard
+Writes an attribute on each device in the group asynchronously.
+ The method sends the request to all devices and returns immediately.
+ Pass the returned request id to 
+\emph on
+Group::write_attribute_reply()
+\emph default
+ to obtain the acknowledgements.
+ 
+\end_layout
+
+\begin_layout Standard
+The first parameter 
+\emph on
+d
+\emph default
+ is a Tango generic container for attribute carrying both the attribute
+ name and the value.
+ See the Tango::DeviceAttribute documentation for details.
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default) request is forwarded to subgroups.
+ Otherwise, it is only applied to the local set of devices.
+ 
+\end_layout
+
+\begin_layout Standard
+The last parameter 
+\emph on
+rsv
+\emph default
+ is reserved for internal purpose and should not be modify.
+ It may disappear in a near future.
+\end_layout
+
+\begin_layout Standard
+See Case 1 of Writing an attribute (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Case-1-writing"
+
+\end_inset
+
+) for an example.
+\end_layout
+
+\begin_layout Subsubsection
+long Group::write_attribute_asynch (const std::string& a, const std::vector<T>&
+ d, bool fwd = true)
+\end_layout
+
+\begin_layout Standard
+Writes an attribute on each device in the group asynchronously.
+ The method sends the request to all devices and returns immediately.
+ Pass the returned request id to 
+\emph on
+Group::write_attribute_reply()
+\emph default
+ to obtain the acknowledgements.
+\end_layout
+
+\begin_layout Standard
+This implementation of write_attribute_asynch allows writing a specific
+ value to each device in the group.
+ In order to use this form of write_attribute_asynch, the user must have
+ an "a priori" and "perfect" knowledge of the devices order in the group.
+\end_layout
+
+\begin_layout Standard
+The parameter 
+\emph on
+a
+\emph default
+ is the name of the attribute.
+ 
+\end_layout
+
+\begin_layout Standard
+The std::vector 
+\emph on
+d
+\emph default
+ contains a specific value for each device in the group.
+ Since this method is a template, d is able to contain any Tango attribute
+ type.
+ Its size must equal 
+\emph on
+Group::get_size(fwd)
+\emph default
+.
+ Otherwise, an exception is thrown.
+ The order of the attribute values must follows the order of the devices
+ in the group (d[0] => 1st device, d[1] => 2nd device and so on).
+ 
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default) request is forwarded to subgroups.
+ Otherwise, it is only applied to the local set of devices.
+\end_layout
+
+\begin_layout Standard
+See Case2 of Writing an attribute (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Case-2-writing"
+
+\end_inset
+
+) for an example.
+\end_layout
+
+\begin_layout Subsubsection
+GroupReplyList Group::write_attribute_reply (long req_id, long timeout_ms
+ = 0)
+\end_layout
+
+\begin_layout Standard
+Returns the acknowledgements of an asynchronous attribute writing.
+ 
+\end_layout
+
+\begin_layout Standard
+The first parameter 
+\emph on
+req_id
+\emph default
+ is a request identifier previously returned by one of the write_attribute_async
+h implementation.
+ 
+\end_layout
+
+\begin_layout Standard
+For each device in the hierarchy, if the acknowledgement is not yet available,
+ write_attribute_reply wait 
+\emph on
+timeout_ms
+\emph default
+ milliseconds before throwing an exception.
+ This exception will be part of the global reply.
+ If 
+\emph on
+timeout_ms
+\emph default
+ is set to 0, write_attribute_reply waits "indefinitely".
+\end_layout
+
+\begin_layout Standard
+Acknowledgements are returned in a GroupReplyList.
+ See Obtaining acknowledgements 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:O-ack"
+
+\end_inset
+
+ for details.
+\end_layout
+
+\begin_layout Subsubsection
+GroupAttrReplyList Group::read_attributes (const std::vector<std::string>&
+ al, bool fwd = true)
+\end_layout
+
+\begin_layout Standard
+Reads several attributes on each device in the group.
+ This method is synchronous and does not return until replies are obtained
+ or timeouts occurred.
+ 
+\end_layout
+
+\begin_layout Standard
+The parameter 
+\emph on
+al
+\emph default
+ is a vector containing the name of the attributes to be read.
+ 
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default) request is forwarded to subgroups.
+ Otherwise, it is only applied to the local set of devices.
+ 
+\end_layout
+
+\begin_layout Standard
+Attribute values are returned in a GroupAttrReplyList.
+ See Obtaining attribute values (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:O-attr-values"
+
+\end_inset
+
+) for details.
+ See also Reading an attribute (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Read-attr"
+
+\end_inset
+
+) for an example.
+ The order of attribute value returned in the GroupAttrReplyList is all
+ attributes for first element in the group followed by all attributes for
+ the second group element and so on.
+\end_layout
+
+\begin_layout Subsubsection
+long Group::read_attributes_asynch (const std::vector<std::string>& al,
+ bool fwd = true, long rsv = -1)
+\end_layout
+
+\begin_layout Standard
+Reads several attributes on each device in the group asynchronously.
+ The method sends the request to all devices and returns immediately.
+ Pass the returned request id to 
+\emph on
+Group::read_attributes_reply()
+\emph default
+ to obtain the results.
+ 
+\end_layout
+
+\begin_layout Standard
+The parameter 
+\emph on
+al
+\emph default
+ is a vector containing the name of the attributes to be read.
+ 
+\end_layout
+
+\begin_layout Standard
+If 
+\emph on
+fwd
+\emph default
+ is set to true (the default) request is forwarded to subgroups.
+ Otherwise, it is only applied to the local set of devices.
+ 
+\end_layout
+
+\begin_layout Standard
+The last parameter (rsv) is reserved for internal purpose and should not
+ be modify.
+ It may disappear in a near future.
+ 
+\end_layout
+
+\begin_layout Standard
+See Reading an attribute (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Read-attr"
+
+\end_inset
+
+) for an example.
+\end_layout
+
+\begin_layout Subsubsection
+GroupAttrReplyList Group::read_attributes_reply (long req_id, long timeout_ms
+ = 0)
+\end_layout
+
+\begin_layout Standard
+Returns the results of an asynchronous attribute reading.
+ 
+\end_layout
+
+\begin_layout Standard
+The first parameter 
+\emph on
+req_id
+\emph default
+ is a request identifier previously returned by read_attributes_asynch.
+ 
+\end_layout
+
+\begin_layout Standard
+For each device in the hierarchy, if the attribute value is not yet available,
+ read_attributes_reply wait 
+\emph on
+timeout_ms
+\emph default
+ milliseconds before throwing an exception.
+ This exception will be part of the global reply.
+ If 
+\emph on
+timeout_ms
+\emph default
+ is set to 0, read_attributes_reply waits "indefinitely".
+\end_layout
+
+\begin_layout Standard
+Replies are returned in a GroupAttrReplyList.
+ See Obtaining attribute values (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:O-attr-values"
+
+\end_inset
+
+) for details.
+ The order of attribute value returned in the GroupAttrReplyList is all
+ attributes for first element in the group followed by all attributes for
+ the second group element and so on.
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Section
+\noindent
+Tango::Database
+\end_layout
+
+\begin_layout Standard
+\noindent
+A high level object which contains the link to the database.
+ It has methods for all database commands e.g.
+ get_device_property(), device_list(), info(), etc.
+ 
+\end_layout
+
+\begin_layout Subsection
+\noindent
+Database::Database()
+\end_layout
+
+\begin_layout Standard
+\noindent
+Create a TANGO Database object.
+ The constructor uses the environment variable 
+\begin_inset Quotes eld
+\end_inset
+
+TANGO_HOST
+\begin_inset Quotes erd
+\end_inset
+
+ to determine which instance of the TANGO database to connect to.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+using namespace Tango;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+Database *db = new Database();
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+\noindent
+string Database::get_info()
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for some general info about the tables in the database.
+ Result is returned as a string.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+cout << db->get_info() << endl;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+will return information like this :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+Running since 2000-11-06 14:10:46
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+ 
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+Devices defined  = 115
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+Devices exported  = 41
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+Device servers defined  = 47
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+Device servers exported  = 17
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+ 
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+Class properties defined  = 5
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+Device properties defined  = 130
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+Class attribute properties defined  = 20
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+Device attribute properties defined  = 92
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions: ConnectionFailed, CommunicationFailed, DevFailed from device
+ (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::add_device(DbDevInfo&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Add a device to the database.
+ The device name, server and class are specified in the DbDevInfo structure.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbDevInfo my_device_info;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_device_info.name = 
+\begin_inset Quotes eld
+\end_inset
+
+my/own/device
+\begin_inset Quotes erd
+\end_inset
+
+;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_device_info._class = 
+\begin_inset Quotes eld
+\end_inset
+
+MyDevice
+\begin_inset Quotes erd
+\end_inset
+
+;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_device_info.server = 
+\begin_inset Quotes eld
+\end_inset
+
+MyServer/test
+\begin_inset Quotes erd
+\end_inset
+
+;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->add_device(my_device_info);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::delete_device(string)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Delete the device of the specified name from the database.
+ Example
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->delete_device(
+\begin_inset Quotes eld
+\end_inset
+
+my/own/device
+\begin_inset Quotes erd
+\end_inset
+
+);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError,
+ DB_DeviceNotDefined)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+DbDevImportInfo Database::import_device(string &)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for the export info of the specified device.
+ The command returns the information in a DbDevImportInfo structure.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbDevImportInfo my_device_import;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_device_import = db->import_device(
+\begin_inset Quotes eld
+\end_inset
+
+my/own/device
+\begin_inset Quotes erd
+\end_inset
+
+);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+cout << 
+\begin_inset Quotes eld
+\end_inset
+
+ device 
+\begin_inset Quotes erd
+\end_inset
+
+ << my_device_import.name;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+cout << 
+\begin_inset Quotes eld
+\end_inset
+
+exported 
+\begin_inset Quotes erd
+\end_inset
+
+ << my_device_import.exported;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+cout << 
+\begin_inset Quotes eld
+\end_inset
+
+ior 
+\begin_inset Quotes erd
+\end_inset
+
+ << my_device_import.ior;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+cout << 
+\begin_inset Quotes eld
+\end_inset
+
+version 
+\begin_inset Quotes erd
+\end_inset
+
+ << my_device_import.version;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+cout << endl;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device ( DB_SQLError,
+ DB_DeviceNotDefined)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::export_device(DbDevExportInfo&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Update the export info for this device in the database.
+ Device name, server, class, pid and version are specified in the DbDevExportInf
+o structure.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbDevExportInfo my_device_export;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_device_export.name = 
+\begin_inset Quotes eld
+\end_inset
+
+my/own/device
+\begin_inset Quotes erd
+\end_inset
+
+;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_device_export.ior = 
+\begin_inset Quotes eld
+\end_inset
+
+the real ior
+\begin_inset Quotes erd
+\end_inset
+
+;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_device_export.host = 
+\begin_inset Quotes eld
+\end_inset
+
+dumela
+\begin_inset Quotes erd
+\end_inset
+
+;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_device_export.version = 
+\begin_inset Quotes eld
+\end_inset
+
+1.0
+\begin_inset Quotes erd
+\end_inset
+
+;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_device_export.pid = get_pid();
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->export_device(my_device_export);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError,
+ DB_DeviceNotDefined)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::unexport_device(string)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Mark the specified device as un-exported in the database.
+ Example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->unexport_device(
+\begin_inset Quotes eld
+\end_inset
+
+my/own/device
+\begin_inset Quotes erd
+\end_inset
+
+);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::add_server(string &, DbDevInfos&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Add a group of devices to the database.
+ The device names, server names and classes are specified in the vector
+ of DbDevInfo structures.
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::delete_server(string &)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Delete the device server and its associated devices from the database.
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::export_server( DbDevExportInfos &)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Export a group of devices to the database.
+ The device names, IOR, class, server name, pid etc.
+ are specified in the vector of DbDevExportInfo structures.
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::unexport_server(string &)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Mark all devices exported for this server as unexported.
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_services(string &servicename,string &instname)
+\end_layout
+
+\begin_layout Standard
+Query database for specified services.The instname parameter can be a wildcard
+ character ("*").
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string servicename("HdbManager");
+\end_layout
+
+\begin_layout LyX-Code
+string instname("ctrm");
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_services(servicename,instname);
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> service_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> service_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+void Database::register_service(string &servicename,string &instname,string
+ &devname)
+\end_layout
+
+\begin_layout Standard
+Register the specified service wihtin the database.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string servicename("HdbManager");
+\end_layout
+
+\begin_layout LyX-Code
+string instname("ctrm");
+\end_layout
+
+\begin_layout LyX-Code
+string devname("sys/hdb/1");
+\end_layout
+
+\begin_layout LyX-Code
+db->register_service(servicename,instname,devname);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+void Database::unregister_service(string &servicename,string &instname)
+\end_layout
+
+\begin_layout Standard
+Unregister the specified service from the database.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string servicename("HdbManager");
+\end_layout
+
+\begin_layout LyX-Code
+string instname("ctrm");
+\end_layout
+
+\begin_layout LyX-Code
+db->unregister_service(servicename,instname);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_host_list()
+\end_layout
+
+\begin_layout Standard
+Returns the list of all host names registered in the database.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_host_list();
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> host_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> host_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_host_list(string &wildcard)
+\end_layout
+
+\begin_layout Standard
+Returns the list of all host names registered in the database which match
+ the specified wildcard (eg: "l-c0*").
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string wildcard("l-c0*");
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_host_list(wildcard);
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> host_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> host_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_server_class_list(string &server)
+\end_layout
+
+\begin_layout Standard
+Query the database for a list of classes instancied by the specified server.
+ The DServer class exists in all TANGO servers and for this reason this
+ class is removed from the returned list.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string server("Serial/1");
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_server_class_list(server);
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> class_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> class_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_server_name_list()
+\end_layout
+
+\begin_layout Standard
+Return the list of all server names registered in the database.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_server_name_list();
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> server_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> server_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_instance_name_list(string &servername)
+\end_layout
+
+\begin_layout Standard
+Return the list of all instance names existing in the database for the specifed
+ server.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string servername("Serial");
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_instance_name_list(servername);
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> instance_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> instance_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_server_list()
+\end_layout
+
+\begin_layout Standard
+Return the list of all servers registered in the database.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_server_list();
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> server_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> server_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_server_list(string &wildcard)
+\end_layout
+
+\begin_layout Standard
+Return the list of all servers registered in the database which match the
+ specified wildcard (eg: "Serial/*").
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string wildcard("Serial/*");
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_server_list(wildcard);
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> server_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> server_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_host_server_list(string &hostname)
+\end_layout
+
+\begin_layout Standard
+Query the database for a list of servers registred on the specified host.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string host("kidiboo");
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_host_server_list(wildcard);
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> server_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> server_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+DbServerInfo Database::get_server_info(string &server)
+\end_layout
+
+\begin_layout Standard
+Query the database for server information.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string server("Serial/1");
+\end_layout
+
+\begin_layout LyX-Code
+DbServerInfo info = db->get_server_info(server);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+void Database::put_server_info(DbServerInfo &info)
+\end_layout
+
+\begin_layout Standard
+Add/update server information in the database.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+DbServerInfo info;
+\end_layout
+
+\begin_layout LyX-Code
+info.name = "Serial/1"; // Server (name/instance)
+\end_layout
+
+\begin_layout LyX-Code
+info.host = "kidiboo"; // Register on host kidiboo
+\end_layout
+
+\begin_layout LyX-Code
+info.mode = 1; // Controlled by Astor flag (0 or 1)
+\end_layout
+
+\begin_layout LyX-Code
+info.level = 3; // Startup level (Used by Astor)
+\end_layout
+
+\begin_layout LyX-Code
+db->put_server_info(info);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+void Database::delete_server_info(string &server)
+\end_layout
+
+\begin_layout Standard
+Delete server information of the specifed server from the database.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string server("Serial/1");
+\end_layout
+
+\begin_layout LyX-Code
+db->delete_server_info(server);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+\noindent
+DbDatum Database::get_device_name(string &, string &)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for a list of devices served by the specified server
+ (1st parameter) and of the specified class (2nd parameter).
+ The method returns a DbDatum type.
+ The device names are stored as an array of strings.
+ Here is two code example of how to extract the names from the DbDatum type
+ :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+vector<string> device_names;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+device_names << db_datum;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+or :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+for (int i=0; i< db_datum.size(); i++)
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+{
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+device_name[i] = db_datum.value_string[i];
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+\noindent
+DbDatum Database::get_device_exported(string &)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for a list of exported devices whose names satisfy the
+ supplied filter (* is wildcard for any character(s)).
+ This method returns a DbDatum type.
+ See the method get_device_name() for an example of how to extract the list
+ of aliases from the DbDatum type.
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+DbDatum Database::get_device_domain(string &)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for a list of device domain names which match the wildcard
+ provided.
+ Wildcard character is * and matches any number of characters.
+ Domain names are case insensitive.
+ This method returns a DbDatum type.
+ See the method get_device_name() for an example of how to extract the list
+ of aliases from the DbDatum type.
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+DbDatum Database::get_device_family(string &)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for a list of device family names which match the wildcard
+ provided.
+ Wildcard character is * and matches any number of characters.
+ Family names are case insensitive.
+ This method returns a DbDatum type.
+ See the method get_device_name() for an example of how to extract the list
+ of aliases from the DbDatum type.
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+DbDatum Database::get_device_member(string &)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for a list of device member names which match the wildcard
+ provided.
+ Wildcard characters is * and matches any number of characters.
+ Member names are case insensitive.
+ This method returns a DbDatum type.
+ See the method get_device_name() for an example of how to extract the list
+ of aliases from the DbDatum type.
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_device_class_list(string &server)
+\end_layout
+
+\begin_layout Standard
+Query the database for a list of devices and classes served by the specified
+ server.
+ Return a list with the following structure: {device name,class name,device
+ name,class name,...}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string server("Serial/1");
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_device_class_list(server);
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> dev_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> dev_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+string Database::get_class_for_device(string &devname)
+\end_layout
+
+\begin_layout Standard
+Return the class of the specified device.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string devname("sr/rf-cavity/1");
+\end_layout
+
+\begin_layout LyX-Code
+string classname = db->get_class_for_device(devname);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_class_inheritance_for_device(string &devname)
+\end_layout
+
+\begin_layout Standard
+Return the class inheritance scheme of the specified device.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string devname("sr/rf-cavity/1");
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_class_inheritance_for_device(devname);
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> class_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> class_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_device_exported_for_class(string &classname)
+\end_layout
+
+\begin_layout Standard
+Query database for list of exported devices for the specified class.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string classname("MyClass");
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_device_exported_for_class(classname);
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> dev_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> dev_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_object_list(string &wildcard)
+\end_layout
+
+\begin_layout Standard
+Query the database for a list of object (free properties) for which properties
+ are defined and which match the specified wildcard.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string wildcard("Optic*");
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_object_list(wildcard);
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> obj_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> obj_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_object_property_list(string &objectname,string &wildcard)
+\end_layout
+
+\begin_layout Standard
+Query the database for a list of properties defined for the specified object
+ and which match the specified wildcard.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string objname("OpticID9");
+\end_layout
+
+\begin_layout LyX-Code
+string wildcard("Delta*");
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_object_property_list(objname,wildcard);
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> prop_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> prop_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::get_property(string, DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for a list of object (i.e.
+ non-device) properties for the specified object.
+ The property names are specified by the vector of DbDatum structures.
+ The method returns the properties in the same DbDatum structures.
+ To retrieve the properties use the extract operator >>.
+ Here is an example of how to use the DbData type to specify and extract
+ properties :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbData db_data;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum(
+\begin_inset Quotes eld
+\end_inset
+
+velocity
+\begin_inset Quotes erd
+\end_inset
+
+));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum(
+\begin_inset Quotes eld
+\end_inset
+
+acceleration
+\begin_inset Quotes erd
+\end_inset
+
+));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->get_property(
+\begin_inset Quotes eld
+\end_inset
+
+mymotor
+\begin_inset Quotes erd
+\end_inset
+
+, db_data);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+float velocity, acceleration;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data[0] >> velocity;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data[1] >> acceleration;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::put_property(string, DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Insert or update a list of properties for the specified object.
+ The property names and their values are specified by the vector of DbDatum
+ structures.
+ Use the insert operator >> to insert the properties into the DbDatum structures.
+ Here is an example of how to insert properties into the database using
+ this method :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbDatum velocity(
+\begin_inset Quotes eld
+\end_inset
+
+velocity
+\begin_inset Quotes erd
+\end_inset
+
+), acceleration(
+\begin_inset Quotes eld
+\end_inset
+
+acceleration
+\begin_inset Quotes erd
+\end_inset
+
+);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbData db_data;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+velocity << 100000.0;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+acceleration << 500000.0;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(velocity);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(acceleration);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->put_property(
+\begin_inset Quotes eld
+\end_inset
+
+mymotor
+\begin_inset Quotes erd
+\end_inset
+
+, db_data);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::delete_property(string, DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Delete a list of properties for the specified object.
+ The property names are specified by the vector of DbDatum structures.
+ Here is an example of how to delete properties from the database using
+ this method :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbData db_data;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum(
+\begin_inset Quotes eld
+\end_inset
+
+velocity
+\begin_inset Quotes erd
+\end_inset
+
+));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum(
+\begin_inset Quotes eld
+\end_inset
+
+acceleration
+\begin_inset Quotes erd
+\end_inset
+
+));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->delete_property(
+\begin_inset Quotes eld
+\end_inset
+
+mymotor
+\begin_inset Quotes erd
+\end_inset
+
+, db_data);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+vector<DbHistory> Database::get_property_history(string &objname, string
+ &propname)
+\end_layout
+
+\begin_layout Standard
+Get the list of the last 10 modifications of the specifed object property.
+ Note that propname can contain a wildcard character (eg: "prop*").
+ 
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+vector<DbHistory> hist;
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum result;
+\end_layout
+
+\begin_layout LyX-Code
+string objname("jlptest");
+\end_layout
+
+\begin_layout LyX-Code
+string propname("test_prop");
+\end_layout
+
+\begin_layout LyX-Code
+hist = db->get_property_history(objname,propname);
+\end_layout
+
+\begin_layout LyX-Code
+// Print the modification history of the specified property
+\end_layout
+
+\begin_layout LyX-Code
+for(int i=0;i<hist.size();i++) {
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+  cout << "Name:" << hist[i].get_name() << endl; 
+\end_layout
+
+\begin_layout LyX-Code
+  cout << "Date:" << hist[i].get_date() << endl; 
+\end_layout
+
+\begin_layout LyX-Code
+  if( hist[i].is_deleted() ) {
+\end_layout
+
+\begin_layout LyX-Code
+    cout << "Deleted !" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+  } else {
+\end_layout
+
+\begin_layout LyX-Code
+    hist[i].get_value() >> result;
+\end_layout
+
+\begin_layout LyX-Code
+    for (int j=0; j<result.size(); j++)
+\end_layout
+
+\begin_layout LyX-Code
+      cout << "Value:" << result[j] << endl;
+\end_layout
+
+\begin_layout LyX-Code
+  }
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exceptions: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::get_device_property(string, DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for a list of device properties for the specified object.
+ The property names are specified by the vector of DbDatum structures.
+ The method returns the properties in the same DbDatum structures.
+ To retrieve the properties use the extract operator >>.
+ Here is an example of how to use the DbData type to specify and extract
+ properties :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbData db_data;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum(
+\begin_inset Quotes eld
+\end_inset
+
+velocity
+\begin_inset Quotes erd
+\end_inset
+
+));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum(
+\begin_inset Quotes eld
+\end_inset
+
+acceleration
+\begin_inset Quotes erd
+\end_inset
+
+));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->get_device_property(
+\begin_inset Quotes eld
+\end_inset
+
+id11/motor/1
+\begin_inset Quotes erd
+\end_inset
+
+, db_data);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+float velocity, acceleration;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data[0] >> velocity;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data[1] >> acceleration;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::put_device_property(string, DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Insert or update a list of properties for the specified device.
+ The property names and their values are specified by the vector of DbDatum
+ structures.
+ Use the insert operator >> to insert the properties into the DbDatum structures.
+ Here is an example of how to insert properties into the database using
+ this method :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbDatum velocity(
+\begin_inset Quotes eld
+\end_inset
+
+velocity
+\begin_inset Quotes erd
+\end_inset
+
+), acceleration(
+\begin_inset Quotes eld
+\end_inset
+
+acceleration
+\begin_inset Quotes erd
+\end_inset
+
+);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbData db_data;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+velocity << 100000.0;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+acceleration << 500000.0;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(velocity);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(acceleration);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->put_device_property(
+\begin_inset Quotes eld
+\end_inset
+
+id11/motor/1
+\begin_inset Quotes erd
+\end_inset
+
+, db_data);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::delete_device_property(string, DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Delete a list of properties for the specified device.
+ The property names are specified by the vector of DbDatum structures.
+ Here is an example of how to delete properties from the database using
+ this method :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbData db_data;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum(
+\begin_inset Quotes eld
+\end_inset
+
+velocity
+\begin_inset Quotes erd
+\end_inset
+
+));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum(
+\begin_inset Quotes eld
+\end_inset
+
+acceleration
+\begin_inset Quotes erd
+\end_inset
+
+));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->delete_device_property(
+\begin_inset Quotes eld
+\end_inset
+
+id11/motor/1
+\begin_inset Quotes erd
+\end_inset
+
+, db_data);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+vector<DbHistory> Database::get_device_property_history(string &devname,
+ string &propname)
+\end_layout
+
+\begin_layout Standard
+Get the list of the last 10 modifications of the specifed device property.
+ Note that propname can contain a wildcard character (eg: "prop*").
+ An example of usage of a similar function can be found in the documentation
+ of the get_property_history() function.
+\end_layout
+
+\begin_layout Standard
+Exceptions: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::get_device_attribute_property(string, DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for a list of device attribute properties for the specified
+ object.
+ The attribute names are specified by the vector of DbDatum structures.
+ The method returns all the properties for the specified attributes.
+ The attribute names are returned with the number of properties specified
+ as their value.
+ The first DbDatum element of the returned DbData vector contains the first
+ attribute name and the first attribute property number.
+ The following DbDatum element contains the first attribute property name
+ and property values.
+ To retrieve the properties use the extract operator >>.
+ Here is an example of how to use the DbData type to specify and extract
+ attribute properties :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbData db_data;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum("velocity"));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum("acceleration"));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+ 
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->get_device_attribute_property("id11/motor/1", db_data);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+ 
+\end_layout
+
+\begin_layout LyX-Code
+float vel_max, vel_min, acc_max, acc_min;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+ 
+\end_layout
+
+\begin_layout LyX-Code
+for (int i=0;i < db_data.size();i++)
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+{
+\end_layout
+
+\begin_layout LyX-Code
+     long nb_prop;
+\end_layout
+
+\begin_layout LyX-Code
+     string &att_name = db_data[i].name;
+\end_layout
+
+\begin_layout LyX-Code
+     db_data[i] >> nb_prop;
+\end_layout
+
+\begin_layout LyX-Code
+     i++;
+\end_layout
+
+\begin_layout LyX-Code
+     for (int k=0;k < nb_prop;k++)
+\end_layout
+
+\begin_layout LyX-Code
+     {
+\end_layout
+
+\begin_layout LyX-Code
+         string &prop_name = db_data[i].name;
+\end_layout
+
+\begin_layout LyX-Code
+         if (att_name == "velocity")
+\end_layout
+
+\begin_layout LyX-Code
+         {
+\end_layout
+
+\begin_layout LyX-Code
+             if (prop_name == "min")
+\end_layout
+
+\begin_layout LyX-Code
+                 db_data[i] >>  vel_min;
+\end_layout
+
+\begin_layout LyX-Code
+             else if (att_name == "max")
+\end_layout
+
+\begin_layout LyX-Code
+                 db_data[i] >> vel_max;
+\end_layout
+
+\begin_layout LyX-Code
+         }
+\end_layout
+
+\begin_layout LyX-Code
+         else
+\end_layout
+
+\begin_layout LyX-Code
+         {
+\end_layout
+
+\begin_layout LyX-Code
+             if (prop_name == "min")
+\end_layout
+
+\begin_layout LyX-Code
+                 db_data[i] >> acc_min;
+\end_layout
+
+\begin_layout LyX-Code
+             else
+\end_layout
+
+\begin_layout LyX-Code
+                 db_data[i] >> acc_max;
+\end_layout
+
+\begin_layout LyX-Code
+         }
+\end_layout
+
+\begin_layout LyX-Code
+         i++;
+\end_layout
+
+\begin_layout LyX-Code
+     }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::put_device_attribute_property(string, DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Insert or update a list of attribute properties for the specified device.
+ The attribute property names and their values are specified by the vector
+ of DbDatum structures.
+ Use the insert operator >> to insert the properties into the DbDatum structures.
+ Here is an example of how to insert/update properties 
+\emph on
+min
+\emph default
+, 
+\emph on
+max
+\emph default
+ for attribute 
+\emph on
+velocity
+\emph default
+ and properties 
+\emph on
+min
+\emph default
+, 
+\emph on
+max
+\emph default
+ for attribute 
+\emph on
+acceleration
+\emph default
+ of device 
+\emph on
+id11/motor/1
+\emph default
+ into the database using this method :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbDatum velocity("velocity"), vel_min("min"), vel_max("max");
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbDatum acceleration("acceleration"), acc_min("min"), acc_max("max");
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbData db_data;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+velocity << 2;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+vel_min << 0.0;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+vel_max << 1000000.0;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(velocity);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(vel_min);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(vel_max);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+acceleration << 2;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+acc_min << 0.0;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+acc_max << 8000000;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(acceleration);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(acc_min);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(acc_max);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->put_device_attribute_property(
+\begin_inset Quotes eld
+\end_inset
+
+id11/motor/1
+\begin_inset Quotes erd
+\end_inset
+
+, db_data);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::delete_device_attribute_property(string, DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Delete a list of attribute properties for the specified device.
+ The attribute names are specified by the vector of DbDatum structures.
+ Here is an example of how to delete the 
+\emph on
+unit
+\emph default
+ property of the 
+\emph on
+velocity
+\emph default
+ attribute of the 
+\emph on
+id11/motor/1
+\emph default
+ device using this method :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbData db_data;
+\end_layout
+
+\begin_layout LyX-Code
+db_data.push_back(DbDatum("velocity"));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum("unit"));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->delete_device_attribute_property("id11/motor/1", db_data);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+vector<DbHistory> Database::get_device_attribute_property_history(string
+ &devname, string &attname, string &propname)
+\end_layout
+
+\begin_layout Standard
+Get the list of the last 10 modifications of the specifed device attribute
+ property.
+ Note that propname and attname can contain a wildcard character (eg: "prop*").
+ An example of usage of a similar function can be found in the documentation
+ of the get_property_history() function.
+\end_layout
+
+\begin_layout Standard
+Exceptions: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_class_list(string &wildcard)
+\end_layout
+
+\begin_layout Standard
+Query the database for a list of classes which match the specified wildcard.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string wildcard("Motor*");
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_class_list(wildcard);
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> class_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> class_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_class_property_list(string &classname)
+\end_layout
+
+\begin_layout Standard
+Query the database for a list of properties defined for the specified class.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string classname("MyClass");
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_class_property_list(classname);
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> prop_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> prop_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::get_class_property(string, DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for a list of class properties.
+ The property names are specified by the vector of DbDatum structures.
+ The method returns the properties in the same DbDatum structures.
+ To retrieve the properties use the extract operator >>.
+ Here is an example of how to use the DbData type to specify and extract
+ properties :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbData db_data;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum("velocity"));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum("acceleration"));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->get_class_property("StepperMotor", db_data);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+float velocity, acceleration;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data[0] >> velocity;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data[1] >> acceleration;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::put_class_property(string, DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Insert or update a list of properties for the specified class.
+ The property names and their values are specified by the vector of DbDatum
+ structures.
+ Use the insert operator >> to insert the properties into the DbDatum structures.
+ Here is an example of how to insert properties into the database using
+ this method :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbDatum velocity("velocity"), acceleration("acceleration");
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbData db_data;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+velocity << 100000.0;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+acceleration << 500000.0;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(velocity);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(acceleration);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->put_class_property("StepperMotor", db_data);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::delete_class_property(string, DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Delete a list of properties for the specified class.
+ The property names are specified by the vector of DbDatum structures.
+ Here is an example of how to delete properties from the database using
+ this method :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbData db_data;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum("velocity"));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum("acceleration"));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->delete_class_property("StepperMotor", db_data);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+vector<DbHistory> Database::get_class_property_history(string &classname,
+ string &propname)
+\end_layout
+
+\begin_layout Standard
+Get the list of the last 10 modifications of the specifed class property.
+ Note that propname can contain a wildcard character (eg: "prop*").
+ An example of usage of a similar function can be found in the documentation
+ of the get_property_history() function.
+\end_layout
+
+\begin_layout Standard
+Exceptions: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_class_attribute_list(string &classname,string &wildcard)
+\end_layout
+
+\begin_layout Standard
+Query the database for a list of attributes defined for the specified class
+ which match the specified wildcard.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+string classname("MyClass");
+\end_layout
+
+\begin_layout LyX-Code
+string wildcard("*");
+\end_layout
+
+\begin_layout LyX-Code
+DbDatum db_datum = db->get_class_attribute_list(classname,wildcard);
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> att_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_datum >> att_list;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exception: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::get_class_attribute_property(string, DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for a list of class attribute properties for the specified
+ object.
+ The attribute names are specified by the vector of DbDatum structures.
+ The method returns all the properties for the specified attributes.
+ The attribute names are returned with the number of properties specified
+ as their value.
+ The first DbDatum element of the returned DbData vector contains the first
+ attribute name and the first attribute property number.
+ The following DbDatum element contains the first attribute property name
+ and property values.
+ To retrieve the properties use the extract operator >>.
+ Here is an example of how to use the DbData type to specify and extract
+ attribute properties :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbData db_data;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum("velocity"));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum("acceleration"));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+ 
+\end_layout
+
+\begin_layout LyX-Code
+db->get_class_attribute_property("StepperMotor", db_data);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+ 
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+float vel_max, vel_min, acc_max, acc_min;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+ 
+\end_layout
+
+\begin_layout LyX-Code
+for (int i=0; i< db_data.size(); i++)
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+{
+\end_layout
+
+\begin_layout LyX-Code
+     long nb_prop;
+\end_layout
+
+\begin_layout LyX-Code
+     string &att_name = db_data[i].name;
+\end_layout
+
+\begin_layout LyX-Code
+     db_data[i] >> nb_prop;
+\end_layout
+
+\begin_layout LyX-Code
+     i++;
+\end_layout
+
+\begin_layout LyX-Code
+     for (int k=0;k < nb_prop;k++)
+\end_layout
+
+\begin_layout LyX-Code
+     {
+\end_layout
+
+\begin_layout LyX-Code
+         string &prop_name = db_data[i].name;
+\end_layout
+
+\begin_layout LyX-Code
+         if (att_name == "velocity")
+\end_layout
+
+\begin_layout LyX-Code
+         {
+\end_layout
+
+\begin_layout LyX-Code
+             if (prop_name == "min")
+\end_layout
+
+\begin_layout LyX-Code
+                 db_data[i] >>  vel_min;
+\end_layout
+
+\begin_layout LyX-Code
+             else if (att_name == "max")
+\end_layout
+
+\begin_layout LyX-Code
+                 db_data[i] >> vel_max;
+\end_layout
+
+\begin_layout LyX-Code
+         }
+\end_layout
+
+\begin_layout LyX-Code
+         else
+\end_layout
+
+\begin_layout LyX-Code
+         {
+\end_layout
+
+\begin_layout LyX-Code
+             if (prop_name == "min")
+\end_layout
+
+\begin_layout LyX-Code
+                 db_data[i] >> acc_min;
+\end_layout
+
+\begin_layout LyX-Code
+             else
+\end_layout
+
+\begin_layout LyX-Code
+                 db_data[i] >> acc_max;
+\end_layout
+
+\begin_layout LyX-Code
+         }
+\end_layout
+
+\begin_layout LyX-Code
+         i++;
+\end_layout
+
+\begin_layout LyX-Code
+     }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::put_class_attribute_property(string, DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Insert or update a list of attribute properties for the specified class.
+ The attribute property names and their values are specified by the vector
+ of DbDatum structures.
+ Use the insert operator >> to insert the properties into the DbDatum structures.
+ Here is an example of how to insert/update 
+\emph on
+min
+\emph default
+, 
+\emph on
+max
+\emph default
+ properties for attribute 
+\emph on
+velocity
+\emph default
+ and 
+\emph on
+min
+\emph default
+, 
+\emph on
+max
+\emph default
+ properties for attribute 
+\emph on
+acceleration
+\emph default
+ properties belonging to class 
+\emph on
+StepperMotor
+\emph default
+ into the database using this method :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbDatum velocity("velocity"), vel_min("min"), vel_max("max");
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbDatum acceleration("acceleration"), acc_min("min"), acc_max("max");
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbData db_data;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+velocity << 2;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+vel_min << 0.0;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+vel_max << 1000000.0;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(velocity);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(vel_min);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(vel_max);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+acceleration << 2;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+acc_min << 0.0;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+acc_max << 8000000;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(acceleration);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(acc_min);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(acc_max);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->put_class_attribute_property("StepperMotor", db_data);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void Database::delete_class_attribute_property(string, DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Delete a list of attribute properties for the specified class.
+ The attribute names are specified by the vector of DbDatum structures.
+ All properties belonging to the listed attributes are deleted.
+ Here is an example of how to delete the 
+\emph on
+unit
+\emph default
+ property of the 
+\emph on
+velocity
+\emph default
+ attribute of the 
+\emph on
+StepperMotor
+\emph default
+ class from the database using this method :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbData db_data;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum("velocity"));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data.push_back(DbDatum("unit"));
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db->delete_class_attribute_property("StepperMotor", db_data);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+vector<DbHistory> Database::get_class_attribute_property_history(string
+ &devname, string &attname, string &propname)
+\end_layout
+
+\begin_layout Standard
+Get the list of the last 10 modifications of the specifed class attribute
+ property.
+ Note that propname and attname can contain a wildcard character (eg: "prop*").
+ An example of usage of a similar function can be found in the documentation
+ of the get_property_history() function.
+\end_layout
+
+\begin_layout Standard
+Exceptions: ConnectionFailed, CommunicationFailed, DevFailed from device
+\end_layout
+
+\begin_layout Subsection
+void Database::get_alias(string dev_name, string &dev_alias)
+\end_layout
+
+\begin_layout Standard
+Get the device alias name from its name.
+ The device name is specified by 
+\emph on
+dev_name
+\emph default
+ and the device alias name is returned in 
+\emph on
+dev_alias
+\emph default
+.
+ If there is no alias defined for the device, a DevFailed exception is thrown.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions: ConnectionFailed, CommunicationFailed, DevFailed from device
+ (DB_AliasNotDefined)
+\end_layout
+
+\begin_layout Subsection
+void Database::get_device_alias(string dev_alias, string &dev_name)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Get the device name from an alias.
+ The device alias is specified by 
+\emph on
+dev_alias
+\emph default
+ and the device name is returned in 
+\emph on
+dev_name
+\emph default
+.
+ If there is no device with the given alias, a DevFailed exception is thrown.
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_DeviceNotDefine
+d)
+\end_layout
+
+\begin_layout Subsection
+void Database::get_attribute_alias(string attr_alias, string &attr_name)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Get the full attribute name from an alias.
+ The attribute alias is specified by 
+\emph on
+attr_alias
+\emph default
+ and the full attribute name is returned in 
+\emph on
+attr_name
+\emph default
+.
+ If there is no attribute with the given alias, a DevFailed exception is
+ thrown.
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+void Database::put_attribute_alias(string &att_name, string &alias_name)
+\end_layout
+
+\begin_layout Standard
+Set an alias for an attribute name.
+ The attribute alias is specified by alias_name and the attribute name is
+ specifed by att_name.
+ If the given alias already exists, a DevFailed exception is thrown.
+\end_layout
+
+\begin_layout Standard
+Exceptions: ConnectionFailed, CommunicationFailed, DevFailed from device
+ (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+void Database::delete_attribute_alias(string &alias_name)
+\end_layout
+
+\begin_layout Standard
+Remove the alias associated to an attribute name.
+\end_layout
+
+\begin_layout Standard
+Exceptions: ConnectionFailed, CommunicationFailed, DevFailed from device
+ (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_device_alias_list(string &filter)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Get device alias list.
+ The parameter 
+\emph on
+alias
+\emph default
+ is a string to filter the alias list returned.
+ Wildcard (*) is supported.
+ For instance, if the string alias passed as the method parameter is initialised
+ with only the * character, all the defined device alias will be returned.
+ The DbDatum returned by this method is initialised with an array of strings
+ and must be extracted into a vector<string>.
+ If there is no alias with the given filter, the returned array will have
+ a 0 size.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbData db_data;
+\end_layout
+
+\begin_layout LyX-Code
+string filter("*");
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+db_data = db->get_device_alias_list(filter);
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> al_list;
+\end_layout
+
+\begin_layout LyX-Code
+db_data >> al_list;
+\end_layout
+
+\begin_layout LyX-Code
+cout << al_list.size() << " device alias defined in db" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+for (int i=0;i < al_list.size();i++)
+\end_layout
+
+\begin_layout LyX-Code
+    cout << "alias = " << al_list[i] << endl;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+DbDatum Database::get_attribute_alias_list(string &filter)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Get attribute alias list.
+ The parameter 
+\emph on
+alias
+\emph default
+ is a string to filter the alias list returned.
+ Wildcard (*) is supported.
+ For instance, if the string alias passed as the method parameter is initialised
+ with only the * character, all the defined attribute alias will be returned.
+ The DbDatum returned by this method is initialised with an array of strings
+ and must be extracted into a vector<string>.
+ If there is no alias with the given filter, the returned array will have
+ a 0 size.
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+void Database::put_device_alias(string &dev_name,string &alias_name)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Create a device alias.
+ Alias name has to be uniq within a Tango control system and you will receive
+ an exception if the alias is already defined.
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+void Database::delete_device_alias(string &alias_name)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Delete a device alias.
+\end_layout
+
+\begin_layout Standard
+\noindent
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Section
+\noindent
+Tango::DbDevice
+\end_layout
+
+\begin_layout Standard
+\noindent
+A database object for a device which can be used to query or modify properties,
+ import and export information for a device.
+ This class provides an easy to use interface for device objects in the
+ database.
+ It uses the methods of the Database class therefore the reader is referred
+ to these for the exact calling syntax and examples.
+ The following methods are defined for the DbDevice class :
+\end_layout
+
+\begin_layout Subsection
+\noindent
+DbDevice::DbDevice(string &)
+\end_layout
+
+\begin_layout Standard
+\noindent
+A constructor for a DbDevice object for a device in the TANGO database specified
+ by the TANGO_HOST environment variable.
+ 
+\end_layout
+
+\begin_layout Subsection
+\noindent
+DbDevice::DbDevice(string &, Database *)
+\end_layout
+
+\begin_layout Standard
+\noindent
+A constructor for a DbDevice object for the device in the specified database.
+ This method reuses the Database supplied by the programmer.
+\end_layout
+
+\begin_layout Subsection
+\noindent
+DbDevImportInfo DbDevice::import_device()
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for the import info of this device.
+ Returns a DbDevImportInfo structure.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbDevice::export_device(DbDevExportInfo&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Update the export info for this device in the database.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbDevice::add_device(DbDevInfo&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Add/Update this device to the database.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbDevice::delete_device()
+\end_layout
+
+\begin_layout Standard
+\noindent
+Delete this device from the database.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbDevice::get_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for the list of properties of this device.
+ See Database::get_device_property() for an example of how to specify and
+ retrieve the properties.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbDevice::put_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Update the list of properties for this device in the database.
+ See Database::put_device_property() for an example of how to specify the
+ properties.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbDevice::delete_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Delete the list of specified properties for this device in the database.
+ See Database::delete_property() for an example of how to specify the properties.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbDevice::get_attribute_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for the list of attribute properties of this device.
+ See Database::get_device_attribute_property() for an example of how to
+ specify and retrieve the properties.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbDevice::put_attribute_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Update the list of attribute properties for this device in the database.
+ See Database::put_device_attribute_property() for an example of how to
+ specify the properties.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbDevice::delete_attribute_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Delete all properties for the list of specified attributes for this device
+ in the database.
+ See Database::delete_device_attribute_property() for an example of how
+ to specify the properties.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Section
+\noindent
+Tango::DbClass
+\end_layout
+
+\begin_layout Standard
+\noindent
+A database object for a class which can be used to query or modify class
+ properties.
+\end_layout
+
+\begin_layout Subsection
+\noindent
+DbClass::DbClass(string)
+\end_layout
+
+\begin_layout Standard
+\noindent
+A constructor for a DbClass object for a class in the TANGO database specified
+ by the TANGO_HOST environment variable.
+ 
+\end_layout
+
+\begin_layout Subsection
+\noindent
+DbClass::DbClass(string, Database *)
+\end_layout
+
+\begin_layout Standard
+\noindent
+A constructor for a DbClass object for the class in the specified database.
+ This method reuses the Database supplied by the programmer.
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbClass::get_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for the list of properties of this class.
+ See Database::get_class_property() for an example of how to specify and
+ retrieve the properties.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbClass::put_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Update the list of properties for this class in the database.
+ See Database::put_class_property() for an example of how to specify the
+ properties.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbClass::delete_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Delete the list of specified properties for this class in the database.
+ See Database::delete_property() for an example of how to specify the properties.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbClass::get_attribute_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Query the database for the list of attribute properties of this class.
+ See Database::get_class_attribute_property() for an example of how to specify
+ and retrieve the properties.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbClass::put_attribute_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Update the list of attribute properties for this class in the database.
+ See Database::put_class_attribute_property() for an example of how to specify
+ the properties.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbClass::delete_attribute_property(DbData&)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Delete all properties for the list of specified attributes for this class
+ in the database.
+ See Database::delete_class_attribute_property() for an example of how to
+ specify the properties.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Section
+Tango::DbServer
+\end_layout
+
+\begin_layout Standard
+\noindent
+A database object for a device server which can be used to query or modify
+ server database information.
+\end_layout
+
+\begin_layout Subsection
+\noindent
+DbServer::DbServer(string)
+\end_layout
+
+\begin_layout Standard
+\noindent
+A constructor for a DbServer object for a server in the TANGO database specified
+ by the TANGO_HOST environment variable.
+\end_layout
+
+\begin_layout Subsection
+\noindent
+DbServer::DbServer(string, Database *)
+\end_layout
+
+\begin_layout Standard
+\noindent
+A constructor for a DbServer object for the server in the specified database.
+ This method reuses the Database supplied by the programmer.
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbServer::add_server(DbDevInfos &)
+\end_layout
+
+\begin_layout Standard
+Add a group of devices to the database.
+ The device names, server names and classes are specified in the vector
+ of DbDevInfo structures.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+void DbServer::delete_server()
+\end_layout
+
+\begin_layout Standard
+Delete the device server and its associated devices from the database.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+void DbServer::export_server(DbDevExportInfos &)
+\end_layout
+
+\begin_layout Standard
+Export a group of device to the database.
+ The device names, IOR, class, server name, pid etc.
+ are specified in the vector of DbDevExportInfo structures.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Subsection
+void DbServer::unexport_server()
+\end_layout
+
+\begin_layout Standard
+Mark all the devices exported by the server as un exported.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exceptions
+\emph default
+: 
+\emph on
+ConnectionFailed, CommunicationFailed, DevFailed from device (DB_SQLError)
+\end_layout
+
+\begin_layout Section
+\noindent
+Tango::DbDatum
+\end_layout
+
+\begin_layout Standard
+\noindent
+A single database value which has a name, type, address and value and methods
+ for inserting and extracting C++ native types.
+ This is the fundamental type for specifying database properties.
+ Every property has a name and has one or more values associated with it.
+ The values can be inserted and extracted using the operators << and >>
+ respectively.
+ A status flag indicates if there is data in the DbDatum object or not.
+ An additional flag allows the user to activate exceptions.
+ 
+\end_layout
+
+\begin_layout Subsection
+\noindent
+Operators
+\end_layout
+
+\begin_layout Standard
+\noindent
+The insert and extract operators are specified for the following C++ types
+ :
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+boolean
+\end_layout
+
+\begin_layout Enumerate
+unsigned char
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+short
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+unsigned short
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+DevLong
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+DevULong
+\end_layout
+
+\begin_layout Enumerate
+DevLong64
+\end_layout
+
+\begin_layout Enumerate
+DevULong64
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+float
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+double
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+string
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+char* (insert only)
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+const char *
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<string>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<short>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<unsigned short>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<DevLong>
+\end_layout
+
+\begin_layout Enumerate
+vector<DevULong>
+\end_layout
+
+\begin_layout Enumerate
+vector<DevLong64>
+\end_layout
+
+\begin_layout Enumerate
+vector<DevULong64>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<float>
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+vector<double>
+\end_layout
+
+\begin_layout Standard
+\noindent
+Here is an example of creating, inserting and extracting some DbDatum types
+ :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbDatum my_short("my_short"), my_long(
+\begin_inset Quotes eld
+\end_inset
+
+my_long
+\begin_inset Quotes erd
+\end_inset
+
+), my_string("my_string");
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DbDatum my_float_vector("my_float_vector"), my_double_vector("my_double_vector")
+;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+string a_string;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+short a_short;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+DevLong a_long;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+vector<float> a_float_vector;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+vector<double> a_double_vector;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_short << 100; // insert a short
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_short >> a_short; // extract a short
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_long << 1000; // insert a DevLong
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_long >> a_long; // extract a long
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_string << string("estas lista a bailar el tango ?"); // insert a string
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_string >> a_string; // extract a string
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_float_vector << a_float_vector // insert a vector of floats
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_float_vector >> a_float_vector; // extract a vector of floats
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_double_vector << a_double_vector; // insert a vector of doubles
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+my_double_vector >> a_double_vector; // extract a vector of doubles
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: WrongData if requested
+\end_layout
+
+\begin_layout Subsection
+\noindent
+bool DbDatum::is_empty()
+\end_layout
+
+\begin_layout Standard
+\noindent
+is_empty() is a boolean method which trues true or false depending on whether
+ the DbDatum object contains data or not.
+ It can be used to test whether a property is defined in the database or
+ not e.g.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+sl_props.push_back(parity_prop);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+dbase->get_device_property(device_name, sl_props);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+if (! parity_prop.is_empty()) 
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+{
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+        parity_prop >> parity;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+}
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+else
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+{
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+      cout << device_name << " has no parity defined in database !" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+Exception: WrongData if requested
+\end_layout
+
+\begin_layout Subsection
+\noindent
+void DbDatum::exceptions(bitset<DbDatum::numFlags>)
+\end_layout
+
+\begin_layout Standard
+\noindent
+Is a method which allows the user to switch on/off exception throwing for
+ trying to extract data from an empty DbDatum object.
+ The default is to not throw exception.
+ The following flags are supported :
+\end_layout
+
+\begin_layout Enumerate
+\noindent
+
+\series bold
+isempty_flag
+\series default
+ - throw a WrongData exception (reason = API_EmptyDbDatum) if user tries
+ to extract data from an empty DbDatum object
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+wrongtype_flag
+\series default
+ - throw a WrongData exception (reason = API_IncompatibleArgumentType) if
+ user tries to extract data with a type different than the type used for
+ insertion
+\end_layout
+
+\begin_layout Subsection
+bitset<DbDatum::numFlags> exceptions()
+\end_layout
+
+\begin_layout Standard
+Returns the whole exception flags.
+\end_layout
+
+\begin_layout Subsection
+void DbDatum::reset_exceptions(DbDatum::except_flags fl)
+\end_layout
+
+\begin_layout Standard
+Resets one exception flag
+\end_layout
+
+\begin_layout Subsection
+void DbDatum::set_exceptions(DbDatum::except_flags fl)
+\end_layout
+
+\begin_layout Standard
+Sets one exception flag
+\end_layout
+
+\begin_layout Standard
+The following is an example of how to use these exceptions related methods
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+     1          DbDatum da;
+\end_layout
+
+\begin_layout LyX-Code
+     2  
+\end_layout
+
+\begin_layout LyX-Code
+     3          bitset<DbDatum::numFlags> bs = da.exceptions();
+\end_layout
+
+\begin_layout LyX-Code
+     4          cout << "bs = " << bs << endl;
+\end_layout
+
+\begin_layout LyX-Code
+     5                  
+\end_layout
+
+\begin_layout LyX-Code
+     6          da.set_exceptions(DbDatum::wrongtype_flag);
+\end_layout
+
+\begin_layout LyX-Code
+     7          bs = da.exceptions();
+\end_layout
+
+\begin_layout LyX-Code
+     8                  
+\end_layout
+
+\begin_layout LyX-Code
+     9          cout << "bs = " << bs << endl;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+\noindent
+Tango::DbData
+\end_layout
+
+\begin_layout Standard
+\noindent
+A vector of Tango::DbDatum structures.
+ DbData is used to send or return one or more database properties or information.
+ It is the standard input and output type for all methods which query and/or
+ update properties in the database.
+\end_layout
+
+\begin_layout Section
+Exception
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Exception"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+All the exception thrown by this API are Tango::DevFailed exception.
+ This exception is a variable length array of Tango::DevError type.
+ The Tango::DevError type is a four fields structure.
+ These fields are :
+\end_layout
+
+\begin_layout Enumerate
+A string describing the error type.
+ This string replaces an error code and allows a more easy management of
+ include files.
+ This field is called 
+\series bold
+reason
+\end_layout
+
+\begin_layout Enumerate
+A string describing in plain text the reason of the error.
+ This field is called 
+\series bold
+desc
+\end_layout
+
+\begin_layout Enumerate
+A string giving the name of the method which thrown the exception.
+ This field is named 
+\series bold
+origin
+\end_layout
+
+\begin_layout Enumerate
+The error severity.
+ This is an enumeration with three values which are WARN, ERR or PANIC.
+ Its name is 
+\series bold
+severity
+\end_layout
+
+\begin_layout Standard
+This is a variable length array in order to transmit to the client what
+ is the primary error reason.
+ The sequence element 0 describes the primary error.
+ An exception class hierarchy has been implemented within the API to ease
+ API programmers task.
+ All the exception classes inherits from the Tango::DevFailed class.
+ Except for the 
+\emph on
+NamedDevFaildeList
+\emph default
+ exception class, they don't add any new fields to the exception, they just
+ allow easy "catching".
+ Exception classes thrown only by the API layer are :
+\end_layout
+
+\begin_layout Itemize
+ConnectionFailed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ConnectionFailed
+\end_layout
+
+\end_inset
+
+ 
+\end_layout
+
+\begin_layout Itemize
+CommunicationFailed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CommunicationFailed
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+WrongNameSyntax
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+WrongNameSyntax
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+NonDbDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+NonDbDevice
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+WrongData
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+WrongData
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+NonSupportedFeature
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+NonSupportedFeature
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+AsynCall
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AsynCall
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+AsynReplyNotArrived
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AsynReplyNotArrived
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+EventSystemFailed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+EventSystemFailed
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+NamedDevFailedList
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+NamedDevFailedList
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+DeviceUnlocked
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceUnlocked
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+On top of these classes, exception thrown by the device (Tango::DevFailed
+ exception) are directly passed to the client.
+\end_layout
+
+\begin_layout Subsection
+The ConnectionFailed exception
+\end_layout
+
+\begin_layout Standard
+This exception is thrown when a problem occurs during the connection establishme
+nt between the application and the device.
+ The API is stateless.
+ This means that DeviceProxy constructors filter most of the exception except
+ for cases described in the following table.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="37" columns="5">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Method name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+device type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+error type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Level
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+reason
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+TANGO_HOST not set
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_TangoHostNotSet
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+with
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Device not defined in db
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DB_DeviceNotDefined
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ database
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+or
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CommandFailed
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DeviceProxy
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Alias not defined in db
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_DeviceNotDefined
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+constructor
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+with database
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Database server
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CorbaException
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+specified in dev name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+not running
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CantConnectToDatabase
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+without
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Server running but device
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CorbaException
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+database
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+not defined in server
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_DeviceNotExported
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+TANGO_HOST not set
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_TangoHostNotSet
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DB_DeviceNotDefined
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Device not defined in db
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CommandFailed
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+AttributeProxy
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+with
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_DeviceNotDefined
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+constructor
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+database
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DB_SQLError
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Alias not defined in db
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CommandFailed
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_AliasNotDefined
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+with database
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Database server
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CorbaException
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+specified in dev name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+not running
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CantConnectToDatabase
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DeviceProxy
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+without
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Server not
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CorbaException
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+or
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+database
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+running
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_ServerNotRunning
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+AttributeProxy
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Server not running
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_DeviceNotExported
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+method call
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+with
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Dead 
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CorbaException
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+(except
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+database
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+server
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CantConnectToDevice
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+cmd_inout
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Dead database server
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CorbaException
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+read_attribute)
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+when reconnection needed
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CantConnectToDatabase
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+without
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Server
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CorbaException
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DeviceProxy
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+database
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+not
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_ServerNotRunning
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+cmd_inout 
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+running
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CommandFailed
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+and
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Server 
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_DeviceNotExported
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+read_attribute
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+not running
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CommandFailed
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CorbaException
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+or
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+with
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Dead
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CantConnectToDevice
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+AttributeProxy
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+database
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+server
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CommandFailed
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+read
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+or API_AttributeFailed
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+and
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Dead database
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CorbaException
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+write
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+server when reconnection
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CantConnectToDatabase
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+needed
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CommandFailed
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The desc DevError structure field allows a user to get more precise information.
+ These informations are :
+\end_layout
+
+\begin_layout Description
+DB_DeviceNotDefined The name of the device not defined in the database
+\end_layout
+
+\begin_layout Description
+API_CommandFailed The device and command name
+\end_layout
+
+\begin_layout Description
+API_CantConnectToDevice The device name
+\end_layout
+
+\begin_layout Description
+API_CorbaException The name of the CORBA exception, its reason, its locality,
+ its completed flag and its minor code
+\end_layout
+
+\begin_layout Description
+API_CantConnectToDatabase The database server host and its port number
+\end_layout
+
+\begin_layout Description
+API_DeviceNotExported The device name
+\end_layout
+
+\begin_layout Subsection
+The CommunicationFailed exception
+\end_layout
+
+\begin_layout Standard
+This exception is thrown when a communication problem is detected during
+ the communication between the client application and the device server.
+ It is a two levels Tango::DevError structure.
+ In case of time-out, the DevError structures fields are:
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="3" columns="4">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Level
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Reason
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Desc
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Severity
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CorbaException
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CORBA exception fields translated into a string
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ERR
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_DeviceTimedOut
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+String with time-out value and device name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ERR
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+ 
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+For all other communication errors, the DevError structures fields are:
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="3" columns="4">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="block" valignment="middle" width="60mm">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Level
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Reason
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="1" alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Desc
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Severity
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CorbaException
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CORBA exception fields translated into a string
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ERR
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+API_CommunicationFailed
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+String with device, method, command/attribute name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ERR
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+The WrongNameSyntax exception
+\end_layout
+
+\begin_layout Standard
+This exception has only one level of Tango::DevError structure.
+ The possible value for the reason field are :
+\end_layout
+
+\begin_layout Description
+API_UnsupportedProtocol This error occurs when trying to build a DeviceProxy
+ or an AttributeProxy instance for a device with an unsupported protocol.
+ Refer to the appendix on device naming syntax to get the list of supported
+ database modifier
+\end_layout
+
+\begin_layout Description
+API_UnsupportedDBaseModifier This error occurs when trying to build a DeviceProx
+y or an AttributeProxy instance for a device/attribute with a database modifier
+ unsupported.
+ Refer to the appendix on device naming syntax to get the list of supported
+ database modifier
+\end_layout
+
+\begin_layout Description
+API_WrongDeviceNameSyntax This error occurs for all the other error in device
+ name syntax.
+ It is thrown by the DeviceProxy class constructor.
+\end_layout
+
+\begin_layout Description
+API_WrongAttributeNameSyntax This error occurs for all the other error in
+ attribute name syntax.
+ It is thrown by the AttributeProxy class constructor.
+\end_layout
+
+\begin_layout Description
+API_WrongWildcardUsage This error occurs if there is a bad usage of the
+ wildcard character
+\end_layout
+
+\begin_layout Subsection
+The NonDbDevice exception
+\end_layout
+
+\begin_layout Standard
+This exception has only one level of Tango::DevError structure.
+ The reason field is set to API_NonDatabaseDevice.
+ This exception is thrown by the API when using the DeviceProxy or AttributeProx
+y class database access for non-database device.
+\end_layout
+
+\begin_layout Subsection
+The WrongData exception
+\end_layout
+
+\begin_layout Standard
+This exception has only one level of Tango::DevError structure.
+ The possible value for the reason field are :
+\end_layout
+
+\begin_layout Description
+API_EmptyDbDatum This error occurs when trying to extract data from an empty
+ DbDatum object
+\end_layout
+
+\begin_layout Description
+API_IncompatibleArgumentType This error occurs when trying to extract data
+ with a type different than the type used to send the data
+\end_layout
+
+\begin_layout Description
+API_EmptyDeviceAttribute This error occurs when trying to extract data from
+ an empty DeviceAttribute object
+\end_layout
+
+\begin_layout Description
+API_IncompatibleAttrArgumentType This error occurs when trying to extract
+ attribute data with a type different than the type used to send the data
+\end_layout
+
+\begin_layout Description
+API_EmptyDeviceData This error occurs when trying to extract data from an
+ empty DeviceData object
+\end_layout
+
+\begin_layout Description
+API_IncompatibleCmdArgumentType This error occurs when trying to extract
+ command data with a type different than the type used to send the data
+\end_layout
+
+\begin_layout Subsection
+The NonSupportedFeature exception
+\end_layout
+
+\begin_layout Standard
+This exception is thrown by the API layer when a request to a feature implemente
+d in Tango device interface release n is requested for a device implementing
+ Tango device interface n-x.
+ There is one possible value for the reason field which is API_UnsupportedFeatur
+e.
+\end_layout
+
+\begin_layout Subsection
+The AsynCall exception
+\end_layout
+
+\begin_layout Standard
+This exception is thrown by the API layer when a the asynchronous model
+ id badly used.
+ This exception has only one level of Tango::DevError structure.
+ The possible value for the reason field are :
+\end_layout
+
+\begin_layout Description
+API_BadAsynPollId This error occurs when using an asynchronous request identifie
+r which is not valid any more.
+\end_layout
+
+\begin_layout Description
+API_BadAsyn This error occurs when trying to fire callback when no callback
+ has been previously registered
+\end_layout
+
+\begin_layout Description
+API_BadAsynReqType This error occurs when trying to get result of an asynchronou
+s request with an asynchronous request identifier returned by a non-coherent
+ asynchronous request (For instance, using the asynchronous request identifier
+ returned by a 
+\emph on
+command_inout_asynch()
+\emph default
+ method with a 
+\emph on
+read_attribute_reply()
+\emph default
+ attribute).
+\end_layout
+
+\begin_layout Subsection
+The AsynReplyNotArrived exception
+\end_layout
+
+\begin_layout Standard
+This exception is thrown by the API layer when:
+\end_layout
+
+\begin_layout Itemize
+a request to get asynchronous reply is made and the reply is not yet arrived
+\end_layout
+
+\begin_layout Itemize
+a blocking wait with timeout for asynchronous reply is made and the timeout
+ expired.
+\end_layout
+
+\begin_layout Standard
+There is one possible value for the reason field which is API_AsynReplyNotArrive
+d.
+\end_layout
+
+\begin_layout Subsection
+The EventSystemFailed exception
+\end_layout
+
+\begin_layout Standard
+This exception is thrown by the API layer when subscribing or unsubscribing
+ from an event failed.
+ This exception has only one level of Tango::DevError structure.
+ The possible value for the reason field are :
+\end_layout
+
+\begin_layout Description
+API_NotificationServiceFailed This error occurs when the 
+\emph on
+subscribe_event()
+\emph default
+ method failed trying to access the CORBA notification service
+\end_layout
+
+\begin_layout Description
+API_EventNotFound This error occurs when you are using an incorrect event_id
+ in the 
+\emph on
+unsubscribe_event()
+\emph default
+ method
+\end_layout
+
+\begin_layout Description
+API_InvalidArgs This error occurs when NULL pointers are passed to the subscribe
+ or unsubscribe event methods
+\end_layout
+
+\begin_layout Description
+API_MethodArgument This error occurs when trying to subscribe to an event
+ which has already been subsribed to
+\end_layout
+
+\begin_layout Description
+API_DSFailedRegisteringEvent This error means that the device server to
+ which the device belongs to failed when it tries to register the event.
+ Most likely, it means that there is no event property defined
+\end_layout
+
+\begin_layout Description
+API_EventNotFound Occurs when using a wrong event identifier in the 
+\emph on
+unsubscribe_event
+\emph default
+ method
+\end_layout
+
+\begin_layout Subsection
+The NamedDevFailedList
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+NamedDevFailedList
+\end_layout
+
+\end_inset
+
+ exception
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:The-NamedDevFailedList-exception"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This exception is only thrown by the 
+\emph on
+DeviceProxy::write_attributes()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+write-attributes
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ In this case, it is necessary to have a new class of exception to transfer
+ the error stack for several attribute(s) which failed during the writing.
+ Therefore, this exception class contains for each attributes which failed
+ :
+\end_layout
+
+\begin_layout Itemize
+The name of the attribute
+\end_layout
+
+\begin_layout Itemize
+Its index in the vector passed as argumen tof the write_attributes() method
+\end_layout
+
+\begin_layout Itemize
+The error stack as described in 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Exception"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+long NamedDevFailedList::get_faulty_attr_nb()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+get-faulty-attr-nb
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Returns the number of attributes which failed during the write_attribute
+ call.
+\end_layout
+
+\begin_layout Subsubsection
+vector<NamedDevFailed> NamedDevErrorList::err_list
+\end_layout
+
+\begin_layout Standard
+Public data member of the NamedDevFailedList.
+ There is one element in this vector for each attribute which failed during
+ its writing.
+\end_layout
+
+\begin_layout Subsubsection
+string NamedDevFailed::name
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+NamedDevFailed
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Public data member of the NamedDevFailed class.
+ It contains the name of the attribute which failed.
+\end_layout
+
+\begin_layout Subsubsection
+long NamedDevFailed::idx_in_call
+\end_layout
+
+\begin_layout Standard
+Public data member of the NamedDevFailed class.
+ It contains the index in the write_attributes method parameter vector of
+ the attribute which failed.
+\end_layout
+
+\begin_layout Subsubsection
+DevErrorList NamedDevFailed::err_stack
+\end_layout
+
+\begin_layout Standard
+Public data member of the NamedDevFailed class.
+ This is the error stack.
+\end_layout
+
+\begin_layout Standard
+The following piece of code is an example of how to use this class exception
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+catch (Tango::NamedDevFailed &e)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   long nb_faulty = e.get_faulty_attr_nb();
+\end_layout
+
+\begin_layout LyX-Code
+   for (long i = 0;i < nb_faulty;i++)
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+       cout << "Attribute " << e.err_list[i].name << " failed!" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+       for (long j = 0;j < e.err_list[i].err_stack.length();j++)
+\end_layout
+
+\begin_layout LyX-Code
+       {
+\end_layout
+
+\begin_layout LyX-Code
+           cout << "Reason [" << j << "] = " << e.err_list[i].err_stack[j].reason;
+\end_layout
+
+\begin_layout LyX-Code
+           cout << "Desc [" << j << "] = " << e.err_list[i].err_stack[j].desc;
+\end_layout
+
+\begin_layout LyX-Code
+       }
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This exception inherits from Tango::DevFailed.
+ It is possible to catch it with a "catch DevFailed" catch block.
+ In this case, like any other DevFailed exception, there is only one error
+ stack.
+ This stack is initialised with the name of all the attributes which failed
+ in its "reason" field.
+\end_layout
+
+\begin_layout Subsection
+The DeviceUnlocked
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceUnlocked
+\end_layout
+
+\end_inset
+
+ exception
+\end_layout
+
+\begin_layout Standard
+This exception is thrown by the API layer when a device locked by the process
+ has been unlocked by an admin client.
+ This exception has two levels of Tango::DevError structure.
+ There is only possible value for the reason field which is
+\end_layout
+
+\begin_layout Description
+API_DeviceUnlocked The device has been unlocked by another client (administratio
+n client)
+\end_layout
+
+\begin_layout Standard
+The first level is the message reported by the Tango kernel from the server
+ side.
+ The second layer is added by the client API layer with informations on
+ which API call generates the exception and device name.
+\end_layout
+
+\begin_layout Section
+Reconnection and exception
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Reconnection-and-exception"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The Tango API automatically manages re-connection between client and server
+ in case of communication error during a network access between a client
+ and a server.
+ The transparency reconnection mode allows a user to be (or not be) informed
+ that automatic reconnection took place.
+ If the transparency reconnection mode is not set, when a communication
+ error occurs, an exception is returned to the caller and the connection
+ is internally marked as bad.
+ On the next try to contact the device, the API will try to re-build the
+ network connection.
+ If the transparency reconnection mode is set, the API will try to re-build
+ the network connection has soon as the communication error occurs and the
+ caller is not informed.
+ Several cases are possible.
+ They are summarized in the following table:
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="13" columns="5">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="block" valignment="middle" width="45mm">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="block" valignment="middle" width="35mm">
+<column alignment="block" valignment="middle" width="35mm">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Case
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Server state
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+call nb
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+exception (transparency false)
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+exception (transparency true)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Server killed before call n
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+n
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CommunicationFailed
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ConnectionFailed
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Server killed
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+down
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+n+1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ConnectionFailed(2 levels)
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+idem
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+and re-started
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+down
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+n + 2
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+idem
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+idem
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Running
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+n + x
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+No exception
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+No exception
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Server died before call n
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+n
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CommunicationFailed
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ConnectionFailed
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Server died
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+died
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+n + 1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ConnectionFailed (3 levels)
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+idem
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+and re-started
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+died
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+n + 2
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+idem
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+idem
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Running
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+n + x
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+No exception
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+No exception
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Server killed
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Server killed and re-started before call n
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+n
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CommunicationFailed
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+No exception
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+and re-started
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Running
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+n+x
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+No exception
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+No exception
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Server died
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Server died and re-started before call n
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+n
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CommunicationFailed
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+No exception
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+and re-started
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Running
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+n + x
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+No exception
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+No exception
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Please note that the timeout case is managed differently because it will
+ not enter the re-connection system.
+ The transparency reconnection mode is set by default to true for Tango
+ version 5.5!
+\end_layout
+
+\end_body
+\end_document
diff --git a/doc/src/cpp_api/line.tex b/doc/src/cpp_api/line.tex
new file mode 100644
index 0000000..1ba963f
--- /dev/null
+++ b/doc/src/cpp_api/line.tex
@@ -0,0 +1,6 @@
+\begin{flushleft}
+\begin{picture}(0,0)
+\thicklines
+\put(0,0){\line(1,0){400}}
+\end{picture}
+\end{flushleft}
diff --git a/doc/src/dance/0046-reduc.jpg b/doc/src/dance/0046-reduc.jpg
new file mode 100644
index 0000000..f25aba7
Binary files /dev/null and b/doc/src/dance/0046-reduc.jpg differ
diff --git a/doc/src/dance/0066-reduc.jpg b/doc/src/dance/0066-reduc.jpg
new file mode 100644
index 0000000..948de5a
Binary files /dev/null and b/doc/src/dance/0066-reduc.jpg differ
diff --git a/doc/src/dance/18-8-size.jpg b/doc/src/dance/18-8-size.jpg
new file mode 100644
index 0000000..423cda3
Binary files /dev/null and b/doc/src/dance/18-8-size.jpg differ
diff --git a/doc/src/dance/AT97-65-size.jpg b/doc/src/dance/AT97-65-size.jpg
new file mode 100644
index 0000000..2a7c906
Binary files /dev/null and b/doc/src/dance/AT97-65-size.jpg differ
diff --git a/doc/src/dance/Eltaita-reduc.jpg b/doc/src/dance/Eltaita-reduc.jpg
new file mode 100644
index 0000000..12e7665
Binary files /dev/null and b/doc/src/dance/Eltaita-reduc.jpg differ
diff --git a/doc/src/dance/Ready.eps b/doc/src/dance/Ready.eps
new file mode 100644
index 0000000..0b29794
--- /dev/null
+++ b/doc/src/dance/Ready.eps
@@ -0,0 +1,101 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: Ready.eps
+%%Creator: fig2dev Version 3.2 Patchlevel 1
+%%CreationDate: Thu Feb  3 11:33:07 2000
+%%For: taurel at amber2 (E.Taurel,,,)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 468 59
+%%Pages: 0
+%%BeginSetup
+%%EndSetup
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-78.0 222.0 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+  bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+  4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+n -1000 4522 m -1000 -1000 l 9652 -1000 l 9652 4522 l cp clip
+ 0.06299 0.06299 sc
+% Polyline
+7.500 slw
+n 1260 2610 m 8640 2610 l 8640 3510 l 1260 3510 l cp gs col0 s gr 
+/Palatino-Bold ff 360.00 scf sf
+1530 3195 m
+gs 1 -1 sc (Are you ready to dance the TANGO ?) col0 sh gr
+$F2psEnd
+rs
diff --git a/doc/src/dance/tango-08-27.jpg b/doc/src/dance/tango-08-27.jpg
new file mode 100644
index 0000000..5c2b95b
Binary files /dev/null and b/doc/src/dance/tango-08-27.jpg differ
diff --git a/doc/src/dance/tango-08-39.jpg b/doc/src/dance/tango-08-39.jpg
new file mode 100644
index 0000000..8d06131
Binary files /dev/null and b/doc/src/dance/tango-08-39.jpg differ
diff --git a/doc/src/dance/tg_argentine.jpg b/doc/src/dance/tg_argentine.jpg
new file mode 100644
index 0000000..8465de6
Binary files /dev/null and b/doc/src/dance/tg_argentine.jpg differ
diff --git a/doc/src/ds_model/archi.eps b/doc/src/ds_model/archi.eps
new file mode 100644
index 0000000..24228bc
--- /dev/null
+++ b/doc/src/ds_model/archi.eps
@@ -0,0 +1,234 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: archi.eps
+%%Creator: fig2dev Version 3.2 Patchlevel 1
+%%CreationDate: Wed Jan  9 16:50:19 2002
+%%For: taurel at spica1.esrf.fr (E.Taurel,,,)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 780 456
+%%Pages: 0
+%%BeginSetup
+%%EndSetup
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-21.0 506.0 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+  bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+  4 -2 roll mul srgb} bind def
+ /DrawEllipse {
+	/endangle exch def
+	/startangle exch def
+	/yrad exch def
+	/xrad exch def
+	/y exch def
+	/x exch def
+	/savematrix mtrx currentmatrix def
+	x y tr xrad yrad sc 0 0 1 startangle endangle arc
+	closepath
+	savematrix setmatrix
+	} def
+
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+n -1000 9022 m -1000 -1000 l 13702 -1000 l 13702 9022 l cp clip
+ 0.06299 0.06299 sc
+% Arc
+7.500 slw
+gs n 10768.8 6300.0 931.2 -104.9 104.9 arc
+gs col0 s gr
+ gr
+
+% Arc
+gs n 11061.8 6291.8 908.2 -100.9 89.5 arc
+gs col0 s gr
+ gr
+
+% Arc
+gs n 4039.0 6150.7 709.7 -111.4 103.8 arcn
+gs col0 s gr
+ gr
+
+% Arc
+gs n 2676.2 4632.4 608.0 175.5 22.0 arcn
+gs col0 s gr
+ gr
+
+% Ellipse
+n 10620 6210 1554 1554 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 2430 6210 1554 1554 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 6480 2610 1554 1554 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 10530 6300 900 900 0 360 DrawEllipse gs col0 s gr
+
+% Polyline
+gs  clippath
+5250 3450 m 5130 3420 l 5250 3390 l 5115 3390 l 5115 3450 l cp
+2731 4655 m 2610 4680 l 2705 4601 l 2583 4660 l 2610 4714 l cp
+clip
+n 2610 4680 m 5220 3420 l 5130 3420 l gs col0 s gr gr
+
+% arrowhead
+n 2731 4655 m 2610 4680 l 2705 4601 l 2718 4628 l 2731 4655 l  cp gs 0.00 setgray ef gr  col0 s
+% arrowhead
+n 5250 3450 m 5130 3420 l 5250 3390 l 5250 3420 l 5250 3450 l  cp gs 0.00 setgray ef gr  col0 s
+% Polyline
+gs  clippath
+8970 6180 m 9090 6210 l 8970 6240 l 9105 6240 l 9105 6180 l cp
+4080 6240 m 3960 6210 l 4080 6180 l 3945 6180 l 3945 6240 l cp
+clip
+n 3960 6210 m 9090 6210 l gs col0 s gr gr
+
+% arrowhead
+n 4080 6240 m 3960 6210 l 4080 6180 l 4080 6210 l 4080 6240 l  cp gs 0.00 setgray ef gr  col0 s
+% arrowhead
+n 8970 6180 m 9090 6210 l 8970 6240 l 8970 6210 l 8970 6180 l  cp gs 0.00 setgray ef gr  col0 s
+% Polyline
+gs  clippath
+10167 4598 m 10260 4680 l 10140 4651 l 10260 4714 l 10287 4660 l cp
+7923 3502 m 7830 3420 l 7950 3449 l 7830 3386 l 7803 3440 l cp
+clip
+n 7830 3420 m 10260 4680 l gs col0 s gr gr
+
+% arrowhead
+n 7923 3502 m 7830 3420 l 7950 3449 l 7937 3475 l 7923 3502 l  cp gs 0.00 setgray ef gr  col0 s
+% arrowhead
+n 10167 4598 m 10260 4680 l 10140 4651 l 10153 4625 l 10167 4598 l  cp gs 0.00 setgray ef gr  col0 s
+% Polyline
+n 360 810 m 12690 810 l 12690 8010 l 360 8010 l cp gs col0 s gr 
+% Polyline
+n 9630 6300 m 11430 6300 l gs col0 s gr 
+% Polyline
+n 10530 5400 m 10530 7200 l gs col0 s gr 
+/Times-Roman ff 270.00 scf sf
+1980 6300 m
+gs 1 -1 sc (Client) col0 sh gr
+/Times-Roman ff 270.00 scf sf
+5940 2790 m
+gs 1 -1 sc (Database) col0 sh gr
+/Times-Roman ff 270.00 scf sf
+5940 2430 m
+gs 1 -1 sc (TANGO) col0 sh gr
+/Times-Roman ff 270.00 scf sf
+1890 5940 m
+gs 1 -1 sc (TANGO) col0 sh gr
+/Times-Roman ff 270.00 scf sf
+10800 5220 m
+gs 1 -1 sc (Server) col0 sh gr
+/Times-Roman ff 270.00 scf sf
+9720 5220 m
+gs 1 -1 sc (TANGO) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+9990 6030 m
+gs 1 -1 sc (Cmd) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+10620 6030 m
+gs 1 -1 sc (Attrib) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+9720 6570 m
+gs 1 -1 sc (CORBA) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+9900 6840 m
+gs 1 -1 sc (attrib) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+10620 6570 m
+gs 1 -1 sc (CORBA) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+10620 6840 m
+gs 1 -1 sc (opera) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+2430 4950 m
+gs 1 -1 sc (API) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+3510 6300 m
+gs 1 -1 sc (API) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+10260 7470 m
+gs 1 -1 sc (Devices) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+6210 6120 m
+gs 1 -1 sc (CORBA) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+9450 4140 m
+gs 1 -1 sc (CORBA) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+2700 4140 m
+gs 1 -1 sc (CORBA) col0 sh gr
+$F2psEnd
+rs
diff --git a/doc/src/ds_model/ds_model.lyx b/doc/src/ds_model/ds_model.lyx
new file mode 100644
index 0000000..4d987b4
--- /dev/null
+++ b/doc/src/ds_model/ds_model.lyx
@@ -0,0 +1,1719 @@
+#LyX 1.6.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 345
+\begin_document
+\begin_header
+\textclass Tango_book
+\begin_preamble
+\usepackage{a4wide}
+\end_preamble
+\use_default_options false
+\language english
+\inputencoding latin1
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_amsmath 1
+\use_esint 0
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\secnumdepth 5
+\tocdepth 5
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\author "" 
+\author "" 
+\end_header
+
+\begin_body
+
+\begin_layout Chapter
+The TANGO device server model
+\end_layout
+
+\begin_layout Standard
+This chapter will present the TANGO device server object model hereafter
+ referred as TDSOM
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TDSOM
+\end_layout
+
+\end_inset
+
+.
+ First, it will introduce CORBA
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CORBA
+\end_layout
+
+\end_inset
+
+.
+ Then, it will describe each of the basic features of the TDSOM and their
+ function.
+ The TDSOM can be divided into the following basic elements - the 
+\emph on
+device
+\emph default
+, the 
+\emph on
+server
+\emph default
+, the 
+\emph on
+database
+\emph default
+ and the 
+\emph on
+application programmers interface
+\emph default
+.
+ This chapter will treat each of the above elements separately.
+\end_layout
+
+\begin_layout Section
+Introduction to CORBA
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:corba"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+CORBA is a definition of how to write object request brokers (ORB
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ORB
+\end_layout
+
+\end_inset
+
+).
+ The definition is managed by the Object Management Group (OMG
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+OMG
+\end_layout
+
+\end_inset
+
+ 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "OMG-page"
+
+\end_inset
+
+).
+ Various commercial and non-commercial implementations exist for CORBA for
+ all the mainstream operating systems.
+ CORBA
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CORBA
+\end_layout
+
+\end_inset
+
+ uses a programming language independent definition language (called IDL)
+ to defined network object interfaces.
+ Language mappings are defined from IDL
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+IDL
+\end_layout
+
+\end_inset
+
+ to the main programming languages e.g.
+ C++, Java, C, COBOL, Smalltalk and ADA.
+ Within an interface, CORBA defines two kinds of actions available to the
+ outside world.
+ These actions are called 
+\series bold
+attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+
+\series default
+ and 
+\series bold
+operations
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+operation
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+Operations are all the actions offered by an interface.
+ For instance, within an interface for a Thermostat class, operations could
+ be the action to read the temperature or to set the nominal temperature.
+ An attribute defines a pair of operations a client can call to send or
+ receive a value.
+ For instance, the position of a motor can be defined as an attribute because
+ it is a data that you only set or get.
+ A read only attribute defines a single operation the client can call to
+ receives a value.
+ In case of error, an operation is able to throw an exception to the client,
+ attributes cannot raises exception except system exception (du to network
+ fault for instance).
+\end_layout
+
+\begin_layout Standard
+Intuitively, IDL interface correspond to C++ classes and IDL operations
+ correspond to C++ member functions and attributes as a way to read/write
+ public member variable.
+ Nevertheless, IDL defines only the interface to an object and say nothing
+ about the object implementation.
+ IDL is only a descriptive language.
+ Once the interface is fully described in the IDL language, a compiler (from
+ IDL to C++, from IDL to Java...) generates code to implement this interface.
+ Obviously, you still have to write how operations are implemented.
+\end_layout
+
+\begin_layout Standard
+The act of invoking an operation on an interface causes the ORB to send
+ a message to the corresponding object implementation.
+ If the target object is in another address space, the ORB run time sends
+ a remote procedure call to the implementation.
+ If the target object is in the same address space as the caller, the invocation
+ is accomplished as an ordinary function call to avoid the overhead of using
+ a networking protocol.
+\end_layout
+
+\begin_layout Standard
+For an excellent reference on CORBA
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CORBA
+\end_layout
+
+\end_inset
+
+ with C++ refer to 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Henning"
+
+\end_inset
+
+.
+ The complete TANGO IDL
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+IDL
+\end_layout
+
+\end_inset
+
+ file can be found in the TANGO web page
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Tango web"
+
+\end_inset
+
+ or at the end of this document in the appendix 2 chapter.
+\end_layout
+
+\begin_layout Section
+The model
+\end_layout
+
+\begin_layout Standard
+The basic idea of the TDSOM
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TDSOM
+\end_layout
+
+\end_inset
+
+ is to treat each device as an 
+\series bold
+object
+\series default
+.
+ Each device is a separate entity which has its own data and behavior.
+ Each device has a unique name which identifies it in network name space.
+ Devices are organized according to 
+\series bold
+classes
+\series default
+, each device belonging to a class.
+ All classes are derived from one root class thus allowing some common behavior
+ for all devices.
+ Four kind of requests can be sent to a device (locally i.e.
+ in the same process, or remotely i.e.
+ across the network) :
+\end_layout
+
+\begin_layout Itemize
+Execute actions via 
+\series bold
+commands
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Read/Set data specific to each device belonging to a class via TANGO 
+\series bold
+attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Read some basic device data available for all devices via CORBA attributes.
+\end_layout
+
+\begin_layout Itemize
+Execute a predefined set of actions available for every devices via CORBA
+ operations
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+operation
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Each device is stored in a process called a 
+\series bold
+device server
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+server
+\end_layout
+
+\end_inset
+
+.
+ Devices are configured at runtime via 
+\series bold
+properties
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+properties
+\end_layout
+
+\end_inset
+
+
+\series default
+ which are stored in a 
+\series bold
+database
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+database
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Section
+The device
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:dev"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The device is the heart of the TDSOM.
+ A device is an abstract concept defined by the TDSOM.
+ In reality, it can be a piece of hardware (an interlock bit) a collection
+ of hardware (a screen attached to a stepper motor) a logical device (a
+ taper) or a combination of all these (an accelerator).
+ Each device has a unique name in the control system and eventually one
+ alias
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+alias
+\end_layout
+
+\end_inset
+
+.
+ Within Tango, a four field name
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+name
+\end_layout
+
+\end_inset
+
+ space has been adopted consisting of 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+[//FACILITY/]DOMAIN/CLASS/MEMBER
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+ Facility refers to the control system instance, domain refers to the sub-system
+, class the class and member the instance of the device.
+ Device name alias(es) must also be unique within a control system.
+ There is no predefined syntax for device name alias.
+\end_layout
+
+\begin_layout Standard
+Each device belongs to a class.
+ The device class contains a complete description and implementation of
+ the behavior of all members of that class.
+ New device classes can be constructed out of existing device classes.
+ This way a new hierarchy of classes can be built up in a short time.
+ Device classes can use existing devices as sub-classes or as sub-objects.
+ The practice of reusing existing classes is classical for Object Oriented
+ Programming and is one of its main advantages.
+\end_layout
+
+\begin_layout Standard
+All device classes are derived from the same class (the device root class)
+ and implement 
+\series bold
+the same CORBA interface
+\series default
+.
+ All devices implementing the same CORBA interface ensures all control object
+ support the same set of CORBA operations and attributes.
+ The device root class contains part of the common device code.
+ By inheriting from this class, all devices shared a common behavior.
+ This also makes maintenance and improvements to the TDSOM easy to carry
+ out.
+\end_layout
+
+\begin_layout Standard
+All devices also support a 
+\series bold
+black box
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+black-box
+\end_layout
+
+\end_inset
+
+
+\series default
+ where client requests for attributes or operations are recorded.
+ This feature allows easier debugging session for device already installed
+ in a running control system.
+\end_layout
+
+\begin_layout Subsection
+The commands
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Each device class implements a list of commands.
+ Commands are very important because they are the client's major dials and
+ knobs for controlling a device.
+ Commands have a fixed calling syntax - consisting of one input argument
+ and one output argument.
+ Arguments type must be chosen in a fixed set of data types: All simple
+ types (boolean, short, long (32 bits), long (64 bits), float, double, unsigned
+ short, unsigned long (32 bits), unsigned long (64 bits) and string) and
+ arrays of simple types plus array of strings and longs and array of strings
+ and doubles).
+ Commands can execute any sequence of actions.
+ Commands can be executed synchronously (the requester is blocked until
+ the command ended) or asynchronously (the requester send the request and
+ is called back when the command ended).
+\end_layout
+
+\begin_layout Standard
+Commands are executed using two CORBA operations named 
+\series bold
+command_inout
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-inout
+\end_layout
+
+\end_inset
+
+
+\series default
+ for synchronous commands and 
+\series bold
+command_inout_async
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-inout-async
+\end_layout
+
+\end_inset
+
+
+\series default
+ for asynchronous commands.
+ These two operations called a special method implemented in the device
+ root class - the 
+\emph on
+command_handler
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-handler
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ The 
+\emph on
+command_handler
+\emph default
+ calls an 
+\emph on
+is_allowed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-allowed
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method implemented in the device class before calling the command itself.
+ The 
+\emph on
+is_allowed
+\emph default
+ method is specific to each command
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+In contrary to the state_handler method of the TACO device server model
+ which is not specific to each command.
+\end_layout
+
+\end_inset
+
+.
+ It checks to see whether the command to be executed is compatible with
+ the present device state.
+ The command function is executed only if the 
+\emph on
+is_allowed
+\emph default
+ method allows it.
+ Otherwise, an exception is sent to the client.
+\end_layout
+
+\begin_layout Subsection
+The TANGO attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In addition to commands, TANGO devices also support normalized data types
+ called attributes
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+TANGO attributes were known as signals in the TACO device server model
+\end_layout
+
+\end_inset
+
+.
+ Commands are device specific and the data they transport are not normalized
+ i.e.
+ they can be any one of the TANGO data types with no restriction on what
+ each byte means.
+ This means that it is difficult to interpret the output of a command
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command
+\end_layout
+
+\end_inset
+
+ in terms of what kind of value(s) it represents.
+ Generic display programs need to know what the data returned represents,
+ in what units it is, plus additional information like minimum, maximum,
+ quality etc.
+ Tango attributes solve this problem.
+\end_layout
+
+\begin_layout Standard
+TANGO attributes are zero, one or two dimensional data which have a fix
+ set of properties e.g.
+ quality, minimum and maximum, alarm low and high.
+ They are transferred in a specialized TANGO type and can be read, write
+ or read-write.
+ A device can support a list of attributes.
+ Clients can read one or more attributes from one or more devices.
+ To read TANGO attributes, the client uses the 
+\series bold
+read_attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attributes
+\end_layout
+
+\end_inset
+
+
+\series default
+ operation.
+ To write TANGO attributes, a client uses the 
+\series bold
+write_attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+write-attributes
+\end_layout
+
+\end_inset
+
+
+\series default
+ operation.
+ To write then read TANGO attributes within the same network request, the
+ client uses the 
+\series bold
+write_read_attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+write-read-attribute
+\end_layout
+
+\end_inset
+
+
+\series default
+ operation.
+ To query a device for all the attributes it supports, a client uses the
+ 
+\series bold
+get_attribute_config
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+get-attribute-config
+\end_layout
+
+\end_inset
+
+
+\series default
+ operation.
+ A client is also able to modify some of parameters defining an attribute
+ with the 
+\series bold
+set_attribute_config
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+set-attribute-config
+\end_layout
+
+\end_inset
+
+
+\series default
+ operation.
+ These four operations are defined in the device CORBA interface.
+\end_layout
+
+\begin_layout Standard
+TANGO support thirteen data types for attributes (and arrays of for one
+ or two dimensional data) which are: boolean, short, long (32 bits), long
+ (64 bits), float, double, unsigned char, unsigned short, unsigned long
+ (32 bits), unsigned long (64 bits), string, a specific data type for Tango
+ device state and finally another specific data type to transfer data as
+ an array of unsigned char with a string describing the coding of these
+ data.
+\end_layout
+
+\begin_layout Subsection
+Command or attributes ?
+\end_layout
+
+\begin_layout Standard
+There are no strict rules concerning what should be returned as command
+ result and what should be implemented as an attribute.
+ Nevertheless, attributes are more adapted to return physical value which
+ have a kind of time consistency.
+ Attribute also have more properties which help the client to precisely
+ know what it represents.
+ For instance, the state and the status of a power supply are not physical
+ values and are returned as command result.
+ The current generated by the power supply is a physical value and is implemente
+d as an attribute.
+ The attribute properties allow a client to know its unit, its label and
+ some other informations which are related to a physical value.
+ Command are well adapted to send order to a device like switching from
+ one mode of operation to another mode of operation.
+ For a power supply, the switch from a STANDBY mode to a ON mode is typically
+ done via a command.
+\end_layout
+
+\begin_layout Subsection
+The CORBA attributes
+\end_layout
+
+\begin_layout Standard
+Some key data implemented for each device can be read without the need to
+ call a command or read an attribute.
+ These data are :
+\end_layout
+
+\begin_layout Itemize
+The device state
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+state
+\end_layout
+
+\end_inset
+
+ntranet.esrf.fr/
+\end_layout
+
+\begin_layout Itemize
+The device status
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+status
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+The device name
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+name
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+The administration device name called adm_name
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+administration
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+The device description
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+description
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The device state is a number representing its state.
+ A set of predefined states are defined in the TDSOM.
+ The device status is a string describing in plain text the device state
+ and any additional useful information of the device as a formatted ascii
+ string.
+ The device name is its name as defined in 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:dev"
+
+\end_inset
+
+.
+ For each set of devices grouped within the same server, an administration
+ device is automatically added.
+ This adm_name is the name of the administration device.
+ The device description is also an ascii string describing the device rule.
+\end_layout
+
+\begin_layout Standard
+These five CORBA attributes are implemented in the device root class and
+ therefore do not need any coding from the device class programmer.
+ As explained in 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:corba"
+
+\end_inset
+
+, the CORBA attributes are not allowed to raise exceptions whereas command
+ (which are implemented using CORBA operations) can.
+\end_layout
+
+\begin_layout Subsection
+The remaining CORBA operations
+\end_layout
+
+\begin_layout Standard
+The TDSOM also supports a list of actions defined as CORBA operations in
+ the device interface and implemented in the device root class.
+ Therefore, these actions are implemented automatically for every TANGO
+ device.
+ These operations are :
+\end_layout
+
+\begin_layout List
+\labelwidthstring MMMMMMMMMMM
+ping
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ping
+\end_layout
+
+\end_inset
+
+ to ping a device to check if the device is alive.
+ Obviously, it checks only the connection from a client to the device and
+ not all the device functionalities
+\end_layout
+
+\begin_layout List
+\labelwidthstring MMMMMMMMMMM
+command_list_query
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-list-query
+\end_layout
+
+\end_inset
+
+ request a list of all the commands supported by a device with their input
+ and output types and description
+\end_layout
+
+\begin_layout List
+\labelwidthstring MMMMMMMMMMM
+command_query
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-query
+\end_layout
+
+\end_inset
+
+ request information about a specific command which are its input and output
+ type and description
+\end_layout
+
+\begin_layout List
+\labelwidthstring MMMMMMMMMMM
+info
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+info
+\end_layout
+
+\end_inset
+
+ request general information on the device like its name, the host where
+ the device server hosting the device is running...
+\end_layout
+
+\begin_layout List
+\labelwidthstring MMMMMMMMMMM
+black_box
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+black-box
+\end_layout
+
+\end_inset
+
+ read the device black-box as an array of strings
+\end_layout
+
+\begin_layout Subsection
+The special case of the device state and status
+\end_layout
+
+\begin_layout Standard
+Device state
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+state
+\end_layout
+
+\end_inset
+
+ and status
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+status
+\end_layout
+
+\end_inset
+
+ are the most important key device informations.
+ Nearly all client software dealing with Tango device needs device(s) state
+ and/or status.
+ In order to simplify client software developper work, it is possible to
+ get these two piece of information in three different manners :
+\end_layout
+
+\begin_layout Enumerate
+Using the appropriate CORBA attribute (state or status)
+\end_layout
+
+\begin_layout Enumerate
+Using command on the device.
+ The command are called State or Status
+\end_layout
+
+\begin_layout Enumerate
+Using attribute.
+ Even if the state and status are not real attribute, it is possible to
+ get their value using the read_attributes operation.
+ Nevertheless, it is not possible to set the attribute configuration for
+ state and status.
+ An error is reported by the server if a client try to do so.
+\end_layout
+
+\begin_layout Subsection
+The device polling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+polling
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Within the Tango framework, it is also possible to force executing command(s)
+ or reading attribute(s) at a fixed frequency.
+ It is called 
+\emph on
+device polling
+\emph default
+.
+ This is automatically handled by Tango core software with a polling threads
+ pool.
+ The command result or attribute value are stored in circular buffers.
+ When a client want to read attribute value (or command result) for a polled
+ attribute (or a polled command), he has the choice to get the attribute
+ value (or command result) with a real access to the device of from the
+ last value stored in the device ring buffer.
+ This is a great advantage for 
+\begin_inset Quotes eld
+\end_inset
+
+slow
+\begin_inset Quotes erd
+\end_inset
+
+ devices.
+ Getting data from the buffer is much faster than accessing the device itself.
+ The technical disadvantage is the time shift between the data returned
+ from the polling buffer and the time of the request.
+ Polling a command is only possible for command without input arguments.
+\end_layout
+
+\begin_layout Standard
+Two other CORBA operations called 
+\emph on
+command_inout_history_X
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-inout-history-X
+\end_layout
+
+\end_inset
+
+
+\emph default
+ and 
+\emph on
+read_attribute _history_X
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attribute-history-X
+\end_layout
+
+\end_inset
+
+
+\emph default
+ allow a client to retrieve the history of polled command or attribute stored
+ in the polling buffers.
+ Obviously, this history is limited to the depth of the polling buffer.
+ 
+\end_layout
+
+\begin_layout Standard
+The whole polling system is available only since Tango release 2.x and above
+ in CPP and since TangORB release 3.7.x and above in Java.
+\end_layout
+
+\begin_layout Section
+The server
+\end_layout
+
+\begin_layout Standard
+Another integral part of the TDSOM is the server concept.
+ The server (also referred as device server
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+server
+\end_layout
+
+\end_inset
+
+) is a process whose main task is to offer one or more services to one or
+ more clients.
+ To do this, the server has to spend most of its time in a wait loop waiting
+ for clients to connect to it.
+ The devices are hosted in the server process.
+ A server is able to host several classes of devices.
+ In the TDSOM, a device of the 
+\series bold
+DServer
+\series default
+ class is automatically hosted by each device server.
+ This class of device supports commands which enable remote device server
+ process administration.
+\end_layout
+
+\begin_layout Standard
+TANGO supports device server process on three operating system : Linux,
+ Solaris and Windows NT.
+\end_layout
+
+\begin_layout Section
+The Tango Logging
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+logging
+\end_layout
+
+\end_inset
+
+ Service
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:The-Tango-Logging"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+During software life, it is always convenient to print miscellaneous information
+s which help to:
+\end_layout
+
+\begin_layout Itemize
+Debug the software
+\end_layout
+
+\begin_layout Itemize
+Report on error
+\end_layout
+
+\begin_layout Itemize
+Give regular information to user
+\end_layout
+
+\begin_layout Standard
+This is classically done using cout (or C printf) in C++ or println method
+ in Java language.
+ In a highly distributed control system, it is difficult to get all these
+ informations coming from a high number of different processes running on
+ a large number of computers.
+ Since its release 3, Tango has incorporated a Logging Service called the
+ Tango Logging Service (TLS) which allows print messages to be:
+\end_layout
+
+\begin_layout Itemize
+Displayed on a console (the classical way)
+\end_layout
+
+\begin_layout Itemize
+Sent to a file
+\end_layout
+
+\begin_layout Itemize
+Sent to specific Tango device called log consumer
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+consumer
+\end_layout
+
+\end_inset
+
+.
+ Tango package has an implementation of log consumer where every consumer
+ device is associated to a graphical interface.
+ This graphical interface display messages but could also be used to sort
+ messages, to filter messages...
+ Using this feature, it is possible to centralise display of these messages
+ coming from different devices embedded within different processes.
+ These log consumers can be:
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+Statically configured meaning that it memorizes the list of Tango devices
+ for which it will get and display messages.
+\end_layout
+
+\begin_layout Itemize
+Dynamically configured.
+ The user, with the help of the graphical interface, chooses devices from
+ which he want to see messages.
+\end_layout
+
+\end_deeper
+\begin_layout Section
+The database
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+database
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+To achieve complete device independence, it is necessary however to supplement
+ device classes with a possibility for configuring device dependencies at
+ runtime.
+ The utility which does this in the TDSOM is the 
+\series bold
+property database
+\series default
+.
+ Properties
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+Properties were known as resources in the TACO device server model
+\end_layout
+
+\end_inset
+
+ are identified by an ascii string and the device name.
+ TANGO attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+ are also configured using properties
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+properties
+\end_layout
+
+\end_inset
+
+.
+ This database is also used to store device network addresses (CORBA IOR
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+IOR
+\end_layout
+
+\end_inset
+
+'s), list of classes hosted by a device server process and list of devices
+ for each class in a device server process.
+ The database ensure the uniqueness of device name and of alias.
+ It also links device name and it list of aliases.
+\end_layout
+
+\begin_layout Standard
+TANGO uses MySQL
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+MySQL
+\end_layout
+
+\end_inset
+
+
+\begin_inset CommandInset citation
+LatexCommand cite
+key "mysql"
+
+\end_inset
+
+ as its database.
+ MySQL is a relational database which implements the SQL language.
+ However, this is largely enough to implement all the functionalities needed
+ by the TDSOM.
+ The database is accessed via a classical TANGO device hosted in a device
+ server.
+ Therefore, client access the database via TANGO commands requested on the
+ database device.
+ For a good reference on MySQL refer to 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "MySQL book"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+The controlled access
+\end_layout
+
+\begin_layout Standard
+Tango also provides a controlled access
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+controlled-access
+\end_layout
+
+\end_inset
+
+ system.
+ It's a simple controlled access system.
+ It does not provide encrypted communication or sophisticated authentification.
+ It simply defines which user (based on computer loggin authentification)
+ is allowed to do which command (or write attribute) on which device and
+ from which host.
+ The information used to configure this controlled access feature are stored
+ in the Tango database and accessed by a specific Tango device server which
+ is not the classsical Tango database device server described in the previous
+ section.
+ Two access levels are defined:
+\end_layout
+
+\begin_layout Itemize
+Everything is allowed for this user from this host
+\end_layout
+
+\begin_layout Itemize
+The write-like calls on the device are forbidden and according to configuration,
+ a command subset is also forbidden for this user from this host
+\end_layout
+
+\begin_layout Standard
+This feature is precisely described in the chapter "Advanced features"
+\end_layout
+
+\begin_layout Section
+The Application Programmers Interfaces
+\end_layout
+
+\begin_layout Subsection
+Rules of the API
+\end_layout
+
+\begin_layout Standard
+While it is true TANGO clients can be programmed using only the CORBA API,
+ CORBA knows nothing about TANGO.
+ This means client have to know all the details of retrieving IORs from
+ the TANGO database, additional information to send on the wire, TANGO version
+ control etc.
+ These details can and should be wrapped in TANGO Application Programmer
+ Interface (API).
+ The API is implemented as a library in C++ and as a package in Java.
+ The API is what makes TANGO clients easy to write.
+ The API's consists the following basic classes :
+\end_layout
+
+\begin_layout Itemize
+DeviceProxy which is a 
+\emph on
+proxy
+\emph default
+ to the real device
+\end_layout
+
+\begin_layout Itemize
+DeviceData to encapsulate data send/receive from/to device via commands
+\end_layout
+
+\begin_layout Itemize
+DeviceAttribute to encapsulate data send/receive from/to device via attributes
+\end_layout
+
+\begin_layout Itemize
+Group which is a 
+\emph on
+proxy
+\emph default
+ to a group
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+group
+\end_layout
+
+\end_inset
+
+ of devices
+\end_layout
+
+\begin_layout Standard
+In addition to these main classes, many other classes allows a full interface
+ to TANGO features.
+ The following figure is a drawing of a typical client/server application
+ using TANGO.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Graphics
+	filename archi.eps
+	width 12cm
+	height 7cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The database is used during server and client startup phase to establish
+ connection between client and server.
+\end_layout
+
+\begin_layout Subsection
+Communication between client and server using the API
+\end_layout
+
+\begin_layout Standard
+With the API, it is possible to request command to be executed on a device
+ or to read/write device attribute(s) using one of the two communication
+ models implemented.
+ These two models are:
+\end_layout
+
+\begin_layout Enumerate
+The synchronous model where client waits (and is blocked) for the server
+ to send the answer or until the timeout is reached
+\end_layout
+
+\begin_layout Enumerate
+The asynchronous model.
+ In this model, the clients send the request and immediately returns.
+ It is not blocked.
+ It is free to do whatever it has to do like updating a graphical user interface.
+ The client has the choice to retrieve the server answer by checking if
+ the reply is arrived by calling an API specific call or by requesting that
+ a call-back method is executed when the client receives the server answer.
+\end_layout
+
+\begin_layout Standard
+The asynchronous model is available with Tango release 3 and above.
+\end_layout
+
+\begin_layout Subsection
+Tango events
+\end_layout
+
+\begin_layout Standard
+On top of the two communication model previously described, TANGO offers
+ an "event system"
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+event
+\end_layout
+
+\end_inset
+
+.
+ The standard TANGO communication paradigm is a synchronou/asynchronous
+ two-way call.
+ In this paradigm the call is initiated by the client who contacts the server.
+ The server handles the client's request and sends the answer to the client
+ or throws an exception which the client catches.
+ This paradigm involves two calls to receive a single answer and requires
+ the client to be active in initiating the request.
+ If the client has a permanent interest in a value he is obliged to poll
+ the server for an update in a value every time.
+ This is not efficient in terms of network bandwidth nor in terms of client
+ programming.
+\end_layout
+
+\begin_layout Standard
+For clients who are permanently interested in values the event-driven communicat
+ion paradigm is a more efficient and natural way of programming.
+ In this paradigm the client registers her interest once in an event (value).
+ After that the server informs the client every time the event has occurred.
+ This paradigm avoids the client polling, frees it for doing other things,
+ is fast and makes efficient use of the network.
+\end_layout
+
+\begin_layout Standard
+TANGO uses the CORBA OMG COS Notification Service
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Notification Service
+\end_layout
+
+\end_inset
+
+ to generates events.
+ TANGO uses the omniNotify
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+omniNotify
+\end_layout
+
+\end_inset
+
+ implementation of the Notification service.
+ omniNotify was developed in conjunction with the omniORB CORBA implementation
+ also used by TANGO.
+ The heart of the Notification Service is the notification daemon.
+ The omniNotify daemons are the processes which receive events from device
+ servers and distribute them to all clients which are subscribed.
+ In order to distribute the load of the events there is one notification
+ daemon per host.
+ Servers send their events to the daemon on the local host.
+ Clients and servers get the IOR for the host from the TANGO database.
+ 
+\end_layout
+
+\begin_layout Standard
+The following figure is a schematic of the Tango event system.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Graphics
+	filename event_schematic.eps
+	scale 80
+	BoundingBox 0bp 0bp 523bp 485bp
+	clip
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The event system is available with Tango release 4 and above
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 5cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset label
+LatexCommand label
+name "OneRicardo"
+
+\end_inset
+
+
+\begin_inset Graphics
+	filename ../dance/Eltaita-reduc.jpg
+	lyxscale 80
+	scale 150
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/doc/src/ds_model/event_schematic.eps b/doc/src/ds_model/event_schematic.eps
new file mode 100644
index 0000000..a84d7ed
--- /dev/null
+++ b/doc/src/ds_model/event_schematic.eps
@@ -0,0 +1,309 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: event_schematic.eps
+%%Creator: fig2dev Version 3.2 Patchlevel 3c
+%%CreationDate: Mon Mar 17 13:06:27 2003
+%%For: goetz at splash (Andy Goetz)
+%%BoundingBox: 0 0 523 485
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 485 moveto 0 0 lineto 523 0 lineto 523 485 lineto closepath clip newpath
+-126.0 500.0 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+  bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+  4 -2 roll mul srgb} bind def
+ /DrawEllipse {
+	/endangle exch def
+	/startangle exch def
+	/yrad exch def
+	/xrad exch def
+	/y exch def
+	/x exch def
+	/savematrix mtrx currentmatrix def
+	x y tr xrad yrad sc 0 0 1 startangle endangle arc
+	closepath
+	savematrix setmatrix
+	} def
+
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+%%Page: 1 1
+10 setmiterlimit
+ 0.06299 0.06299 sc
+%
+% Fig objects follow
+%
+% Arc
+7.500 slw
+gs  clippath
+9537 1923 m 9568 1872 l 9439 1792 l 9526 1881 l 9407 1844 l cp
+eoclip
+n 6404.4 6896.1 5907.0 -128.8 -57.9 arc
+gs col0 s gr
+ gr
+
+% arrowhead
+n 9407 1844 m 9526 1881 l 9439 1792 l  col0 s
+% Arc
+gs  clippath
+6381 3407 m 6421 3362 l 6308 3261 l 6378 3364 l 6268 3306 l cp
+eoclip
+n 3462.7 6563.6 4328.5 -99.5 -47.4 arc
+gs col0 s gr
+ gr
+
+% arrowhead
+n 6268 3306 m 6378 3364 l 6308 3261 l  col0 s
+% Ellipse
+n 6345 3915 855 540 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 9540 2610 704 704 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 9585 4680 704 704 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 6399 6595 704 704 0 360 DrawEllipse gs col0 s gr
+
+% Polyline
+n 2130 2340 m 2025 2340 2025 3045 105 arcto 4 {pop} repeat
+  2025 3150 3450 3150 105 arcto 4 {pop} repeat
+  3555 3150 3555 2445 105 arcto 4 {pop} repeat
+  3555 2340 2130 2340 105 arcto 4 {pop} repeat
+ cp gs col0 s gr 
+% Polyline
+n 2130 4770 m 2025 4770 2025 5475 105 arcto 4 {pop} repeat
+  2025 5580 3450 5580 105 arcto 4 {pop} repeat
+  3555 5580 3555 4875 105 arcto 4 {pop} repeat
+  3555 4770 2130 4770 105 arcto 4 {pop} repeat
+ cp gs col0 s gr 
+% Polyline
+n 2130 3555 m 2025 3555 2025 4260 105 arcto 4 {pop} repeat
+  2025 4365 3450 4365 105 arcto 4 {pop} repeat
+  3555 4365 3555 3660 105 arcto 4 {pop} repeat
+  3555 3555 2130 3555 105 arcto 4 {pop} repeat
+ cp gs col0 s gr 
+% Polyline
+n 7830 6390 m 9450 6390 l 9450 7920 l 7830 7920 l
+ cp gs col0 s gr 
+% Polyline
+15.000 slw
+gs  clippath
+7125 3718 m 7158 3768 l 7285 3685 l 7169 3726 l 7252 3634 l cp
+eoclip
+n 8865 2610 m
+ 7155 3735 l gs col7 1.00 shd ef gr gs col0 s gr gr
+
+% arrowhead
+7.500 slw
+n 7252 3634 m 7169 3726 l 7285 3685 l  col0 s
+% Polyline
+15.000 slw
+gs  clippath
+7152 3971 m 7130 4027 l 7270 4082 l 7170 4011 l 7292 4027 l cp
+eoclip
+n 8865 4680 m
+ 7155 4005 l gs col0 s gr gr
+
+% arrowhead
+7.500 slw
+n 7292 4027 m 7170 4011 l 7270 4082 l  col0 s
+% Polyline
+gs  clippath
+6315 5910 m 6375 5910 l 6375 5758 l 6345 5878 l 6315 5758 l cp
+eoclip
+n 6345 4455 m
+ 6345 5895 l gs col0 s gr gr
+
+% arrowhead
+n 6315 5758 m 6345 5878 l 6375 5758 l  col0 s
+% Polyline
+gs  clippath
+6359 5835 m 6396 5882 l 6515 5789 l 6403 5840 l 6478 5742 l cp
+eoclip
+n 9585 3330 m
+ 6390 5850 l gs col0 s gr gr
+
+% arrowhead
+n 6478 5742 m 6403 5840 l 6515 5789 l  col0 s
+% Polyline
+gs  clippath
+6460 5822 m 6469 5881 l 6619 5860 l 6496 5848 l 6610 5801 l cp
+eoclip
+n 9585 5400 m
+ 6480 5850 l gs col0 s gr gr
+
+% arrowhead
+n 6610 5801 m 6496 5848 l 6619 5860 l  col0 s
+% Polyline
+gs  clippath
+3557 2711 m 3526 2763 l 3657 2839 l 3569 2753 l 3687 2787 l cp
+eoclip
+n 5490 3870 m
+ 3555 2745 l gs col0 s gr gr
+
+% arrowhead
+n 3687 2787 m 3569 2753 l 3657 2839 l  col0 s
+% Polyline
+gs  clippath
+3540 3885 m 3540 3945 l 3692 3945 l 3572 3915 l 3692 3885 l cp
+eoclip
+n 5490 3915 m
+ 3555 3915 l gs col0 s gr gr
+
+% arrowhead
+n 3692 3885 m 3572 3915 l 3692 3945 l  col0 s
+% Polyline
+gs  clippath
+3526 5157 m 3557 5208 l 3687 5129 l 3569 5166 l 3656 5078 l cp
+eoclip
+n 5490 4005 m
+ 3555 5175 l gs col0 s gr gr
+
+% arrowhead
+n 3656 5078 m 3569 5166 l 3687 5129 l  col0 s
+% Polyline
+gs  clippath
+7845 6645 m 7845 6585 l 7693 6585 l 7813 6615 l 7693 6645 l cp
+eoclip
+n 7155 6615 m
+ 7830 6615 l gs col0 s gr gr
+
+% arrowhead
+n 7693 6645 m 7813 6615 l 7693 6585 l  col0 s
+/Times-Roman ff 180.00 scf sf
+5895 3915 m
+gs 1 -1 sc (notify daemon) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+8910 4725 m
+gs 1 -1 sc (device server #2) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+2295 2790 m
+gs 1 -1 sc (client #1) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+2295 4050 m
+gs 1 -1 sc (client #2) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+2250 5265 m
+gs 1 -1 sc (client #3) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+5805 6660 m
+gs 1 -1 sc (database server) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+7920 6660 m
+gs 1 -1 sc (events table:) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+7920 7110 m
+gs 1 -1 sc (notifd/host: IOR) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+7920 7335 m
+gs 1 -1 sc (server/name: IOR) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+5805 945 m
+gs 1 -1 sc (event subscription ) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+4725 2385 m
+gs 1 -1 sc (event filter) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+4410 3240 m
+gs 1 -1 sc (event\(s\)) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+4185 3870 m
+gs 1 -1 sc (event\(s\)) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+4410 4770 m
+gs 1 -1 sc (event\(s\)) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+5985 5130 m
+gs 1 -1 sc (IOR) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+7290 4905 m
+gs 1 -1 sc (IOR) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+7875 5580 m
+gs 1 -1 sc (IOR) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+7560 4140 m
+gs 1 -1 sc (event channel) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+7560 3600 m
+gs 1 -1 sc (event channel) col0 sh gr
+/Times-Bold ff 270.00 scf sf
+4365 450 m
+gs 1 -1 sc (Schematic of TANGO Events system) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+8910 2655 m
+gs 1 -1 sc (device server #1) col0 sh gr
+$F2psEnd
+rs
diff --git a/doc/src/ds_model/line.tex b/doc/src/ds_model/line.tex
new file mode 100644
index 0000000..1ba963f
--- /dev/null
+++ b/doc/src/ds_model/line.tex
@@ -0,0 +1,6 @@
+\begin{flushleft}
+\begin{picture}(0,0)
+\thicklines
+\put(0,0){\line(1,0){400}}
+\end{picture}
+\end{flushleft}
diff --git a/doc/src/ds_writing/command.eps b/doc/src/ds_writing/command.eps
new file mode 100644
index 0000000..99580e7
--- /dev/null
+++ b/doc/src/ds_writing/command.eps
@@ -0,0 +1,248 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: command.eps
+%%Creator: fig2dev Version 3.2 Patchlevel 1
+%%CreationDate: Tue Dec  7 11:30:22 1999
+%%For: taurel at amber1 (E.Taurel,,,)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 819 303
+%%Pages: 0
+%%BeginSetup
+%%EndSetup
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-38.0 324.0 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+  bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+  4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+n -1000 6142 m -1000 -1000 l 14602 -1000 l 14602 6142 l cp clip
+ 0.06299 0.06299 sc
+% Polyline
+7.500 slw
+gs  clippath
+5460 1410 m 5580 1440 l 5460 1470 l 5595 1470 l 5595 1410 l cp
+clip
+n 2610 1440 m 5580 1440 l gs col0 s gr gr
+
+% arrowhead
+n 5460 1410 m 5580 1440 l 5460 1470 l  col0 s
+% Polyline
+n 2340 990 m 2340 1170 l gs col0 s gr 
+% Polyline
+n 5850 1080 m 5850 1440 l gs col0 s gr 
+% Polyline
+gs  clippath
+1950 1140 m 2070 1170 l 1950 1200 l 2085 1200 l 2085 1140 l cp
+clip
+n 990 1170 m 2070 1170 l gs col0 s gr gr
+
+% arrowhead
+n 1950 1140 m 2070 1170 l 1950 1200 l  col0 s
+% Polyline
+n 5670 1440 m 6030 1440 l 6030 4590 l 5670 4590 l cp gs col0 s gr 
+% Polyline
+gs  clippath
+6240 4350 m 6120 4320 l 6240 4290 l 6105 4290 l 6105 4350 l cp
+clip
+n 9360 4320 m 6120 4320 l gs col0 s gr gr
+
+% arrowhead
+n 6240 4350 m 6120 4320 l 6240 4290 l  col0 s
+% Polyline
+gs  clippath
+2730 4620 m 2610 4590 l 2730 4560 l 2595 4560 l 2595 4620 l cp
+clip
+n 5580 4590 m 2610 4590 l gs col0 s gr gr
+
+% arrowhead
+n 2730 4620 m 2610 4590 l 2730 4560 l  col0 s
+% Polyline
+gs  clippath
+9240 3570 m 9360 3600 l 9240 3630 l 9375 3630 l 9375 3570 l cp
+clip
+n 6120 3600 m 9360 3600 l gs col0 s gr gr
+
+% arrowhead
+n 9240 3570 m 9360 3600 l 9240 3630 l  col0 s
+% Polyline
+gs  clippath
+6240 3180 m 6120 3150 l 6240 3120 l 6105 3120 l 6105 3180 l cp
+clip
+n 9360 3150 m 6120 3150 l gs col0 s gr gr
+
+% arrowhead
+n 6240 3180 m 6120 3150 l 6240 3120 l  col0 s
+% Polyline
+gs  clippath
+9240 2310 m 9360 2340 l 9240 2370 l 9375 2370 l 9375 2310 l cp
+clip
+n 6120 2340 m 9360 2340 l gs col0 s gr gr
+
+% arrowhead
+n 9240 2310 m 9360 2340 l 9240 2370 l  col0 s
+% Polyline
+n 9450 2340 m 9810 2340 l 9810 3150 l 9450 3150 l cp gs col0 s gr 
+% Polyline
+n 9450 3600 m 9810 3600 l 9810 4320 l 9450 4320 l cp gs col0 s gr 
+% Polyline
+n 9630 3150 m 9630 3600 l gs col0 s gr 
+% Polyline
+n 9630 4320 m 9630 4590 l gs col0 s gr 
+% Polyline
+n 12420 3690 m 12780 3690 l 12780 4230 l 12420 4230 l cp gs col0 s gr 
+% Polyline
+n 12600 4230 m 12600 4500 l gs col0 s gr 
+% Polyline
+gs  clippath
+12210 1590 m 12330 1620 l 12210 1650 l 12345 1650 l 12345 1590 l cp
+clip
+n 6120 1620 m 12330 1620 l gs col0 s gr gr
+
+% arrowhead
+n 12210 1590 m 12330 1620 l 12210 1650 l  col0 s
+% Polyline
+gs  clippath
+6240 2010 m 6120 1980 l 6240 1950 l 6105 1950 l 6105 2010 l cp
+clip
+n 12330 1980 m 6120 1980 l gs col0 s gr gr
+
+% arrowhead
+n 6240 2010 m 6120 1980 l 6240 1950 l  col0 s
+% Polyline
+n 12420 1620 m 12780 1620 l 12780 1980 l 12420 1980 l cp gs col0 s gr 
+% Polyline
+n 12600 1080 m 12600 1620 l gs col0 s gr 
+% Polyline
+n 12600 1980 m 12600 3690 l gs col0 s gr 
+% Polyline
+gs  clippath
+10020 4260 m 9900 4230 l 10020 4200 l 9885 4200 l 9885 4260 l cp
+clip
+n 12330 4230 m 9900 4230 l gs col0 s gr gr
+
+% arrowhead
+n 10020 4260 m 9900 4230 l 10020 4200 l  col0 s
+% Polyline
+gs  clippath
+12210 3750 m 12330 3780 l 12210 3810 l 12345 3810 l 12345 3750 l cp
+clip
+n 9900 3780 m 12330 3780 l gs col0 s gr gr
+
+% arrowhead
+n 12210 3750 m 12330 3780 l 12210 3810 l  col0 s
+% Polyline
+n 2160 1170 m 2520 1170 l 2520 4590 l 2160 4590 l cp gs col0 s gr 
+% Polyline
+n 2340 4590 m 2340 4770 l gs col0 s gr 
+% Polyline
+n 9630 2070 m 9630 2340 l gs col0 s gr 
+% Polyline
+n 5850 4590 m 5850 4860 l gs col0 s gr 
+% Polyline
+n 630 360 m 13590 360 l 13590 5130 l 630 5130 l cp gs col0 s gr 
+/Courier ff 180.00 scf sf
+2790 1350 m
+gs 1 -1 sc (command_handler) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+1710 810 m
+gs 1 -1 sc (StepperMotor object) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+4860 810 m
+gs 1 -1 sc (StepperMotorClass singleton) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+9000 810 m
+gs 1 -1 sc (DevReadPosition) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+11790 810 m
+gs 1 -1 sc (StepperMotor object) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+900 1080 m
+gs 1 -1 sc (command_inout) col0 sh gr
+/Courier ff 180.00 scf sf
+6300 3510 m
+gs 1 -1 sc (execute) col0 sh gr
+/Courier ff 180.00 scf sf
+6210 2250 m
+gs 1 -1 sc (is_allowed) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+6210 1530 m
+gs 1 -1 sc (always_executed_hook) col0 sh gr
+/Courier ff 180.00 scf sf
+10080 3600 m
+gs 1 -1 sc (dev_read_position) col0 sh gr
+$F2psEnd
+rs
diff --git a/doc/src/ds_writing/complete_server.eps b/doc/src/ds_writing/complete_server.eps
new file mode 100644
index 0000000..e8ca3fe
--- /dev/null
+++ b/doc/src/ds_writing/complete_server.eps
@@ -0,0 +1,198 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: complete_server.eps
+%%Creator: fig2dev Version 3.2 Patchlevel 1
+%%CreationDate: Tue Feb 20 16:47:08 2001
+%%For: taurel at amber13.esrf.fr (E.Taurel,,,)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 745 416
+%%Pages: 0
+%%BeginSetup
+%%EndSetup
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-50.0 460.0 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+  bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+  4 -2 roll mul srgb} bind def
+ /DrawEllipse {
+	/endangle exch def
+	/startangle exch def
+	/yrad exch def
+	/xrad exch def
+	/y exch def
+	/x exch def
+	/savematrix mtrx currentmatrix def
+	x y tr xrad yrad sc 0 0 1 startangle endangle arc
+	closepath
+	savematrix setmatrix
+	} def
+
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+n -1000 8302 m -1000 -1000 l 13612 -1000 l 13612 8302 l cp clip
+ 0.06299 0.06299 sc
+7.500 slw
+ [60] 0 sd
+% Ellipse
+n 7425 5580 45 45 0 360 DrawEllipse gs col7 0.00 shd ef gr gs col0 s gr
+ [] 0 sd
+% Polyline
+n 7470 4860 m 9540 4860 l 9540 6030 l 7470 6030 l cp gs col0 s gr 
+% Polyline
+n 7470 5220 m 9540 5220 l gs col0 s gr 
+/Times-Roman ff 180.00 scf sf
+8250 5115 m
+gs 1 -1 sc (AClass) col0 sh gr
+% Polyline
+n 3780 3150 m 5850 3150 l 5850 4320 l 3780 4320 l cp gs col0 s gr 
+% Polyline
+n 3780 3510 m 5850 3510 l gs col0 s gr 
+% Polyline
+n 4590 4680 m 4950 4680 l 4770 4500 l 4590 4680 l  cp gs col0 s gr 
+% Polyline
+n 4770 4500 m 4770 4320 l gs col0 s gr 
+/Times-Roman ff 180.00 scf sf
+4410 3420 m
+gs 1 -1 sc (DeviceImpl) col0 sh gr
+% Polyline
+n 4770 4860 m 4770 4680 l gs col0 s gr 
+% Polyline
+n 6030 5580 m 7380 5580 l gs col0 s gr 
+% Polyline
+n 8460 4860 m 8460 4680 l gs col0 s gr 
+% Polyline
+n 7470 3150 m 9540 3150 l 9540 4320 l 7470 4320 l cp gs col0 s gr 
+% Polyline
+n 7470 3510 m 9540 3510 l gs col0 s gr 
+% Polyline
+n 8280 4680 m 8640 4680 l 8460 4500 l 8280 4680 l  cp gs col0 s gr 
+% Polyline
+n 8460 4500 m 8460 4320 l gs col0 s gr 
+% Polyline
+ [60] 0 sd
+n 1440 2790 m 6300 2790 l 6300 6840 l 1440 6840 l cp gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 7110 2790 m 11970 2790 l 11970 6840 l 7110 6840 l cp gs col0 s gr  [] 0 sd
+% Polyline
+n 810 720 m 12600 720 l 12600 7290 l 810 7290 l cp gs col0 s gr 
+% Polyline
+n 4005 945 m 6075 945 l 6075 2115 l 4005 2115 l cp gs col0 s gr 
+% Polyline
+n 4005 1305 m 6075 1305 l gs col0 s gr 
+% Polyline
+n 7335 945 m 9405 945 l 9405 2115 l 7335 2115 l cp gs col0 s gr 
+% Polyline
+n 7335 1305 m 9405 1305 l gs col0 s gr 
+% Polyline
+n 3780 4860 m 5850 4860 l 5850 6030 l 3780 6030 l cp gs col0 s gr 
+% Polyline
+n 3780 5220 m 5850 5220 l gs col0 s gr 
+% Polyline
+n 5850 5580 m 5940 5490 l 6030 5580 l 5940 5670 l 5850 5580 l  cp gs col0 s gr 
+% Polyline
+n 6075 1620 m 6165 1530 l 6255 1620 l 6165 1710 l 6075 1620 l  cp gs col0 s gr 
+% Polyline
+n 6255 1620 m 7335 1620 l gs col0 s gr 
+/Times-Roman ff 180.00 scf sf
+8100 3420 m
+gs 1 -1 sc (DeviceClass) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+1890 6660 m
+gs 1 -1 sc (Device server pattern implementing the DServer class) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+7470 6660 m
+gs 1 -1 sc (Device server pattern\(s\) implementing device class\(es\)) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+4635 1185 m
+gs 1 -1 sc (Tango::Util) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+4485 5115 m
+gs 1 -1 sc (DServer) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+8010 1170 m
+gs 1 -1 sc (Database) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+4545 1575 m
+gs 1 -1 sc (server_init\(\)) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+4545 1845 m
+gs 1 -1 sc (server_run\(\)) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+7155 1530 m
+gs 1 -1 sc (1) col0 sh gr
+$F2psEnd
+rs
diff --git a/doc/src/ds_writing/device_et.eps b/doc/src/ds_writing/device_et.eps
new file mode 100644
index 0000000..d527369
--- /dev/null
+++ b/doc/src/ds_writing/device_et.eps
@@ -0,0 +1,953 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: device_et.eps
+%%Creator: fig2dev Version 3.2 Patchlevel 3d
+%%CreationDate: Fri Oct  1 15:31:45 2004
+%%For: taurel at wow (E.Taurel,,,)
+%%BoundingBox: 0 0 839 982
+%%Magnification: 0.9000
+%%EndComments
+/MyAppDict 100 dict dup begin def
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 982 moveto 0 0 lineto 839 0 lineto 839 982 lineto closepath clip newpath
+-35.0 1087.5 translate
+1 -1 scale
+
+% This junk string is used by the show operators
+/PATsstr 1 string def
+/PATawidthshow { 	% cx cy cchar rx ry string
+  % Loop over each character in the string
+  {  % cx cy cchar rx ry char
+    % Show the character
+    dup				% cx cy cchar rx ry char char
+    PATsstr dup 0 4 -1 roll put	% cx cy cchar rx ry char (char)
+    false charpath		% cx cy cchar rx ry char
+    /clip load PATdraw
+    % Move past the character (charpath modified the
+    % current point)
+    currentpoint			% cx cy cchar rx ry char x y
+    newpath
+    moveto			% cx cy cchar rx ry char
+    % Reposition by cx,cy if the character in the string is cchar
+    3 index eq {			% cx cy cchar rx ry
+      4 index 4 index rmoveto
+    } if
+    % Reposition all characters by rx ry
+    2 copy rmoveto		% cx cy cchar rx ry
+  } forall
+  pop pop pop pop pop		% -
+  currentpoint
+  newpath
+  moveto
+} bind def
+/PATcg {
+  7 dict dup begin
+    /lw currentlinewidth def
+    /lc currentlinecap def
+    /lj currentlinejoin def
+    /ml currentmiterlimit def
+    /ds [ currentdash ] def
+    /cc [ currentrgbcolor ] def
+    /cm matrix currentmatrix def
+  end
+} bind def
+% PATdraw - calculates the boundaries of the object and
+% fills it with the current pattern
+/PATdraw {			% proc
+  save exch
+    PATpcalc			% proc nw nh px py
+    5 -1 roll exec		% nw nh px py
+    newpath
+    PATfill			% -
+  restore
+} bind def
+% PATfill - performs the tiling for the shape
+/PATfill { % nw nh px py PATfill -
+  PATDict /CurrentPattern get dup begin
+    setfont
+    % Set the coordinate system to Pattern Space
+    PatternGState PATsg
+    % Set the color for uncolored pattezns
+    PaintType 2 eq { PATDict /PColor get PATsc } if
+    % Create the string for showing
+    3 index string		% nw nh px py str
+    % Loop for each of the pattern sources
+    0 1 Multi 1 sub {		% nw nh px py str source
+	% Move to the starting location
+	3 index 3 index		% nw nh px py str source px py
+	moveto			% nw nh px py str source
+	% For multiple sources, set the appropriate color
+	Multi 1 ne { dup PC exch get PATsc } if
+	% Set the appropriate string for the source
+	0 1 7 index 1 sub { 2 index exch 2 index put } for pop
+	% Loop over the number of vertical cells
+	3 index 		% nw nh px py str nh
+	{			% nw nh px py str
+	  currentpoint		% nw nh px py str cx cy
+	  2 index oldshow	% nw nh px py str cx cy
+	  YStep add moveto	% nw nh px py str
+	} repeat		% nw nh px py str
+    } for
+    5 { pop } repeat
+  end
+} bind def
+
+% PATkshow - kshow with the current pattezn
+/PATkshow {			% proc string
+  exch bind			% string proc
+  1 index 0 get			% string proc char
+  % Loop over all but the last character in the string
+  0 1 4 index length 2 sub {
+				% string proc char idx
+    % Find the n+1th character in the string
+    3 index exch 1 add get	% string proe char char+1
+    exch 2 copy			% strinq proc char+1 char char+1 char
+    % Now show the nth character
+    PATsstr dup 0 4 -1 roll put	% string proc chr+1 chr chr+1 (chr)
+    false charpath		% string proc char+1 char char+1
+    /clip load PATdraw
+    % Move past the character (charpath modified the current point)
+    currentpoint newpath moveto
+    % Execute the user proc (should consume char and char+1)
+    mark 3 1 roll		% string proc char+1 mark char char+1
+    4 index exec		% string proc char+1 mark...
+    cleartomark			% string proc char+1
+  } for
+  % Now display the last character
+  PATsstr dup 0 4 -1 roll put	% string proc (char+1)
+  false charpath		% string proc
+  /clip load PATdraw
+  neewath
+  pop pop			% -
+} bind def
+% PATmp - the makepattern equivalent
+/PATmp {			% patdict patmtx PATmp patinstance
+  exch dup length 7 add		% We will add 6 new entries plus 1 FID
+  dict copy			% Create a new dictionary
+  begin
+    % Matrix to install when painting the pattern
+    TilingType PATtcalc
+    /PatternGState PATcg def
+    PatternGState /cm 3 -1 roll put
+    % Check for multi pattern sources (Level 1 fast color patterns)
+    currentdict /Multi known not { /Multi 1 def } if
+    % Font dictionary definitions
+    /FontType 3 def
+    % Create a dummy encoding vector
+    /Encoding 256 array def
+    3 string 0 1 255 {
+      Encoding exch dup 3 index cvs cvn put } for pop
+    /FontMatrix matrix def
+    /FontBBox BBox def
+    /BuildChar {
+	mark 3 1 roll		% mark dict char
+	exch begin
+	Multi 1 ne {PaintData exch get}{pop} ifelse  % mark [paintdata]
+	  PaintType 2 eq Multi 1 ne or
+	  { XStep 0 FontBBox aload pop setcachedevice }
+	  { XStep 0 setcharwidth } ifelse
+	  currentdict		% mark [paintdata] dict
+	  /PaintProc load	% mark [paintdata] dict paintproc
+	end
+	gsave
+	  false PATredef exec true PATredef
+	grestore
+	cleartomark		% -
+    } bind def
+    currentdict
+  end				% newdict
+  /foo exch			% /foo newlict
+  definefont			% newfont
+} bind def
+% PATpcalc - calculates the starting point and width/height
+% of the tile fill for the shape
+/PATpcalc {	% - PATpcalc nw nh px py
+  PATDict /CurrentPattern get begin
+    gsave
+	% Set up the coordinate system to Pattern Space
+	% and lock down pattern
+	PatternGState /cm get setmatrix
+	BBox aload pop pop pop translate
+	% Determine the bounding box of the shape
+	pathbbox			% llx lly urx ury
+    grestore
+    % Determine (nw, nh) the # of cells to paint width and height
+    PatHeight div ceiling		% llx lly urx qh
+    4 1 roll				% qh llx lly urx
+    PatWidth div ceiling		% qh llx lly qw
+    4 1 roll				% qw qh llx lly
+    PatHeight div floor			% qw qh llx ph
+    4 1 roll				% ph qw qh llx
+    PatWidth div floor			% ph qw qh pw
+    4 1 roll				% pw ph qw qh
+    2 index sub cvi abs			% pw ph qs qh-ph
+    exch 3 index sub cvi abs exch	% pw ph nw=qw-pw nh=qh-ph
+    % Determine the starting point of the pattern fill
+    %(px, py)
+    4 2 roll				% nw nh pw ph
+    PatHeight mul			% nw nh pw py
+    exch				% nw nh py pw
+    PatWidth mul exch			% nw nh px py
+  end
+} bind def
+
+% Save the original routines so that we can use them later on
+/oldfill	/fill load def
+/oldeofill	/eofill load def
+/oldstroke	/stroke load def
+/oldshow	/show load def
+/oldashow	/ashow load def
+/oldwidthshow	/widthshow load def
+/oldawidthshow	/awidthshow load def
+/oldkshow	/kshow load def
+
+% These defs are necessary so that subsequent procs don't bind in
+% the originals
+/fill	   { oldfill } bind def
+/eofill	   { oldeofill } bind def
+/stroke	   { oldstroke } bind def
+/show	   { oldshow } bind def
+/ashow	   { oldashow } bind def
+/widthshow { oldwidthshow } bind def
+/awidthshow { oldawidthshow } bind def
+/kshow 	   { oldkshow } bind def
+/PATredef {
+  MyAppDict begin
+    {
+    /fill { /clip load PATdraw newpath } bind def
+    /eofill { /eoclip load PATdraw newpath } bind def
+    /stroke { PATstroke } bind def
+    /show { 0 0 null 0 0 6 -1 roll PATawidthshow } bind def
+    /ashow { 0 0 null 6 3 roll PATawidthshow }
+    bind def
+    /widthshow { 0 0 3 -1 roll PATawidthshow }
+    bind def
+    /awidthshow { PATawidthshow } bind def
+    /kshow { PATkshow } bind def
+  } {
+    /fill   { oldfill } bind def
+    /eofill { oldeofill } bind def
+    /stroke { oldstroke } bind def
+    /show   { oldshow } bind def
+    /ashow  { oldashow } bind def
+    /widthshow { oldwidthshow } bind def
+    /awidthshow { oldawidthshow } bind def
+    /kshow  { oldkshow } bind def
+    } ifelse
+  end
+} bind def
+false PATredef
+% Conditionally define setcmykcolor if not available
+/setcmykcolor where { pop } {
+  /setcmykcolor {
+    1 sub 4 1 roll
+    3 {
+	3 index add neg dup 0 lt { pop 0 } if 3 1 roll
+    } repeat
+    setrgbcolor - pop
+  } bind def
+} ifelse
+/PATsc {		% colorarray
+  aload length		% c1 ... cn length
+    dup 1 eq { pop setgray } { 3 eq { setrgbcolor } { setcmykcolor
+  } ifelse } ifelse
+} bind def
+/PATsg {		% dict
+  begin
+    lw setlinewidth
+    lc setlinecap
+    lj setlinejoin
+    ml setmiterlimit
+    ds aload pop setdash
+    cc aload pop setrgbcolor
+    cm setmatrix
+  end
+} bind def
+
+/PATDict 3 dict def
+/PATsp {
+  true PATredef
+  PATDict begin
+    /CurrentPattern exch def
+    % If it's an uncolored pattern, save the color
+    CurrentPattern /PaintType get 2 eq {
+      /PColor exch def
+    } if
+    /CColor [ currentrgbcolor ] def
+  end
+} bind def
+% PATstroke - stroke with the current pattern
+/PATstroke {
+  countdictstack
+  save
+  mark
+  {
+    currentpoint strokepath moveto
+    PATpcalc				% proc nw nh px py
+    clip newpath PATfill
+    } stopped {
+	(*** PATstroke Warning: Path is too complex, stroking
+	  with gray) =
+    cleartomark
+    restore
+    countdictstack exch sub dup 0 gt
+	{ { end } repeat } { pop } ifelse
+    gsave 0.5 setgray oldstroke grestore
+  } { pop restore pop } ifelse
+  newpath
+} bind def
+/PATtcalc {		% modmtx tilingtype PATtcalc tilematrix
+  % Note: tiling types 2 and 3 are not supported
+  gsave
+    exch concat					% tilingtype
+    matrix currentmatrix exch			% cmtx tilingtype
+    % Tiling type 1 and 3: constant spacing
+    2 ne {
+	% Distort the pattern so that it occupies
+	% an integral number of device pixels
+	dup 4 get exch dup 5 get exch		% tx ty cmtx
+	XStep 0 dtransform
+	round exch round exch			% tx ty cmtx dx.x dx.y
+	XStep div exch XStep div exch		% tx ty cmtx a b
+	0 YStep dtransform
+	round exch round exch			% tx ty cmtx a b dy.x dy.y
+	YStep div exch YStep div exch		% tx ty cmtx a b c d
+	7 -3 roll astore			% { a b c d tx ty }
+    } if
+  grestore
+} bind def
+/PATusp {
+  false PATredef
+  PATDict begin
+    CColor PATsc
+  end
+} bind def
+
+% this is the pattern fill program from the Second edition Reference Manual
+% with changes to call the above pattern fill
+% left30
+11 dict begin
+/PaintType 1 def
+/PatternType 1 def
+/TilingType 1 def
+/BBox [0 0 1 1] def
+/XStep 1 def
+/YStep 1 def
+/PatWidth 1 def
+/PatHeight 1 def
+/Multi 2 def
+/PaintData [
+  { clippath } bind
+  { 32 16 true [ 32 0 0 -16 0 16 ]
+	{<c000c000300030000c000c000300030000c000c000300030
+	000c000c00030003c000c000300030000c000c0003000300
+	00c000c000300030000c000c00030003>}
+     imagemask } bind
+] def
+/PaintProc {
+	pop
+	exec fill
+} def
+currentdict
+end
+/P1 exch def
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+  bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+  4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+10 setmiterlimit
+ 0.05669 0.05669 sc
+%
+% Fig objects follow
+%
+% Polyline
+7.500 slw
+n 9090 9720 m 11250 9720 l 11250 11160 l 9090 11160 l
+ cp gs col0 s gr 
+% Polyline
+n 9090 10080 m
+ 11250 10080 l gs col0 s gr 
+/Courier ff 180.00 scf sf
+9585 10380 m
+gs 1 -1 sc (is_allowed\(\)) col0 sh gr
+/Courier ff 180.00 scf sf
+9765 10695 m
+gs 1 -1 sc (execute\(\)) col0 sh gr
+/Courier ff 180.00 scf sf
+9465 9960 m
+gs 1 -1 sc (DevReadPosition) col0 sh gr
+% Polyline
+n 11565 9720 m 13725 9720 l 13725 11160 l 11565 11160 l
+ cp gs col0 s gr 
+% Polyline
+n 11565 10080 m
+ 13725 10080 l gs col0 s gr 
+/Courier ff 180.00 scf sf
+12060 10380 m
+gs 1 -1 sc (is_allowed\(\)) col0 sh gr
+/Courier ff 180.00 scf sf
+12240 10695 m
+gs 1 -1 sc (execute\(\)) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+11970 9945 m
+gs 1 -1 sc (TemplCommand) col0 sh gr
+% Polyline
+n 12510 11970 m 12780 11700 l
+ 13050 11970 l gs col0 s gr 
+% Polyline
+n 6390 4770 m 6750 4770 l 6570 4500 l
+ 6390 4770 l  cp gs col0 s gr 
+% Polyline
+n 6390 16920 m 6750 16920 l 6570 16650 l
+ 6390 16920 l  cp gs col0 s gr 
+% Polyline
+gs  clippath
+6600 2190 m 6540 2190 l 6540 2341 l 6570 2221 l 6600 2341 l cp
+eoclip
+n 6570 2610 m
+ 6570 2205 l gs col0 s gr gr
+
+% arrowhead
+n 6600 2341 m 6570 2221 l 6540 2341 l 6600 2341 l  cp gs 0.00 setgray ef gr  col0 s
+% Polyline
+n 2610 9720 m 2610 9360 l 10260 9360 l
+ 10260 9720 l gs col0 s gr 
+% Polyline
+n 5130 9360 m
+ 5130 9720 l gs col0 s gr 
+% Polyline
+n 7650 9360 m
+ 7650 9720 l gs col0 s gr 
+% Polyline
+n 6570 8730 m
+ 6570 9090 l gs col0 s gr 
+% Polyline
+n 6390 9360 m
+ 6570 9090 l gs col0 s gr 
+% Polyline
+n 7331 9090 m 7339 9090 l gs col0 s gr
+% Polyline
+n 6750 9360 m
+ 6570 9090 l gs col0 s gr 
+% Polyline
+n 2610 7290 m
+ 2610 7020 l gs col0 s gr 
+% Polyline
+n 2430 7020 m 2790 7020 l 2610 6750 l
+ 2430 7020 l  cp gs col0 s gr 
+% Polyline
+n 2610 6750 m
+ 2610 6480 l gs col0 s gr 
+% Polyline
+n 6570 5040 m
+ 6570 4770 l gs col0 s gr 
+% Polyline
+n 6570 4500 m
+ 6570 4230 l gs col0 s gr 
+% Polyline
+n 3690 6300 m
+ 3870 6120 l gs col0 s gr 
+% Polyline
+n 3870 6120 m 4050 6300 l 3870 6480 l
+ 3690 6300 l gs col0 s gr 
+% Polyline
+n 4590 3330 m
+ 5310 3330 l gs /PC [[0.00 0.00 0.00] [0.00 0.00 0.00]] def
+15.00 15.00 sc P1 [16 0 0 -8 306.00 222.00]  PATmp PATsp ef gr PATusp gs col0 s gr 
+% Polyline
+n 4050 6300 m 4590 6300 l 4590 8190 l
+ 5400 8190 l gs col0 s gr 
+% Polyline
+n 1530 7290 m 3690 7290 l 3690 8730 l 1530 8730 l
+ cp gs col0 s gr 
+% Polyline
+n 5490 5040 m 7650 5040 l 7650 6480 l 5490 6480 l
+ cp gs col0 s gr 
+% Polyline
+n 1530 5040 m 3690 5040 l 3690 6480 l 1530 6480 l
+ cp gs col0 s gr 
+% Polyline
+n 1530 9720 m 3690 9720 l 3690 11160 l 1530 11160 l
+ cp gs col0 s gr 
+% Polyline
+n 6570 9720 m 8730 9720 l 8730 11160 l 6570 11160 l
+ cp gs col0 s gr 
+% Polyline
+n 4050 9720 m 6210 9720 l 6210 11160 l 4050 11160 l
+ cp gs col0 s gr 
+% Polyline
+n 1530 10080 m
+ 3690 10080 l gs col0 s gr 
+% Polyline
+n 4050 10080 m
+ 6210 10080 l gs col0 s gr 
+% Polyline
+n 6570 10080 m
+ 8730 10080 l gs col0 s gr 
+% Polyline
+n 5490 7650 m
+ 7650 7650 l gs col0 s gr 
+% Polyline
+n 1530 7650 m
+ 3690 7650 l gs col0 s gr 
+% Polyline
+n 1530 5400 m
+ 3690 5400 l gs col0 s gr 
+% Polyline
+n 5490 5400 m
+ 7650 5400 l gs col0 s gr 
+% Polyline
+n 5490 2610 m 7650 2610 l 7650 4230 l 5490 4230 l
+ cp gs col0 s gr 
+% Polyline
+n 5490 2970 m
+ 7650 2970 l gs col0 s gr 
+% Polyline
+n 5490 3870 m
+ 7650 3870 l gs col0 s gr 
+% Polyline
+n 10260 9360 m 12690 9360 l
+ 12690 9675 l gs col0 s gr 
+% Polyline
+n 4005 12330 m 6165 12330 l 6165 13770 l 4005 13770 l
+ cp gs col0 s gr 
+% Polyline
+n 4005 12690 m
+ 6165 12690 l gs col0 s gr 
+% Polyline
+n 6570 12330 m 8730 12330 l 8730 13770 l 6570 13770 l
+ cp gs col0 s gr 
+% Polyline
+n 6570 12690 m
+ 8730 12690 l gs col0 s gr 
+% Polyline
+n 9180 12330 m 11340 12330 l 11340 13770 l 9180 13770 l
+ cp gs col0 s gr 
+% Polyline
+n 9180 12690 m
+ 11340 12690 l gs col0 s gr 
+% Polyline
+n 7740 11970 m
+ 7740 12330 l gs col0 s gr 
+% Polyline
+n 10350 11970 m
+ 10350 12330 l gs col0 s gr 
+% Polyline
+n 5040 12330 m 5040 11970 l
+ 13050 11970 l gs col0 s gr 
+% Polyline
+n 12780 11700 m
+ 12780 11160 l gs col0 s gr 
+% Polyline
+n 630 1890 m 15390 1890 l 15390 19170 l 630 19170 l
+ cp gs col0 s gr 
+% Polyline
+ [15 45] 45 sd
+n 5220 4860 m 7920 4860 l 7920 6660 l 5220 6660 l
+ cp gs col0 s gr  [] 0 sd
+% Polyline
+ [15 45] 45 sd
+n 1350 7200 m 3870 7200 l 3870 8910 l 1350 8910 l
+ cp gs col0 s gr  [] 0 sd
+% Polyline
+ [15 45] 45 sd
+n 9000 9630 m 11340 9630 l 11340 11340 l 9000 11340 l
+ cp gs col0 s gr  [] 0 sd
+% Polyline
+ [15 45] 45 sd
+n 5310 3330 m
+ 5490 3330 l gs col0 s gr  [] 0 sd
+% Polyline
+ [15 45] 45 sd
+n 5400 8190 m
+ 5490 8190 l gs col0 s gr  [] 0 sd
+% Polyline
+n 6570 16650 m
+ 6570 16380 l gs col0 s gr 
+% Polyline
+n 6570 17370 m
+ 6570 16920 l gs col0 s gr 
+% Polyline
+n 5490 15300 m
+ 7650 15300 l gs col0 s gr 
+% Polyline
+n 9180 15300 m
+ 11340 15300 l gs col0 s gr 
+% Polyline
+n 5490 17730 m
+ 7650 17730 l gs col0 s gr 
+% Polyline
+n 5490 17370 m 7650 17370 l 7650 18810 l 5490 18810 l
+ cp gs col0 s gr 
+% Polyline
+n 9180 14940 m 11340 14940 l 11340 16380 l 9180 16380 l
+ cp gs col0 s gr 
+% Polyline
+n 5490 14940 m 7650 14940 l 7650 16380 l 5490 16380 l
+ cp gs col0 s gr 
+% Polyline
+n 9180 15750 m 9000 15570 l 8820 15750 l 9000 15930 l
+ 9180 15750 l  cp gs col0 s gr 
+% Polyline
+n 7650 15750 m
+ 8820 15750 l gs col0 s gr 
+% Polyline
+n 7672 3262 m 7852 3082 l 8032 3262 l 7852 3442 l
+ 7672 3262 l  cp gs col0 s gr 
+% Polyline
+n 7830 3600 m 8010 3780 l 7830 3960 l
+ 7650 3780 l gs col0 s gr 
+% Polyline
+n 1530 2610 m 3690 2610 l 3690 4050 l 1530 4050 l
+ cp gs col0 s gr 
+% Polyline
+n 1530 2970 m
+ 3690 2970 l gs col0 s gr 
+% Polyline
+n 1350 5670 m 1530 5850 l 1350 6030 l
+ 1170 5850 l gs col0 s gr 
+% Polyline
+n 1170 5850 m 900 5850 l 900 3330 l
+ 1530 3330 l gs col0 s gr 
+% Polyline
+n 5490 7278 m 7650 7278 l 7650 8718 l 5490 8718 l
+ cp gs col0 s gr 
+% Polyline
+n 1170 5850 m
+ 1350 5670 l gs col0 s gr 
+% Polyline
+n 7650 3780 m
+ 7830 3600 l gs col0 s gr 
+% Polyline
+n 8010 3240 m 14220 3240 l 14220 15750 l
+ 11340 15750 l gs col0 s gr 
+% Polyline
+n 3870 5265 m 4050 5445 l 3870 5625 l
+ 3690 5445 l gs col0 s gr 
+% Polyline
+n 3870 5670 m 4050 5850 l 3870 6030 l
+ 3690 5850 l gs col0 s gr 
+% Polyline
+n 9855 3465 m 12015 3465 l 12015 4905 l 9855 4905 l
+ cp gs col0 s gr 
+% Polyline
+n 9855 3870 m
+ 12015 3870 l gs col0 s gr 
+% Polyline
+n 9900 5310 m 12060 5310 l 12060 6750 l 9900 6750 l
+ cp gs col0 s gr 
+% Polyline
+n 8415 7335 m 10575 7335 l 10575 8775 l 8415 8775 l
+ cp gs col0 s gr 
+% Polyline
+n 11475 7335 m 13635 7335 l 13635 8775 l 11475 8775 l
+ cp gs col0 s gr 
+% Polyline
+n 9900 5715 m
+ 12060 5715 l gs col0 s gr 
+% Polyline
+n 8415 7740 m
+ 10575 7740 l gs col0 s gr 
+% Polyline
+n 11475 7740 m
+ 13635 7740 l gs col0 s gr 
+/Courier-Oblique ff 180.00 scf sf
+6585 2850 m
+gs 1 -1 sc (DeviceImpl) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+2625 5280 m
+gs 1 -1 sc (DeviceClass) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+6600 3180 m
+gs 1 -1 sc (init_device\(\)=0) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+5595 3405 m
+gs 1 -1 sc (attribute_factory\(\)) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+5700 3660 m
+gs 1 -1 sc (command_factory\(\)) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+6240 7515 m
+gs 1 -1 sc (Command) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+5850 7965 m
+gs 1 -1 sc (is_allowed\(\)=0) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+5985 8250 m
+gs 1 -1 sc (execute\(\)=0) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+2190 9975 m
+gs 1 -1 sc (DevState) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+4725 9960 m
+gs 1 -1 sc (DevStatus) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+7200 9960 m
+gs 1 -1 sc (DevRestart) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+2010 10410 m
+gs 1 -1 sc (is_allowed\(\)) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+2160 10755 m
+gs 1 -1 sc (execute\(\)) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+4530 10380 m
+gs 1 -1 sc (is_allowed\(\)) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+7050 10365 m
+gs 1 -1 sc (is_allowed\(\)) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+4650 10710 m
+gs 1 -1 sc (execute\(\)) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+7200 10695 m
+gs 1 -1 sc (execute\(\)) col0 sh gr
+/Courier ff 180.00 scf sf
+1755 7530 m
+gs 1 -1 sc (StepperMotorClass) col0 sh gr
+/Courier ff 180.00 scf sf
+1860 7935 m
+gs 1 -1 sc (device_factory\(\)) col0 sh gr
+/Courier ff 180.00 scf sf
+1800 8235 m
+gs 1 -1 sc (command_factory\(\)) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+6090 4095 m
+gs 1 -1 sc (dev_state) col0 sh gr
+/Courier ff 180.00 scf sf
+6030 5280 m
+gs 1 -1 sc (StpperMotor) col0 sh gr
+/Courier ff 180.00 scf sf
+5940 5670 m
+gs 1 -1 sc (init_device\(\)) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+5970 2145 m
+gs 1 -1 sc (CORBA classes) col0 sh gr
+/Courier ff 180.00 scf sf
+5535 6030 m
+gs 1 -1 sc (dev_read_position\(\)) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+1680 5730 m
+gs 1 -1 sc (device_factory\(\)=0) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+1620 6030 m
+gs 1 -1 sc (command_factory\(\)=0) col0 sh gr
+/Courier ff 180.00 scf sf
+4500 12990 m
+gs 1 -1 sc (is_allowed\(\)) col0 sh gr
+/Courier ff 180.00 scf sf
+4680 13305 m
+gs 1 -1 sc (execute\(\)) col0 sh gr
+/Courier ff 180.00 scf sf
+7065 12990 m
+gs 1 -1 sc (is_allowed\(\)) col0 sh gr
+/Courier ff 180.00 scf sf
+7245 13305 m
+gs 1 -1 sc (execute\(\)) col0 sh gr
+/Courier ff 180.00 scf sf
+9675 12990 m
+gs 1 -1 sc (is_allowed\(\)) col0 sh gr
+/Courier ff 180.00 scf sf
+9855 13305 m
+gs 1 -1 sc (execute\(\)) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+4230 12600 m
+gs 1 -1 sc (TemplCommandIn) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+6750 12600 m
+gs 1 -1 sc (TemplCommandOut) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+9270 12600 m
+gs 1 -1 sc (TemplCommandInOut) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+5040 3240 m
+gs 1 -1 sc (1,..n) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+5040 8100 m
+gs 1 -1 sc (1,..n) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+9675 15210 m
+gs 1 -1 sc (MultiAttribute) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+6165 15210 m
+gs 1 -1 sc (Attribute) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+6120 17640 m
+gs 1 -1 sc (WAttribute) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+11475 15660 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+7740 15660 m
+gs 1 -1 sc (1,..n) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+6120 15660 m
+gs 1 -1 sc (set_value\(\)) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+6120 15930 m
+gs 1 -1 sc (get_name\(\)) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+5850 18180 m
+gs 1 -1 sc (get_write_value\(\)) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+9765 16155 m
+gs 1 -1 sc (read_alarm\(\)) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+9675 15885 m
+gs 1 -1 sc (check_alarm\(\)) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+9855 15615 m
+gs 1 -1 sc (get_attr....\(\)) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+2280 2850 m
+gs 1 -1 sc (DbClass) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+2040 3330 m
+gs 1 -1 sc (get_property\(\)) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+2070 3600 m
+gs 1 -1 sc (put_prperty\(\)) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+1350 3240 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+10575 3735 m
+gs 1 -1 sc (DbDevice) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+10395 4230 m
+gs 1 -1 sc (get_property\(\)) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+10395 4500 m
+gs 1 -1 sc (put_property\(\)) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+10710 6300 m
+gs 1 -1 sc (read\(\)) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+9180 8325 m
+gs 1 -1 sc (read\(\)) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+12330 8370 m
+gs 1 -1 sc (read\(\)) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+10215 6030 m
+gs 1 -1 sc (is_allowed\(\)) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+8730 8055 m
+gs 1 -1 sc (is_allowed\(\)) col0 sh gr
+/Courier-Oblique ff 180.00 scf sf
+11745 8055 m
+gs 1 -1 sc (is_allowed\(\)) col0 sh gr
+% Polyline
+n 4590 3330 m 4590 5445 l
+ 4050 5445 l gs col0 s gr 
+% Polyline
+n 9450 7155 m 12645 7155 l
+ 12645 7335 l gs col0 s gr 
+% Polyline
+n 9450 7155 m
+ 9450 7335 l gs col0 s gr 
+% Polyline
+n 10800 7155 m 10980 6975 l
+ 11160 7155 l gs col0 s gr 
+% Polyline
+n 10980 6975 m
+ 10980 6750 l gs col0 s gr 
+% Polyline
+n 8010 3780 m 9450 3780 l 9450 3645 l
+ 9855 3645 l gs col0 s gr 
+% Polyline
+n 4050 5850 m 4860 5850 l 4860 6930 l 9450 6930 l 9450 5490 l
+ 9900 5490 l gs col0 s gr 
+% Polyline
+n 3690 5850 m
+ 3870 5670 l gs col0 s gr 
+% Polyline
+n 3690 5445 m
+ 3870 5265 l gs col0 s gr 
+/Times-Roman ff 180.00 scf sf
+9675 3555 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+9495 5400 m
+gs 1 -1 sc (1,..n) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+10755 5580 m
+gs 1 -1 sc (Attr) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+9045 7605 m
+gs 1 -1 sc (PositionAttr) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+12060 7605 m
+gs 1 -1 sc (SetPositionAttr) col0 sh gr
+$F2psEnd
+rs
+end
diff --git a/doc/src/ds_writing/ds_writing.lyx b/doc/src/ds_writing/ds_writing.lyx
new file mode 100644
index 0000000..91927a1
--- /dev/null
+++ b/doc/src/ds_writing/ds_writing.lyx
@@ -0,0 +1,25754 @@
+#LyX 1.6.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 345
+\begin_document
+\begin_header
+\textclass Tango_book
+\begin_preamble
+\usepackage{a4wide}
+\end_preamble
+\use_default_options false
+\language english
+\inputencoding latin1
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_amsmath 1
+\use_esint 0
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\secnumdepth 5
+\tocdepth 5
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\author "" 
+\author "" 
+\end_header
+
+\begin_body
+
+\begin_layout Chapter
+Writing a TANGO device server
+\end_layout
+
+\begin_layout Section
+The device server framework
+\end_layout
+
+\begin_layout Standard
+This chapter will present the TANGO device server framework.
+ It will introduce what is the device server pattern and then it will describe
+ a complete device server framework.
+ A definition of classes used by the device server framework is given in
+ this chapter.
+ This manual is not intended to give the complete and detailed description
+ of classes data member or methods, refer to 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+ to get this full description.
+ But first, the naming convention used in this project is detailed.
+\end_layout
+
+\begin_layout Standard
+The aim of the class definition given in this chapter is only to help the
+ reader to understand how a TANGO device server works.
+ For a detailed description of these classes (and their methods), refer
+ to chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Writing_chapter"
+
+\end_inset
+
+ or to 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection
+Naming convention and programming language
+\end_layout
+
+\begin_layout Standard
+TANGO fully supports two different programming languages which are 
+\series bold
+C++
+\series default
+ and 
+\series bold
+Java
+\series default
+.
+ When the Java code differs from the C++ code, examples in both languages
+ will be given.
+ For C++, its standard library has been used.
+ Details about this library can be found in 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Stroustrup"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+Every software project needs a naming
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+naming
+\end_layout
+
+\end_inset
+
+ convention.
+ The naming convention adopted for the TDSOM is very simple and only defines
+ two guidelines which are:
+\end_layout
+
+\begin_layout Itemize
+Class names start with uppercase and use capitalization for compound words
+ (For instance MyClassName).
+\end_layout
+
+\begin_layout Itemize
+Method names are in lowercase and use underscores for compound words (For
+ instance my_method_name).
+\end_layout
+
+\begin_layout Standard
+These conventions will be use hereafter for both C++ and Java.
+\end_layout
+
+\begin_layout Subsection
+The device pattern
+\end_layout
+
+\begin_layout Standard
+Device server are written using the Device pattern
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+pattern
+\end_layout
+
+\end_inset
+
+.
+ The aim of this pattern is to provide the control programmer with a framework
+ in which s/he can develop new control objects.
+ The device pattern uses other design patterns like the Singleton
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+singleton
+\end_layout
+
+\end_inset
+
+ and Command patterns.
+ These patterns are fully described in 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Patterns"
+
+\end_inset
+
+.
+ The device pattern class diagram for stepper motor device is drawn in figure
+ 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Dvice pattern figure"
+
+\end_inset
+
+
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Device pattern class diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Graphics
+	filename device_et.eps
+	width 14cm
+	height 18cm
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Device pattern class diagram
+\begin_inset CommandInset label
+LatexCommand label
+name "Dvice pattern figure"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+.
+ In this figure, only classes surrounded with a dash line square are device
+ specific.
+ All the other classes are part of the TDSOM core and are developed by the
+ Tango system team.
+ Different kind of classes are used by the device pattern.
+ 
+\end_layout
+
+\begin_layout Itemize
+Three of them are root classes and it is only necessary to inherit from
+ them.
+ These classes are the 
+\series bold
+DeviceImpl
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceImpl
+\end_layout
+
+\end_inset
+
+, 
+\series bold
+DeviceClass
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceClass
+\end_layout
+
+\end_inset
+
+
+\series default
+ and 
+\series bold
+Command
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Command
+\end_layout
+
+\end_inset
+
+
+\series default
+ classes.
+ 
+\end_layout
+
+\begin_layout Itemize
+Classes necessary to implement commands
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command
+\end_layout
+
+\end_inset
+
+.
+ The TDSOM supports two ways to create command : Using inheritance
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+inheritance
+\end_layout
+
+\end_inset
+
+ or using the template
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+template
+\end_layout
+
+\end_inset
+
+ command model.
+ It is possible to mix model within the same device pattern
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+Using 
+\series bold
+inheritance
+\series default
+.
+ This model of creating command heavily used the polymorphism offered by
+ each modern object oriented programming language.
+ In this schema, each command supported by a device via the command_inout
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-inout
+\end_layout
+
+\end_inset
+
+ or command_inout_async
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-inout-async
+\end_layout
+
+\end_inset
+
+ operation is implemented by a separate class.
+ The Command
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Command
+\end_layout
+
+\end_inset
+
+ class is the root class for each of these classes.
+ It is an abstract class.
+ A 
+\emph on
+execute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+execute
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method must be defined in each sub-class.
+ A 
+\emph on
+is_allowed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-allowed
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method may also be re-defined in each class if the default one does not
+ fulfill all the needs
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+The default is_allowed method behavior is to always allows the command
+\end_layout
+
+\end_inset
+
+.
+ In our stepper motor device server example, the DevReadPosition command
+ follows this model.
+\end_layout
+
+\begin_layout Enumerate
+Using the 
+\series bold
+template command
+\series default
+ model.
+ Using this model, it is not necessary to write one class for each command.
+ You create one instance of classes already defined in the TDSOM for each
+ command.
+ The link between command name and method which need to be executed is done
+ through pointers to method for C++ and through method names for Java.
+ To support different kind of command, four classes are part of the TDSOM.
+ These classes are :
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The 
+\series bold
+TemplCommand
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TemplCommand
+\end_layout
+
+\end_inset
+
+
+\series default
+ class for command without input or output parameter
+\end_layout
+
+\begin_layout Enumerate
+The 
+\series bold
+TemplCommandIn
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TemplCommandIn
+\end_layout
+
+\end_inset
+
+
+\series default
+ class for command with input parameter but without output parameter
+\end_layout
+
+\begin_layout Enumerate
+The 
+\series bold
+TemplCommandOu
+\series default
+t
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TemplCommandOut
+\end_layout
+
+\end_inset
+
+ class for command with output parameter but without input parameter
+\end_layout
+
+\begin_layout Enumerate
+The 
+\series bold
+TemplCommandInOut
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TemplCommandInOut
+\end_layout
+
+\end_inset
+
+
+\series default
+ class for all the remaining commands
+\end_layout
+
+\end_deeper
+\end_deeper
+\begin_layout Itemize
+Classes necessary to implement TANGO device attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+.
+ All these classes are part of the TANGO core classes.
+ These classes are the 
+\series bold
+MultiAttribute
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+MultiAttribute
+\end_layout
+
+\end_inset
+
+, 
+\series bold
+Attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Attribute
+\end_layout
+
+\end_inset
+
+
+\series default
+, 
+\series bold
+WAttribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+WAttribute
+\end_layout
+
+\end_inset
+
+
+\series default
+, 
+\series bold
+Attr
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Attr
+\end_layout
+
+\end_inset
+
+, 
+\series bold
+SpectrumAttr
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SpectrumAttr
+\end_layout
+
+\end_inset
+
+
+\series default
+ and 
+\series bold
+ImageAttr
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ImageAttr
+\end_layout
+
+\end_inset
+
+
+\series default
+ classes.
+ The last three are used to create user attribute.
+ Each attribute supported by a device is implemented by a separate class.
+ The Attr class is the root class for each of these classes.
+ According to the attribute data format, the user class implementing the
+ attribute must inherit from the Attr, SpectrumAttr or ImageAtttr class.
+ SpectrumAttr class inherits from Attr class and Image Attr class inherits
+ from the SpectrumAttr class.
+ The Attr base class defined three methods called 
+\emph on
+is_allowed
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-allowed
+\end_layout
+
+\end_inset
+
+, 
+\emph on
+read
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read
+\end_layout
+
+\end_inset
+
+
+\emph default
+ and 
+\emph on
+write
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+write
+\end_layout
+
+\end_inset
+
+.
+ These methods may be redefined in sub-classes in order to implement the
+ attribute specific behaviour.
+\end_layout
+
+\begin_layout Itemize
+The other are device specific.
+ For stepper motor device, they are named StepperMotor, StepperMotorClass
+ and DevReadPosition.
+\end_layout
+
+\begin_layout Subsubsection
+The DeviceImpl
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceImpl
+\end_layout
+
+\end_inset
+
+ class
+\end_layout
+
+\begin_layout Paragraph
+Description
+\end_layout
+
+\begin_layout Standard
+This class is the device root class and is the link between the Device pattern
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+pattern
+\end_layout
+
+\end_inset
+
+ and CORBA
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CORBA
+\end_layout
+
+\end_inset
+
+.
+ It inherits from CORBA classes and implements all the methods needed to
+ execute CORBA operations and attributes.
+ For instance, its method 
+\emph on
+command_inout
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-inout
+\end_layout
+
+\end_inset
+
+
+\emph default
+ is executed when a client requests a command_inout operation.
+ The method 
+\emph on
+name
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+name
+\end_layout
+
+\end_inset
+
+
+\emph default
+ of the DeviceImpl class is executed when a client requests the name CORBA
+ attribute.
+ This class also encapsulates some key device data like its name
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+name
+\end_layout
+
+\end_inset
+
+, its state
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+state
+\end_layout
+
+\end_inset
+
+, its status
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+status
+\end_layout
+
+\end_inset
+
+, its black box
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+black-box
+\end_layout
+
+\end_inset
+
+....
+ This class is an abstract class and cannot be instantiated as is.
+ 
+\end_layout
+
+\begin_layout Paragraph
+Contents
+\end_layout
+
+\begin_layout Standard
+The contents of this class can be summarize as :
+\end_layout
+
+\begin_layout Itemize
+Different constructors and one destructor
+\end_layout
+
+\begin_layout Itemize
+Methods to access instance data members outside the class or its derivate
+ classes.
+ These methods are necessary because data members are declared as protected.
+\end_layout
+
+\begin_layout Itemize
+Methods triggered by CORBA attribute request
+\end_layout
+
+\begin_layout Itemize
+Methods triggered by CORBA operation
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+operation
+\end_layout
+
+\end_inset
+
+ request
+\end_layout
+
+\begin_layout Itemize
+The 
+\emph on
+init_device
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+init-device
+\end_layout
+
+\end_inset
+
+()
+\emph default
+ method.
+ This method makes the class abstract.
+ It should be implemented by a sub-class.
+ It is used by the inherited classes constructors.
+\end_layout
+
+\begin_layout Itemize
+Methods triggered by the automatically added State
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+State
+\end_layout
+
+\end_inset
+
+ and Status
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Status
+\end_layout
+
+\end_inset
+
+ commands.
+ These methods are declared virtual and therefore can be redefined in sub-classe
+s.
+ These two commands are automatically added to the list of commands defined
+ for a class of devices.
+ They are discussed in chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Auto_cmd"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+A method called 
+\emph on
+always_executed_hook()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+always-executed-hook
+\end_layout
+
+\end_inset
+
+
+\emph default
+ always executed for each command before the device state is tested for
+ command execution.
+ This method gives the programmer a hook where he(she) can program some
+ mandatory action which must be done before any command execution.
+ An example of the such action is an hardware access to the device to read
+ its real hardware state.
+\end_layout
+
+\begin_layout Itemize
+A method called 
+\emph on
+read_attr_hardware()
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attr-hardware
+\end_layout
+
+\end_inset
+
+ triggered by the read_attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attributes
+\end_layout
+
+\end_inset
+
+ CORBA operation.
+ This method is called once for each read_attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attributes
+\end_layout
+
+\end_inset
+
+ call.
+ This method is virtual and may be redefined in sub-classes.
+ 
+\end_layout
+
+\begin_layout Itemize
+Methods for signal
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+signal
+\end_layout
+
+\end_inset
+
+ management (C++ specific) 
+\end_layout
+
+\begin_layout Itemize
+Data members like the device name
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+name
+\end_layout
+
+\end_inset
+
+, the device status
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+status
+\end_layout
+
+\end_inset
+
+, the device state
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+state
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Some private methods and data members
+\end_layout
+
+\begin_layout Subsubsection
+The DbDevice class
+\end_layout
+
+\begin_layout Standard
+Each DeviceImpl instance is an aggregate with one instance of the DbDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DbDevice
+\end_layout
+
+\end_inset
+
+ class.
+ This DbDevice class can be used to query or modify device properties
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+properties
+\end_layout
+
+\end_inset
+
+.
+ It provides an easy to use interface for device objects in the database.
+ The description of this class can be found in the Tango java or C++ API
+ documentation.
+\end_layout
+
+\begin_layout Subsubsection
+The Command class
+\end_layout
+
+\begin_layout Paragraph
+Description of the inheritance
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+inheritance
+\end_layout
+
+\end_inset
+
+ model
+\end_layout
+
+\begin_layout Standard
+Within the TDSOM, each command
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command
+\end_layout
+
+\end_inset
+
+ supported by a device and implemented using the inheritance model is implemente
+d by a separate class.
+ The Command
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Command
+\end_layout
+
+\end_inset
+
+ class is the root class for each of these classes.
+ It is an abstract class.
+ It stores the command name, the command argument types and description
+ and mainly defines two methods which are the 
+\emph on
+execute
+\emph default
+ and 
+\emph on
+is_allowed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-allowed
+\end_layout
+
+\end_inset
+
+
+\emph default
+ methods.
+ The 
+\emph on
+execute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+execute
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method should be implemented in each sub-class.
+ A default 
+\emph on
+is_allowed
+\emph default
+ method exists for command always allowed.
+ A command also stores a parameter which is the command display type.
+ It is also used to select if the command must be displayed according to
+ the application mode (every day operation or expert mode).
+\end_layout
+
+\begin_layout Paragraph
+Description of the template model
+\end_layout
+
+\begin_layout Standard
+Using this method, it is not necessary to create a separate class for each
+ device command.
+ In this method, each command is represented by an instance of one of the
+ template
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+template
+\end_layout
+
+\end_inset
+
+ command classes.
+ They are four template command classes.
+ All these classes inherits from the Command class.
+ These four classes are :
+\end_layout
+
+\begin_layout Enumerate
+The 
+\series bold
+TemplCommand
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TemplCommand
+\end_layout
+
+\end_inset
+
+
+\series default
+ class.
+ One object of this class must be created for each command without input
+ nor output parameters
+\end_layout
+
+\begin_layout Enumerate
+The 
+\series bold
+TemplCommandIn
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TemplCommandIn
+\end_layout
+
+\end_inset
+
+
+\series default
+ class.
+ One object of this class must be created for each command without output
+ parameter but with input parameter
+\end_layout
+
+\begin_layout Enumerate
+The 
+\series bold
+TemplCommandOut
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TemplCommandOut
+\end_layout
+
+\end_inset
+
+
+\series default
+ class.
+ One object of this class must be created for each command without input
+ parameter but with output parameter
+\end_layout
+
+\begin_layout Enumerate
+The 
+\series bold
+TemplCommandInOut
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TemplCommandInOut
+\end_layout
+
+\end_inset
+
+
+\series default
+ class.
+ One object of this class must be created for each command with input and
+ output parameters
+\end_layout
+
+\begin_layout Standard
+These four classes redefine the 
+\emph on
+execute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+execute
+\end_layout
+
+\end_inset
+
+
+\emph default
+ and 
+\emph on
+is_allowed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-allowed
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method of the Command class.
+ These classes provides constructors which allow the user to :
+\end_layout
+
+\begin_layout Itemize
+specify which method must be executed by these classes 
+\emph on
+execute
+\emph default
+ method
+\end_layout
+
+\begin_layout Itemize
+optionally specify which method must be executed by these classes 
+\emph on
+is_allowed
+\emph default
+ method.
+\end_layout
+
+\begin_layout Standard
+The method specification is done via pointer to method with C++ and simply
+ with method name for java.
+\end_layout
+
+\begin_layout Standard
+Remember that it is possible to mix command implementation method within
+ the same device pattern.
+\end_layout
+
+\begin_layout Paragraph
+Contents
+\end_layout
+
+\begin_layout Standard
+The content of this class can be summarizes as :
+\end_layout
+
+\begin_layout Itemize
+Class constructors and destructor
+\end_layout
+
+\begin_layout Itemize
+Declaration of the 
+\emph on
+execute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+execute
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method
+\end_layout
+
+\begin_layout Itemize
+Declaration of the 
+\emph on
+is_allowed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-allowed
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method
+\end_layout
+
+\begin_layout Itemize
+Methods to read/set class data members
+\end_layout
+
+\begin_layout Itemize
+Methods to extract
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+extract
+\end_layout
+
+\end_inset
+
+ data from the object used to transfer data on the network
+\end_layout
+
+\begin_layout Itemize
+Methods to insert
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+insert
+\end_layout
+
+\end_inset
+
+ data into the object used to transfer data on the network
+\end_layout
+
+\begin_layout Itemize
+Class data members like command name, command input data type, command input
+ data description...
+\end_layout
+
+\begin_layout Subsubsection
+The DeviceClass
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceClass
+\end_layout
+
+\end_inset
+
+ class
+\end_layout
+
+\begin_layout Paragraph
+Description
+\end_layout
+
+\begin_layout Standard
+This class implements all what is specific for a controlled object class.
+ For instance, every device of the same class supports the same list of
+ commands
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command
+\end_layout
+
+\end_inset
+
+ and therefore, this list of available commands is stored in this DeviceClass.
+ The structure returned by the info operation contains a documentation URL
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+URL stands for 
+\series bold
+U
+\series default
+niform 
+\series bold
+R
+\series default
+esource 
+\series bold
+L
+\series default
+ocator
+\end_layout
+
+\end_inset
+
+.
+ This documentation
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+documentation
+\end_layout
+
+\end_inset
+
+ URL
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+URL
+\end_layout
+
+\end_inset
+
+ is the same for every device of the same class.
+ Therefore, the documentation URL is a data member of this class.
+ There should have only one instance of this class per device pattern implementa
+tion.
+ The device list is also stored in this class.
+ It is an abstract class because the two methods 
+\emph on
+device_factory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+device-factory
+\end_layout
+
+\end_inset
+
+()
+\emph default
+ and 
+\emph on
+command_factory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-factory
+\end_layout
+
+\end_inset
+
+()
+\emph default
+ are declared as pure virtual.
+ The rule of the 
+\emph on
+device_factory()
+\emph default
+ method is to create all the devices belonging to the device class.
+ The rule of the 
+\emph on
+command_factory()
+\emph default
+ method is to create one instance of all the classes needed to support device
+ commands.
+ This class also stored the 
+\emph on
+attribute_factory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute-factory
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ The rule of this method is to store in a vector of strings, the name of
+ all the device attributes.
+ This method has a default implementation which is an empty body for device
+ without attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Paragraph
+Contents
+\end_layout
+
+\begin_layout Standard
+The contents of this class can be summarize as :
+\end_layout
+
+\begin_layout Itemize
+The 
+\emph on
+command_handler
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-handler
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method
+\end_layout
+
+\begin_layout Itemize
+Methods to access data members.
+\end_layout
+
+\begin_layout Itemize
+Signal
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+signal
+\end_layout
+
+\end_inset
+
+ related method (C++ specific)
+\end_layout
+
+\begin_layout Itemize
+Class constructor.
+ It is protected to implements the Singleton pattern
+\end_layout
+
+\begin_layout Itemize
+Class data members like the class command list, the device list...
+\end_layout
+
+\begin_layout Subsubsection
+The DbClass
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DbClass
+\end_layout
+
+\end_inset
+
+ class
+\end_layout
+
+\begin_layout Standard
+Each DeviceClass instance is an aggregate with one instance of the DbClass
+ class.
+ This DbClass class can be used to query or modify class properties
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+properties
+\end_layout
+
+\end_inset
+
+.
+ It provides an easy to use interface for device objects in the database.
+ The description of this class can be found in the Tango java or C++ API
+ documentation.
+\end_layout
+
+\begin_layout Subsubsection
+The MultiAttribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+MultiAttribute
+\end_layout
+
+\end_inset
+
+ class
+\end_layout
+
+\begin_layout Paragraph
+Description
+\end_layout
+
+\begin_layout Standard
+This class is a container for all the TANGO attributes defined for the device.
+ There is one instance of this class for each device.
+ This class is mainly an aggregate of Attribute object(s).
+ It has been developed to ease TANGO attribute management.
+\end_layout
+
+\begin_layout Paragraph
+Contents
+\end_layout
+
+\begin_layout Standard
+The class contents could be summarizes as :
+\end_layout
+
+\begin_layout Itemize
+Miscellaneous methods to retrieve one attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+ object in the aggregate
+\end_layout
+
+\begin_layout Itemize
+Method to retrieve a list of attribute with an alarm level defined
+\end_layout
+
+\begin_layout Itemize
+Get attribute number method
+\end_layout
+
+\begin_layout Itemize
+Miscellaneous methods to check if an attribute value is outside the authorized
+ limits
+\end_layout
+
+\begin_layout Itemize
+Method to add messages for all attribute with an alarm set
+\end_layout
+
+\begin_layout Itemize
+Data members with the attribute list
+\end_layout
+
+\begin_layout Subsubsection
+The Attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Attribute
+\end_layout
+
+\end_inset
+
+ class
+\end_layout
+
+\begin_layout Paragraph
+Description
+\end_layout
+
+\begin_layout Standard
+There is one object of this class for each device attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+.
+ This class is used to store all the attribute properties
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+properties
+\end_layout
+
+\end_inset
+
+, the attribute value and all the alarm
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+alarm
+\end_layout
+
+\end_inset
+
+ related data.
+ Like commands, this class also stores th attribute display type.
+ It is foreseen to be used by future Tango graphical application toolkit
+ to select if the attribute must be displayed according to the application
+ mode (every day operation or expert mode).
+\end_layout
+
+\begin_layout Paragraph
+Contents
+\end_layout
+
+\begin_layout Itemize
+Miscellaneous method to get boolean attribute information
+\end_layout
+
+\begin_layout Itemize
+Methods to access some data members
+\end_layout
+
+\begin_layout Itemize
+Methods to get/set attribute properties
+\end_layout
+
+\begin_layout Itemize
+Method to check if the attribute is in alarm condition
+\end_layout
+
+\begin_layout Itemize
+Methods related to attribute data
+\end_layout
+
+\begin_layout Itemize
+Friend function to print attribute properties
+\end_layout
+
+\begin_layout Itemize
+Data members (properties value and attribute data)
+\end_layout
+
+\begin_layout Subsubsection
+The WAttribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+WAttribute
+\end_layout
+
+\end_inset
+
+ class
+\end_layout
+
+\begin_layout Paragraph
+Description
+\end_layout
+
+\begin_layout Standard
+This class inherits from the Attribute class.
+ There is one instance of this class for each writable
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+writable
+\end_layout
+
+\end_inset
+
+ device attribute.
+ On top of all the data already managed by the Attribute class, this class
+ stores the attribute set value.
+\end_layout
+
+\begin_layout Paragraph
+Contents
+\end_layout
+
+\begin_layout Standard
+Within this class, you will mainly find methods related to attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+ set value storage and some data members.
+\end_layout
+
+\begin_layout Subsubsection
+The Attr class
+\end_layout
+
+\begin_layout Standard
+Within the TDSOM, each attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command
+\end_layout
+
+\end_inset
+
+ supported by a device is implemented by a separate class.
+ The Attr
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Attr
+\end_layout
+
+\end_inset
+
+ class is the root class for each of these classes.
+ It is used in conjonction with the Attribute and Wattribute classes to
+ implement Tango attribute behaviour.
+ It defines three methods which are the 
+\emph on
+is_allowed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-allowed
+\end_layout
+
+\end_inset
+
+, read
+\emph default
+ and 
+\emph on
+write
+\emph default
+ methods.
+ A default 
+\emph on
+is_allowed
+\emph default
+ method exists for attribute always allowed.
+ Default 
+\emph on
+read
+\emph default
+ and 
+\emph on
+write
+\emph default
+ empty methods are defined.
+ For readable attribute, it is necessary to overwrite the 
+\emph on
+read
+\emph default
+ method.
+ For writable attribute, it is necessary to overwrite the 
+\emph on
+write
+\emph default
+ method and for read and write attribute, both methods must be overwritten.
+\end_layout
+
+\begin_layout Subsubsection
+The SpectrumAttr
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SpectrumAttr
+\end_layout
+
+\end_inset
+
+ class
+\end_layout
+
+\begin_layout Standard
+This class inherits from the Attr class.
+ It is the base class for user spectrum attribute.
+ It is used in conjonction with the Attribute and WAttribute class to implement
+ Tango spectrum attribute behaviour.
+ From the Attr class, it inherits the Attr 
+\emph on
+is_allowed
+\emph default
+, 
+\emph on
+read
+\emph default
+ and 
+\emph on
+write
+\emph default
+ methods.
+\end_layout
+
+\begin_layout Subsubsection
+The ImageAttr
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ImageAttr
+\end_layout
+
+\end_inset
+
+ class
+\end_layout
+
+\begin_layout Standard
+This class inherits from the SpectrumAttr class.
+ It is the base class for user image attribute.
+ It is used in conjonction with the Attribute and WAttribute class to implement
+ Tango image attribute behaviour.
+ From the Attr class, it inherits the Attr 
+\emph on
+is_allowed
+\emph default
+, 
+\emph on
+read
+\emph default
+ and 
+\emph on
+write
+\emph default
+ methods.
+\end_layout
+
+\begin_layout Subsubsection
+The StepperMotor class
+\end_layout
+
+\begin_layout Paragraph
+Description
+\end_layout
+
+\begin_layout Standard
+This class inherits from the DeviceImpl
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceImpl
+\end_layout
+
+\end_inset
+
+ class and is the class implementing the controlled object behavior.
+ Each command will trigger a method in this class written by the device
+ server programmer and specific to the object to be controlled.
+ This class also stores all the device specific data.
+\end_layout
+
+\begin_layout Paragraph
+Definition
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+1 class StepperMotor: public Tango::DeviceImpl
+\end_layout
+
+\begin_layout LyX-Code
+2 {
+\end_layout
+
+\begin_layout LyX-Code
+3 public :
+\end_layout
+
+\begin_layout LyX-Code
+4    StepperMotor(Tango::DeviceClass *,string &);
+\end_layout
+
+\begin_layout LyX-Code
+5    StepperMotor(Tango::DeviceClass *,const char *);
+\end_layout
+
+\begin_layout LyX-Code
+6    StepperMotor(Tango::DeviceClass *,const char *,const char *);
+\end_layout
+
+\begin_layout LyX-Code
+7    ~StepperMotor() {};
+\end_layout
+
+\begin_layout LyX-Code
+8 
+\end_layout
+
+\begin_layout LyX-Code
+9    DevLong dev_read_position(DevLong);
+\end_layout
+
+\begin_layout LyX-Code
+10   DevLong dev_read_direction(DevLong);
+\end_layout
+
+\begin_layout LyX-Code
+11   bool direct_cmd_allowed(const CORBA::Any &);
+\end_layout
+
+\begin_layout LyX-Code
+12 
+\end_layout
+
+\begin_layout LyX-Code
+13   virtual Tango::DevState dev_state();
+\end_layout
+
+\begin_layout LyX-Code
+14   virtual Tango::ConstDevString dev_status();
+\end_layout
+
+\begin_layout LyX-Code
+15 
+\end_layout
+
+\begin_layout LyX-Code
+16   virtual void always_executed_hook();
+\end_layout
+
+\begin_layout LyX-Code
+17 
+\end_layout
+
+\begin_layout LyX-Code
+18   virtual void read_attr_hardware(vector<long> &attr_list);
+\end_layout
+
+\begin_layout LyX-Code
+19 
+\end_layout
+
+\begin_layout LyX-Code
+20   void read_position(Tango::Attribute &);
+\end_layout
+
+\begin_layout LyX-Code
+21   bool is_Position_allowed(Tango::AttReqType req);
+\end_layout
+
+\begin_layout LyX-Code
+22   void write_SetPosition(Tango::WAttribute &);
+\end_layout
+
+\begin_layout LyX-Code
+23   void read_Direction(Tango::Attribute &);
+\end_layout
+
+\begin_layout LyX-Code
+24 
+\end_layout
+
+\begin_layout LyX-Code
+25   virtual void init_device();
+\end_layout
+
+\begin_layout LyX-Code
+26   virtual void delete_device();
+\end_layout
+
+\begin_layout LyX-Code
+27 
+\end_layout
+
+\begin_layout LyX-Code
+28   void get_device_properties();
+\end_layout
+
+\begin_layout LyX-Code
+29 
+\end_layout
+
+\begin_layout LyX-Code
+30 protected : 
+\end_layout
+
+\begin_layout LyX-Code
+31   long axis[AGSM_MAX_MOTORS];
+\end_layout
+
+\begin_layout LyX-Code
+32   DevLong position[AGSM_MAX_MOTORS];
+\end_layout
+
+\begin_layout LyX-Code
+33   DevLong direction[AGSM_MAX_MOTORS];
+\end_layout
+
+\begin_layout LyX-Code
+34   long state[AGSM_MAX_MOTORS];
+\end_layout
+
+\begin_layout LyX-Code
+35 
+\end_layout
+
+\begin_layout LyX-Code
+36   Tango::DevLong *attr_Position_read;
+\end_layout
+
+\begin_layout LyX-Code
+37   Tango::DevLong *attr_Direction_read;
+\end_layout
+
+\begin_layout LyX-Code
+38   Tango::DevLong attr_SetPosition_write;
+\end_layout
+
+\begin_layout LyX-Code
+39 
+\end_layout
+
+\begin_layout LyX-Code
+40   Tango::DevLong min;
+\end_layout
+
+\begin_layout LyX-Code
+41   Tango::DevLong max;
+\end_layout
+
+\begin_layout LyX-Code
+42 
+\end_layout
+
+\begin_layout LyX-Code
+43   Tango::DevLong *ptr;
+\end_layout
+
+\begin_layout LyX-Code
+44 };
+\end_layout
+
+\begin_layout LyX-Code
+45 
+\end_layout
+
+\begin_layout LyX-Code
+46 } /* End of StepperMotor namespace */
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : The StepperMotor class inherits from the DeviceImpl class
+\end_layout
+
+\begin_layout Standard
+Line 4-7 : Class constructors and destructor
+\end_layout
+
+\begin_layout Standard
+Line 9 : Method triggered by the DevReadPosition command
+\end_layout
+
+\begin_layout Standard
+Line 10-11 : Methods triggered by the DevReadDirection command
+\end_layout
+
+\begin_layout Standard
+Line 13 : Redefinition of the 
+\emph on
+dev_state
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+dev-state
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method of the DeviceImpl class.
+ This method will be triggered by the State
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+State
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+Line 14 : Redefinition of the 
+\emph on
+dev_statu
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+dev-status
+\end_layout
+
+\end_inset
+
+s method of the DeviceImpl class.
+ This method will be triggered by the Status
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Status
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+Line 16 : Redefinition of the 
+\emph on
+always_executed_hook
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+always-executed-hook
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+\end_layout
+
+\begin_layout Standard
+Line 25 : Definition of the 
+\emph on
+init_device
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+init-device
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method (declared as pure virtual by the DeviceImpl class)
+\end_layout
+
+\begin_layout Standard
+Line 26 : Definition of the 
+\emph on
+delete_device
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+delet-device
+\end_layout
+
+\end_inset
+
+ method
+\end_layout
+
+\begin_layout Standard
+Line 30-44 : Device data
+\end_layout
+
+\begin_layout Subsubsection
+The StepperMotorClass class
+\end_layout
+
+\begin_layout Paragraph
+Description
+\end_layout
+
+\begin_layout Standard
+This class inherits from the DeviceClass
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceClass
+\end_layout
+
+\end_inset
+
+ class.
+ Like the DeviceClass class, there should be only one instance of the StepperMot
+orClass.
+ This is ensured because this class is written following the Singleton
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+singleton
+\end_layout
+
+\end_inset
+
+ pattern as defined in 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Patterns"
+
+\end_inset
+
+.
+ All controlled object class data which should be defined only once per
+ class must be stored in this object.
+\end_layout
+
+\begin_layout Paragraph
+Definition 
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+input{line.tex}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  class StepperMotorClass : public DeviceClass
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+3  public:
+\end_layout
+
+\begin_layout Standard
+     4          static StepperMotorClass *init(const char *);
+\end_layout
+
+\begin_layout Standard
+     5          static StepperMotorClass *instance();
+\end_layout
+
+\begin_layout Standard
+     6          ~StepperMotorClass() {_instance = NULL;}
+\end_layout
+
+\begin_layout Standard
+     7          
+\end_layout
+
+\begin_layout Standard
+     8  protected:
+\end_layout
+
+\begin_layout Standard
+     9          StepperMotorClass(string &);
+\end_layout
+
+\begin_layout Standard
+    10          static StepperMotorClass *_instance;
+\end_layout
+
+\begin_layout Standard
+    11          void command_factory();
+\end_layout
+
+\begin_layout Standard
+    12          
+\end_layout
+
+\begin_layout Standard
+    13  private:
+\end_layout
+
+\begin_layout Standard
+    14          void device_factory(Tango_DevVarStringArray *);
+\end_layout
+
+\begin_layout Standard
+    15  };
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+input{line.tex}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : This class is a sub-class of the DeviceClass class
+\end_layout
+
+\begin_layout Standard
+Line 4-5 and 9-10: Methods and data member necessary for the Singleton
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+singleton
+\end_layout
+
+\end_inset
+
+ pattern
+\end_layout
+
+\begin_layout Standard
+Line 6 : Class destructor
+\end_layout
+
+\begin_layout Standard
+Line 11 : Definition of the 
+\emph on
+command_factor
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-factory
+\end_layout
+
+\end_inset
+
+y
+\emph default
+ method declared as pure virtual in the DeviceClass call
+\end_layout
+
+\begin_layout Standard
+Line 13-14 : Definition of the 
+\emph on
+device_factory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+device-factory
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method declared as pure virtual in the DeviceClass class
+\end_layout
+
+\begin_layout Subsubsection
+The DevReadPosition class
+\end_layout
+
+\begin_layout Paragraph
+Description
+\end_layout
+
+\begin_layout Standard
+This is the class for the DevReadPosition command.
+ This class implements the 
+\emph on
+execute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+execute
+\end_layout
+
+\end_inset
+
+
+\emph default
+ and 
+\emph on
+is_allowed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-allowed
+\end_layout
+
+\end_inset
+
+
+\emph default
+ methods defined by the Command
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Command
+\end_layout
+
+\end_inset
+
+ class.
+ This class is necessary because this command is implemented using the inheritan
+ce
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+inheritance
+\end_layout
+
+\end_inset
+
+ model.
+\end_layout
+
+\begin_layout Paragraph
+Definition
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  class DevReadPositionCmd : public Command
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3  public:
+\end_layout
+
+\begin_layout Standard
+     4          DevReadPositionCmd(const char *,Tango_CmdArgType, Tango_CmdArgTy
+pe, const char *, const char*);
+\end_layout
+
+\begin_layout Standard
+     5          ~DevReadPositionCmd() {};
+\end_layout
+
+\begin_layout Standard
+     6          
+\end_layout
+
+\begin_layout Standard
+     7          virtual bool is_allowed (DeviceImpl *, const CORBA::Any
+ &);
+\end_layout
+
+\begin_layout Standard
+     8          virtual CORBA::Any *execute (DeviceImpl *, const CORBA::Any
+ &);
+\end_layout
+
+\begin_layout Standard
+     9  };
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : The class is a sub class of the Command class
+\end_layout
+
+\begin_layout Standard
+Line 4-5 : Class constructor and destructor
+\end_layout
+
+\begin_layout Standard
+Line 7-8 : Definition of the 
+\emph on
+is_allowed
+\emph default
+ and 
+\emph on
+execute
+\emph default
+ method declared as pure virtual in the Command class.
+\end_layout
+
+\begin_layout Subsubsection
+The PositionAttr class
+\end_layout
+
+\begin_layout Paragraph
+Description
+\end_layout
+
+\begin_layout Standard
+This is the class for the Position attribute.
+ This attribute is a scalar attribute and therefore inherits from the Attr
+ base class.
+ This class implements the 
+\emph on
+read
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+execute
+\end_layout
+
+\end_inset
+
+
+\emph default
+ and 
+\emph on
+is_allowed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-allowed
+\end_layout
+
+\end_inset
+
+
+\emph default
+ methods defined by the Attr
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Command
+\end_layout
+
+\end_inset
+
+ class.
+\end_layout
+
+\begin_layout Paragraph
+Definition
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  class PositionAttr: public Tango::Attr
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3  public:
+\end_layout
+
+\begin_layout Standard
+     4          PositionAttr():Attr("Position",Tango::DEV_LONG,Tango::READ);
+\end_layout
+
+\begin_layout Standard
+     5          ~PositionAttr() {};
+\end_layout
+
+\begin_layout Standard
+     6          
+\end_layout
+
+\begin_layout Standard
+     7          virtual void read(Tango::DeviceImpl *dev,Tango::Attribute
+ &att)
+\end_layout
+
+\begin_layout Standard
+     8          {(static_cast<StepperMotor *>(dev))->read_Position(att);}
+\end_layout
+
+\begin_layout Standard
+     9          virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType
+ ty)
+\end_layout
+
+\begin_layout Standard
+    10          {return (static_cast<StepperMotor *>(dev))->is_Position_allowed(
+ty);}
+\end_layout
+
+\begin_layout Standard
+    11  };
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : The class is a sub class of the Attr class
+\end_layout
+
+\begin_layout Standard
+Line 4-5 : Class constructor and destructor
+\end_layout
+
+\begin_layout Standard
+Line 7 : Re-definition of the 
+\emph on
+read
+\emph default
+ method defined in the Attr class.
+ This is simply a "forward" to the 
+\emph on
+read_Position
+\emph default
+ method of the StepperMotor class
+\end_layout
+
+\begin_layout Standard
+Line 9 : Re-definition of the 
+\emph on
+is_allowed
+\emph default
+ method defined in the Attr class.
+ This is also a "forward" to the 
+\emph on
+is_Position_allowed
+\emph default
+ method of the StepperMotor class
+\end_layout
+
+\begin_layout Subsection
+Startup of a device pattern
+\begin_inset CommandInset label
+LatexCommand label
+name "Pattern startup"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+To start the device pattern implementation for stepper motor device, four
+ methods of the StepperMotorClass class must be executed.
+ These methods are :
+\end_layout
+
+\begin_layout Enumerate
+The creation of the StepperMethodClass singleton
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+singleton
+\end_layout
+
+\end_inset
+
+ via its 
+\emph on
+init
+\emph default
+() method
+\end_layout
+
+\begin_layout Enumerate
+The 
+\emph on
+command_factory
+\emph default
+()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-factory
+\end_layout
+
+\end_inset
+
+ method of the StepperMotorClass class
+\end_layout
+
+\begin_layout Enumerate
+The 
+\emph on
+attribute_factory
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute-factory
+\end_layout
+
+\end_inset
+
+() method of the StepperMotorClass class.
+ This method has a default empty body for device class without attributes.
+\end_layout
+
+\begin_layout Enumerate
+The 
+\emph on
+device_factory
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+device-factory
+\end_layout
+
+\end_inset
+
+() method of the StepperMotorClass class
+\end_layout
+
+\begin_layout Standard
+This startup procedure is described in figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "pattern_startup_fig"
+
+\end_inset
+
+
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename startup.eps
+	width 14cm
+	height 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Device pattern startup sequence
+\begin_inset CommandInset label
+LatexCommand label
+name "pattern_startup_fig"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+ .
+ The creation of the StepperMotorClass will automatically create an instance
+ of the DeviceClass class.
+ The constructor of the DeviceClass
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceClass
+\end_layout
+
+\end_inset
+
+ class will create the Status
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Status
+\end_layout
+
+\end_inset
+
+, State
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+State
+\end_layout
+
+\end_inset
+
+ and Init
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Init
+\end_layout
+
+\end_inset
+
+ command objects and store them in its command list.
+\end_layout
+
+\begin_layout Standard
+The 
+\emph on
+command_factory
+\emph default
+() method will simply create all the user defined commands and add them
+ in the command list.
+\end_layout
+
+\begin_layout Standard
+The 
+\emph on
+attribute_factory
+\emph default
+() method will simply build a list of device attribute names.
+\end_layout
+
+\begin_layout Standard
+The 
+\emph on
+device_factory
+\emph default
+() method will create each StepperMotor object and store them in the StepperMoto
+rClass instance device list.
+ The list of devices to be created and their names is passed to the 
+\emph on
+device_factory
+\emph default
+ method in its input argument.
+ StepperMotor is a sub-class of DeviceImpl class.
+ Therefore, when a StepperMotor object is created, a DeviceImpl object is
+ also created.
+ The DeviceImpl constructor builds all the device attribute object(s) from
+ the attribute list built by the 
+\emph on
+attribute_factory()
+\emph default
+ method.
+\end_layout
+
+\begin_layout Subsection
+Command execution sequence
+\end_layout
+
+\begin_layout Standard
+The figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "command_timing_fig"
+
+\end_inset
+
+
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename command.eps
+	width 14cm
+	height 8cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Command execution timing
+\begin_inset CommandInset label
+LatexCommand label
+name "command_timing_fig"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+ described how the method implementing a command is executed when a command_inou
+t
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-inout
+\end_layout
+
+\end_inset
+
+ CORBA operation is requested by a client.
+ The 
+\emph on
+command_inout
+\emph default
+ method of the StepperMotor object (inherited from the DeviceImpl class)
+ is triggered by an instance of a class generated by the CORBA
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CORBA
+\end_layout
+
+\end_inset
+
+ IDL compiler.
+ This method calls the 
+\emph on
+command_handler
+\emph default
+()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-handler
+\end_layout
+
+\end_inset
+
+ method of the StepperMotorClass object (inherited from the DeviceClass
+ class).
+ The 
+\emph on
+command_handler
+\emph default
+ method searches in its command
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command
+\end_layout
+
+\end_inset
+
+ list for the wanted command (using its name).
+ If the command is found, the 
+\emph on
+always_executed_hook
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+always-executed-hook
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method of the StepperMotor object is called.
+ Then, the 
+\emph on
+is_allowed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-allowed
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method of the wanted command is executed.
+ If the 
+\emph on
+is_allowed
+\emph default
+ method returns correctly, the 
+\emph on
+execute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+execute
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method is executed.
+ The 
+\emph on
+execute
+\emph default
+ method extracts the incoming data from the CORBA object use to transmit
+ data over the network and calls the user written method which implements
+ the command.
+\end_layout
+
+\begin_layout Subsection
+The automatically added commands
+\begin_inset CommandInset label
+LatexCommand label
+name "Auto_cmd"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In order to increase the common behavior of every kind of devices in a TANGO
+ control system, three commands are automatically added to each class of
+ devices.
+ These commands are :
+\end_layout
+
+\begin_layout Itemize
+State
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+State
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Status
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Status
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Init
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Init
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The default behavior of the method called by the State command depends on
+ the device state.
+ If the device state is ON or ALARM
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ALARM
+\end_layout
+
+\end_inset
+
+, the method will :
+\end_layout
+
+\begin_layout Itemize
+read the attribute(s) with an alarm
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+alarm
+\end_layout
+
+\end_inset
+
+ level defined
+\end_layout
+
+\begin_layout Itemize
+check if the read value is above/below the alarm level and eventually change
+ the device state to ALARM.
+\end_layout
+
+\begin_layout Itemize
+returns the device state.
+\end_layout
+
+\begin_layout Standard
+For all the other device state
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+state
+\end_layout
+
+\end_inset
+
+, the method simply returns the device state stored in the DeviceImpl class.
+ Nevertheless, the method used to return this state (called 
+\emph on
+dev_state
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+state
+\end_layout
+
+\end_inset
+
+) is defined as virtual and can be redefined in DeviceImpl sub-class.
+ The difference between the default State command and the state CORBA attribute
+ is the ability of the State
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+State
+\end_layout
+
+\end_inset
+
+ command to signal an error to the caller by throwing an exception.
+\end_layout
+
+\begin_layout Standard
+The default behavior of the method called by the Status
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Status
+\end_layout
+
+\end_inset
+
+ command depends on the device state.
+ If the device state is ON or ALARM
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ALARM
+\end_layout
+
+\end_inset
+
+, the method returns the device status stored in the DeviceImpl class plus
+ additional message(s) for all the attributes which are in alarm condition.
+ For all the other device state, the method simply returns the device status
+ as it is stored in the DeviceImpl class.
+ Nevertheless, the method used to return this status (called 
+\emph on
+dev_status
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+status
+\end_layout
+
+\end_inset
+
+) is defined as virtual and can be redefined in DeviceImpl sub-class.
+ The difference between the default Status command and the status CORBA
+ attribute is the ability of the Status command to signal an error to the
+ caller by throwing an exception.
+\end_layout
+
+\begin_layout Standard
+The Init
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Init
+\end_layout
+
+\end_inset
+
+ command is used to re-initialize a device without changing its network
+ connection.
+ This command calls the device 
+\emph on
+delete_device
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+delete-device
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method and the device 
+\emph on
+init_device
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+init-device
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ The rule of the 
+\emph on
+delete_device
+\emph default
+ method is to free memory allocated in the 
+\emph on
+init_device
+\emph default
+ method in order to avoid memory leak.
+\end_layout
+
+\begin_layout Subsection
+Reading/Writing attributes
+\end_layout
+
+\begin_layout Subsubsection
+Reading attributes
+\end_layout
+
+\begin_layout Standard
+A Tango client is able to read Tango attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+(s) with the CORBA read_attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attributes
+\end_layout
+
+\end_inset
+
+ call.
+ Inside the device server, this call will trigger several methods of the
+ device class (StepperMotor in our example) :
+\end_layout
+
+\begin_layout Enumerate
+The 
+\emph on
+always_executed_hook()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+allways-executed-hook
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ 
+\end_layout
+
+\begin_layout Enumerate
+A method call 
+\emph on
+read_attr_hardware()
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attr-hardware
+\end_layout
+
+\end_inset
+
+.
+ This method is called one time per read_attributes CORBA call.
+ The aim of this method is to read the device hardware and to store the
+ result in a device class data member.
+\end_layout
+
+\begin_layout Enumerate
+For each attribute to be read
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+A method called 
+\emph on
+is_<att name>_allowed()
+\emph default
+.
+ The rule of this method is to allow (or disallow) the next method to be
+ executed.
+ It is usefull for device with some attributes which can be read only in
+ some precise conditions.
+ It has one parameter which is the request type (read or write)
+\end_layout
+
+\begin_layout Enumerate
+A method called 
+\emph on
+read_<att name>()
+\emph default
+.
+ The aim of this method is to extract the real attribute value from the
+ hardware read-out and to store the attribute value into the attribute object.
+ It has one parameter which is a reference to the Attribute object to be
+ read.
+\end_layout
+
+\end_deeper
+\begin_layout Standard
+The figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "r_attribute_timing_fig"
+
+\end_inset
+
+ is a drawing of these method calls sequencing.
+ For attribute always readable, a default 
+\emph on
+is_allowed
+\emph default
+ method is provided.
+ This method always returns true.
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename r_attribute.eps
+	scale 70
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Read attribute sequencing
+\begin_inset CommandInset label
+LatexCommand label
+name "r_attribute_timing_fig"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Writing attributes
+\end_layout
+
+\begin_layout Standard
+A Tango client is able to write Tango attribute(s) with the CORBA write_attribut
+es
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+write-attributes
+\end_layout
+
+\end_inset
+
+ call.
+ Inside a device server, this call will trigger several methods of the device
+ class (StepperMotor in our example)
+\end_layout
+
+\begin_layout Enumerate
+The 
+\emph on
+always_executed_hook()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+allways-executed-hook
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ 
+\end_layout
+
+\begin_layout Enumerate
+For each attribute to be written
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+A method called 
+\emph on
+is_<att name>_allowed()
+\emph default
+.
+ The rule of this method is to allow (or disallow) the next method to be
+ executed.
+ It is usefull for device with some attributes which can be written only
+ in some precise conditions.
+ It has one parameter which is the request type (read or write)
+\end_layout
+
+\begin_layout Enumerate
+A method called 
+\emph on
+write_<att name>()
+\emph default
+.
+ It has one parameter which is a reference to the WAttribute object to be
+ written.
+ The aim of this method is to get the data to be written from the WAttribute
+ object and to write this value into the corresponding hardware.
+\end_layout
+
+\end_deeper
+\begin_layout Standard
+The figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "w_attribute_timing_fig"
+
+\end_inset
+
+ is a drawing of these method calls sequencing.
+ For attribute always writeable, a default is_allowed method is provided.
+ This method always allways returns true.
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename w_attribute.eps
+	scale 70
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Write attribute sequencing
+\begin_inset CommandInset label
+LatexCommand label
+name "w_attribute_timing_fig"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+The device server framework
+\end_layout
+
+\begin_layout Subsubsection
+Vocabulary
+\begin_inset CommandInset label
+LatexCommand label
+name "Voc"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+A device server
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+server
+\end_layout
+
+\end_inset
+
+ pattern implementation is embedded in a process called a 
+\series bold
+device server
+\series default
+.
+ Several instances of the same device server process can be used in a TANGO
+ control system.
+ To identify instances, a device server process is started with an 
+\series bold
+instance name
+\series default
+ which is different for each instance.
+ The device server name is the couple device server executable
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+executable
+\end_layout
+
+\end_inset
+
+ name/device server instance
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+instance
+\end_layout
+
+\end_inset
+
+ name.
+ For instance, a device server started with the following command 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+Perkin id11
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+ starts a device server process with an instance name id11, an executable
+ name Perkin and a device server name Perkin/id11.
+\end_layout
+
+\begin_layout Subsubsection
+The DServer class
+\begin_inset CommandInset label
+LatexCommand label
+name "DServer_class"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In order to simplify device server process administration, a device of the
+ DServer
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DServer
+\end_layout
+
+\end_inset
+
+ class is automatically added to each device server process.
+ Thus, every device server process supports the same set of administration
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+administration
+\end_layout
+
+\end_inset
+
+ commands.
+ The implementation of this DServer class follows the device pattern and
+ therefore, its device behaves like any other devices.
+ The device name is 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+dserver/device server executable name/device server instance name
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+For instance, for the device server process described in chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Voc"
+
+\end_inset
+
+, the dserver device name is dserver/perkin/id11.
+ This name is returned by the adm_name
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+adm-name
+\end_layout
+
+\end_inset
+
+ CORBA attribute available for every device.
+ On top of the three automatically added commands, this device supports
+ the following commands :
+\end_layout
+
+\begin_layout Itemize
+DevRestart
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevRestart
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+RestartServer
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+RestartServer
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+QueryClass
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+QueryClass
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+QueryDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+QueryDevice
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Kill
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Kill
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+SetTraceLevel (Java server only)
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SetTraceLevel
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+GetTraceLevel (Java server only)
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GetTraceLevel
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+SetTraceOutput (Java server only)
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SetTraceOutput
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+GetTraceOutput (Java server only)
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GetTraceOutput
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+AddLoggingTarget (C++ server only)
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AddLoggingTarget
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+RemoveLoggingTarget (C++ server only)
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+RemoveLoggingTarget
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+GetLoggingTarget (C++ server only)
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GetLoggingTarget
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+GetLoggingLevel (C++ server only)
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GetLoggingLevel
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+SetLoggingLevel (C++ server only)
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SetLoggingLevel
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+StopLogging (C++ server only)
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+StopLogging
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+StartLogging (C++ server only)
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+StartLogging
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+PolledDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+PolledDevice
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+DevPollStatus
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevPollStatus
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+AddObjPolling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AddObjPolling
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+RemObjPolling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+RemObjPolling
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+UpdObjPollingPeriod
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+UpdObjPollingPeriod
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+StartPolling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+StartPolling
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+StopPolling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+StopPolling
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+EventSubscriptionChange
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+EventSubscriptionChange
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+LockDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+LockDevice
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+UnLockDevice
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+UnLockDevice
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+ReLockDevices
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ReLockDevices
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+DevLockStatus
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevLockStatus
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+These commands will be fully described later in this document.
+\end_layout
+
+\begin_layout Standard
+Several controlled object classes can be embedded within the same device
+ server process and it is the rule of this device to create all these device
+ server patterns and to call their command and device factories as described
+ in 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Pattern startup"
+
+\end_inset
+
+.
+ The name and number of all the classes to be created is known to this device
+ after the execution of a method called 
+\emph on
+class_factory
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+class-factory
+\end_layout
+
+\end_inset
+
+.
+ With C++, it is the user responsibility to write this method.
+ Using Java, this method is already written and automatically retrieves
+ which classes must be created and creates them.
+\end_layout
+
+\begin_layout Subsubsection
+The Tango::Util
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Util
+\end_layout
+
+\end_inset
+
+ class
+\end_layout
+
+\begin_layout Paragraph
+Description
+\end_layout
+
+\begin_layout Standard
+This class merges a complete set of utilities in the same class.
+ It is implemented as a singleton
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+singleton
+\end_layout
+
+\end_inset
+
+ and there is only one instance of this class per device server process.
+ It is mandatory to create this instance in order to run a device server.
+ The description of all the methods implemented in this class can be found
+ in 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Paragraph
+Contents
+\end_layout
+
+\begin_layout Standard
+Within this class, you can find :
+\end_layout
+
+\begin_layout Itemize
+Static method to create/retrieve the singleton object
+\end_layout
+
+\begin_layout Itemize
+Miscellaneous utility methods like getting the server output trace level,
+ getting the CORBA
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CORBA
+\end_layout
+
+\end_inset
+
+ ORB pointer, retrieving device server instance name, getting the server
+ PID and more.
+ Please, refer to 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+ to get a complete list of all these utility methods.
+\end_layout
+
+\begin_layout Itemize
+Method to create the device pattern implementing the DServer class (
+\emph on
+server_init()
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+server-init
+\end_layout
+
+\end_inset
+
+)
+\end_layout
+
+\begin_layout Itemize
+Method to start the server (
+\emph on
+server_run()
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+server-run
+\end_layout
+
+\end_inset
+
+)
+\end_layout
+
+\begin_layout Itemize
+TANGO database related methods
+\end_layout
+
+\begin_layout Subsubsection
+A complete device server
+\end_layout
+
+\begin_layout Standard
+Within a complete device server, at least two implementations of the device
+ server pattern are created (one for the dserver object and the other for
+ the class of devices to control).
+ On top of that, one instance of the Tango::Util
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Util
+\end_layout
+
+\end_inset
+
+ class must also be created.
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename complete_server.eps
+	width 14cm
+	height 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+A complete device server
+\begin_inset CommandInset label
+LatexCommand label
+name "completeDS"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+ A drawing of a complete device server is in figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "completeDS"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Device server startup sequence
+\begin_inset CommandInset label
+LatexCommand label
+name "Server_startup"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The device server startup sequence is the following :
+\end_layout
+
+\begin_layout Enumerate
+Create an instance of the Tango::Util class.
+ This will initialize the CORBA Object Request Broker
+\end_layout
+
+\begin_layout Enumerate
+Called the 
+\emph on
+server_init
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+init
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method of the Tango::Util instance The call to this method will :
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+Create the DServerClass object of the device pattern implementing the DServer
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DServer
+\end_layout
+
+\end_inset
+
+ class.
+ This will create the dserver object which during its construction will
+ :
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+Called the 
+\emph on
+class_factory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+class-factory
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method of the DServer object.
+ This method must create all the xxxClass instance for all the device pattern
+ implementation embedded in the device server process.
+\end_layout
+
+\begin_layout Enumerate
+Call the 
+\emph on
+command_factory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-factory
+\end_layout
+
+\end_inset
+
+
+\emph default
+ and 
+\emph on
+device_factory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+device-factory
+\end_layout
+
+\end_inset
+
+
+\emph default
+ of all the classes previously created.
+ The list of devices passed to each call to the 
+\emph on
+device_factory
+\emph default
+ method is retrieved from the TANGO database.
+\end_layout
+
+\end_deeper
+\end_deeper
+\begin_layout Enumerate
+Wait for incoming request with the 
+\emph on
+server_run()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+server-run
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method of the Tango::Util class.
+\end_layout
+
+\begin_layout Section
+Exchanging data between client and server
+\begin_inset CommandInset label
+LatexCommand label
+name "Data exchange"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Exchanging data between clients and server means most of the time passing
+ data between processes running on different computer using the network.
+ Tango limits the type of data exchanged between client and server and defines
+ a way to exchange these data.
+ This chapter details these features.
+ Memory allocation and error reporting are also discussed.
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+All the rules described in this chapter are valid only for data exchanged
+ between client and server.
+ For device server internal data, classical C++ or Java types can be use.
+\end_layout
+
+\begin_layout Subsection
+Command / Attribute data types
+\end_layout
+
+\begin_layout Standard
+Commands have a fixed calling syntax - consisting of one input argument
+ and one output argument.
+ Arguments type must be chosen out of a fixed set of 19 data types.
+ The following table details type name, code and the corresponding CORBA
+ IDL types.
+\end_layout
+
+\begin_layout Standard
+The type name used in the type name column of this table is the C++ name.
+ In the IDL file, all the Tango definition are grouped in a IDL
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+IDL
+\end_layout
+
+\end_inset
+
+ module named Tango.
+ The IDL module maps to C++ namespace
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+namespace
+\end_layout
+
+\end_inset
+
+.
+ Therefore, all the data type are parts of a namespace called Tango.
+ For Java, the IDL module maps to Java package
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+package
+\end_layout
+
+\end_inset
+
+ and name are not changed related to the IDL file.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="25" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="left" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Type name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+IDL type
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevBoolean
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+boolean
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevShort
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+short
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevLong
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+long
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevLong64
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+long long
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevFloat
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+float
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevDouble
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevUShort
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned short
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevULong
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned long
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevULong64
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned long long
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevString
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+string
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarCharArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of unsigned char
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarShortArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of short
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarLongArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of long
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarLong64Array
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of long long
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarFloatArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of float
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarDoubleArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of double
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarUShortArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of unsigned short
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarULongArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of unsigned long
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarULong64Array
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of unsigned long long
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of string
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarLongStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+structure with a sequence of long and a sequence of string
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevVarDoubleStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+structure with a sequence of double and a sequence of string
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevState
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+enumeration
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevEncoded
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+structure with a string and a sequence of char
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The CORBA Interface Definition Language uses a type called 
+\series bold
+sequence
+\series default
+ for variable length array.
+ This sequence
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+sequence
+\end_layout
+
+\end_inset
+
+ type is mapped differently according to the language used (C++ or Java).
+ The Tango::DevUxxx types are used for unsigned types.
+ The Tango::DevVarxxxxArray must be used when the data to be transferred
+ are variable length array.
+ The Tango::DevVarLongStringArray
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevVarLongStringArray
+\end_layout
+
+\end_inset
+
+ and Tango::DevVarDoubleStringArray
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevVarDoubleStringArray
+\end_layout
+
+\end_inset
+
+ are structures with two fields which are variable length array of Tango
+ long (32 bits) and variable length array of strings for the Tango::DevVarLongSt
+ringArray and variable length array of double and variable length array
+ of string for the Tango::DevVarDoubleStringArray.
+ The Tango::State
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevState
+\end_layout
+
+\end_inset
+
+ type is used by the State
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+State
+\end_layout
+
+\end_inset
+
+ command to return the device state.
+ 
+\end_layout
+
+\begin_layout Subsubsection
+Using command data types with C++
+\end_layout
+
+\begin_layout Standard
+Unfortunately, the mapping between IDL and C++ was defined before the C++
+ class library had been standardized.
+ This explains why the standard C++ string class or vector classes are not
+ used in the IDL to C++ mapping.
+\end_layout
+
+\begin_layout Standard
+TANGO commands argument types can be grouped on five groups depending on
+ the IDL data type used.
+ These groups are :
+\end_layout
+
+\begin_layout Enumerate
+Data type using basic types (Tango::DevBoolean, Tango::DevShort, Tango::DevLong,
+ Tango::DevFloat, Tango::DevDouble, Tango::DevUshort and Tango::DevULong)
+\end_layout
+
+\begin_layout Enumerate
+Data type using strings (Tango::DevString type)
+\end_layout
+
+\begin_layout Enumerate
+Data types using sequences
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+sequence
+\end_layout
+
+\end_inset
+
+ (Tango::DevVarxxxArray types except Tango::DevVarLongStringArray and Tango::Dev
+VarDoubleStringArray)
+\end_layout
+
+\begin_layout Enumerate
+Data types using structures (Tango::DevVarLongStringArray and Tango::DevVarDoubl
+eStringArray types)
+\end_layout
+
+\begin_layout Enumerate
+Data type using enumeration (Tango::DevState type)
+\end_layout
+
+\begin_layout Standard
+In the following sub chapters, only summaries of the IDL to C++ mapping
+ are given.
+ For a full description of the C++ mapping, please refer to 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Henning"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Paragraph
+Basic types
+\end_layout
+
+\begin_layout Standard
+For these types, the mapping between IDL and C++ is obvious and defined
+ in the following table.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="10" columns="4">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango type name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+IDL type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+C++
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+typedef
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevBoolean
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+boolean
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CORBA::Boolean
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned char
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevShort
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+short
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CORBA::Short
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+short
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevLong
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+long
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CORBA::Long
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+int
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevLong64
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+long long
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CORBA::LongLong
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+long long or long (64 bits chip)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevFloat
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+float
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CORBA::Float
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+float
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevDouble
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CORBA::Double
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevUShort
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned short
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CORBA::UShort
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned short
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevULong
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned long
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CORBA::ULong
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned long
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango::DevULong64
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned long long
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CORBA:ULongLong
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned long long or unsigned long (64 bits chip)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The types defined in the column named C++ should be used for a better portabilit
+y.
+ All these types are defined in the CORBA namespace and therefore their
+ qualified names is CORBA::xxx.
+\end_layout
+
+\begin_layout Paragraph
+Strings
+\end_layout
+
+\begin_layout Standard
+Strings are mapped to 
+\series bold
+char *
+\series default
+.
+ The use of 
+\emph on
+new
+\emph default
+ and 
+\emph on
+delete
+\emph default
+ for dynamic allocation of strings is not portable.
+ Instead, you must use helper functions defined by CORBA (in the CORBA namespace
+).
+ These functions are :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+        char *CORBA::string_alloc(unsigned long len);
+\end_layout
+
+\begin_layout Standard
+        char *CORBA::string_dup(const char *);
+\end_layout
+
+\begin_layout Standard
+        void CORBA::string_free(char *);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+These functions handle dynamic memory for strings.
+ The 
+\emph on
+string_alloc
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+string-alloc
+\end_layout
+
+\end_inset
+
+
+\emph default
+ function allocates one more byte than requested by the len parameter (for
+ the trailing 0).
+ The function 
+\emph on
+string_dup
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+string-dup
+\end_layout
+
+\end_inset
+
+
+\emph default
+ combines the allocation and copy.
+ Both 
+\emph on
+string_alloc
+\emph default
+ and 
+\emph on
+string_dup
+\emph default
+ return a null pointer if allocation fails.
+ The 
+\emph on
+string_free
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+string-free
+\end_layout
+
+\end_inset
+
+
+\emph default
+ function must be used to free memory allocated with 
+\emph on
+string_alloc
+\emph default
+ and 
+\emph on
+string_dup
+\emph default
+.
+ Calling 
+\emph on
+string_free
+\emph default
+ for a null pointer is safe and does nothing.
+ The following code fragment is an example of the Tango::DevString
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevString
+\end_layout
+
+\end_inset
+
+ type usage
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1     Tango::DevString str = CORBA::string_alloc(5);
+\end_layout
+
+\begin_layout Standard
+     2     strcpy(str,"TANGO");
+\end_layout
+
+\begin_layout Standard
+     3  
+\end_layout
+
+\begin_layout Standard
+     4     Tango::DevString str1 = CORBA::string_dup("Do you want to danse
+ TANGO?");
+\end_layout
+
+\begin_layout Standard
+     5  
+\end_layout
+
+\begin_layout Standard
+     6     CORBA::string_free(str);
+\end_layout
+
+\begin_layout Standard
+     7     CORBA::string_free(str1);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1-2 : TANGO is a five letters string.
+ The CORBA::string_alloc function parameter is 5 but the function allocates
+ 6 bytes
+\end_layout
+
+\begin_layout Standard
+Line 4 : Example of the CORBA::string_dup function
+\end_layout
+
+\begin_layout Standard
+Line 6-7 : Memory deallocation
+\end_layout
+
+\begin_layout Paragraph
+Sequences
+\end_layout
+
+\begin_layout Standard
+IDL sequences
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+sequence
+\end_layout
+
+\end_inset
+
+ are mapped to C++ classes that behave like vectors with a variable number
+ of elements.
+ Each IDL sequence type results in a separate C++ class.
+ Within each class representing a IDL sequence types, you find the following
+ method (only the main methods are related here) :
+\end_layout
+
+\begin_layout Enumerate
+Four constructors.
+ 
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+A default constructor which creates an empty sequence.
+\end_layout
+
+\begin_layout Enumerate
+The maximum constructor which creates a sequence with memory allocated for
+ at least the number of elements passed as argument.
+ This does not limit the number of element in the sequence but only the
+ way how memory is allocated to store element
+\end_layout
+
+\begin_layout Enumerate
+A sophisticated constructor where it is possible to assign the memory used
+ by the sequence with a preallocated buffer.
+\end_layout
+
+\begin_layout Enumerate
+A copy constructor which does a deep copy
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+An assignment operator which does a deep copy
+\end_layout
+
+\begin_layout Enumerate
+A 
+\emph on
+length
+\emph default
+ accessor which simply returns the current number of elements in the sequence
+\end_layout
+
+\begin_layout Enumerate
+A 
+\emph on
+length
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+length
+\end_layout
+
+\end_inset
+
+
+\emph default
+ modifier which changes the length of the sequence (which is different than
+ the number of elements in the sequence)
+\end_layout
+
+\begin_layout Enumerate
+Overloading of the [] operator.
+ The subscript operator [] provides access to the sequence element.
+ For a sequence containing elements of type T, the [] operator is overloaded
+ twice to return value of type T & and const T &.
+ Insertion into a sequence using the [] operator for the const T & make
+ a deep copy.
+ Sequence are numbered between 0 and 
+\emph on
+length
+\emph default
+() -1.
+\end_layout
+
+\begin_layout Standard
+Note that using the maximum constructor will not prevent you from setting
+ the length of the sequence with a call to the length modifier.
+ The following code fragment is an example of how to use a Tango::DevVarLongArra
+y
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevVarLongArray
+\end_layout
+
+\end_inset
+
+ type
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1     Tango::DevVarLongArray *mylongseq_ptr;
+\end_layout
+
+\begin_layout Standard
+     2     mylongseq_ptr = new Tango::DevVarLongArray();
+\end_layout
+
+\begin_layout Standard
+     3     mylongseq_ptr->length(4);
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5     (*mylongseq_ptr)[0] = 1;
+\end_layout
+
+\begin_layout Standard
+     6     (*mylongseq_ptr)[1] = 2;
+\end_layout
+
+\begin_layout Standard
+     7     (*mylongseq_ptr)[2] = 3;
+\end_layout
+
+\begin_layout Standard
+     8     (*mylongseq_ptr)[3] = 4;
+\end_layout
+
+\begin_layout Standard
+     9  
+\end_layout
+
+\begin_layout Standard
+    10     // (*mylongseq_ptr)[4] = 5;
+\end_layout
+
+\begin_layout Standard
+    11  
+\end_layout
+
+\begin_layout Standard
+    12     CORBA::Long nb_elt = mylongseq_ptr->length();
+\end_layout
+
+\begin_layout Standard
+    13  
+\end_layout
+
+\begin_layout Standard
+    14     mylongseq_ptr->length(5);
+\end_layout
+
+\begin_layout Standard
+    15     (*mylongseq_ptr)[4] = 5;
+\end_layout
+
+\begin_layout Standard
+    16  
+\end_layout
+
+\begin_layout Standard
+    17     for (int i = 0;i < mylongseq_ptr->length();i++)
+\end_layout
+
+\begin_layout Standard
+    18          cout << "Sequence elt " << i + 1 << " = " << (*mylongseq_ptr)[i]
+ << endl;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : Declare a pointer to Tango::DevVarLongArray type which is a sequence
+ of long
+\end_layout
+
+\begin_layout Standard
+Line 2 : Create an empty sequence
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+sequence
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 3 : Change the length
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+length
+\end_layout
+
+\end_inset
+
+ of the sequence to 4
+\end_layout
+
+\begin_layout Standard
+Line 5 - 8 : Initialize sequence elements
+\end_layout
+
+\begin_layout Standard
+Line 10 ; Oups !!! The length of the sequence is 4.
+ The behavior of this line is undefined and may be a core can be dumped
+ at run time
+\end_layout
+
+\begin_layout Standard
+Line 12 : Get the number of element actually stored in the sequence
+\end_layout
+
+\begin_layout Standard
+Line 14-15 : Grow the sequence to five elements and initialize element number
+ 5
+\end_layout
+
+\begin_layout Standard
+Line 17-18 : Print sequence element
+\end_layout
+
+\begin_layout Standard
+Another example for the Tango::DevVarStringArray
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+
+ type is given
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1     Tango::DevVarStringArray mystrseq(4);
+\end_layout
+
+\begin_layout Standard
+     2     mystrseq.length(4);
+\end_layout
+
+\begin_layout Standard
+     3  
+\end_layout
+
+\begin_layout Standard
+     4     mystrseq[0] = CORBA::string_dup("Rock and Roll");
+\end_layout
+
+\begin_layout Standard
+     5     mystrseq[1] = CORBA::string_dup("Bossa Nova");
+\end_layout
+
+\begin_layout Standard
+     6     mystrseq[2] = CORBA::string_dup(
+\begin_inset Quotes eld
+\end_inset
+
+Waltz
+\begin_inset Quotes erd
+\end_inset
+
+);
+\end_layout
+
+\begin_layout Standard
+     7     mystrseq[3] = CORBA::string_dup("Tango");
+\end_layout
+
+\begin_layout Standard
+     8  
+\end_layout
+
+\begin_layout Standard
+     9     CORBA::Long nb_elt = mystrseq.length();
+\end_layout
+
+\begin_layout Standard
+    10  
+\end_layout
+
+\begin_layout Standard
+    11     for (int i = 0;i < mystrseq.length();i++)
+\end_layout
+
+\begin_layout Standard
+    12          cout << "Sequence elt " << i + 1 << " = " << mystrseq[i]
+ << endl;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : Create a sequence using the maximum constructor
+\end_layout
+
+\begin_layout Standard
+Line 2 : Set the sequence length to 4.
+ This is mandatory even if you used the maximum constructor.
+\end_layout
+
+\begin_layout Standard
+Line 4-7 : Populate the sequence
+\end_layout
+
+\begin_layout Standard
+Line 9 : Get how many strings are stored into the sequence
+\end_layout
+
+\begin_layout Standard
+Line 11-12 : Print sequence elements.
+\end_layout
+
+\begin_layout Paragraph
+Structures
+\end_layout
+
+\begin_layout Standard
+Only three TANGO types are defined as structures.
+ These types are the Tango::DevVarLongStringArray
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevVarLongStringArray
+\end_layout
+
+\end_inset
+
+, the Tango::DevVarDoubleStringArray
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevVarDoubleStringArray
+\end_layout
+
+\end_inset
+
+ and the Tango::DevEncoded
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevEncoded
+\end_layout
+
+\end_inset
+
+ data type.
+ IDL structures map to C++ structures with corresponding members.
+ For the Tango::DevVarLongStringArray, the two members are named 
+\emph on
+svalue
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+svalue
+\end_layout
+
+\end_inset
+
+
+\emph default
+ for the sequence of strings and 
+\emph on
+lvalue
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+lvalue
+\end_layout
+
+\end_inset
+
+
+\emph default
+ for the sequence of longs.
+ For the Tango::DevVarDoubleStringArray, the two structure members are called
+ 
+\emph on
+svalue
+\emph default
+ for the sequence of strings and 
+\emph on
+dvalue
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+dvalue
+\end_layout
+
+\end_inset
+
+
+\emph default
+ for the sequence of double.
+ For the Tango::DevEncoded, the two structure members are called 
+\emph on
+encoded_format
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+encoded-format
+\end_layout
+
+\end_inset
+
+
+\emph default
+ for a string describing the data coding and 
+\emph on
+encoded_data
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+encoded-data
+\end_layout
+
+\end_inset
+
+
+\emph default
+ for the data themselves.
+ The encoded_data field type is a Tango::DevVarCharArray.
+ An example of the usage of the Tango::DevVarLongStringArray type is detailed
+ below.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1     Tango::DevVarLongStringArray my_vl;
+\end_layout
+
+\begin_layout Standard
+     2  
+\end_layout
+
+\begin_layout Standard
+     3     myvl.svalue.length(2);
+\end_layout
+
+\begin_layout Standard
+     4     myvl.svalue[0] = CORBA_string_dup("Samba");
+\end_layout
+
+\begin_layout Standard
+     5     myvl.svalue[1] = CORBA_string_dup("Rumba");
+\end_layout
+
+\begin_layout Standard
+     6  
+\end_layout
+
+\begin_layout Standard
+     7     myvl.lvalue.length(1);
+\end_layout
+
+\begin_layout Standard
+     8     myvl.lvalue[0] = 10;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : Declaration of the structure
+\end_layout
+
+\begin_layout Standard
+Line 3-5 : Initialization of two strings in the sequence of string member
+\end_layout
+
+\begin_layout Standard
+Line 7-8 : Initialization of one long in the sequence of long member
+\end_layout
+
+\begin_layout Paragraph
+Enumeration
+\end_layout
+
+\begin_layout Standard
+Only one TANGO type is an enumeration.
+ This is the Tango::DevState
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevState
+\end_layout
+
+\end_inset
+
+ type used to transfer device state between client and server.
+ IDL enumerated types map to C++ enumerations (amazing no!) with a trailing
+ dummy enumerator to force enumeration to be a 32 bit type.
+ The first enumerator will have the value 0, the next one will have the
+ value 1 and so on.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1     Tango::DevState state;
+\end_layout
+
+\begin_layout Standard
+     2  
+\end_layout
+
+\begin_layout Standard
+     3     state = Tango::ON;
+\end_layout
+
+\begin_layout Standard
+     4     state = Tango::FAULT;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Using command data types with Java
+\end_layout
+
+\begin_layout Standard
+All the rules described in this chapter are valid only for data exchanged
+ between client and server.
+ For device server internal data, classical Java types can be use.
+\end_layout
+
+\begin_layout Standard
+TANGO commands argument types can be grouped on four groups depending on
+ the IDL data type used.
+ These groups are :
+\end_layout
+
+\begin_layout Enumerate
+Data type using basic types (DevBoolean, DevShort, DevLong, DevFloat, DevDouble,
+ DevUShort, DevULong and DevString)
+\end_layout
+
+\begin_layout Enumerate
+Data types using sequences (DevVarxxxArray types except DevVarLongStringArray
+ and DevVarDoubleStringArray)
+\end_layout
+
+\begin_layout Enumerate
+Data types using structures (DevVarLongStringArray and DevVarDoubleStringArray
+ types)
+\end_layout
+
+\begin_layout Enumerate
+Data type using enumeration (DevState type)
+\end_layout
+
+\begin_layout Standard
+In the following sub chapters, only summaries of the IDL to Java mapping
+ are given.
+ For a full description of the Java mapping, please refer to 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "CORBA_norm"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Paragraph
+Basic types
+\end_layout
+
+\begin_layout Standard
+For these types, the mapping between IDL and Java is obvious and defined
+ in the following table.
+ 
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="11" columns="3">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango type name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+IDL type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Java type
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevBoolean
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+boolean
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+boolean
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevShort
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+short
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+short
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevLong
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+long
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+int
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevLong64
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+long long
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+long
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevFloat
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+float
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+float
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevDouble
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevString
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+string
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+String
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevUShort
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned short
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+short
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevULong
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned long
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+int
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevULong64
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned long long
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+long
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The Java int is a 32 bits type
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+The Java long type is a 64 bits data type
+\end_layout
+
+\end_inset
+
+ and therefore, the DevLong type maps to Java int.
+ Java does not support unsigned types, this is why the DevUShort type maps
+ to short and the DevULong type maps to int.
+ In the contrary of C++, Java does not support a preprocessor and therefore,
+ declaring a data from the DevLong type (or any other type in the previous
+ table) will result in compiler errors.
+ Instead, the Java types must be used.
+\end_layout
+
+\begin_layout Standard
+IDL string maps directly to java.lang.String class.
+\end_layout
+
+\begin_layout Paragraph
+Sequences
+\end_layout
+
+\begin_layout Standard
+IDL sequences map to Java array.
+ The following tables details the mapping used for Tango sequence types.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="11" columns="3">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango type name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+IDL type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Java type
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevVarCharArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of byte
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+byte[]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevVarShortArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of short
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+short[]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevVarLongArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of long
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+int[]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevVarLong64Array
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of long long
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+long[]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevVarFloatArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of float
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+float[]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevVarDoubleArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of double
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double[]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevVarUShortArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of unsigned short
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+short[]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevVarULongArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of unsigned long
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+int[]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevVarULong64Array
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of unsigned long long
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+long[]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevVarStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sequence of string
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+String[]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Paragraph
+Structures
+\end_layout
+
+\begin_layout Standard
+IDL structures map to a final Java class with the same name.
+ This class provides instance variables for all IDL structure fields.
+ It also provides a default constructor and a constructor from all structures
+ fields values.
+ The class name, the field name and types are summaries in the following
+ table
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="7" columns="4">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango type name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Java class name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+field name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+field Java type
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevVarLongStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevVarLongStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+lvalue
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+int[]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+svalue
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+String[]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevVarDoubleStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevVarDoubleStringArray
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+dvalue
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double[]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+svalue
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+String[]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevEncoded
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevEncoded
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+encoded_format
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+String
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+encoded_data
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+char[]
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Paragraph
+Enumeration
+\end_layout
+
+\begin_layout Standard
+Enumeration does not exist in Java.
+ An IDL enumeration is mapped to a final class with the same name as the
+ enum type.
+ This class has the following members :
+\end_layout
+
+\begin_layout Enumerate
+A 
+\emph on
+value
+\emph default
+ method which returns the value as an integer.
+\end_layout
+
+\begin_layout Enumerate
+A pair of static data members per label.
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The first one is an integer with a name equals to the label name prepended
+ with an underscore (
+\begin_inset Quotes eld
+\end_inset
+
+_
+\begin_inset Quotes erd
+\end_inset
+
+) like _ON for instance.
+\end_layout
+
+\begin_layout Enumerate
+The second one is a reference to an object of the class representing the
+ enumeration with its value set to the label value.
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+An integer conversion method called 
+\emph on
+from_int
+\emph default
+ which returns a reference to an object of the class representing the enumeratio
+n
+\end_layout
+
+\begin_layout Enumerate
+A private constructor
+\end_layout
+
+\begin_layout Standard
+The following code fragment is an example of Tango command data types usage
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1          short l = 2;
+\end_layout
+
+\begin_layout Standard
+     2  
+\end_layout
+
+\begin_layout Standard
+     3          String[] str_array = new String[2];
+\end_layout
+
+\begin_layout Standard
+     4          str_array[0] = new String("Be Bop");
+\end_layout
+
+\begin_layout Standard
+     5          str_array[1] = new String("Break dance");
+\end_layout
+
+\begin_layout Standard
+     6  
+\end_layout
+
+\begin_layout Standard
+     7          System.out.println("Elt nb in DevVarStringArray data " + str_array.
+length);
+\end_layout
+
+\begin_layout Standard
+     8          for (int i = 0;i < str_array.length;i++)
+\end_layout
+
+\begin_layout Standard
+     9                  System.out.println("Element value = " + str_array[i]);
+\end_layout
+
+\begin_layout Standard
+    10  
+\end_layout
+
+\begin_layout Standard
+    11          DevVarLongStringArray ls = new DevVarLongStringArray();
+\end_layout
+
+\begin_layout Standard
+    12          ls.lvalue = new int[1];
+\end_layout
+
+\begin_layout Standard
+    13          ls.lvalue[0] = 1;
+\end_layout
+
+\begin_layout Standard
+    14          ls.svalue = new String[2];
+\end_layout
+
+\begin_layout Standard
+    15          ls.svalue[0] = new String("Smurf");
+\end_layout
+
+\begin_layout Standard
+    16          ls.svalue[1] = new String("Pogo");
+\end_layout
+
+\begin_layout Standard
+    17  
+\end_layout
+
+\begin_layout Standard
+    18          DevState st = DevState.FAULT;
+\end_layout
+
+\begin_layout Standard
+    19          switch (st.value())
+\end_layout
+
+\begin_layout Standard
+    20          {
+\end_layout
+
+\begin_layout Standard
+    21          case DevState._ON : 
+\end_layout
+
+\begin_layout Standard
+    22                  System.out.println("The state is ON");
+\end_layout
+
+\begin_layout Standard
+    23                  st = DevState.FAULT;
+\end_layout
+
+\begin_layout Standard
+    24                  break;
+\end_layout
+
+\begin_layout Standard
+    25  
+\end_layout
+
+\begin_layout Standard
+    26          case DevState._FAULT :
+\end_layout
+
+\begin_layout Standard
+    27                  System.out.println("The state is FAULT");
+\end_layout
+
+\begin_layout Standard
+    28                  st = DevState.ON;
+\end_layout
+
+\begin_layout Standard
+    29                  break;
+\end_layout
+
+\begin_layout Standard
+    30          }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : Use of a DevShort type (pretty simple no)
+\end_layout
+
+\begin_layout Standard
+Line 3-5 : Use of a DevVarStringArray data type with 2 elements
+\end_layout
+
+\begin_layout Standard
+Line 7-9 : Print DevVarStringArray data element number and value
+\end_layout
+
+\begin_layout Standard
+Line 11-16 : Use of a DevVarLongStringArray data type
+\end_layout
+
+\begin_layout Standard
+Line 18 : Initialization of a DevState data with the FAULT state
+\end_layout
+
+\begin_layout Standard
+Line 19 : Test on the DevState data value
+\end_layout
+
+\begin_layout Standard
+Line 21 : Use the integer value associated to each enumeration label to
+ test DevState data
+\end_layout
+
+\begin_layout Standard
+Line 23 : Update DevState data value
+\end_layout
+
+\begin_layout Subsection
+Passing data between client and server
+\end_layout
+
+\begin_layout Standard
+In order to have one definition of the CORBA operation used to send a command
+ to a device whatever the command data type is, TANGO uses CORBA IDL 
+\series bold
+any
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+any
+\end_layout
+
+\end_inset
+
+
+\series default
+ object.
+ The IDL type 
+\emph on
+any
+\emph default
+ provides a universal type that can hold a value of arbitrary IDL types.
+ Type 
+\emph on
+any
+\emph default
+ therefore allows you to send and receive values whose types are not fixed
+ at compile time.
+\end_layout
+
+\begin_layout Standard
+Type 
+\emph on
+any
+\emph default
+ is often compared to a void * in C.
+ Like a pointer to void, an 
+\emph on
+any
+\emph default
+ value can denote a datum of any type.
+ However, there is an important difference; whereas a void * denotes a completel
+y untyped value that can be interpreted only with advance knowledge of its
+ type, values of type 
+\emph on
+any
+\emph default
+ maintain type safety.
+ For example, if a sender places a string value into an 
+\emph on
+any
+\emph default
+, the receiver cannot extract the string as a value of the wrong type.
+ Attempt to read the contents of an 
+\emph on
+any
+\emph default
+ as the wrong type cause a run-time error.
+\end_layout
+
+\begin_layout Standard
+Internally, a value of type 
+\emph on
+any
+\emph default
+ consists of a pair of values.
+ One member of the pair is the actual value contained inside the 
+\emph on
+any
+\emph default
+ and the other member of the pair is the type code.
+ The type code is a description of the value's type.
+ The type description is used to enforce type safety when the receiver extracts
+ the value.
+ Extraction of the value succeeds only if the receiver extracts the value
+ as a type that matches the information in the type code.
+\end_layout
+
+\begin_layout Standard
+Within TANGO, the command input and output parameters are objects of the
+ IDL 
+\emph on
+any
+\emph default
+ type.
+ Only insertion/extraction of all types defined as command data types is
+ possible into/from these 
+\emph on
+any
+\emph default
+ objects.
+\end_layout
+
+\begin_layout Subsubsection
+C++ mapping for IDL any type
+\end_layout
+
+\begin_layout Standard
+The IDL any
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+any
+\end_layout
+
+\end_inset
+
+ maps to the C++ class 
+\series bold
+CORBA::Any
+\series default
+.
+ This class contains a large number of methods with mainly methods to insert/ext
+ract data into/from the any.
+ It provides a default constructor which builds an any which contains no
+ value and a type code that indicates 
+\begin_inset Quotes eld
+\end_inset
+
+no value
+\begin_inset Quotes erd
+\end_inset
+
+.
+ Such an any must be used for command which does not need input or output
+ parameter.
+ The operator 
+\series bold
+<<=
+\series default
+ is overloaded many times to insert data into an any object.
+ The operator 
+\series bold
+>>=
+\series default
+ is overloaded many times to extract data from an any object.
+\end_layout
+
+\begin_layout Paragraph
+Inserting/Extracting TANGO basic types
+\end_layout
+
+\begin_layout Standard
+The insertion or extraction of TANGO basic types is straight forward using
+ the <<= or >>= operators.
+ Nevertheless, the Tango::DevBoolean type is mapped to a unsigned char and
+ other IDL types are also mapped to char C++ type (The unsigned is not taken
+ into account in the C++ overloading algorithm).
+ Therefore, it is not possible to use operator overloading for these IDL
+ types which map to C++ char.
+ For the Tango::DevBoolean type, you must use the 
+\emph on
+CORBA::Any::from_boolean
+\emph default
+ or 
+\emph on
+CORBA::Any::to_boolean
+\emph default
+ intermediate objects defined in the CORBA::Any class.
+\end_layout
+
+\begin_layout Paragraph
+Inserting/Extracting TANGO strings
+\end_layout
+
+\begin_layout Standard
+The <<= operator is overloaded for const char * and always makes a deep
+ copy.
+ This deep copy is done using the CORBA::
+\emph on
+string_dup
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+string-dup
+\end_layout
+
+\end_inset
+
+
+\emph default
+ function.
+ The extraction of strings uses the >>= overloaded operator.
+ The main point is that the Any
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+any
+\end_layout
+
+\end_inset
+
+ object retains ownership of the string, so the returned pointer points
+ at memory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+memory
+\end_layout
+
+\end_inset
+
+ inside the Any.
+ This means that you must not deallocate the extracted string and you must
+ treat the extracted string as read-only.
+\end_layout
+
+\begin_layout Paragraph
+Inserting/Extracting TANGO sequences
+\end_layout
+
+\begin_layout Standard
+Insertion and extraction of sequences
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+sequence
+\end_layout
+
+\end_inset
+
+ also uses the overloaded <<= and >>= operators.
+ The insertion operator is overloaded twice: once for insertion by reference
+ and once for insertion by pointer.
+ If you insert a value by reference, the insertion makes a deep copy.
+ If you insert a value by pointer, the Any
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+any
+\end_layout
+
+\end_inset
+
+ assumes the ownership of the pointed-to memory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+memory
+\end_layout
+
+\end_inset
+
+.
+ 
+\end_layout
+
+\begin_layout Standard
+Extraction is always by pointer.
+ As with strings, you must treat the extracted pointer as read-only and
+ must not deallocate it because the pointer points at memory internal to
+ the Any.
+\end_layout
+
+\begin_layout Paragraph
+Inserting/Extracting TANGO structures
+\end_layout
+
+\begin_layout Standard
+This is identical to inserting/extracting sequences.
+\end_layout
+
+\begin_layout Paragraph
+Inserting/Extracting TANGO enumeration
+\end_layout
+
+\begin_layout Standard
+This is identical to inserting/extracting basic types
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1          CORBA::Any a;
+\end_layout
+
+\begin_layout Standard
+     2          Tango::DevLong l1,l2;
+\end_layout
+
+\begin_layout Standard
+     3          l1 = 2;
+\end_layout
+
+\begin_layout Standard
+     4          a <<= l1;
+\end_layout
+
+\begin_layout Standard
+     5          a >>= l2;
+\end_layout
+
+\begin_layout Standard
+     6  
+\end_layout
+
+\begin_layout Standard
+     7          CORBA::Any b;
+\end_layout
+
+\begin_layout Standard
+     8          Tango::DevBoolean b1,b2;
+\end_layout
+
+\begin_layout Standard
+     9          b1 = true;
+\end_layout
+
+\begin_layout Standard
+    10          b <<= CORBA::Any::from_boolean(b1);
+\end_layout
+
+\begin_layout Standard
+    11          b >>= CORBA::Any::to_boolean(b2);
+\end_layout
+
+\begin_layout Standard
+    12  
+\end_layout
+
+\begin_layout Standard
+    13          CORBA::Any s;
+\end_layout
+
+\begin_layout Standard
+    14          Tango::DevString str1,str2;
+\end_layout
+
+\begin_layout Standard
+    15          str1 = "I like dancing TANGO";
+\end_layout
+
+\begin_layout Standard
+    16          s <<= str1;
+\end_layout
+
+\begin_layout Standard
+    17          s >>= str2;
+\end_layout
+
+\begin_layout Standard
+    18  
+\end_layout
+
+\begin_layout Standard
+    19  //      CORBA::string_free(str2);
+\end_layout
+
+\begin_layout Standard
+    20  //      a <<= CORBA::string_dup("Oups");
+\end_layout
+
+\begin_layout Standard
+    21  
+\end_layout
+
+\begin_layout Standard
+    22          CORBA::Any seq;
+\end_layout
+
+\begin_layout Standard
+    23          Tango::DevVarFloatArray fl_arr1;
+\end_layout
+
+\begin_layout Standard
+    24          fl_arr1.length(2);
+\end_layout
+
+\begin_layout Standard
+    25          fl_arr1[0] = 1.0;
+\end_layout
+
+\begin_layout Standard
+    26          fl_arr1[1] = 2.0;
+\end_layout
+
+\begin_layout Standard
+    27          seq <<= fl_arr1;
+\end_layout
+
+\begin_layout Standard
+    28          const Tango::DevVarFloatArray *fl_arr_ptr;
+\end_layout
+
+\begin_layout Standard
+    29          seq >>= fl_arr_ptr;
+\end_layout
+
+\begin_layout Standard
+    30  
+\end_layout
+
+\begin_layout Standard
+    31  //      delete fl_arr_ptr;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1-5 : Insertion and extraction of Tango::DevLong type
+\end_layout
+
+\begin_layout Standard
+Line 7-11 Insertion and extraction of Tango::DevBoolean type using the CORBA::An
+y::from_boolean and CORBA::Any::to_boolean intermediate structure
+\end_layout
+
+\begin_layout Standard
+Line 13-17 : Insertion and extraction of Tango::DevString type
+\end_layout
+
+\begin_layout Standard
+Line 19 : Wrong ! You should not deallocate a string extracted from an any
+\end_layout
+
+\begin_layout Standard
+Line 20 : Wrong ! Memory leak because the <<= operator will do the copy.
+ 
+\end_layout
+
+\begin_layout Standard
+Line 22-29 : Insertion and extraction of Tango::DevVarxxxArray types.
+ This is an insertion by reference and the use of the <<= operator makes
+ a deep copy of the sequence.
+ Therefore, after line 27, it is possible to deallocate the sequence
+\end_layout
+
+\begin_layout Standard
+Line 31: Wrong.! You should not deallocate a sequence extracted from an any
+\end_layout
+
+\begin_layout Subsubsection
+The insert and extract methods of the Command class
+\end_layout
+
+\begin_layout Standard
+In order to simplify the insertion/extraction into/from Any
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+any
+\end_layout
+
+\end_inset
+
+ objects, small helper methods have been written in the Command
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Command
+\end_layout
+
+\end_inset
+
+ class.
+ The signatures of these methods are :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1          void extract
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+extract
+\end_layout
+
+\end_inset
+
+(const CORBA::Any &,<Tango type> &);
+\end_layout
+
+\begin_layout Standard
+     2          CORBA::Any *insert
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+insert
+\end_layout
+
+\end_inset
+
+(<Tango type>);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+An 
+\emph on
+extract
+\emph default
+ method has been written for all Tango types.
+ These method extract the data from the Any object passed as parameter and
+ throw an exception if the Any data type is incompatible with the awaiting
+ type.
+ An 
+\emph on
+insert
+\emph default
+ method have been written for all Tango types.
+ These method create an Any object, insert the data into the Any and return
+ a pointer to the created Any.
+ For Tango types mapped to sequences or structures, two 
+\emph on
+insert
+\emph default
+ methods have been written: one for the insertion from pointer and the other
+ for the insertion from reference.
+ For Tango strings, two 
+\emph on
+insert
+\emph default
+ methods have been written: one for insertion from a classical Tango::DevString
+ type and the other from a const Tango::DevString type.
+ The first one deallocate the memory after the insert into the Any object.
+ The second one only inserts the string into the Any object.
+ 
+\end_layout
+
+\begin_layout Standard
+The previous example can be rewritten using the insert/extract helper methods
+ (We suppose that we can use the Command class insert/extract methods)
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1          Tango::DevLong l1,l2;
+\end_layout
+
+\begin_layout Standard
+     2          l1 = 2;
+\end_layout
+
+\begin_layout Standard
+     3          CORBA::Any *a_ptr = insert(l1);
+\end_layout
+
+\begin_layout Standard
+     4          extract(*a_ptr,l2);
+\end_layout
+
+\begin_layout Standard
+     5  
+\end_layout
+
+\begin_layout Standard
+     6          Tango::DevBoolean b1,b2;
+\end_layout
+
+\begin_layout Standard
+     7          b1 = true;
+\end_layout
+
+\begin_layout Standard
+     8          CORBA::Any *b_ptr = insert(b1);
+\end_layout
+
+\begin_layout Standard
+     9          extract(*b_ptr,b2);
+\end_layout
+
+\begin_layout Standard
+    10  
+\end_layout
+
+\begin_layout Standard
+    11          Tango::DevString str1,str2;
+\end_layout
+
+\begin_layout Standard
+    12          str1 = "I like dancing TANGO";
+\end_layout
+
+\begin_layout Standard
+    13          CORBA::Any *s_ptr = insert(str1);
+\end_layout
+
+\begin_layout Standard
+    14          extract(*s_ptr,str2);
+\end_layout
+
+\begin_layout Standard
+    15  
+\end_layout
+
+\begin_layout Standard
+    16          Tango::DevVarFloatArray fl_arr1;
+\end_layout
+
+\begin_layout Standard
+    17          fl_arr1.length(2);
+\end_layout
+
+\begin_layout Standard
+    18          fl_arr1[0] = 1.0;
+\end_layout
+
+\begin_layout Standard
+    19          fl_arr1[1] = 2.0;
+\end_layout
+
+\begin_layout Standard
+    20          insert(fl_arr1);
+\end_layout
+
+\begin_layout Standard
+    21          CORBA::Any *seq_ptr = insert(fl_arr1);
+\end_layout
+
+\begin_layout Standard
+    22          Tango::DevVarFloatArray *fl_arr_ptr;
+\end_layout
+
+\begin_layout Standard
+    23          extract(*seq_ptr,fl_arr_ptr);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1-4 : Insertion and extraction of Tango::DevLong type
+\end_layout
+
+\begin_layout Standard
+Line 6-9 : Insertion and extraction of Tango::DevBoolean type 
+\end_layout
+
+\begin_layout Standard
+Line 11-14 : Insertion and extraction of Tango::DevString type
+\end_layout
+
+\begin_layout Standard
+Line 16-23 : Insertion and extraction of Tango::DevVarxxxArray types.
+ This is an insertion by reference which makes a deep copy of the sequence.
+ Therefore, after line 20, it is possible to deallocate the sequence
+\end_layout
+
+\begin_layout Subsubsection
+Java mapping for IDL any type
+\end_layout
+
+\begin_layout Standard
+The IDL any maps to the Java class 
+\series bold
+org.omg.CORBA.Any
+\series default
+ .
+ This class has all the necessary methods to insert and extract instances
+ of IDL native types (short, int, float, string..).
+ The method name to insert native IDL types is 
+\emph on
+insert_<type name>
+\emph default
+ (
+\emph on
+insert_short
+\emph default
+(), 
+\emph on
+insert_float
+\emph default
+(), 
+\emph on
+insert_string
+\emph default
+()).
+ They all take a reference to the element to be inserted as argument.
+ The method name to extract basic types is 
+\emph on
+extract_<type name>
+\emph default
+ (
+\emph on
+extract_short
+\emph default
+(), 
+\emph on
+extract_floa
+\emph default
+t() or 
+\emph on
+extract_string
+\emph default
+()).
+ These extract methods do not need argument and return a reference to the
+ extracted data.
+ If the extraction operations have a mismatched type, the CORBA BAD_OPERATION
+ exception is raised.
+ An 
+\begin_inset Quotes eld
+\end_inset
+
+any
+\begin_inset Quotes erd
+\end_inset
+
+ object is constructed with the 
+\emph on
+create_any
+\emph default
+() method of the CORBA 
+\begin_inset Quotes eld
+\end_inset
+
+orb
+\begin_inset Quotes erd
+\end_inset
+
+ object.
+ This orb object represents the Object Request Broker.
+ Within a Tango device server, you can retrieve it with a method of the
+ TangoUtil class described in 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Paragraph
+Inserting/Extracting TANGO basic types and strings 
+\end_layout
+
+\begin_layout Standard
+The insertion or extraction of TANGO basic types and strings is straight
+ forward using the insert or extract methods provided by the org.omg.CORBA.Any
+ class.
+\end_layout
+
+\begin_layout Paragraph
+Inserting/Extracting TANGO sequences, structures or enumeration
+\end_layout
+
+\begin_layout Standard
+The IDL to Java compiler generates Helper classes for all types defined
+ in the IDL file.
+ The generated classes name is the name of the type followed by the suffix
+ 
+\series bold
+Helper
+\series default
+ (DevVarCharArrayHelper, DevLongHelper).
+ Classes are generated even for types which directly map to native Java
+ types.
+ Several static methods needed to manipulate the type are supplied in these
+ classes.
+ These include 
+\begin_inset Quotes eld
+\end_inset
+
+Any
+\begin_inset Quotes erd
+\end_inset
+
+ insert and extract operations for the type.
+ For a data type <typename>, the insert and extract method are :
+\end_layout
+
+\begin_layout Itemize
+public static void insert(org.omg.CORBA.Any a, <typename> t) {..}
+\end_layout
+
+\begin_layout Itemize
+public static <typename> extract(Any a) {...}
+\end_layout
+
+\begin_layout Standard
+Such classes exists for all the TANGO data types.
+ The following code fragment is an example of the insertion/extraction in/from
+ Any object with Java
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  Any a = TangoUtil.instance().get_orb().create_any();
+\end_layout
+
+\begin_layout Standard
+     2  int l1 = 1;
+\end_layout
+
+\begin_layout Standard
+     3  a.insert_long(l1);
+\end_layout
+
+\begin_layout Standard
+     4  int l2 = a.extract_long();
+\end_layout
+
+\begin_layout Standard
+     5  
+\end_layout
+
+\begin_layout Standard
+     6  DevLongHelper.insert(a,l1);
+\end_layout
+
+\begin_layout Standard
+     7  int l3 = DevLongHelper.extract(a);
+\end_layout
+
+\begin_layout Standard
+     8  
+\end_layout
+
+\begin_layout Standard
+     9  Any s = TangoUtil.instance().get_orb().create_any();
+\end_layout
+
+\begin_layout Standard
+    10  String str = new String("I like dancing TANGO");
+\end_layout
+
+\begin_layout Standard
+    11  s.insert_string(str);
+\end_layout
+
+\begin_layout Standard
+    12  String str_ex = s.extract_string();
+\end_layout
+
+\begin_layout Standard
+    13  
+\end_layout
+
+\begin_layout Standard
+    14  DevStringHelper.insert(s,str);
+\end_layout
+
+\begin_layout Standard
+    15  String str_help = DevStringHelper.extract(s);
+\end_layout
+
+\begin_layout Standard
+    16  
+\end_layout
+
+\begin_layout Standard
+    17  Any arr = TangoUtil.instance().get_orb().create_any();
+\end_layout
+
+\begin_layout Standard
+    18  int[] array = new int[2];
+\end_layout
+
+\begin_layout Standard
+    19  array[0] = 1;
+\end_layout
+
+\begin_layout Standard
+    20  array[1] = 2;
+\end_layout
+
+\begin_layout Standard
+    21  DevVarLongArrayHelper.insert(arr,array);
+\end_layout
+
+\begin_layout Standard
+    22  int[] array_ext = DevVarLongArrayhelper.extract(arr);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : Create an instance of the Any class.
+\end_layout
+
+\begin_layout Standard
+Line 3 : Insert a DevLong data into the Any object.
+ The method name is insert_long because this is a method to insert an IDL
+ long type into the object even if the IDL long type maps to an int in Java.
+\end_layout
+
+\begin_layout Standard
+Line 4 : Extract a DevLong type from the Any
+\end_layout
+
+\begin_layout Standard
+Line 6-7 : Insert or Extract DevLong data type to/from the Any object using
+ the Helper class.
+\end_layout
+
+\begin_layout Standard
+Line 9-12 : Create an Any object and a DevString data.
+ Insert and Extract this string into/from the Any using the method provided
+ by the any object
+\end_layout
+
+\begin_layout Standard
+Line 14-15 : Insert or Extract string into/from the Any using methods provided
+ by the Helper class
+\end_layout
+
+\begin_layout Standard
+Line 17-22 : The same thing for data of the DevVarLongArray type.
+ Note that DevVarLongArray is not a basic IDL type and the Any class does
+ not provide method to insert/extract data of this type into/from the Any.
+ The use of the methods provided by the Helper class is mandatory in this
+ case.
+\end_layout
+
+\begin_layout Subsubsection
+The insert and extract methods of the Command class for Java
+\end_layout
+
+\begin_layout Standard
+In order to simplify the insertion/extraction into/from Any objects, small
+ helper methods have been written in the Command class.
+ The signatures of these methods are :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1          <java type> extract_<Tango type_name>(Any);
+\end_layout
+
+\begin_layout Standard
+     2          Any insert(<Tango type>);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+An 
+\emph on
+extract
+\emph default
+ method has been written for all Tango types.
+ These method extract the data from the Any object passed as parameter and
+ throw an exception if the Any data type is incompatible with the awaiting
+ type.
+ All these 
+\emph on
+extract
+\emph default
+ methods take the same input parameter and only differ in their return type
+ which is not taken into account for method overloading.
+ Therefore, the name of the method depends on the type of the data to be
+ extracted.
+ The following is some example of these method names and signatures :
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+int extract_DevLong(Any) throws DevFailed
+\emph default
+ for the DevLong type
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+int[] extract_DevVarULongArray(Any) throws DevFailed
+\emph default
+ for DevVarULongArray type
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+String[] extract_DevVarStringArray(Any) throws DevFailed
+\emph default
+ for DevVarStringArray
+\end_layout
+
+\begin_layout Standard
+An 
+\emph on
+insert
+\emph default
+ method have been written for all Tango types.
+ These method create an Any object, insert the data into the Any and return
+ a pointer to the created Any.
+ The previous example can be rewritten using the insert/extract helper methods
+ (We suppose that we can use the Command class insert/extract methods)
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  int l1 = 1;
+\end_layout
+
+\begin_layout Standard
+     2  Any a = insert(l1);
+\end_layout
+
+\begin_layout Standard
+     3  int l2 = extract_DevLong(a);
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5  String str = new String("I like dancing TANGO");
+\end_layout
+
+\begin_layout Standard
+     6  Any s = insert(str);
+\end_layout
+
+\begin_layout Standard
+     7  String str_ex = extract_DevString(s);
+\end_layout
+
+\begin_layout Standard
+     8  
+\end_layout
+
+\begin_layout Standard
+     9  int[] array = new int[2];
+\end_layout
+
+\begin_layout Standard
+    10  array[0] = 1;
+\end_layout
+
+\begin_layout Standard
+    11  array[1] = 2;
+\end_layout
+
+\begin_layout Standard
+    12  Any arr = insert(array);
+\end_layout
+
+\begin_layout Standard
+    13  int[] array_ext = extract_DevVarLongArray(arr);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1-3 : Insertion/Extraction of DevLong type
+\end_layout
+
+\begin_layout Standard
+Line 5-7 : Insertion/Extraction of DevString type
+\end_layout
+
+\begin_layout Standard
+Line 9-13 : Insertion/Extraction of DevVarLongArray type
+\end_layout
+
+\begin_layout Subsection
+C++ memory management
+\end_layout
+
+\begin_layout Standard
+The rule described here are valid for variable length command data types
+ like Tango::DevString or all the Tango:: DevVarxxxxArray types.
+\end_layout
+
+\begin_layout Standard
+The method executing the command must allocate the memory used to pass data
+ back to the client or use static memory (like buffer declares as object
+ data member.
+ If necessary, the ORB will deallocate this memory after the data have been
+ sent to the caller.
+ Fortunately, for incoming data, the method have no memory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+memory
+\end_layout
+
+\end_inset
+
+ management responsibilities.
+ The details about memory management given in this chapter assume that the
+ insert/extract methods of the Tango::Command class are used and only the
+ method in the device object is discussed.
+\end_layout
+
+\begin_layout Subsubsection
+For string
+\end_layout
+
+\begin_layout Standard
+Example of a method receiving a Tango::DevString
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevString
+\end_layout
+
+\end_inset
+
+ and returning a Tango::DevString is detailed just below
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  Tango::DevString MyDev::dev_string(Tango::DevString argin)
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          Tango::DevString        argout;
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5          cout << "the received string is " << argin << endl;
+\end_layout
+
+\begin_layout Standard
+     6          
+\end_layout
+
+\begin_layout Standard
+     7          string str("Am I a good Tango dancer ?");
+\end_layout
+
+\begin_layout Standard
+     8          argout = new char[str.size() + 1];
+\end_layout
+
+\begin_layout Standard
+     9          strcpy(argout,str.c_str());
+\end_layout
+
+\begin_layout Standard
+    10          
+\end_layout
+
+\begin_layout Standard
+    11          return argout;
+\end_layout
+
+\begin_layout Standard
+    12  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Note that there is no need to deallocate the memory used by the incoming
+ string.
+ Memory for the outgoing string is allocated at line 8, then it is initialized
+ at the following line.
+ The memory allocated at line 8 will be automatically freed by the usage
+ of the 
+\emph on
+Command::insert
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+insert
+\end_layout
+
+\end_inset
+
+()
+\emph default
+ method.
+ Using this schema, memory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+memory
+\end_layout
+
+\end_inset
+
+ is allocated/freed each time the command is executed.
+ For constant string length, a statically allocated buffer can be used.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  Tango::ConstDevString MyDev::dev_string(Tango::DevString argin)
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          Tango::ConstDevString   argout;
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5          cout << "the received string is " << argin << endl;
+\end_layout
+
+\begin_layout Standard
+     6          
+\end_layout
+
+\begin_layout Standard
+     7          argout = "Hello world"; 
+\end_layout
+
+\begin_layout Standard
+     8          return argout;
+\end_layout
+
+\begin_layout Standard
+     9  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+A Tango::ConstDevString
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::ConstDevString
+\end_layout
+
+\end_inset
+
+ data type is used.
+ It is not a new data Tango data type.
+ It has been introduced only to allows 
+\emph on
+Command::insert()
+\emph default
+ method overloading.
+ The argout pointer is initialized at line 7 with memory statically allocated.
+ In this case, no memory will be freed by the 
+\emph on
+Command::insert()
+\emph default
+ method.
+ There is also no memory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+memory
+\end_layout
+
+\end_inset
+
+ copy in the contrary of the previous example.
+ A buffer defined as object data member can also be used to set the argout
+ pointer.
+\end_layout
+
+\begin_layout Subsubsection
+For array/sequence
+\end_layout
+
+\begin_layout Standard
+Example of a method returning a Tango::DevVarLongArray
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevVarLongArray
+\end_layout
+
+\end_inset
+
+ is detailed just below
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  Tango::DevVarLongArray *MyDev::dev_array()
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          Tango::DevVarLongArray  *argout  = new Tango::DevVarLongArray();
+\end_layout
+
+\begin_layout Standard
+     4                  
+\end_layout
+
+\begin_layout Standard
+     5          long output_array_length = ...;
+\end_layout
+
+\begin_layout Standard
+     6          argout->length(output_array_length);
+\end_layout
+
+\begin_layout Standard
+     7          for (int i = 0;i < output_array_length;i++)
+\end_layout
+
+\begin_layout Standard
+     8                  (*argout)[i] = i;
+\end_layout
+
+\begin_layout Standard
+     9  
+\end_layout
+
+\begin_layout Standard
+    10          return argout;
+\end_layout
+
+\begin_layout Standard
+    11  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In this case, memory is allocated at line 3 and 6.
+ Then, the sequence
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+sequence
+\end_layout
+
+\end_inset
+
+ is populated.
+ The sequence is created and returned using pointer.
+ The 
+\emph on
+Command::insert()
+\emph default
+ method will insert the sequence into the CORBA::Any object using this pointer.
+ Therefore, the CORBA::Any object will take ownership of the allocated memory.
+ It will free it when it will be destroyed by the CORBA ORB after the data
+ have been sent away.
+ It is also possible to use a statically allocated memory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+memory
+\end_layout
+
+\end_inset
+
+ and to avoid copying in the sequence used to returned the data.
+ This is explained in the following example assuming a buffer of long data
+ is declared as device data member and named buffer.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  Tango::DevVarLongArray *MyDev::dev_array()
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          Tango::DevVarLongArray  *argout;
+\end_layout
+
+\begin_layout Standard
+     4                  
+\end_layout
+
+\begin_layout Standard
+     5          long output_array_length = ...;
+\end_layout
+
+\begin_layout Standard
+     6          argout = create_DevVarLongArray(buffer,output_array_length);
+\end_layout
+
+\begin_layout Standard
+     7          return argout;
+\end_layout
+
+\begin_layout Standard
+     8  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+At line 3 only a pointer to a DevVarLongArray is defined.
+ This pointer is set at line 6 using the 
+\emph on
+create_DevVarLongArray()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+create-DevVarLongArray
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ This method will create a sequence using this buffer without memory allocation
+ and with minimum copying.
+ The 
+\emph on
+Command::insert()
+\emph default
+ method used here is the same than the one used in the previous example.
+ The sequence is created in a way that the destruction of the CORBA::Any
+ object in which the sequence will be inserted will not destroy the buffer.
+ The following create_xxx methods are defined in the DeviceImpl class :
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="10" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Method name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+data type
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+create_DevVarCharArray()
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned char
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+create_DevVarShortArray()
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+short
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+create_DevVarLongArray()
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevLong
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+create_DevVarLong64Array()
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevLong64
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+create_DevVarFloatArray()
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+float
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+create_DevVarDoubleArray()
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+create_DevVarUShortArray()
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned short
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+create_DevVarULongArray()
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevULong
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+create_DevVarULong64Array()
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevULong64
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+For string array/sequence
+\end_layout
+
+\begin_layout Standard
+Example of a method returning a Tango::DevVarStringArray
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+
+ is detailed just below
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  Tango::DevVarStringArray *MyDev::dev_str_array()
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          Tango::DevVarStringArray *argout  = new Tango::DevVarStringArray
+();
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5          argout->length(3);
+\end_layout
+
+\begin_layout Standard
+     6          (*argout)[0] = CORBA::string_dup("Rumba");
+\end_layout
+
+\begin_layout Standard
+     7          (*argout)[1] = CORBA::string_dup("Waltz");
+\end_layout
+
+\begin_layout Standard
+     8          string str("Jerck");
+\end_layout
+
+\begin_layout Standard
+     9          (*argout)[2] = CORBA::string_dup(str.c_str());
+\end_layout
+
+\begin_layout Standard
+    10          return argout;
+\end_layout
+
+\begin_layout Standard
+    11  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Memory is allocated at line 3 and 5.
+ Then, the sequence
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+sequence
+\end_layout
+
+\end_inset
+
+ is populated at lines 6,7 and 9.
+ The usage of the 
+\emph on
+CORBA::string_dup
+\emph default
+ function also allocates memory.
+ The sequence is created and returned using pointer.
+ The 
+\emph on
+Command::insert()
+\emph default
+ method will insert the sequence into the CORBA::Any object using this pointer.
+ Therefore, the CORBA::Any object will take ownership of the allocated memory.
+ It will free it when it will be destroyed by the CORBA ORB after the data
+ have been sent away.
+ For portability reason, the ORB uses the 
+\emph on
+CORBA::string_free
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+string-free
+\end_layout
+
+\end_inset
+
+
+\emph default
+ function to free the memory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+memory
+\end_layout
+
+\end_inset
+
+ allocated for each string.
+ This is why the corresponding 
+\emph on
+CORBA::string_du
+\emph default
+p
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+string-dup
+\end_layout
+
+\end_inset
+
+ or 
+\emph on
+CORBA::string_alloc
+\emph default
+ function must be used to reserve this memory.It is also possible to use
+ a statically allocated memory and to avoid copying in the sequence used
+ to returned the data.
+ This is explained in the following example assuming a buffer of pointer
+ to char is declared as device data member and named int_buffer.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  Tango::DevVarStringArray *DocDs::dev_str_array()
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          int_buffer[0] = "first";
+\end_layout
+
+\begin_layout Standard
+     4          int_buffer[1] = "second";
+\end_layout
+
+\begin_layout Standard
+     5  
+\end_layout
+
+\begin_layout Standard
+     6          Tango::DevVarStringArray *argout;
+\end_layout
+
+\begin_layout Standard
+     7          argout = create_DevVarStringArray(int_buffer,2);
+\end_layout
+
+\begin_layout Standard
+     8          return argout;
+\end_layout
+
+\begin_layout Standard
+     9  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The intermediate buffer is initialized with statically allocated memory
+ at lines 3 and 4.
+ The returned sequence is created at line 7 with the 
+\emph on
+create_DevVarStringArray()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+create-DevVarStringArray
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ Like for classical array, the sequence is created in a way that the destruction
+ of the CORBA::Any
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+any
+\end_layout
+
+\end_inset
+
+ object in which the sequence will be inserted will not destroy the buffer.
+\end_layout
+
+\begin_layout Subsubsection
+For Tango composed types
+\end_layout
+
+\begin_layout Standard
+Tango supports only two composed types which are Tango::DevVarLongStringArray
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevVarLongStringArray
+\end_layout
+
+\end_inset
+
+ and Tango::DevVarDoubleStringArray
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevVarDoubleStringArray
+\end_layout
+
+\end_inset
+
+.
+ These types are translated to C++ structure with two sequences.
+ It is not possible to use memory statically allocated for these types.
+ Each structure element must be initialized as described in the previous
+ sub-chapters using the dynamically allocated memory case.
+\end_layout
+
+\begin_layout Subsection
+Reporting errors
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Reporting-errors"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Tango uses the C++ and Java try/catch plus exception
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+exception
+\end_layout
+
+\end_inset
+
+ mechanism to report errors.
+ Two kind of errors can be transmitted between client and server :
+\end_layout
+
+\begin_layout Enumerate
+CORBA system error.
+ These exceptions are raised by the ORB and indicates major failures (A
+ communication failure, An invalid object reference...)
+\end_layout
+
+\begin_layout Enumerate
+CORBA user exception.
+ These kind of exceptions are defined in the IDL file.
+ This allows an exception to contain an arbitrary amount of error information
+ of arbitrary type.
+\end_layout
+
+\begin_layout Standard
+TANGO defines one user exception called 
+\series bold
+DevFailed
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevFailed
+\end_layout
+
+\end_inset
+
+.
+ This exception is a variable length array of 
+\series bold
+DevError
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevError
+\end_layout
+
+\end_inset
+
+
+\series default
+ type (a sequence of DevError).
+ The DevError type is a four fields structure.
+ These fields are :
+\end_layout
+
+\begin_layout Enumerate
+A string describing the type of the error.
+ This string replaces an error code and allows a more easy management of
+ include files.
+\end_layout
+
+\begin_layout Enumerate
+The error severity.
+ It is an enumeration with the three values which are WARN, ERR or PANIC.
+\end_layout
+
+\begin_layout Enumerate
+A string describing in plain text the reason of the error
+\end_layout
+
+\begin_layout Enumerate
+A string describing the origin of the error
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+error
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The Tango::DevFailed type is a sequence of DevError structures in order
+ to transmit to the client what is the primary error reason when several
+ classes are used within a command.
+ The sequence element 0 must be the DevError structure describing the primary
+ error.
+ A method called 
+\emph on
+print_exception
+\emph default
+()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+print-exception
+\end_layout
+
+\end_inset
+
+ defined in the Tango::Except
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Except
+\end_layout
+
+\end_inset
+
+ class prints the content of exception (CORBA system exception or Tango::DevFail
+ed exception).
+ Some static methods of the Tango::Except class called 
+\emph on
+throw_exception
+\emph default
+()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+throw-exception
+\end_layout
+
+\end_inset
+
+ can be used to throw Tango::DevFailed exception.
+ Some other static methods called 
+\emph on
+re_throw_exception()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+re-throw-exception
+\end_layout
+
+\end_inset
+
+
+\emph default
+ may also be used when the user want to add a new element in the exception
+ sequence and re-throw the exception.
+ With Java, these functions are static methods of the Except class.
+ Details on these methods can be found in 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsubsection
+Example of throwing exception using C++
+\end_layout
+
+\begin_layout Standard
+This example is a piece of code from the 
+\emph on
+command_handler
+\emph default
+() method of the DeviceImpl class.
+ An exception
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+exception
+\end_layout
+
+\end_inset
+
+ is thrown to the client to indicate that the requested command is not defined
+ in the command list.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1          TangoSys_OMemStream o;
+\end_layout
+
+\begin_layout Standard
+     2                  
+\end_layout
+
+\begin_layout Standard
+     3          o << "Command " << command << " not found" << ends;
+\end_layout
+
+\begin_layout Standard
+     4          Tango::Except::throw_exception((const char *)"API_CommandNotFoun
+d",
+\end_layout
+
+\begin_layout Standard
+     5                                o.str(),
+\end_layout
+
+\begin_layout Standard
+     6                                (const char *)"DeviceClass::command_handle
+r");
+\end_layout
+
+\begin_layout Standard
+     7  
+\end_layout
+
+\begin_layout Standard
+     8  
+\end_layout
+
+\begin_layout Standard
+     9          try
+\end_layout
+
+\begin_layout Standard
+    10          {
+\end_layout
+
+\begin_layout Standard
+    11                  .....
+\end_layout
+
+\begin_layout Standard
+    12          }
+\end_layout
+
+\begin_layout Standard
+    13          catch (Tango::DevFailed &e)
+\end_layout
+
+\begin_layout Standard
+    14          {
+\end_layout
+
+\begin_layout Standard
+    15                  TangoSys_OMemStream o;
+\end_layout
+
+\begin_layout Standard
+    16                  
+\end_layout
+
+\begin_layout Standard
+    17                  o << "Command " << command << " not found" << ends;
+\end_layout
+
+\begin_layout Standard
+    18                  Tango::Except::re_throw_exception(e,
+\end_layout
+
+\begin_layout Standard
+    19                                  (const char *)"API_CommandNotFound",
+\end_layout
+
+\begin_layout Standard
+    20                                  o.str(),
+\end_layout
+
+\begin_layout Standard
+    21                                  (const char *)"DeviceClass::command_hand
+ler");
+\end_layout
+
+\begin_layout Standard
+    22          }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : Build a memory stream.
+ Use the TangoSys_MemStream because memory streams are not managed the same
+ way between Windows and Unix
+\end_layout
+
+\begin_layout Standard
+Line 3 : Build the reason string in the memory stream
+\end_layout
+
+\begin_layout Standard
+Line 4-5 : Throw the exception to client using one of the 
+\emph on
+throw_exception
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+throw-exception
+\end_layout
+
+\end_inset
+
+
+\emph default
+ static method of the Except
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Except
+\end_layout
+
+\end_inset
+
+ class.
+ This throw_exception method used here allows the definition of the error
+ type string, the reason string and the origin string of the DevError structure.
+ The remaining DevError field (the error severity) will be set to its default
+ value.
+ Note that the first and third parameters are casted to a 
+\emph on
+const char *
+\emph default
+.
+ Standard C++ defines that such a string is already a 
+\emph on
+const char *
+\emph default
+ but the GNU C++ compiler (release 2.95) does not use this type inside its
+ function overloading but rather uses a 
+\emph on
+char *
+\emph default
+ which leads to calling the wrong function.
+\end_layout
+
+\begin_layout Standard
+Line 13-22 : Re-throw an already catched tango::DevFailed exception with
+ one more element in the exception sequence.
+\end_layout
+
+\begin_layout Subsubsection
+Example of throwing exception using Java
+\end_layout
+
+\begin_layout Standard
+This example is a fragment of code from the 
+\emph on
+command_handler
+\emph default
+() method of the DeviceImpl class.
+ An exception is thrown to the client to indicate that the requested command
+ is not defined in the command list.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  StringBuffer o = new StringBuffer("Command ");
+\end_layout
+
+\begin_layout Standard
+     2  o.append(command);
+\end_layout
+
+\begin_layout Standard
+     3  o.append(" not found");
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5  Except.throw_exception("API_CommandNotFound",
+\end_layout
+
+\begin_layout Standard
+     6                         o.toString(),
+\end_layout
+
+\begin_layout Standard
+     7                         "DeviceClass.command_handler");
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1-3 : Build a string with a message describing the error.
+ The StringBuffer class is used instead of the String class because the
+ StringBuffer class allows dynamic resizing of the string.
+\end_layout
+
+\begin_layout Standard
+Line 5-7 : Throw the exception to client using the static 
+\emph on
+throw_exception
+\emph default
+ method of the Except class.
+ The 
+\emph on
+throw_exception
+\emph default
+ method used here allows the definition of the reason string, the description
+ string and the origin string of the DevError structure.
+ The remaining DevError field (the error severity) will be set to its default
+ value.
+ Like C++, some static 
+\emph on
+re_throw_exception()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+re-throw-exception
+\end_layout
+
+\end_inset
+
+
+\emph default
+ methods also exist to re-throw DevFailed exception with one more sequence
+ element.
+\end_layout
+
+\begin_layout Standard
+Note that the CORBA system exception inherits from the java.lang.RuntimeException.
+ Exception derivate from this class do not need to be catched or re-thrown.
+ This is the case for the BAD_OPERATION exception thrown when a mismatched
+ type is used to extract data from an Any object.
+ CORBA user exception (like the DevFailed exception) inherits from the java.Excep
+tion class and needs to be catched or re-thrown.
+\end_layout
+
+\begin_layout Section
+The Tango Logging
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+logging
+\end_layout
+
+\end_inset
+
+ Service 
+\begin_inset CommandInset label
+LatexCommand label
+name "The-Tango-Logging chapter"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+A first introduction about this logging service has been done in chapter
+ 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:The-Tango-Logging"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The TANGO Logging Service (TLS) gives the user the control over how much
+ information is actually generated and to where it goes.
+ In practice, the TLS allows to select both the logging level and targets
+ of any device within the control system.
+\end_layout
+
+\begin_layout Subsection
+Logging Targets
+\end_layout
+
+\begin_layout Standard
+The TLS implementation allows each device logging requests to print simultaneous
+ly to multiple destinations.
+ In the TANGO terminology, an output destination is called a 
+\series bold
+logging target
+\series default
+.
+ Currently, targets exist for console, file and log consumer device.
+ 
+\end_layout
+
+\begin_layout Standard
+CONSOLE: logs are printed to the console (i.e.
+ the standard output),
+\end_layout
+
+\begin_layout Standard
+FILE: logs are stored in a XML file.
+ A rolling mechanism is used to backup the log file when it reaches a certain
+ size (see below), 
+\end_layout
+
+\begin_layout Standard
+DEVICE: logs are sent to a device implementing a well known TANGO interface
+ (see section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Tango-log-consumer"
+
+\end_inset
+
+ for a definition of the log consumer interface).
+ One implementation of a log consumer associated to a graphical user interface
+ is available within the Tango package.
+ It is called the LogViewer
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+LogViewer
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+The device's logging behavior can be control by adding and/or removing targets.
+\end_layout
+
+\begin_layout Standard
+Note : When the size of a log file (for file logging target) reaches the
+ so-called rolling-file-threshold (rft), it is backuped as "current_log_file_nam
+e" + "_1" and a new "current_log_file_name" is opened.
+ Obviously, there is only one backup file at a time (i.e.
+ any existing backup is destroyed before the current log file is backuped).
+ The default threshold is 2Mb, the minimum is 500 Kb and the maximum is
+ 20 Mb.
+\end_layout
+
+\begin_layout Subsection
+Logging Levels
+\end_layout
+
+\begin_layout Standard
+Devices can be assigned a logging level.
+ It acts as a filter to control the kind of information sent to the targets.
+ Since, there are (usually) much more low level log statements than high
+ level statements, the logging level also control the amount of information
+ produced by the device.
+ The TLS provides the following levels (semantic is just given to be indicative
+ of what could be log at each level):
+\end_layout
+
+\begin_layout Standard
+OFF: Nothing is logged
+\end_layout
+
+\begin_layout Standard
+FATAL: A fatal error occurred.
+ The process is about to abort
+\end_layout
+
+\begin_layout Standard
+ERROR: An (unrecoverable) error occurred but the process is still alive
+\end_layout
+
+\begin_layout Standard
+WARN: An error occurred but could be recovered locally
+\end_layout
+
+\begin_layout Standard
+INFO: Provides information on important actions performed
+\end_layout
+
+\begin_layout Standard
+DEBUG: Generates detailed information describing the internal behavior of
+ a device
+\end_layout
+
+\begin_layout Standard
+Levels are ordered the following way: 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+DEBUG < INFO < WARN < ERROR < FATAL < OFF
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+For a given device, a level is said to be enabled if it is greater or equal
+ to the logging level assigned to this device.
+ In other words, any logging request which level is lower than the device's
+ logging level is ignored.
+ 
+\end_layout
+
+\begin_layout Standard
+Note: The logging level can't be controlled at target level.
+ The device's targets shared the same device logging level.
+\end_layout
+
+\begin_layout Subsection
+Sending TANGO Logging Messages
+\end_layout
+
+\begin_layout Subsubsection
+Logging macros in C++
+\end_layout
+
+\begin_layout Standard
+The TLS provides the user with easy to use C++ macros with 
+\emph on
+printf
+\emph default
+ and 
+\emph on
+stream
+\emph default
+ like syntax.
+ For each logging level, a macro is defined in both styles:
+\end_layout
+
+\begin_layout Itemize
+LOG_{FATAL, ERROR, WARN, INFO or DEBUG}
+\end_layout
+
+\begin_layout Itemize
+{FATAL, ERROR, WARN, INFO or DEBUG}_STREAM
+\end_layout
+
+\begin_layout Standard
+These macros are supposed to be used within the device's main implementation
+ class (i.e.
+ the class that inherits (directly or indirectly) from the Tango::DeviceImpl
+ class).
+ In this context, they produce logging messages containing the device name.
+ In other words, they automatically identify the log source.
+ Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:C++-logging-in"
+
+\end_inset
+
+ gives a trick to log in the name of device outside its main implementation
+ class.
+ Printf like example:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+LOG_DEBUG(("Msg#%d - Hello world", i++));
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Stream like example:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+DEBUG_STREAM << "Msg#" << i++ << "- Hello world" << endl;   
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+These two logging requests are equivalent.
+ Note the double parenthesis in the printf version.
+\end_layout
+
+\begin_layout Subsubsection
+C++ logging in the name of a device
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:C++-logging-in"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+A device implementation is sometimes spread over several classes.
+ Since all these classes implement the same device, their logging requests
+ should be associated with this device name.
+ Unfortunately, the C++ logging macros can't be used because they are outside
+ the device's main implementation class.
+ The Tango::LogAdapter class is a workaround for this limitation.
+\end_layout
+
+\begin_layout Standard
+Any method not member of the device's main implementation class, which send
+ log messages associated to a device must be a member of a class inheriting
+ from the Tango::LogAdapter class.
+ Here is an example:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+1 class MyDeviceActualImpl: public Tango::LogAdapter
+\end_layout
+
+\begin_layout Standard
+2 {
+\end_layout
+
+\begin_layout Standard
+3 public :
+\end_layout
+
+\begin_layout Standard
+4      MyDeviceActualImpl(...,Tango::DeviceImpl *device,...)
+\end_layout
+
+\begin_layout Standard
+5      :Tango::LogAdpater(device)
+\end_layout
+
+\begin_layout Standard
+6      {
+\end_layout
+
+\begin_layout Standard
+7          ....
+\end_layout
+
+\begin_layout Standard
+8 //
+\end_layout
+
+\begin_layout Standard
+9 // The following log is associated to the device passed to the constructor
+\end_layout
+
+\begin_layout Standard
+10 //
+\end_layout
+
+\begin_layout Standard
+11         DEBUG_STREAM << "In MyDeviceActualImpl constructor" << endl;
+\end_layout
+
+\begin_layout Standard
+12 
+\end_layout
+
+\begin_layout Standard
+13         ....
+\end_layout
+
+\begin_layout Standard
+14      }
+\end_layout
+
+\begin_layout Standard
+15 };
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Logging in Java
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Logging-in-Java"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In order to send a log from a device implementation method (i.e.
+ a method of a class inheriting from 
+\emph on
+TangoDs.DeviceImpl
+\emph default
+), the developer makes use of the 
+\emph on
+org.apache.log4j.Logger
+\emph default
+ instance which reference is returned by the 
+\emph on
+DeviceImpl.get_logger
+\emph default
+ method.
+ The 
+\emph on
+org.apache.log4j.Logger.{fatal,error,warn,info
+\emph default
+ and 
+\emph on
+debug}
+\emph default
+ methods provide the actual logging features.
+ See for more information about the Logger class.
+ Here is an example of Logging usage with Java:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  public class myDevice extends DeviceImpl implements TangoConst
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3     ...
+\end_layout
+
+\begin_layout Standard
+     4          
+\end_layout
+
+\begin_layout Standard
+     5     public void init_device()
+\end_layout
+
+\begin_layout Standard
+     6     {
+\end_layout
+
+\begin_layout Standard
+     7  
+\end_layout
+
+\begin_layout Standard
+     8  // A Debug log
+\end_layout
+
+\begin_layout Standard
+     9  
+\end_layout
+
+\begin_layout Standard
+    10        get_logger().debug("Initializing device " + get_name());
+\end_layout
+
+\begin_layout Standard
+    11  
+\end_layout
+
+\begin_layout Standard
+    12        try
+\end_layout
+
+\begin_layout Standard
+    13        {
+\end_layout
+
+\begin_layout Standard
+    14  // Initialization code
+\end_layout
+
+\begin_layout Standard
+    15           String p = get_property("startup property");
+\end_layout
+
+\begin_layout Standard
+    16           if (p == null)
+\end_layout
+
+\begin_layout Standard
+    17           {
+\end_layout
+
+\begin_layout Standard
+    18              get_logger().warn("No startup property defined for "
+ + get_name());
+\end_layout
+
+\begin_layout Standard
+    19              ...
+\end_layout
+
+\begin_layout Standard
+    20           }
+\end_layout
+
+\begin_layout Standard
+    21        }
+\end_layout
+
+\begin_layout Standard
+    22        catch (Exception e)
+\end_layout
+
+\begin_layout Standard
+    23        {
+\end_layout
+
+\begin_layout Standard
+    24  // An error log
+\end_layout
+
+\begin_layout Standard
+    25  
+\end_layout
+
+\begin_layout Standard
+    26           get_logger().error("unknown exception caught");
+\end_layout
+
+\begin_layout Standard
+    27        }
+\end_layout
+
+\begin_layout Standard
+    28     }
+\end_layout
+
+\begin_layout Standard
+    29     ...
+\end_layout
+
+\begin_layout Standard
+    30  }
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Logging in the name of a device with Java
+\end_layout
+
+\begin_layout Standard
+Using Java, you can log in the name of a device from anywhere in your code
+ as far as you get a reference to this device.
+ Use the device 
+\emph on
+get_logger
+\emph default
+ public method to obtain its associated logger then proceed as describe
+ in 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Logging-in-Java"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Section
+Writing a device server
+\begin_inset CommandInset label
+LatexCommand label
+name "Writing_chapter"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Writing a device server can be made easier by adopting the correct approach.
+ This chapter will describe how to write a device server.
+ It is divided into the following parts : understanding the device, defining
+ device commands, choosing device state and writing the necessary classes.
+ All along this chapter, examples will be given using the stepper motor
+ device server.
+ Writing a device server for our stepper motor example device means writing
+ :
+\end_layout
+
+\begin_layout Itemize
+The 
+\emph on
+main
+\emph default
+ function
+\end_layout
+
+\begin_layout Itemize
+The 
+\emph on
+class_factory
+\emph default
+ method (only for C++ device server)
+\end_layout
+
+\begin_layout Itemize
+The 
+\emph on
+StepperMotorClass
+\emph default
+ class
+\end_layout
+
+\begin_layout Itemize
+The 
+\emph on
+DevReadPositionCmd
+\emph default
+ and 
+\emph on
+DevReadDirectionCmd
+\emph default
+ classes
+\end_layout
+
+\begin_layout Itemize
+The 
+\emph on
+PositionAttr
+\emph default
+, 
+\emph on
+SetPositionAttr
+\emph default
+ and 
+\emph on
+DirectionAttr
+\emph default
+ classes
+\end_layout
+
+\begin_layout Itemize
+The 
+\emph on
+StepperMotor
+\emph default
+ class.
+ 
+\end_layout
+
+\begin_layout Standard
+All these functions and classes will be detailed.
+ The stepper motor device server described in this chapter supports 2 commands
+ and 3 attributes which are :
+\end_layout
+
+\begin_layout Itemize
+Command DevReadPosition implemented using the inheritance
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+inheritance
+\end_layout
+
+\end_inset
+
+ model
+\end_layout
+
+\begin_layout Itemize
+Command DevReadDirection implemented using the template
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+template
+\end_layout
+
+\end_inset
+
+ command model
+\end_layout
+
+\begin_layout Itemize
+Attribute Position (position of the first motor).
+ This attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+ is readable and is linked with a writable attribute (called SetPosition).
+ When the value of this attribute is requested by the client, the value
+ of the associated writable attribute is also returned.
+\end_layout
+
+\begin_layout Itemize
+Attribute SetPosition (writable attribute linked with the Position attribute).
+ This attribute has some properties with user defined default value.
+\end_layout
+
+\begin_layout Itemize
+Attribute Direction (direction of the first motor)
+\end_layout
+
+\begin_layout Standard
+As the reader will understand during the reading of the following sub-chapters,
+ the command and attributes classes (
+\emph on
+DevReadPositionCmd
+\emph default
+, 
+\emph on
+DevReadDirectionCmd
+\emph default
+, 
+\emph on
+PositionAttr
+\emph default
+, 
+\emph on
+SetPositionAttr
+\emph default
+ and 
+\emph on
+DirectionAttr
+\emph default
+) are very simple classes.
+ A tool called 
+\series bold
+Pogo
+\series default
+ has been developped to automatically generate/maintain these classes and
+ to write part of the code needed in the remaining one.
+ See xx to know more on this Pogo tool.
+\end_layout
+
+\begin_layout Standard
+In order to also gives an example of how the database objects part of the
+ Tango device pattern could be used, our device have two properties.
+ These properties are of the Tango long data types and are named 
+\begin_inset Quotes eld
+\end_inset
+
+Max
+\begin_inset Quotes erd
+\end_inset
+
+ and 
+\begin_inset Quotes eld
+\end_inset
+
+Min
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection
+Understanding the device
+\end_layout
+
+\begin_layout Standard
+The first step before writing a device server is to develop an understanding
+ of the hardware to be programmed.
+ The Equipment Responsible should have description of the hardware and its
+ operating modes (manuals, spec sheets etc.).
+ The Equipment Responsible must also provide specifications of what the
+ device server should do.
+ The Device Server Programmer should demand an exact description of the
+ registers, alarms, interlocks and any timing constraints which have to
+ be kept.
+ It is very important to have a good understanding of the device interfacing
+ before starting designing a new class.
+ 
+\end_layout
+
+\begin_layout Standard
+Once the Device Server Programmer has understood the hardware the next important
+ step is to define what is a logical device i.e.
+ what part of the hardware will be abstracted out and treated as a logical
+ device.
+ In doing so the following points of the TDSOM should be kept in mind 
+\end_layout
+
+\begin_layout Itemize
+Each device is known and accessed by its ascii name.
+\end_layout
+
+\begin_layout Itemize
+The device is exported onto the network to be imported by applications.
+\end_layout
+
+\begin_layout Itemize
+Each device belongs to a class.
+\end_layout
+
+\begin_layout Itemize
+A list of commands exists per device.
+\end_layout
+
+\begin_layout Itemize
+Applications use the device server api to execute commands on a device.
+ 
+\end_layout
+
+\begin_layout Standard
+The above points have to be taken into account when designing the level
+ of device abstraction.
+ The definition of what is a device for a certain hardware is primarily
+ the job of the Device Server Programmer and the Applications Programmer
+ but can also involve the Equipment Responsible.
+ The Device Server Programmer should make sure that the Applications Programmer
+ agrees with her definition of what is a device.
+\end_layout
+
+\begin_layout Standard
+Here are some guidelines to follow while defining the level of device abstractio
+n - 
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+efficiency
+\series default
+, make sure that not a too fine level of device abstraction has been chosen.
+ If possible group as many attributes together to form a device.
+ Discuss this with the Applications Programmer to find out what is efficient
+ for her application.
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+hardware independency
+\series default
+, one of the main reasons for writing device servers is to provide the Applicati
+ons Programmer with a 
+\emph on
+software
+\emph default
+ interface as opposed to a 
+\emph on
+hardware
+\emph default
+ interface.
+ Hide the hardware structure of the device.
+ For example if the user is only interested in a single channel of a multichanne
+l device then define each channel to be a logical device.
+ The user should not be aware of hardware addresses or cabling details.
+ The user is very often a scientist who has a physics-oriented world view
+ and not a hardware-oriented world view.
+ Hardware independency also has the advantage that applications are immune
+ to hardware changes to the device 
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+object oriented world view
+\series default
+, another 
+\emph on
+raison d'etre
+\emph default
+ behind the device server model is to build up an object oriented view of
+ the world.
+ The device should resemble the user's view of the object as closely as
+ possible.
+ In the case of the ESRF's beam lines for example, the devices should resemble
+ beam line scientist's view of the machine.
+ 
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+atomism
+\series default
+, each device can be considered like an atom - is a independent object.
+ It should appear independent to the client even if behind the scenes it
+ shares some hardware or software with other objects.
+ This is often the case with multichannel devices where the user would like
+ to see each channel as a device but it is obvious that the channels cannot
+ be programmed completely independently.
+ The logical device is there to hide or make transparent this fact.
+ If it is impossible to send commands to one device without modifying another
+ device then a single device should be made out the two devices.
+ 
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+tailored
+\series default
+ 
+\emph on
+vs
+\emph default
+ 
+\series bold
+general
+\series default
+, one of the philosophies of the TDSOM is to provide tailored solutions.
+ For example instead of writing one 
+\emph on
+serial line
+\emph default
+ class which treats the general case of a serial line device and leaving
+ the device protocol to be implemented in the client the TDSOM advocates
+ implementing a device class which handles the protocol of the device.
+ This way the client only has to know the commands of the class and not
+ the details of the protocol.
+ Nothing prevents the device class from using a general purpose serial line
+ class if it exists of course.
+\end_layout
+
+\begin_layout Subsection
+Defining device commands
+\end_layout
+
+\begin_layout Standard
+Each device has a list of commands which can be executed by the application
+ across the network or locally.
+ These commands are the Application Programmer's network knobs and dials
+ for interacting with the device.
+\end_layout
+
+\begin_layout Standard
+The list of commands to be implemented depends on the capabilities of the
+ hardware, the list of sensible functions which can be executed at a distance
+ and of course the functionality required by the application.
+ This implies a close collaboration between the Equipment Responsible, Device
+ Server Programmer and the Application Programmer.
+\end_layout
+
+\begin_layout Standard
+When drawing up the list of commands particular attention should be paid
+ to the following points 
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+performance
+\series default
+, no single command should monopolize the device server for a long time
+ (a nominal value for long is one second).
+ Commands should be implemented in such a way that it executes immediately
+ returning with a response.
+ At best try to keep command execution time down to less than the typical
+ overhead of an rpc call i.e.
+ som milliseconds.
+ This of course is not always possible e.g.
+ a serial line device could require 100 milliseconds of protocol exchange.
+ The Device Server Programmer should find the best trade-off between the
+ users requirements and the devices capabilities.
+ If a command implies a sequence of events which could last for a long time
+ then implement the sequence of events in another thread - don't block the
+ device server.
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+robustness
+\series default
+, should be provided which allow the client to recover from error conditions
+ and or do a warm startup.
+\end_layout
+
+\begin_layout Subsubsection
+Standard commands
+\end_layout
+
+\begin_layout Standard
+A minimum set of three commands exist for all devices.
+ These commands are 
+\end_layout
+
+\begin_layout Itemize
+State
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+State
+\end_layout
+
+\end_inset
+
+ which returns the state of a device
+\end_layout
+
+\begin_layout Itemize
+Status
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Status
+\end_layout
+
+\end_inset
+
+ which returns the status of the device as a formatted ascii string
+\end_layout
+
+\begin_layout Itemize
+Init
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Init
+\end_layout
+
+\end_inset
+
+ which re-initialize a device without changing its network connection
+\end_layout
+
+\begin_layout Standard
+These commands have already been discussed in 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Auto_cmd"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Choosing device state
+\end_layout
+
+\begin_layout Standard
+The device state
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+state
+\end_layout
+
+\end_inset
+
+ is a number which reflects the availability of the device.
+ To simplify the coding for generic application, a predefined set of states
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+state
+\end_layout
+
+\end_inset
+
+ are supported by TANGO.
+ This list has 14 members which are
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="15" columns="1">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+State name
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ON
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+OFF
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+CLOSE
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+OPEN
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+INSERT
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+EXTRACT
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+MOVING
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+STANDBY
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+FAULT
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+INIT
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+RUNNING
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ALARM
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DISABLE
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+UNKNOWN
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The names used here have obvious meaning.
+\end_layout
+
+\begin_layout Subsection
+Device server utilities to ease coding/debugging
+\end_layout
+
+\begin_layout Standard
+The device server framework supports one in C++ and two set of utilities
+ to ease the process of coding and debugging
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+debug
+\end_layout
+
+\end_inset
+
+ device server code.
+ These utilities are :
+\end_layout
+
+\begin_layout Enumerate
+The device server verbose
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+verbose
+\end_layout
+
+\end_inset
+
+ option
+\end_layout
+
+\begin_layout Enumerate
+The device server output redirection system (Java specific)
+\end_layout
+
+\begin_layout Standard
+Using these two facilities avoids the usage of the classical 
+\begin_inset Quotes eld
+\end_inset
+
+#ifdef DEBUG
+\begin_inset Quotes erd
+\end_inset
+
+ style which makes code less readable.
+\end_layout
+
+\begin_layout Subsubsection
+The device server verbose option
+\end_layout
+
+\begin_layout Standard
+Each device server supports a verbose
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+verbose
+\end_layout
+
+\end_inset
+
+ option called 
+\series bold
+-v
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+-v
+\end_layout
+
+\end_inset
+
+.
+ Four verbose levels are defined from 1 to 4.
+ Level 4 is the most talkative one.
+ If you use the -v option without specifying level, level 4 will be assumed.
+\end_layout
+
+\begin_layout Standard
+Since Tango release 3, a Tango Logging Service has been introduced (detailed
+ in chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "The-Tango-Logging chapter"
+
+\end_inset
+
+).
+ This -v option set-up the logging service.
+ If it used, it will automatically add a 
+\emph on
+console
+\emph default
+ target to all devices embedded within the device server process.
+ Level 1 and 2 will set the logging level to all devices embedded within
+ the device server to INFO.
+ Level 3 and 4 will set the logging
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+logging
+\end_layout
+
+\end_inset
+
+ level to all devices embedded within the device server to DEBUG.
+ All messages sent by the API layer are associated to the administration
+ device.
+\end_layout
+
+\begin_layout Standard
+Java specific: A device server started with output level n will print all
+ the messages of level between 1 and n.
+ For instance, if you start a device server using -v3 option, only the output
+ for level 1,2 and 3 will be displayed.
+ Output for level 4 will not be printed.
+ If you don't used the -v option, the output level is set to 0.
+ By convention, level 3 and 4 are reserved for print message embedded into
+ the Tango library.
+ Level 1 and 2 are free for the user.
+\end_layout
+
+\begin_layout Paragraph
+Choosing the output level using C++
+\end_layout
+
+\begin_layout Standard
+In C++ device server, this feature is now implemented using the Tango Logging
+ Service (TLS), see chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "The-Tango-Logging chapter"
+
+\end_inset
+
+ to get all details on this service.
+\end_layout
+
+\begin_layout Paragraph
+Choosing the output level using Java
+\end_layout
+
+\begin_layout Standard
+With Java, four static objects inside the Util class have been defined.
+ These objects are called 
+\emph on
+out1
+\emph default
+, 
+\emph on
+out2
+\emph default
+, 
+\emph on
+out3
+\emph default
+ and 
+\emph on
+out4
+\emph default
+.
+ These four objects support the 
+\emph on
+println
+\emph default
+ method exactly as the 
+\emph on
+out
+\emph default
+ object inside the System class does.
+ The first object (
+\emph on
+out1
+\emph default
+) defines a message which should be printed only when output level 1 or
+ more is requested.
+ The second one (
+\emph on
+out2
+\emph default
+) defines a message which should be printed only when output level 2 or
+ more is requested.
+ The same philosophy is used for 
+\emph on
+out3
+\emph default
+ and 
+\emph on
+out4
+\emph default
+.
+ The usage of these 
+\emph on
+outx
+\emph default
+ objects is the same than the classical 
+\emph on
+out
+\emph default
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1          Util.out3.println
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+println
+\end_layout
+
+\end_inset
+
+("What a nice dance");
+\end_layout
+
+\begin_layout Standard
+     2          Util.out3.println("What's its name ?");
+\end_layout
+
+\begin_layout Standard
+     3  
+\end_layout
+
+\begin_layout Standard
+     4          System.out.println("Its name is TANGO");
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1-2 : The two questions are level 3 messages.
+\end_layout
+
+\begin_layout Standard
+Line 4 : This print will be printed whatever the print level is.
+\end_layout
+
+\begin_layout Standard
+If this piece of code is part of a device server started with a -v2 option,
+ only the message defined line 4 will be displayed.
+ If the device server is started with a -v3, -v4 or -v option, the two messages
+ defined at lines 1 and 2 will also be displayed.
+\end_layout
+
+\begin_layout Paragraph
+Changing the output level at run time (Java specific)
+\end_layout
+
+\begin_layout Standard
+It is possible to change the output level at run time.
+ You do so using commands of the dserver device.
+ These two commands are :
+\end_layout
+
+\begin_layout Itemize
+SetTraceLevel
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SetTraceLevel
+\end_layout
+
+\end_inset
+
+.
+ This command needs the new trace level as input parameter.
+ Using this command supersedes the level requested at device server process
+ command line
+\end_layout
+
+\begin_layout Itemize
+GetTraceLevel
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GetTraceLevel
+\end_layout
+
+\end_inset
+
+.
+ This command returns the actual trace level.
+\end_layout
+
+\begin_layout Subsubsection
+Device server output redirection (Java specific)
+\end_layout
+
+\begin_layout Standard
+Two commands of the dserver device allow device server output redirection.
+ Theses two commands are :
+\end_layout
+
+\begin_layout Itemize
+SetTraceOutput
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SetTraceOutput
+\end_layout
+
+\end_inset
+
+.
+ This command sets all the device server output used to print message to
+ be redirected to a file.
+ This command needs the complete file path as input parameter.
+ The file is local to the computer where the device server process is running.
+\end_layout
+
+\begin_layout Itemize
+GetTraceOutput
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GetTraceOutput
+\end_layout
+
+\end_inset
+
+.
+ This command returns the name of the file used to redirect device server
+ process output.
+ If no SetTraceOutput command has been used prior to the execution of this
+ command, it returns a special string (
+\begin_inset Quotes eld
+\end_inset
+
+Initial Output
+\begin_inset Quotes erd
+\end_inset
+
+) to indicates that the output is still the output defines at process startup.
+\end_layout
+
+\begin_layout Subsubsection
+Java usage example
+\end_layout
+
+\begin_layout Standard
+These two previously described features can ease device server debugging.
+ Suppose a device server process is started with the following command line
+ (UNIX command line)
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+Java -DTANGO_HOST=xxx Perkin/Perkin id22 >/dev/null
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+ This command line does not define any output level.
+ Therefore the default output level is chosen (0) and no message are printed.
+ Sending a SetTraceLevel
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SetTraceLevel
+\end_layout
+
+\end_inset
+
+ command requesting level 4 and a SetTraceOutput command with a file name
+ /tmp/server.out will make the device server sending all the output to the
+ /tmp/server.out file 
+\series bold
+without stopping the process
+\series default
+.
+ The inspection of the /tmp/server.out file will hopefully help to find the
+ reason of the device server problem.
+ When the output are not needed anymore, sending a SetTraceOutput
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SetTraceOutput
+\end_layout
+
+\end_inset
+
+ command with the input parameter set to 
+\begin_inset Quotes eld
+\end_inset
+
+Initial Output
+\begin_inset Quotes erd
+\end_inset
+
+ followed by a SetTraceLevel command with a requested level of 0 will return
+ the server to its original state.
+\end_layout
+
+\begin_layout Subsubsection
+C++ utilities to ease device server coding
+\end_layout
+
+\begin_layout Standard
+Some utilities functions have been added in the C++ release to ease Tango
+ device server development.
+ These utilities allow the user to
+\end_layout
+
+\begin_layout Itemize
+Init a C++ vector from a data of one of the Tango DevVarXXXArray data types
+ 
+\end_layout
+
+\begin_layout Itemize
+Init a data of one of the Tango::DevVarxxxArray data type from a C++ vector
+\end_layout
+
+\begin_layout Itemize
+Print a data of one of Tango::DevVarxxxArray data type
+\end_layout
+
+\begin_layout Standard
+They mainly used the 
+\begin_inset Quotes eld
+\end_inset
+
+<<
+\begin_inset Quotes erd
+\end_inset
+
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+<<
+\end_layout
+
+\end_inset
+
+ operator overloading features.
+ The following code lines are an example of usage of these utilities.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1          vector<string> v1;
+\end_layout
+
+\begin_layout Standard
+     2          v1.push_back("one");
+\end_layout
+
+\begin_layout Standard
+     3          v1.push_back("two");
+\end_layout
+
+\begin_layout Standard
+     4          v1.push_back("three");
+\end_layout
+
+\begin_layout Standard
+     5          
+\end_layout
+
+\begin_layout Standard
+     6          Tango::DevVarStringArray s;
+\end_layout
+
+\begin_layout Standard
+     7          s << v1;
+\end_layout
+
+\begin_layout Standard
+     8          cout << s << endl;
+\end_layout
+
+\begin_layout Standard
+     9  
+\end_layout
+
+\begin_layout Standard
+    10          vector<string> v2;
+\end_layout
+
+\begin_layout Standard
+    11          v2 << s;
+\end_layout
+
+\begin_layout Standard
+    12          
+\end_layout
+
+\begin_layout Standard
+    13          for (int i = 0;i < v2.size();i++)
+\end_layout
+
+\begin_layout Standard
+    14                  cout << "vector element = " << v2[i] << endl;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1-4 : Create and Init a C++ string vector
+\end_layout
+
+\begin_layout Standard
+Line 7 : Init a Tango::DevVarStringArray data from the C++ vector
+\end_layout
+
+\begin_layout Standard
+Line 8 : Print all the Tango::DevVarStringArray element in one line of code.
+\end_layout
+
+\begin_layout Standard
+Line 11 : Init a second empty C++ string vector with the content of the
+ Tango::DevVarStringArray
+\end_layout
+
+\begin_layout Standard
+Line 13-14 : Print vector element
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+Warning
+\series default
+: Note that due to a strange behavior of the Windows VC++ compiler compared
+ to other compilers, to use these utilities with the Windows VC++ compiler,
+ you must add the line 
+\begin_inset Quotes eld
+\end_inset
+
+using namespace tango
+\begin_inset Quotes erd
+\end_inset
+
+ at the beginning of your source file.
+\end_layout
+
+\begin_layout Subsection
+Avoiding name conflicts
+\end_layout
+
+\begin_layout Subsubsection
+Using C++
+\end_layout
+
+\begin_layout Standard
+Namespace are used to avoid name conflicts.
+ Each device pattern implementation is defined within its own namespace
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+namespace
+\end_layout
+
+\end_inset
+
+.
+ The name of the namespace is the device pattern class name.
+ In our example, the namespace name is 
+\emph on
+StepperMotor.
+\end_layout
+
+\begin_layout Subsubsection
+Using Java
+\end_layout
+
+\begin_layout Standard
+Package are used to avoid name conflicts.
+ Each device pattern implementation is defined within its own package
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+package
+\end_layout
+
+\end_inset
+
+.
+ The name of the package is the device pattern class name.
+ In our example, the package name is 
+\emph on
+StepperMotor.
+\end_layout
+
+\begin_layout Subsection
+The device server main function
+\end_layout
+
+\begin_layout Standard
+A device server main
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+main
+\end_layout
+
+\end_inset
+
+ function (or method) always follows the same framework.
+ It exactly implements all the action described in chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Server_startup"
+
+\end_inset
+
+.
+ Even if it could be always the same, it has not been included in the library
+ because some linkers are perturbed by the presence of two main functions.
+\end_layout
+
+\begin_layout Subsubsection
+Using C++
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Standard
+     1  #include <tango.h>
+\end_layout
+
+\begin_layout Standard
+     2  
+\end_layout
+
+\begin_layout Standard
+     3  int main(int argc,char *argv[])
+\end_layout
+
+\begin_layout Standard
+     4  {
+\end_layout
+
+\begin_layout Standard
+     5  
+\end_layout
+
+\begin_layout Standard
+     6          Tango::Util *tg;
+\end_layout
+
+\begin_layout Standard
+     7          
+\end_layout
+
+\begin_layout Standard
+     8          try
+\end_layout
+
+\begin_layout Standard
+     9          {
+\end_layout
+
+\begin_layout Standard
+    10          
+\end_layout
+
+\begin_layout Standard
+    11                  tg = Tango::Util::init(argc,argv);
+\end_layout
+
+\begin_layout Standard
+    12  
+\end_layout
+
+\begin_layout Standard
+    13                  tg->server_init();
+\end_layout
+
+\begin_layout Standard
+    14  
+\end_layout
+
+\begin_layout Standard
+    15                  cout << "Ready to accept request" << endl;
+\end_layout
+
+\begin_layout Standard
+    16                  tg->server_run();
+\end_layout
+
+\begin_layout Standard
+    17          }
+\end_layout
+
+\begin_layout Standard
+    18          catch (bad_alloc)
+\end_layout
+
+\begin_layout Standard
+    19          {
+\end_layout
+
+\begin_layout Standard
+    20                  cout << "Can't allocate memory!!!" << endl;
+\end_layout
+
+\begin_layout Standard
+    21                  cout << "Exiting" << endl;
+\end_layout
+
+\begin_layout Standard
+    22          }
+\end_layout
+
+\begin_layout Standard
+    23          catch (CORBA::Exception &e)
+\end_layout
+
+\begin_layout Standard
+    24          {
+\end_layout
+
+\begin_layout Standard
+    25                  Tango::Except::print_exception(e);
+\end_layout
+
+\begin_layout Standard
+    26                  
+\end_layout
+
+\begin_layout Standard
+    27                  cout << "Received a CORBA::Exception" << endl;
+\end_layout
+
+\begin_layout Standard
+    28                  cout << "Exiting" << endl;
+\end_layout
+
+\begin_layout Standard
+    29          }
+\end_layout
+
+\begin_layout Standard
+    30  
+\end_layout
+
+\begin_layout Standard
+    31          tg->server_cleanup();
+\end_layout
+
+\begin_layout Standard
+    32                  
+\end_layout
+
+\begin_layout Standard
+    33          return(0);
+\end_layout
+
+\begin_layout Standard
+    34  }
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : Include the 
+\series bold
+tango.h
+\series default
+ file.
+ This file is a master include file.
+ It includes several other files.
+ The list of files included by tango.h can be found in 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 11 : Create the instance of the Tango::Util
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Util
+\end_layout
+
+\end_inset
+
+ class (a singleton).
+ Passing argc,argv to this method is mandatory because the device server
+ command line is checked when the Tango::Util object is constructed.
+\end_layout
+
+\begin_layout Standard
+Line 13 : Start all the device pattern creation and initialization with
+ the 
+\emph on
+server_init()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+server-init
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method
+\end_layout
+
+\begin_layout Standard
+Line 16 : Put the server in a endless waiting loop with the 
+\emph on
+server_run()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+server-run
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ In normal case, the process should never returns from this line.
+\end_layout
+
+\begin_layout Standard
+Line 18-22 : Catch all exceptions due to memory allocation error, display
+ a message to the user and exit
+\end_layout
+
+\begin_layout Standard
+Line 23 : Catch all standard TANGO exception which could occur during device
+ pattern creation and initialization
+\end_layout
+
+\begin_layout Standard
+Line 25 : Print exception parameters
+\end_layout
+
+\begin_layout Standard
+Line 27-28 : Print an additional message
+\end_layout
+
+\begin_layout Standard
+Line 31 : Cleanup the server before exiting by calling the 
+\emph on
+server_cleanup()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+server-cleanup
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+\end_layout
+
+\begin_layout Subsubsection
+Using Java
+\end_layout
+
+\begin_layout Standard
+The 
+\emph on
+main
+\emph default
+ method can be defined in any class.
+ There is no mandatory class where it should be defined.
+ In our StepperMotor example, the 
+\emph on
+main
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+main
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method has been implemented in the StepperMotor class because it is the
+ most logical place.
+ 
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  package StepperMotor
+\end_layout
+
+\begin_layout Standard
+     2  
+\end_layout
+
+\begin_layout Standard
+     3  import java.util.*;
+\end_layout
+
+\begin_layout Standard
+     4  import org.omg.CORBA.*;
+\end_layout
+
+\begin_layout Standard
+     5  import fr.esrf.Tango.*;
+\end_layout
+
+\begin_layout Standard
+     6  import fr.esrf.TangoDs.*;
+\end_layout
+
+\begin_layout Standard
+     7  
+\end_layout
+
+\begin_layout Standard
+     8  public class StepperMotor extends DeviceImpl implements TangoConst
+\end_layout
+
+\begin_layout Standard
+     9  {
+\end_layout
+
+\begin_layout Standard
+    10          public static void main(String[] argv)
+\end_layout
+
+\begin_layout Standard
+    11          {
+\end_layout
+
+\begin_layout Standard
+    12                  try
+\end_layout
+
+\begin_layout Standard
+    13                  {
+\end_layout
+
+\begin_layout Standard
+    14                  
+\end_layout
+
+\begin_layout Standard
+    15                          Util tg = Util.init(argv,"StepperMotor");
+\end_layout
+
+\begin_layout Standard
+    16                          
+\end_layout
+
+\begin_layout Standard
+    17                          tg.server_init();
+\end_layout
+
+\begin_layout Standard
+    18                          
+\end_layout
+
+\begin_layout Standard
+    19                          System.out.println("Ready to accept request");
+\end_layout
+
+\begin_layout Standard
+    20  
+\end_layout
+
+\begin_layout Standard
+    21                          tg.server_run();
+\end_layout
+
+\begin_layout Standard
+    22                  }
+\end_layout
+
+\begin_layout Standard
+    23                  catch (OutOfMemoryError ex)
+\end_layout
+
+\begin_layout Standard
+    24                  {
+\end_layout
+
+\begin_layout Standard
+    25                          System.err.println("Can't allocate memory
+ !!!!");
+\end_layout
+
+\begin_layout Standard
+    26                          System.err.println("Exiting");
+\end_layout
+
+\begin_layout Standard
+    27                  }
+\end_layout
+
+\begin_layout Standard
+    28                  catch (UserException ex)
+\end_layout
+
+\begin_layout Standard
+    29                  {
+\end_layout
+
+\begin_layout Standard
+    30                          Except.print_exception(ex);
+\end_layout
+
+\begin_layout Standard
+    31                          
+\end_layout
+
+\begin_layout Standard
+    32                          System.err.println("Received a CORBA user
+ exception");
+\end_layout
+
+\begin_layout Standard
+    33                          System.err.println("Exiting");
+\end_layout
+
+\begin_layout Standard
+    34                  }
+\end_layout
+
+\begin_layout Standard
+    35                  catch (SystemException ex)
+\end_layout
+
+\begin_layout Standard
+    36                  {
+\end_layout
+
+\begin_layout Standard
+    37                          Except.print_exception(ex);
+\end_layout
+
+\begin_layout Standard
+    38                          
+\end_layout
+
+\begin_layout Standard
+    39                          System.err.println("Received a CORBA system
+ exception");
+\end_layout
+
+\begin_layout Standard
+    40                          System.err.println("Exiting");
+\end_layout
+
+\begin_layout Standard
+    41                  }
+\end_layout
+
+\begin_layout Standard
+    42                  
+\end_layout
+
+\begin_layout Standard
+    43                  System.exit(-1);                
+\end_layout
+
+\begin_layout Standard
+    44          
+\end_layout
+
+\begin_layout Standard
+    45          }       
+\end_layout
+
+\begin_layout Standard
+    46  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+line 1 : The StepperMotor class is part of the StepperMotor package
+\end_layout
+
+\begin_layout Standard
+Line 3-6 : Import several packages.
+ The reason of importing these package will be explained when the StepperMotor
+ class will be detailed later in this chapter
+\end_layout
+
+\begin_layout Standard
+Line 8 : Definition of the StepperMotor class (will be explained later)
+\end_layout
+
+\begin_layout Standard
+Line 10 : Definition of the 
+\emph on
+main
+\emph default
+ method
+\end_layout
+
+\begin_layout Standard
+Line 15 : Create the instance of the Util
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Util
+\end_layout
+
+\end_inset
+
+ class (a singleton).
+ Passing argv to this method is mandatory because the device server command
+ line is checked when the Util object is constructed.
+ The second argument of this 
+\emph on
+init
+\emph default
+ method is the device server executable name as defined in 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Voc"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 17 : Start all the device pattern creation and initialization
+\end_layout
+
+\begin_layout Standard
+Line 21 : Put the server in a endless waiting loop.
+ In normal case, the process should never returns from this line.
+\end_layout
+
+\begin_layout Standard
+Line 23-27 : Catch all exceptions due to memory error and display a message
+ to the user.
+ It seems strange to deal with memory allocation error with Java.The Java
+ garbage collection system reclaims memory only for object which have a
+ reference count equal to zero.
+ If, inside a program, objects are created and stay with an object reference
+ count different than zero, they will never be destructed.
+ If many of these objects are created, memory allocation errors can occurs.
+ You may think that the author of this manual is paranoid but have a look
+ at 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Java memory leak"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 28-34 : Catch CORBA user exception included the TANGO DevFailed exception
+ which could occur during device pattern creation and initialization
+\end_layout
+
+\begin_layout Standard
+Line 30 : Use the static 
+\emph on
+print_exception
+\emph default
+ method of the Except
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Except
+\end_layout
+
+\end_inset
+
+ class to print all the data members of the exception object.
+\end_layout
+
+\begin_layout Standard
+Line 35-41 : catch CORBA system exception.
+ 
+\end_layout
+
+\begin_layout Standard
+Line 37 : Use the static 
+\emph on
+print_exception
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+print-exception
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method of the Except class to print all the data members of the exception
+ object.
+\end_layout
+
+\begin_layout Standard
+Line 43 : Exit the device server
+\end_layout
+
+\begin_layout Subsection
+The DServer::class_factory method (C++ specific)
+\end_layout
+
+\begin_layout Standard
+As described in chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "DServer_class"
+
+\end_inset
+
+, C++ device server needs a 
+\emph on
+class_factory
+\emph default
+() method.
+ This method creates all the device pattern implemented in the device server
+ by calling their 
+\emph on
+init
+\emph default
+()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+init
+\end_layout
+
+\end_inset
+
+ method.
+ The following is an example of a 
+\emph on
+class_factory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+class-factory
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method for a device server with one implementation of the device server
+ pattern for stepper motor device.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  #include <tango.h>
+\end_layout
+
+\begin_layout Standard
+     2  #include <steppermotorclass.h>
+\end_layout
+
+\begin_layout Standard
+     3  
+\end_layout
+
+\begin_layout Standard
+     4  void Tango::DServer::class_factory()
+\end_layout
+
+\begin_layout Standard
+     5  {
+\end_layout
+
+\begin_layout Standard
+     6  
+\end_layout
+
+\begin_layout Standard
+     7          add_class(StepperMotor::StepperMotorClass::init("StepperMotor"))
+;
+\end_layout
+
+\begin_layout Standard
+     8  
+\end_layout
+
+\begin_layout Standard
+     9  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : Include the Tango master include file
+\end_layout
+
+\begin_layout Standard
+Line 2 : Include the steppermotorclass class definition file
+\end_layout
+
+\begin_layout Standard
+Line 7 : Create the StepperMotorClass singleton by calling its 
+\emph on
+init
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+init
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method and stores the returned pointer into the DServer object.
+ Remember that all classes for the device pattern implementation for the
+ stepper motor class is defined within a namespace
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+namespace
+\end_layout
+
+\end_inset
+
+ called 
+\emph on
+StepperMotor
+\emph default
+.
+\end_layout
+
+\begin_layout Subsection
+Writing the StepperMotorClass class
+\begin_inset CommandInset label
+LatexCommand label
+name "Command fact"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Using C++
+\end_layout
+
+\begin_layout Paragraph
+The class definition file
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  #include <tango.h>
+\end_layout
+
+\begin_layout Standard
+     2  
+\end_layout
+
+\begin_layout Standard
+     3  namespace StepperMotor
+\end_layout
+
+\begin_layout Standard
+     4  {
+\end_layout
+
+\begin_layout Standard
+     5  
+\end_layout
+
+\begin_layout Standard
+     6  class StepperMotorClass : public Tango::DeviceClass
+\end_layout
+
+\begin_layout Standard
+     7  {
+\end_layout
+
+\begin_layout Standard
+     8  public:
+\end_layout
+
+\begin_layout Standard
+     9          static StepperMotorClass *init(const char *);
+\end_layout
+
+\begin_layout Standard
+    10          static StepperMotorClass *instance();
+\end_layout
+
+\begin_layout Standard
+    11          ~StepperMotorClass() {_instance = NULL;}
+\end_layout
+
+\begin_layout Standard
+    12          
+\end_layout
+
+\begin_layout Standard
+    13  protected:
+\end_layout
+
+\begin_layout Standard
+    14          StepperMotorClass(string &);
+\end_layout
+
+\begin_layout Standard
+    15          static StepperMotorClass *_instance;
+\end_layout
+
+\begin_layout Standard
+    16          void command_factory();
+\end_layout
+
+\begin_layout Standard
+    17          void attribute_factory(vector<Tango::Attr *> &);
+\end_layout
+
+\begin_layout Standard
+    18          
+\end_layout
+
+\begin_layout Standard
+    19  public:
+\end_layout
+
+\begin_layout Standard
+    20          void device_factory(const Tango::DevVarStringArray *);
+\end_layout
+
+\begin_layout Standard
+    21  };
+\end_layout
+
+\begin_layout Standard
+    22  
+\end_layout
+
+\begin_layout Standard
+    23  } /* End of StepperMotor namespace */
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : Include the Tango master include file
+\end_layout
+
+\begin_layout Standard
+Line 3 : This class is defined within the 
+\emph on
+StepperMotor
+\emph default
+ namespace
+\end_layout
+
+\begin_layout Standard
+Line 6 : Class StepperMotorClass inherits from Tango::DeviceClass
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceClass
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 9-10 : Definition of the 
+\emph on
+init
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+init
+\end_layout
+
+\end_inset
+
+
+\emph default
+ and 
+\emph on
+instance
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+instance
+\end_layout
+
+\end_inset
+
+
+\emph default
+ methods.
+ These methods are static and can be called even if the object is not already
+ constructed.
+\end_layout
+
+\begin_layout Standard
+Line 11: The destructor
+\end_layout
+
+\begin_layout Standard
+Line 14 : The class constructor.
+ It is protected and can't be called from outside the class.
+ Only the 
+\emph on
+init
+\emph default
+ method allows a user to create an instance of this class.
+ See 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Patterns"
+
+\end_inset
+
+ to get details about the singleton design pattern.
+\end_layout
+
+\begin_layout Standard
+Line 15 : The instance pointer.
+ It is static in order to set it to NULL during process initialization phase
+\end_layout
+
+\begin_layout Standard
+Line 16 : Definition of the 
+\emph on
+command_factory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-factory
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method
+\end_layout
+
+\begin_layout Standard
+Line 17 : Definition of the 
+\emph on
+attribute_factory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute-factory
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method
+\end_layout
+
+\begin_layout Standard
+Line 20 : Definition of the 
+\emph on
+device_factory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+device-factory
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method
+\end_layout
+
+\begin_layout Paragraph
+The singleton related methods
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+ 
+\end_layout
+
+\begin_layout Standard
+     1  #include <tango.h>
+\end_layout
+
+\begin_layout Standard
+     2  
+\end_layout
+
+\begin_layout Standard
+     3  #include <steppermotor.h>
+\end_layout
+
+\begin_layout Standard
+     4  #include <steppermotorclass.h>
+\end_layout
+
+\begin_layout Standard
+     5  
+\end_layout
+
+\begin_layout Standard
+     6  namespace StepperMotor
+\end_layout
+
+\begin_layout Standard
+     7  {
+\end_layout
+
+\begin_layout Standard
+     8  
+\end_layout
+
+\begin_layout Standard
+     9  StepperMotorClass *StepperMotorClass::_instance = NULL;
+\end_layout
+
+\begin_layout Standard
+    10  
+\end_layout
+
+\begin_layout Standard
+    11  StepperMotorClass::StepperMotorClass(string &s):
+\end_layout
+
+\begin_layout Standard
+    12  Tango::DeviceClass(s)
+\end_layout
+
+\begin_layout Standard
+    13  {
+\end_layout
+
+\begin_layout Standard
+    14          INFO_STREAM << "Entering StepperMotorClass constructor"
+ << endl;
+\end_layout
+
+\begin_layout Standard
+    15          
+\end_layout
+
+\begin_layout Standard
+    16          INFO_STREAM << "Leaving StepperMotorClass constructor" <<
+ endl;
+\end_layout
+
+\begin_layout Standard
+    17  }
+\end_layout
+
+\begin_layout Standard
+    18  
+\end_layout
+
+\begin_layout Standard
+    19  
+\end_layout
+
+\begin_layout Standard
+    20  StepperMotorClass *StepperMotorClass::init(const char *name)
+\end_layout
+
+\begin_layout Standard
+    21  {
+\end_layout
+
+\begin_layout Standard
+    22          if (_instance == NULL)
+\end_layout
+
+\begin_layout Standard
+    23          {
+\end_layout
+
+\begin_layout Standard
+    24                  try
+\end_layout
+
+\begin_layout Standard
+    25                  {
+\end_layout
+
+\begin_layout Standard
+    26                          string s(name);
+\end_layout
+
+\begin_layout Standard
+    27                          _instance = new StepperMotorClass(s);
+\end_layout
+
+\begin_layout Standard
+    28                  }
+\end_layout
+
+\begin_layout Standard
+    29                  catch (bad_alloc)
+\end_layout
+
+\begin_layout Standard
+    30                  {
+\end_layout
+
+\begin_layout Standard
+    31                          throw;
+\end_layout
+
+\begin_layout Standard
+    32                  }               
+\end_layout
+
+\begin_layout Standard
+    33          }               
+\end_layout
+
+\begin_layout Standard
+    34          return _instance;
+\end_layout
+
+\begin_layout Standard
+    35  }
+\end_layout
+
+\begin_layout Standard
+    36  
+\end_layout
+
+\begin_layout Standard
+    37  StepperMotorClass *StepperMotorClass::instance()
+\end_layout
+
+\begin_layout Standard
+    38  {
+\end_layout
+
+\begin_layout Standard
+    39          if (_instance == NULL)
+\end_layout
+
+\begin_layout Standard
+    40          {
+\end_layout
+
+\begin_layout Standard
+    41                  cerr << "Class is not initialised !!" << endl;
+\end_layout
+
+\begin_layout Standard
+    42                  exit(-1);
+\end_layout
+
+\begin_layout Standard
+    43          }
+\end_layout
+
+\begin_layout Standard
+    44          return _instance;
+\end_layout
+
+\begin_layout Standard
+    45  }
+\end_layout
+
+\begin_layout Standard
+ 
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1-4 : include files: the Tango master include file (tango.h), the StepperMot
+orClass class definition file (steppermotorclass.h) and the StepperMotor
+ class definition file (steppermotor.h)
+\end_layout
+
+\begin_layout Standard
+Line 6 : Open the 
+\emph on
+StepperMotor
+\emph default
+ namespace.
+\end_layout
+
+\begin_layout Standard
+Line 9 : Initialize the static _instance field of the StepperMotorClass
+ class to NULL
+\end_layout
+
+\begin_layout Standard
+Line 11-18 : The class constructor.
+ It takes an input parameter which is the controlled device class name.
+ This parameter is passed to the constructor of the DeviceClass
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceClass
+\end_layout
+
+\end_inset
+
+ class.
+ Otherwise, the constructor does nothing except printing a message
+\end_layout
+
+\begin_layout Standard
+Line 20-35 : The 
+\emph on
+init
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+init
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ This method needs an input parameter which is the controlled device class
+ name (StepperMotor in this case).
+ This method checks is the instance is already constructed by testing the
+ _instance data member.
+ If the instance is not constructed, it creates one.
+ If the instance is already constructed, the method simply returns a pointer
+ to it.
+\end_layout
+
+\begin_layout Standard
+Line 37-45 : The 
+\emph on
+instance
+\emph default
+ method.
+ This method is very similar to the 
+\emph on
+init
+\emph default
+ method except that if the instance is not already constructed.
+ the method print a message and abort the process.
+\end_layout
+
+\begin_layout Standard
+As you can understand, it is not possible to construct more than one instance
+ of the StepperMotorClass (it is a singleton
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+singleton
+\end_layout
+
+\end_inset
+
+) and the 
+\emph on
+init
+\emph default
+ method must be called prior to any other method.
+\end_layout
+
+\begin_layout Paragraph
+The command_factory method
+\end_layout
+
+\begin_layout Standard
+Within our example, the stepper motor device supports two commands
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command
+\end_layout
+
+\end_inset
+
+ which are called DevReadPosition and DevReadDirection.
+ These two command takes a Tango::DevLong argument as input and output parameter.
+ The first command is created using the inheritance
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+inheritance
+\end_layout
+
+\end_inset
+
+ model and the second command is created using the template
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+template
+\end_layout
+
+\end_inset
+
+ command model.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  
+\end_layout
+
+\begin_layout Standard
+     2  void StepperMotorClass::command_factory()
+\end_layout
+
+\begin_layout Standard
+     3  {
+\end_layout
+
+\begin_layout Standard
+     4          command_list.push_back(new DevReadPositionCmd("DevReadPosition",
+\end_layout
+
+\begin_layout Standard
+     5                                                        Tango::DEV_LONG,
+\end_layout
+
+\begin_layout Standard
+     6                                                        Tango::DEV_LONG,
+\end_layout
+
+\begin_layout Standard
+     7                                                        "Motor number
+ (0-7)",
+\end_layout
+
+\begin_layout Standard
+     8                                                        "Motor position"))
+;
+\end_layout
+
+\begin_layout Standard
+     9                                                        
+\end_layout
+
+\begin_layout Standard
+    10          command_list.push_back(
+\end_layout
+
+\begin_layout Standard
+    11              new TemplCommandInOut<Tango::DevLong,Tango::DevLong>
+\end_layout
+
+\begin_layout Standard
+    12                  ((const char *)"DevReadDirection",
+\end_layout
+
+\begin_layout Standard
+    13                   static_cast<Tango::Lg_CmdMethPtr_Lg>
+\end_layout
+
+\begin_layout Standard
+    14                          (&StepperMotor::dev_read_direction),
+\end_layout
+
+\begin_layout Standard
+    15                   static_cast<Tango::StateMethPtr>
+\end_layout
+
+\begin_layout Standard
+    16                          (&StepperMotor::direct_cmd_allowed))
+\end_layout
+
+\begin_layout Standard
+    17                                );
+\end_layout
+
+\begin_layout Standard
+    18  }
+\end_layout
+
+\begin_layout Standard
+    19  
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 4 : Creation of one instance of the DevReadPositionCmd class.
+ The class is created with five arguments which are the command name, the
+ command type code for its input and output parameters and two strings which
+ are the command input and output parameters description.
+ The pointer returned by the new C++ keyword is added to the vector of available
+ command.
+\end_layout
+
+\begin_layout Standard
+Line 10-14 : Creation of the object used for the DevReadDirection command.
+ This command has one input and output parameter.
+ Therefore the created object is an instance of the TemplCommandInOut class.
+ This class is a C++ template class.
+ The first template parameter is the command input parameter type, the second
+ template parameter is the command output parameter type.
+ The second TemplCommandInOut
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TemplCommandInOut
+\end_layout
+
+\end_inset
+
+ class constructor parameter (set at line 13) is a pointer to the method
+ to be executed when the command is requested.
+ A casting is necessary to store this pointer as a pointer to a method of
+ the DeviceImpl class
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+The StepperMotor class inherits from the DeviceImpl class and therefore
+ is a DeviceImpl
+\end_layout
+
+\end_inset
+
+.
+ The third TemplCommandInOut class constructor parameter (set at line 15)
+ is a pointer to the method to be executed to check if the command is allowed.
+ This is necessary only if the default behavior (command always allowed)
+ does not fulfill the needs.
+ A casting is necessary to store this pointer as a pointer to a method of
+ the DeviceImpl
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceImpl
+\end_layout
+
+\end_inset
+
+ class.
+ When a command is created using the template command method, the input
+ and output parameters type are determined from the template C++ class parameter
+s.
+\end_layout
+
+\begin_layout Paragraph
+The device_factory method
+\end_layout
+
+\begin_layout Standard
+The 
+\emph on
+device_factory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+device-factory
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method has one input parameter.
+ It is a pointer to Tango::DevVarStringArray data which is the device name
+ list for this class and the instance of the device server process.
+ This list is fetch from the Tango database.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  void StepperMotorClass::device_factory(const Tango::_DevVarStringArray
+ *devlist_ptr)
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          
+\end_layout
+
+\begin_layout Standard
+     4          for (long i = 0;i < devlist_ptr->length();i++)
+\end_layout
+
+\begin_layout Standard
+     5          {
+\end_layout
+
+\begin_layout Standard
+     6                  DEBUG_STREAM << "Device name : " << (*devlist_ptr)[i]
+ << endl;
+\end_layout
+
+\begin_layout Standard
+     7                                                  
+\end_layout
+
+\begin_layout Standard
+     8                  device_list.push_back(new StepperMotor(this,
+\end_layout
+
+\begin_layout Standard
+     9                                                         (*devlist_ptr)[i]
+));                                                      
+\end_layout
+
+\begin_layout Standard
+    10  
+\end_layout
+
+\begin_layout Standard
+    11                  if (Tango::Util::_UseDb == true)
+\end_layout
+
+\begin_layout Standard
+    12                          export_device(device_list.back());
+\end_layout
+
+\begin_layout Standard
+    13                  else
+\end_layout
+
+\begin_layout Standard
+    14                          export_device(device_list.back(),(*devlist_ptr[i]
+));
+\end_layout
+
+\begin_layout Standard
+    15          }
+\end_layout
+
+\begin_layout Standard
+    16  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 4 : A loop for each device
+\end_layout
+
+\begin_layout Standard
+Line 8 : Create the device object using a StepperMotor class constructor
+ which needs two arguments.
+ These two arguments are a pointer to the StepperMotorClass instance and
+ the device name.
+ The pointer to the constructed object is then added to the device list
+ vector
+\end_layout
+
+\begin_layout Standard
+Line 11-14 : Export device to the outside world using the 
+\emph on
+export_device
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+export-device
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method of the DeviceClass class.
+\end_layout
+
+\begin_layout Paragraph
+The attribute_factory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute-factory
+\end_layout
+
+\end_inset
+
+ method
+\end_layout
+
+\begin_layout Standard
+The rule of this method is to fulfill a vector of pointer to attributes.
+ A reference to this vector is passed as argument to this method.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1     void StepperMotorClass::attribute_factory(vector<Tango::Attr
+ *> &att_list)
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          att_list.push_back(new PositionAttr());
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5          Tango::UserDefaultAttrProp def_prop;
+\end_layout
+
+\begin_layout Standard
+     6          def_prop.set_label("Set the motor position");
+\end_layout
+
+\begin_layout Standard
+     7          def_prop.set_format("scientific;setprecision(4)");
+\end_layout
+
+\begin_layout Standard
+     8          Tango::Attr *at = new SetPositionAttr();
+\end_layout
+
+\begin_layout Standard
+     9          at->set_default_properties(def_prop);
+\end_layout
+
+\begin_layout Standard
+    10          att_list.push_back(at);
+\end_layout
+
+\begin_layout Standard
+    11  
+\end_layout
+
+\begin_layout Standard
+    12          att_list.push_back(new DirectcionAttr());
+\end_layout
+
+\begin_layout Standard
+    13  }
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 3 : Create the PositionAttr class and store the pointer to this object
+ into the attribute pointer vector.
+\end_layout
+
+\begin_layout Standard
+Line 5-7 : Create a Tango::UserDefaultAttrProp instance and set the label
+ and format properties default values in this object
+\end_layout
+
+\begin_layout Standard
+Line 8 : Create the SetPositionAttr attribute.
+ 
+\end_layout
+
+\begin_layout Standard
+Line 9 : Set attribute user default value with the 
+\emph on
+set_default_properties()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+set-default-properties
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method of the Tango::Attr class.
+\end_layout
+
+\begin_layout Standard
+Line 10 : Store the pointer to this object into the attribute pointer vector.
+\end_layout
+
+\begin_layout Standard
+Line 12 : Create the DirectionAttr class and store the pointer to this object
+ into the attribute pointer vector.
+\end_layout
+
+\begin_layout Standard
+Please, note that in some rare case, it is necessary to add attribute to
+ this list during the device server life cycle.
+ This 
+\emph on
+attribute_factory()
+\emph default
+ method is called once during device server start-up.
+ A method 
+\emph on
+add_attribute()
+\emph default
+ of the DeviceImpl class allows the user to add a new attribute to the attribute
+ list outside of this 
+\emph on
+attribute_factory()
+\emph default
+ method.
+ See 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+ for more information on this method.
+\end_layout
+
+\begin_layout Subsubsection
+Using Java
+\end_layout
+
+\begin_layout Paragraph
+The singleton related method
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  package StepperMotor;
+\end_layout
+
+\begin_layout Standard
+     2  
+\end_layout
+
+\begin_layout Standard
+     3  import java.util.*;
+\end_layout
+
+\begin_layout Standard
+     4  import fr.esrf.Tango.*;
+\end_layout
+
+\begin_layout Standard
+     5  import fr.esrf.TangoDs.*;
+\end_layout
+
+\begin_layout Standard
+     6  
+\end_layout
+
+\begin_layout Standard
+     7  public class StepperMotorClass extends DeviceClass implements TangoConst
+\end_layout
+
+\begin_layout Standard
+     8  {
+\end_layout
+
+\begin_layout Standard
+     9          private static StepperMotorClass        _instance = null;
+\end_layout
+
+\begin_layout Standard
+    10          
+\end_layout
+
+\begin_layout Standard
+    11          
+\end_layout
+
+\begin_layout Standard
+    12          public static StepperMotorClass instance()
+\end_layout
+
+\begin_layout Standard
+    13          {
+\end_layout
+
+\begin_layout Standard
+    14                  if (_instance == null)
+\end_layout
+
+\begin_layout Standard
+    15                  {
+\end_layout
+
+\begin_layout Standard
+    16                          System.err.println("StepperMotorClass is not
+ initialised !!!");
+\end_layout
+
+\begin_layout Standard
+    17                          System.err.println("Exiting");
+\end_layout
+
+\begin_layout Standard
+    18                          System.exit(-1);
+\end_layout
+
+\begin_layout Standard
+    19                  }
+\end_layout
+
+\begin_layout Standard
+    20                  return _instance;
+\end_layout
+
+\begin_layout Standard
+    21          }
+\end_layout
+
+\begin_layout Standard
+    22  
+\end_layout
+
+\begin_layout Standard
+    23  
+\end_layout
+
+\begin_layout Standard
+    24          public static StepperMotorClass init(String class_name)
+ throws DevFailed
+\end_layout
+
+\begin_layout Standard
+    25          {
+\end_layout
+
+\begin_layout Standard
+    26                  if (_instance == null)
+\end_layout
+
+\begin_layout Standard
+    27                  {
+\end_layout
+
+\begin_layout Standard
+    28                          _instance = new StepperMotorClass(class_name);
+\end_layout
+
+\begin_layout Standard
+    29                  }
+\end_layout
+
+\begin_layout Standard
+    30                  return _instance;
+\end_layout
+
+\begin_layout Standard
+    31          }
+\end_layout
+
+\begin_layout Standard
+    32          
+\end_layout
+
+\begin_layout Standard
+    33          protected StepperMotorClass(String name) throws DevFailed
+\end_layout
+
+\begin_layout Standard
+    34          {
+\end_layout
+
+\begin_layout Standard
+    35                  super(name);
+\end_layout
+
+\begin_layout Standard
+    36  
+\end_layout
+
+\begin_layout Standard
+    37                  Util.out2.println("Entering StepperMotorClass constructor"
+);
+\end_layout
+
+\begin_layout Standard
+    38          
+\end_layout
+
+\begin_layout Standard
+    39                  Util.out2.println("Leaving StepperMotorClass constructor")
+;
+\end_layout
+
+\begin_layout Standard
+    40          }
+\end_layout
+
+\begin_layout Standard
+    41  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : This class is part of the StepperMotor package.
+\end_layout
+
+\begin_layout Standard
+Line 3-5 : Import different packages.
+ The first one (
+\series bold
+java.lang.util
+\series default
+) is a classical Java package from the JDK.
+ The second one (
+\series bold
+fr.esrf.Tango
+\series default
+) is the package
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+package
+\end_layout
+
+\end_inset
+
+ generated by the IDL compiler from the Tango IDL file.
+ The last one (
+\series bold
+fr.esrf.TangoDs
+\series default
+) is the name of the package with all the root classes of the device server
+ framework.
+\end_layout
+
+\begin_layout Standard
+Line 7 : The StepperMotorClass inherits from the DeviceClass
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceClass
+\end_layout
+
+\end_inset
+
+ and implements the 
+\series bold
+TangoConst
+\series default
+ interface.
+ The TangoConst
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TangoConst
+\end_layout
+
+\end_inset
+
+ interface does not defines any method but simply defines constant variables.
+ The TangoConst interface is a member of the TangoDs package.
+\end_layout
+
+\begin_layout Standard
+Line 9 : The instance pointer.
+ It is static and private.
+ It is initialized to NULL
+\end_layout
+
+\begin_layout Standard
+Line 12-21 : The 
+\emph on
+instance
+\emph default
+ method.
+ This method is very similar to the 
+\emph on
+init
+\emph default
+ method except that if the instance is not already constructed.
+ the method print a message and abort the process.
+\end_layout
+
+\begin_layout Standard
+Line 24-31: The 
+\emph on
+init
+\emph default
+ method.
+ This method needs an input parameter which is the controlled device class
+ name (StepperMotor in this case).
+ This method checks is the instance is already constructed by testing the
+ _instance data member.
+ If the instance is not constructed, it creates one.
+ If the instance is already constructed, the method simply returns a pointer
+ to it.
+\end_layout
+
+\begin_layout Standard
+Line 33-40 : The class constructor which is protected.
+ It takes an input parameter which is the controlled device class name.
+ This parameter is passed to the constructor of the DeviceClass class (line
+ 35).
+ Otherwise, the constructor does nothing except printing a message
+\end_layout
+
+\begin_layout Standard
+As you can understand, it is not possible to construct more than one instance
+ of the StepperMotorClass (it is a singleton
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+singleton
+\end_layout
+
+\end_inset
+
+) and the 
+\emph on
+init
+\emph default
+ method must be called prior to any other method.
+\end_layout
+
+\begin_layout Paragraph
+The command_factory method
+\end_layout
+
+\begin_layout Standard
+Within our example, the stepper motor device supports two commands which
+ are called DevReadPosition and DevReadDirection.
+ These two command takes a Tango_DevLong argument as input and output parameter.
+ The first command is created using the inheritance model and the second
+ command is created using the template command model.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  public void command_factory()
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          String str = new String("DevReadPosition");
+\end_layout
+
+\begin_layout Standard
+     4          command_list.addElement(new DevReadPositionCmd(str,
+\end_layout
+
+\begin_layout Standard
+     5                               Tango_DEV_LONG,Tango_DEV_LONG,
+\end_layout
+
+\begin_layout Standard
+     6                               "Motor number (0-7)",
+\end_layout
+
+\begin_layout Standard
+     7                               "Motor position"));
+\end_layout
+
+\begin_layout Standard
+     8  
+\end_layout
+
+\begin_layout Standard
+     9          str =  new String("DevReadDirection");
+\end_layout
+
+\begin_layout Standard
+    10          command_list.addElement(new TemplCommandInOut(str,
+\end_layout
+
+\begin_layout Standard
+    11                                  "dev_read_direction",
+\end_layout
+
+\begin_layout Standard
+    12                                  "direct_cmd_allowed"));
+\end_layout
+
+\begin_layout Standard
+    13  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 4: Creation of one instance of the DevReadPositionCmd class.
+ The class is created with five arguments which are the command name, the
+ command type code for its input and output parameters and the parameters
+ description (input and output).
+ The Tango_DEV_LONG constant is defined in the TangoConst
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TangoConst
+\end_layout
+
+\end_inset
+
+ interface.
+ The reference returned by the 
+\emph on
+new
+\emph default
+ Java keyword is added to the vector of available command via the 
+\emph on
+addElement
+\emph default
+ method of the Java Vector class.
+\end_layout
+
+\begin_layout Standard
+Line 10-12 : Creation of the object used for the DevReadDirection command.
+ This command has one input and output parameter.
+ Therefore the created object is an instance of the TemplCommandInOut
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TemplCommandInOut
+\end_layout
+
+\end_inset
+
+ class.
+ The second TemplCommandInOut class constructor parameter (set at line 11)
+ is the method name to be executed when the command is requested.
+ The third TemplCommandInOut class constructor parameter (set at line 12)
+ is the method name to be executed to check if the command is allowed.
+ This is necessary only if the default behavior (command always allowed)
+ does not fulfill the needs.
+ When a command is created using the template command method, the input
+ and output parameter types are determined from the given method declaration.
+\end_layout
+
+\begin_layout Paragraph
+The device_factory method
+\end_layout
+
+\begin_layout Standard
+The 
+\emph on
+device_factory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+device-factory
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method has one input parameter.
+ It is a pointer to a DevVarStringArray
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+DevVarStringArray maps to Java String[]
+\end_layout
+
+\end_inset
+
+data which is the device name list for this class and the instance of the
+ device server process.
+ This list is fetch from the Tango database.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  public void device_factory(String[] devlist) throws DevFailed
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          for (int i = 0;i < devlist.length;i++)
+\end_layout
+
+\begin_layout Standard
+     4          {
+\end_layout
+
+\begin_layout Standard
+     5                  Util.out4.println("Device name : " + devlist[i]);
+\end_layout
+
+\begin_layout Standard
+     6                                                  
+\end_layout
+
+\begin_layout Standard
+     7                  device_list.addElement(new StepperMotor(this,
+\end_layout
+
+\begin_layout Standard
+     8                                                          devlist[i],
+\end_layout
+
+\begin_layout Standard
+     9                                                          "A Tango
+ motor",
+\end_layout
+
+\begin_layout Standard
+    10                                                          DevState.ON,
+\end_layout
+
+\begin_layout Standard
+    11                                                          "The motor
+ is ON"));
+\end_layout
+
+\begin_layout Standard
+    12  
+\end_layout
+
+\begin_layout Standard
+    13                  if (Util.instance()._UseDb == true)
+\end_layout
+
+\begin_layout Standard
+    14                          export_device(((DeviceImpl)(device_list.lastEleme
+nt())));
+\end_layout
+
+\begin_layout Standard
+    15                  else
+\end_layout
+
+\begin_layout Standard
+    16                          export_device(((DeviceImpl)(device_list.lastEleme
+nt())),
+\end_layout
+
+\begin_layout Standard
+    17                                          devlist[i]);
+\end_layout
+
+\begin_layout Standard
+    18          }
+\end_layout
+
+\begin_layout Standard
+    19  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 3 : A loop for each device
+\end_layout
+
+\begin_layout Standard
+Line 7 : Create the device object using a StepperMotor class constructor
+ which needs five arguments.
+ These five arguments are a reference to the StepperMotorClass instance,
+ the device name, the device description, the device original state and
+ the device original status.
+ The reference to the constructed object is then added to the device list
+ vector with the 
+\emph on
+addElement
+\emph default
+ method of the java.util.Vector class.
+\end_layout
+
+\begin_layout Standard
+Line 13-17 : Export device to the outside world using the 
+\emph on
+export_device
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+export-device
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method of the DeviceClass class.
+ The 
+\emph on
+lastElement
+\emph default
+ method of the java.util.Vector class returns a reference to an object of
+ the java Object class.
+ It must be casted before being passed to the 
+\emph on
+export_device
+\emph default
+ method
+\end_layout
+
+\begin_layout Paragraph
+The attribute_factory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute-factory
+\end_layout
+
+\end_inset
+
+ method
+\end_layout
+
+\begin_layout Standard
+The rule of this method is to fulfill a vector of references to attribute.
+ A reference to this vector is passed to this method.
+ The Tango core classes will use this vector to build all the attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+ related objects (An instance of the MultiAttribute class and one Attribute
+ or WAttribute object for each attribute defined in this vector).
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  public void attribute_factory(Vector att) throws DevFailed
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          att.addElement(new Attr("Position",
+\end_layout
+
+\begin_layout Standard
+     4                                  Tango_DEV_LONG,
+\end_layout
+
+\begin_layout Standard
+     5                                  AttrWriteType.READ_WITH_WRITE,
+\end_layout
+
+\begin_layout Standard
+     6                                  "SetPosition"));
+\end_layout
+
+\begin_layout Standard
+     7  
+\end_layout
+
+\begin_layout Standard
+     8          UserDefaultAttrProp def_prop = new UserDefaultAttrProp();
+\end_layout
+
+\begin_layout Standard
+     9          def_prop.set_label("set the motor position");
+\end_layout
+
+\begin_layout Standard
+    10          def_prop.set_format("scientific;setprecision(4)");
+\end_layout
+
+\begin_layout Standard
+    11          Attr at = new Attr("SetPosition",
+\end_layout
+
+\begin_layout Standard
+    12                             Tango_DEV_LONG,
+\end_layout
+
+\begin_layout Standard
+    13                             AttrWriteType.WRITE));
+\end_layout
+
+\begin_layout Standard
+    14          at.set_default_properties(def_prop);
+\end_layout
+
+\begin_layout Standard
+    15          att.addElement(at);
+\end_layout
+
+\begin_layout Standard
+    16  
+\end_layout
+
+\begin_layout Standard
+    17          att.addElement(new Attr("Direction",
+\end_layout
+
+\begin_layout Standard
+    18                                  Tango_DEV_LONG));
+\end_layout
+
+\begin_layout Standard
+    19  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 3-6 : Build a one dimension attribute of TANGO_DEV_LONG type with an
+ associate writable attribute.
+ Store a reference to this attribute in the vector.
+ In this example, the attribute display type is not defined in the Attr
+ class constructor.
+ Therefore, it will be initialized with its default value (OPERATOR).
+ Several Attr class constructors are defined with or without the attribute
+ display type.
+ See 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+ for a complete constructor list.
+\end_layout
+
+\begin_layout Standard
+Line 8-10 : Create a UserDefaultAttrProp instance and set the label and
+ format properties default values in this object
+\end_layout
+
+\begin_layout Standard
+Line 11-13 : Build a one dimension writable attribute.
+ 
+\end_layout
+
+\begin_layout Standard
+Line 14 : Set attribute user default value with the 
+\emph on
+set_default_properties()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+set-default-properties
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method of the Tango::Attr class.
+\end_layout
+
+\begin_layout Standard
+Line 15 : Store the reference to this attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+ object into the attribute vector.
+\end_layout
+
+\begin_layout Standard
+Line 17-18 : Build a one dimension attribute.
+ Store the reference to this attribute object into the attribute vector.
+\end_layout
+
+\begin_layout Standard
+Please, note that in some rare case, it is necessary to add attribute to
+ this list during the device server life cycle.
+ This 
+\emph on
+attribute_factory()
+\emph default
+ method is called once during device server start-up.
+ A method 
+\emph on
+add_attribute()
+\emph default
+ of the DeviceImpl class allows the user to add a new attribute to the attribute
+ list outside of this 
+\emph on
+attribute_factory()
+\emph default
+ method.
+ See 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+ for more information on this method.
+\end_layout
+
+\begin_layout Subsection
+The DevReadPositionCmd class
+\end_layout
+
+\begin_layout Subsubsection
+Using C++
+\end_layout
+
+\begin_layout Paragraph
+The class definition file
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  #include <tango.h>
+\end_layout
+
+\begin_layout Standard
+     2  
+\end_layout
+
+\begin_layout Standard
+     3  namespace StepperMotor
+\end_layout
+
+\begin_layout Standard
+     4  {
+\end_layout
+
+\begin_layout Standard
+     5  
+\end_layout
+
+\begin_layout Standard
+     6  class DevReadPositionCmd : public Tango::Command
+\end_layout
+
+\begin_layout Standard
+     7  {
+\end_layout
+
+\begin_layout Standard
+     8  public:
+\end_layout
+
+\begin_layout Standard
+     9          DevReadPositionCmd(const char *,Tango::CmdArgType,
+\end_layout
+
+\begin_layout Standard
+    10                             Tango::CmdArgType,
+\end_layout
+
+\begin_layout Standard
+    11                             const char *,const char *);
+\end_layout
+
+\begin_layout Standard
+    12          ~DevReadPositionCmd() {};
+\end_layout
+
+\begin_layout Standard
+    13          
+\end_layout
+
+\begin_layout Standard
+    14          virtual bool is_allowed (Tango::DeviceImpl *, const CORBA::Any
+ &);
+\end_layout
+
+\begin_layout Standard
+    15          virtual CORBA::Any *execute (Tango::DeviceImpl *, const
+ CORBA::Any &);
+\end_layout
+
+\begin_layout Standard
+    16  };
+\end_layout
+
+\begin_layout Standard
+    17  
+\end_layout
+
+\begin_layout Standard
+    18  } /* End of StepperMotor namespace */
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : Include the tango master include file
+\end_layout
+
+\begin_layout Standard
+Line 3 : Open the 
+\emph on
+StepperMotor
+\emph default
+ namespace.
+\end_layout
+
+\begin_layout Standard
+Line 6 : The DevReadPositionCmd class inherits from the Tango::Command class
+\end_layout
+
+\begin_layout Standard
+Line 9 : The constructor
+\end_layout
+
+\begin_layout Standard
+Line 12 : The destructor
+\end_layout
+
+\begin_layout Standard
+Line 14 : The definition of the 
+\emph on
+is_allowed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-allowed
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ This method is not necessary if the default behavior implemented by the
+ default 
+\emph on
+is_allowed
+\emph default
+ method fulfill the requirements.
+ The default behavior is to always allows the command execution (always
+ return true).
+\end_layout
+
+\begin_layout Standard
+Line 15: The definition of the 
+\emph on
+execute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+execute
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method
+\end_layout
+
+\begin_layout Paragraph
+The class constructor
+\end_layout
+
+\begin_layout Standard
+The class constructor does nothing.
+ It simply invoke the Command
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Command
+\end_layout
+
+\end_inset
+
+ constructor by passing it its five arguments which are:
+\end_layout
+
+\begin_layout Enumerate
+The command name
+\end_layout
+
+\begin_layout Enumerate
+The command
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command
+\end_layout
+
+\end_inset
+
+ input type code
+\end_layout
+
+\begin_layout Enumerate
+The command output type code
+\end_layout
+
+\begin_layout Enumerate
+The command input parameter description
+\end_layout
+
+\begin_layout Enumerate
+The command output parameter description
+\end_layout
+
+\begin_layout Standard
+With this 5 parameters command class constructor, the command display level
+ is not specified.
+ Therefore it is set to its default value (OPERATOR).
+ If the command does not have input or output parameter, it is not possible
+ to use the Command class constructor defined with five parameters.
+ In this case, the command constructor execute the Command class constructor
+ with three elements (class name, input type, output type) and set the input
+ or output parameter description fields with the 
+\emph on
+set_in_type_desc
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+set-in-type-desc
+\end_layout
+
+\end_inset
+
+
+\emph default
+ or 
+\emph on
+set_out_type_desc
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+set-out-type-desc
+\end_layout
+
+\end_inset
+
+
+\emph default
+ Command class methods.
+ To set the command display level, it is possible to use a 6 parameters
+ constructor or it is also possible to set it in the constructor code with
+ the 
+\emph on
+set_disp_level
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+set-disp-level
+\end_layout
+
+\end_inset
+
+ method.
+ Many Command class constructors are defined.
+ See 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+for a complete list.
+\end_layout
+
+\begin_layout Paragraph
+The is_allowed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-allowed
+\end_layout
+
+\end_inset
+
+ method
+\end_layout
+
+\begin_layout Standard
+In our example, the DevReadPosition command is allowed only if the device
+ is in the ON state.
+ This method receives two argument which are a pointer to the device object
+ on which the command must be executed and a reference to the command input
+ Any object.
+ This method returns a boolean which must be set to true if the command
+ is allowed.
+ If this boolean is set to false, the DeviceClass
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceClass
+\end_layout
+
+\end_inset
+
+ 
+\emph on
+command_handle
+\emph default
+r
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-handler
+\end_layout
+
+\end_inset
+
+ method will automatically send an exception to the caller.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  bool DevReadPositionCmd::is_allowed(Tango::DeviceImpl *device,
+\end_layout
+
+\begin_layout Standard
+     2                                      const CORBA::Any &in_any)
+\end_layout
+
+\begin_layout Standard
+     3  {
+\end_layout
+
+\begin_layout Standard
+     4          if (device->get_state() == Tango::ON)
+\end_layout
+
+\begin_layout Standard
+     5                  return true;
+\end_layout
+
+\begin_layout Standard
+     6          else
+\end_layout
+
+\begin_layout Standard
+     7                  return false;
+\end_layout
+
+\begin_layout Standard
+     8  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 4 : Call the 
+\emph on
+get_state
+\emph default
+ method of the DeviceImpl class which simply returns the device state
+\end_layout
+
+\begin_layout Standard
+Line 5 : Authorize command if the device state is ON
+\end_layout
+
+\begin_layout Standard
+Line 7 : Refuse command execution in all other cases.
+ 
+\end_layout
+
+\begin_layout Paragraph
+The execute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+execute
+\end_layout
+
+\end_inset
+
+ method
+\end_layout
+
+\begin_layout Standard
+This method receives two arguments which are a pointer to the device object
+ on which the command must be executed and a reference to the command input
+ Any object.
+ This method returns a pointer to an any object which must be initialized
+ with the data to be returned to the caller.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  CORBA::Any *DevReadPositionCmd::execute(
+\end_layout
+
+\begin_layout Standard
+     2                          Tango::DeviceImpl *device,
+\end_layout
+
+\begin_layout Standard
+     3                          const CORBA::Any &in_any)
+\end_layout
+
+\begin_layout Standard
+     4  {       
+\end_layout
+
+\begin_layout Standard
+     5          INFO_STREAM << "DevReadPositionCmd::execute(): arrived"
+ << endl;
+\end_layout
+
+\begin_layout Standard
+     6          Tango::DevLong motor;
+\end_layout
+
+\begin_layout Standard
+     7  
+\end_layout
+
+\begin_layout Standard
+     8          extract(in_any,motor);
+\end_layout
+
+\begin_layout Standard
+     9          return insert(
+\end_layout
+
+\begin_layout Standard
+    10              (static_cast<StepperMotor *>(device))->dev_read_position(mot
+or));
+\end_layout
+
+\begin_layout Standard
+    11  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 8 : Extract incoming data from the input any object using a Command
+ class 
+\emph on
+extract
+\emph default
+ helper method.
+ If the type of the data in the Any object is not a Tango::DevLong, the
+ 
+\emph on
+extract
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+extract
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method will throw an exception to the client.
+\end_layout
+
+\begin_layout Standard
+Line 9 : Call the stepper motor object method which execute the DevReadPosition
+ command and insert the returned value into an allocated Any object.
+ The Any object allocation is done by the 
+\emph on
+insert
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+insert
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method which return a pointer to this Any.
+\end_layout
+
+\begin_layout Subsubsection
+Using Java
+\end_layout
+
+\begin_layout Paragraph
+The class constructor
+\end_layout
+
+\begin_layout Standard
+The class constructor does nothing.
+ It simply invoke the Command
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Command
+\end_layout
+
+\end_inset
+
+ constructor by passing it its five arguments which are:
+\end_layout
+
+\begin_layout Enumerate
+The command name
+\end_layout
+
+\begin_layout Enumerate
+The command input type code
+\end_layout
+
+\begin_layout Enumerate
+The command output type code
+\end_layout
+
+\begin_layout Enumerate
+The command input parameter description
+\end_layout
+
+\begin_layout Enumerate
+The command output parameter description
+\end_layout
+
+\begin_layout Standard
+With this 5 parameters command class constructor, the command display level
+ is not specified.
+ Therefore it is set to its default value (OPERATOR).
+ If the command does not have input or output parameter, it is not possible
+ to use the Command class constructor defined with five parameters.
+ In this case, the command constructor execute the Command class constructor
+ with three elements (class name, input type, output type) and set the input
+ or output parameter description fields with the 
+\emph on
+set_in_type_desc
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+set-in-type-desc
+\end_layout
+
+\end_inset
+
+
+\emph default
+ or 
+\emph on
+set_out_type_desc
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+set-out-type-desc
+\end_layout
+
+\end_inset
+
+
+\emph default
+ Command class methods.
+ To set the command display level, it is possible to use a 6 parameters
+ constructor or it is also possible to set it in the constructor code with
+ the 
+\emph on
+set_disp_level
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+set-disp-level
+\end_layout
+
+\end_inset
+
+ method.
+ Many Command class constructors are defined.
+ See 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+for a complete list.
+\end_layout
+
+\begin_layout Paragraph
+The is_allowed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-allowed
+\end_layout
+
+\end_inset
+
+ method
+\end_layout
+
+\begin_layout Standard
+In our example, the DevReadPosition command is allowed only if the device
+ is in the ON state.
+ This method receives two argument which are a reference to the device object
+ on which the command must be executed and a reference to the command input
+ Any object.
+ This method returns a boolean which must be set to true if the command
+ is allowed.
+ If this boolean is set to false, the DeviceClass 
+\emph on
+command_handle
+\emph default
+r method will automatically send an exception to the caller.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  package StepperMotor;
+\end_layout
+
+\begin_layout Standard
+     2  
+\end_layout
+
+\begin_layout Standard
+     3  import org.omg.CORBA.*;
+\end_layout
+
+\begin_layout Standard
+     4  import fr.esrf.Tango.*;
+\end_layout
+
+\begin_layout Standard
+     5  import fr.ersf.TangoDs.*;
+\end_layout
+
+\begin_layout Standard
+     6  
+\end_layout
+
+\begin_layout Standard
+     7  public class DevReadPositionCmd extends Command implements TangoConst
+\end_layout
+
+\begin_layout Standard
+     8  {
+\end_layout
+
+\begin_layout Standard
+     9          public  boolean is_allowed(DeviceImpl dev, Any data_in)
+\end_layout
+
+\begin_layout Standard
+    10          {
+\end_layout
+
+\begin_layout Standard
+    11                  if (dev.get_state() == DevState.ON)
+\end_layout
+
+\begin_layout Standard
+    12                          return(true);
+\end_layout
+
+\begin_layout Standard
+    13                  else
+\end_layout
+
+\begin_layout Standard
+    14                          return(false);
+\end_layout
+
+\begin_layout Standard
+    15          }       
+\end_layout
+
+\begin_layout Standard
+    16  
+\end_layout
+
+\begin_layout Standard
+    17  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : This class is part of the StepperMotor package
+\end_layout
+
+\begin_layout Standard
+Line 3-5 : Import different packages.
+ The first one (
+\series bold
+org.omg.CORBA
+\series default
+) is a package
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+package
+\end_layout
+
+\end_inset
+
+ which contains all the CORBA related classes.
+ The second one (
+\series bold
+fr.esrf.Tango
+\series default
+) is the package generated by the IDL compiler from the Tango IDL file.
+ The last one (
+\series bold
+fr.ersf.TangoDs
+\series default
+) is the name of the package with all the root classes of the device server
+ pattern.
+\end_layout
+
+\begin_layout Standard
+Line 7 : The DevReadPositionCmd class inherits from the Command class and
+ implements the 
+\series bold
+TangoConst
+\series default
+ interface.
+ The TangoConst
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TangoConst
+\end_layout
+
+\end_inset
+
+ interface does not defines any method but simply defines constant variables.
+ The TangoConst interface is a member of the TangoDs package.
+\end_layout
+
+\begin_layout Standard
+Line 11 : Call the 
+\emph on
+get_state
+\emph default
+ method of the DeviceImpl class which simply returns a reference to the
+ device state
+\end_layout
+
+\begin_layout Standard
+Line 12 : Authorise command if the device state is ON
+\end_layout
+
+\begin_layout Standard
+Line 14 : Refuse command execution in all other cases.
+ 
+\end_layout
+
+\begin_layout Paragraph
+The execute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+execute
+\end_layout
+
+\end_inset
+
+ method
+\end_layout
+
+\begin_layout Standard
+This method receives two arguments which are a reference to the device object
+ on which the command must be executed and a reference to the command input
+ Any object.
+ This method returns a reference to an any object which must be initialized
+ with the data to be returned to the caller.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  public Any execute(DeviceImpl device,Any in_any) throws DevFailed
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          Util.out2.println("DevReadPositionCmd.execute(): arrived");
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5          int motor = extract_DevLong(in_any);
+\end_layout
+
+\begin_layout Standard
+     6  
+\end_layout
+
+\begin_layout Standard
+     7          return insert(((StepperMotor)(device)).dev_read_position(motor));
+\end_layout
+
+\begin_layout Standard
+     8  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 5 : Extract incoming data from the input any object
+\end_layout
+
+\begin_layout Standard
+Line 7 : Call the stepper motor object method which execute the DevReadPosition
+ command, insert its return value into an any and return.
+\end_layout
+
+\begin_layout Subsection
+The PositionAttr class
+\end_layout
+
+\begin_layout Subsubsection
+Using C++
+\end_layout
+
+\begin_layout Paragraph
+The class definition file
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  #include <tango.h>
+\end_layout
+
+\begin_layout Standard
+     2  #include <steppermotor.h>
+\end_layout
+
+\begin_layout Standard
+     3  
+\end_layout
+
+\begin_layout Standard
+     4  namespace StepperMotor
+\end_layout
+
+\begin_layout Standard
+     5  {
+\end_layout
+
+\begin_layout Standard
+     6  
+\end_layout
+
+\begin_layout Standard
+     7  
+\end_layout
+
+\begin_layout Standard
+     8  class PositionAttr: public Tango::Attr
+\end_layout
+
+\begin_layout Standard
+     9  {
+\end_layout
+
+\begin_layout Standard
+    10  public:
+\end_layout
+
+\begin_layout Standard
+    11          PositionAttr():Attr("Position",
+\end_layout
+
+\begin_layout Standard
+    12                              Tango::DEV_LONG,
+\end_layout
+
+\begin_layout Standard
+    13                              Tango::READ_WITH_WRITE,
+\end_layout
+
+\begin_layout Standard
+    14                              "SetPosition") {};
+\end_layout
+
+\begin_layout Standard
+    15          ~PositionAttr() {};
+\end_layout
+
+\begin_layout Standard
+    16          
+\end_layout
+
+\begin_layout Standard
+    17          virtual void read(Tango::DeviceImpl *dev,Tango::Attribute
+ &att)
+\end_layout
+
+\begin_layout Standard
+    18          {(static_cast<StepperMotor *>(dev))->read_Position(att);}
+\end_layout
+
+\begin_layout Standard
+    19          virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType
+ ty)
+\end_layout
+
+\begin_layout Standard
+    20          {return (static_cast<StepperMotor *>(dev))->is_Position_allowed(
+ty);}
+\end_layout
+
+\begin_layout Standard
+    21  };
+\end_layout
+
+\begin_layout Standard
+    22  
+\end_layout
+
+\begin_layout Standard
+    23  } /* End of StepperMotor namespace */
+\end_layout
+
+\begin_layout Standard
+    24  
+\end_layout
+
+\begin_layout Standard
+    25  #endif // _STEPPERMOTORCLASS_H
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1-2 : Include the tango master include file and the steppermotor class
+ definition include file
+\end_layout
+
+\begin_layout Standard
+Line 4 : Open the 
+\emph on
+StepperMotor
+\emph default
+ namespace.
+\end_layout
+
+\begin_layout Standard
+Line 8 : The PosiitionAttr class inherits from the Tango::Attr class
+\end_layout
+
+\begin_layout Standard
+Line 11-14 : The constructor with 4 arguments
+\end_layout
+
+\begin_layout Standard
+Line 15 : The destructor
+\end_layout
+
+\begin_layout Standard
+Line 17 : The definition of the 
+\emph on
+read
+\emph default
+ method.
+ This method forwards the call to a StepperMotor class method called 
+\emph on
+read_Position()
+\end_layout
+
+\begin_layout Standard
+Line 19 : The definition of the 
+\emph on
+is_allowed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-allowed
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ This method is not necessary if the default behaviour implemented by the
+ default 
+\emph on
+is_allowed
+\emph default
+ method fulfills the requirements.
+ The default behaviour is to always allows the attribute reading (always
+ return true).
+ This method forwards the call to a StepperMotor class method called 
+\emph on
+is_Position_allowed()
+\end_layout
+
+\begin_layout Paragraph
+The class constructor
+\end_layout
+
+\begin_layout Standard
+The class constructor does nothing.
+ It simply invoke the Attr
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Attr
+\end_layout
+
+\end_inset
+
+ constructor by passing it its four arguments which are:
+\end_layout
+
+\begin_layout Enumerate
+The attribute name
+\end_layout
+
+\begin_layout Enumerate
+The attribute data type code
+\end_layout
+
+\begin_layout Enumerate
+The attribute writable type code
+\end_layout
+
+\begin_layout Enumerate
+The name of the associated write attribute
+\end_layout
+
+\begin_layout Standard
+With this 4 parameters Attr class constructor, the attribute display level
+ is not specified.
+ Therefore it is set to its default value (OPERATOR).
+ To set the attribute display level, it is possible to use in the constructor
+ code the 
+\emph on
+set_disp_level
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+set-disp-level
+\end_layout
+
+\end_inset
+
+ method.
+ Many Attr class constructors are defined.
+ See 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+for a complete list.
+\end_layout
+
+\begin_layout Standard
+This Position attribute is a scalar attribute.
+ For spectrum attribute, instead of inheriting from the Attr class, the
+ class must inherits from the SpectrumAttr
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+SpectrumAttr
+\end_layout
+
+\end_inset
+
+ class.
+ Many SpectrumAttr class constructors are defined.
+ See 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+for a complete list.
+\end_layout
+
+\begin_layout Standard
+For Image attribute, instead of inheriting from the Attr class, the class
+ must inherits from the ImageAttr class.
+ Many ImageAttr
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ImageAttr
+\end_layout
+
+\end_inset
+
+ class constructors are defined.
+ See 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+for a complete list.
+ 
+\end_layout
+
+\begin_layout Paragraph
+The is_allowed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-allowed
+\end_layout
+
+\end_inset
+
+ method
+\end_layout
+
+\begin_layout Standard
+This method receives two argument which are a pointer to the device object
+ to which the attribute belongs to and the type of request (read or write).
+ In the PositionAttr class, this method simply "forwards" the request to
+ a method of the StepperMotor class called 
+\emph on
+is_Position_allowed()
+\emph default
+ passing the request type to this method.
+ This method returns a boolean which must be set to true if the attribute
+ is allowed.
+ If this boolean is set to false, the DeviceImpl
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceImpl
+\end_layout
+
+\end_inset
+
+ read_attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attribute
+\end_layout
+
+\end_inset
+
+ method will automatically send an exception to the caller.
+\end_layout
+
+\begin_layout Paragraph
+The read
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+execute
+\end_layout
+
+\end_inset
+
+ method
+\end_layout
+
+\begin_layout Standard
+This method receives two arguments which are a pointer to the device object
+ to which the attribute belongs to and a reference to the corresponding
+ attribute object.
+ This method "forwards" the request to a StepperMotor class called 
+\emph on
+read_Position()
+\emph default
+ passing it the reference on the attribute object.
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Subsection
+The StepperMotor class
+\end_layout
+
+\begin_layout Subsubsection
+Using C++
+\end_layout
+
+\begin_layout Paragraph
+The class definition file
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+1 #include <tango.h>
+\end_layout
+
+\begin_layout LyX-Code
+2 
+\end_layout
+
+\begin_layout LyX-Code
+3 #define AGSM_MAX_MOTORS 8 // maximum number of motors per device
+\end_layout
+
+\begin_layout LyX-Code
+4 
+\end_layout
+
+\begin_layout LyX-Code
+5 namespace StepperMotor
+\end_layout
+
+\begin_layout LyX-Code
+6 {
+\end_layout
+
+\begin_layout LyX-Code
+7 
+\end_layout
+
+\begin_layout LyX-Code
+8 class StepperMotor: public Tango::DeviceImpl
+\end_layout
+
+\begin_layout LyX-Code
+9 {
+\end_layout
+
+\begin_layout LyX-Code
+10 public :
+\end_layout
+
+\begin_layout LyX-Code
+11    StepperMotor(Tango::DeviceClass *,string &);
+\end_layout
+
+\begin_layout LyX-Code
+12    StepperMotor(Tango::DeviceClass *,const char *);
+\end_layout
+
+\begin_layout LyX-Code
+13    StepperMotor(Tango::DeviceClass *,const char *,const char *);
+\end_layout
+
+\begin_layout LyX-Code
+14    ~StepperMotor() {};
+\end_layout
+
+\begin_layout LyX-Code
+15 
+\end_layout
+
+\begin_layout LyX-Code
+16    DevLong dev_read_position(DevLong);
+\end_layout
+
+\begin_layout LyX-Code
+17    DevLong dev_read_direction(DevLong);
+\end_layout
+
+\begin_layout LyX-Code
+18    bool direct_cmd_allowed(const CORBA::Any &);
+\end_layout
+
+\begin_layout LyX-Code
+19 
+\end_layout
+
+\begin_layout LyX-Code
+20    virtual Tango::DevState dev_state();
+\end_layout
+
+\begin_layout LyX-Code
+21    virtual Tango::ConstDevString dev_status();
+\end_layout
+
+\begin_layout LyX-Code
+22 
+\end_layout
+
+\begin_layout LyX-Code
+23    virtual void always_executed_hook();
+\end_layout
+
+\begin_layout LyX-Code
+24 
+\end_layout
+
+\begin_layout LyX-Code
+25    virtual void read_attr_hardware(vector<long> &attr_list);
+\end_layout
+
+\begin_layout LyX-Code
+26 
+\end_layout
+
+\begin_layout LyX-Code
+27    void read_position(Tango::Attribute &);
+\end_layout
+
+\begin_layout LyX-Code
+28    bool is_Position_allowed(Tango::AttReqType req);
+\end_layout
+
+\begin_layout LyX-Code
+29    void write_SetPosition(Tango::WAttribute &);
+\end_layout
+
+\begin_layout LyX-Code
+30    void read_Direction(Tango::Attribute &);
+\end_layout
+
+\begin_layout LyX-Code
+31 
+\end_layout
+
+\begin_layout LyX-Code
+32    virtual void init_device();
+\end_layout
+
+\begin_layout LyX-Code
+33    virtual void delete_device();
+\end_layout
+
+\begin_layout LyX-Code
+34 
+\end_layout
+
+\begin_layout LyX-Code
+35    void get_device_properties();
+\end_layout
+
+\begin_layout LyX-Code
+36 
+\end_layout
+
+\begin_layout LyX-Code
+37 protected : 
+\end_layout
+
+\begin_layout LyX-Code
+38    long axis[AGSM_MAX_MOTORS];
+\end_layout
+
+\begin_layout LyX-Code
+39    DevLong position[AGSM_MAX_MOTORS];
+\end_layout
+
+\begin_layout LyX-Code
+40    DevLong direction[AGSM_MAX_MOTORS];
+\end_layout
+
+\begin_layout LyX-Code
+41    long state[AGSM_MAX_MOTORS];
+\end_layout
+
+\begin_layout LyX-Code
+42 
+\end_layout
+
+\begin_layout LyX-Code
+43    Tango::DevLong *attr_Position_read;
+\end_layout
+
+\begin_layout LyX-Code
+44    Tango::DevLong *attr_Direction_read;
+\end_layout
+
+\begin_layout LyX-Code
+45    Tango::DevLong attr_SetPosition_write;
+\end_layout
+
+\begin_layout LyX-Code
+46 
+\end_layout
+
+\begin_layout LyX-Code
+47    Tango::DevLong min;
+\end_layout
+
+\begin_layout LyX-Code
+48    Tango::DevLong max;
+\end_layout
+
+\begin_layout LyX-Code
+49 
+\end_layout
+
+\begin_layout LyX-Code
+50    Tango::DevLong *ptr;
+\end_layout
+
+\begin_layout LyX-Code
+51 };
+\end_layout
+
+\begin_layout LyX-Code
+52 
+\end_layout
+
+\begin_layout LyX-Code
+53 } /* End of StepperMotor namespace */
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : Include the Tango master include file
+\end_layout
+
+\begin_layout Standard
+Line 5 : Open the 
+\emph on
+StepperMotor
+\emph default
+ namespace.
+\end_layout
+
+\begin_layout Standard
+Line 8 : The StepperMotor class inherits from the DeviceImpl class
+\end_layout
+
+\begin_layout Standard
+Line 11-13 : Three different object constructors
+\end_layout
+
+\begin_layout Standard
+Line 14 : The destructor which calls the 
+\emph on
+delete_device()
+\emph default
+ method
+\end_layout
+
+\begin_layout Standard
+Line 16 : The method to be called for the execution of the DevReadPosition
+ command.
+ This method must be declared as virtual if it is needed to redefine it
+ in a class inheriting from StepperMotor.
+ See chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Inheriting"
+
+\end_inset
+
+ for more details about inheriting.
+\end_layout
+
+\begin_layout Standard
+Line 17 : The method to be called for the execution of the DevReadDirection
+ command
+\end_layout
+
+\begin_layout Standard
+Line 18 : The method called to check if the execution of the DevReadDirection
+ command is allowed.
+ This method is necessary because the DevReadDirection command is created
+ using the template command method and the default behavior is not acceptable
+\end_layout
+
+\begin_layout Standard
+Line 20 : Redefinition of the 
+\emph on
+dev_state
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+dev-state
+\end_layout
+
+\end_inset
+
+.
+ This method is used by the State
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+State
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+Line 21 : Redefinition of the 
+\emph on
+dev_status
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+dev-status
+\end_layout
+
+\end_inset
+
+.
+ This method is used by the Status
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Status
+\end_layout
+
+\end_inset
+
+ command
+\end_layout
+
+\begin_layout Standard
+Line 23 : Redefinition of the 
+\emph on
+always_executed_hook
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+always-executed-hook
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ This method is the place to code mandatory action which must be executed
+ prior to any command.
+\end_layout
+
+\begin_layout Standard
+Line 25-30 : Attribute related methods
+\end_layout
+
+\begin_layout Standard
+Line 32 : Definition of the 
+\emph on
+init_device
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+init-device
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+\end_layout
+
+\begin_layout Standard
+Line 33 : Definition of the 
+\emph on
+delete_device
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+delete-device
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method
+\end_layout
+
+\begin_layout Standard
+Line 35 : Definition of the 
+\emph on
+get_device_properties
+\emph default
+ method
+\end_layout
+
+\begin_layout Standard
+Line 38-50 : Data members.
+ 
+\end_layout
+
+\begin_layout Standard
+Line 43-44 : Pointers to data for readable attributes Position and Direction
+\end_layout
+
+\begin_layout Standard
+Line 45 : Data for the SetPosition attribute
+\end_layout
+
+\begin_layout Standard
+Line 47-48 : Data members for the two device properties
+\end_layout
+
+\begin_layout Paragraph
+The constructors
+\end_layout
+
+\begin_layout Standard
+Three constructors are defined here.
+ It is not mandatory to defined three constructors.
+ But at least one is mandatory.
+ The three constructors take a pointer to the StepperMotorClass instance
+ as first parameter
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+The StepperMotorClass inherits from the DeviceClass and therefore is a DeviceCla
+ss
+\end_layout
+
+\end_inset
+
+.
+ The second parameter is the device name as a C++ string or as a classical
+ pointer to char array.
+ The third parameter necessary only for the third form of constructor is
+ the device description string passed as a classical pointer to a char array.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  #include <tango.h>
+\end_layout
+
+\begin_layout Standard
+     2  #include <steppermotor.h>
+\end_layout
+
+\begin_layout Standard
+     3  
+\end_layout
+
+\begin_layout Standard
+     4  namespace StepperMotor
+\end_layout
+
+\begin_layout Standard
+     5  {
+\end_layout
+
+\begin_layout Standard
+     6  
+\end_layout
+
+\begin_layout Standard
+     7  StepperMotor::StepperMotor(Tango::DeviceClass *cl,string &s)
+\end_layout
+
+\begin_layout Standard
+     8  :Tango::DeviceImpl(cl,s.c_str())
+\end_layout
+
+\begin_layout Standard
+     9  {
+\end_layout
+
+\begin_layout Standard
+    10          init_device();
+\end_layout
+
+\begin_layout Standard
+    11  }
+\end_layout
+
+\begin_layout Standard
+    12  
+\end_layout
+
+\begin_layout Standard
+    13  StepperMotor::StepperMotor(Tango::DeviceClass *cl,const char *s)
+\end_layout
+
+\begin_layout Standard
+    14  :Tango::DeviceImpl(cl,s)
+\end_layout
+
+\begin_layout Standard
+    15  {
+\end_layout
+
+\begin_layout Standard
+    16          init_device();
+\end_layout
+
+\begin_layout Standard
+    17  }
+\end_layout
+
+\begin_layout Standard
+    18  
+\end_layout
+
+\begin_layout Standard
+    19  StepperMotor::StepperMotor(Tango::DeviceClass *cl,const char *s,const
+ char *d)
+\end_layout
+
+\begin_layout Standard
+    20  :Tango::DeviceImpl(cl,s,d)
+\end_layout
+
+\begin_layout Standard
+    21  {
+\end_layout
+
+\begin_layout Standard
+    22          init_device();
+\end_layout
+
+\begin_layout Standard
+    23  }
+\end_layout
+
+\begin_layout Standard
+    24  
+\end_layout
+
+\begin_layout Standard
+    25  void StepperMotor::init_device()
+\end_layout
+
+\begin_layout Standard
+    26  {
+\end_layout
+
+\begin_layout Standard
+    27          cout << "StepperMotor::StepperMotor() create " << device_name
+ << endl;
+\end_layout
+
+\begin_layout Standard
+    28  
+\end_layout
+
+\begin_layout Standard
+    29          long i;
+\end_layout
+
+\begin_layout Standard
+    30  
+\end_layout
+
+\begin_layout Standard
+    31          for (i=0; i< AGSM_MAX_MOTORS; i++)
+\end_layout
+
+\begin_layout Standard
+    32          {
+\end_layout
+
+\begin_layout Standard
+    33                  axis[i] = 0;
+\end_layout
+
+\begin_layout Standard
+    34                  position[i] = 0;
+\end_layout
+
+\begin_layout Standard
+    35                  direction[i] = 0;
+\end_layout
+
+\begin_layout Standard
+    36          }
+\end_layout
+
+\begin_layout Standard
+    37  
+\end_layout
+
+\begin_layout Standard
+    38          ptr = new Tango::DevLong[10];
+\end_layout
+
+\begin_layout Standard
+    39  
+\end_layout
+
+\begin_layout Standard
+    40          get_device_properties();
+\end_layout
+
+\begin_layout Standard
+    41  }
+\end_layout
+
+\begin_layout Standard
+    42  
+\end_layout
+
+\begin_layout Standard
+    43  void StepperMotor::delete_device()
+\end_layout
+
+\begin_layout Standard
+    44  {
+\end_layout
+
+\begin_layout Standard
+    45          delete [] ptr;
+\end_layout
+
+\begin_layout Standard
+    46  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1-2 : Include the Tango master include file (tango.h) and the StepperMotor
+ class definition file (steppermotor.h)
+\end_layout
+
+\begin_layout Standard
+Line 4 : Open the 
+\emph on
+StepperMotor
+\emph default
+ namespace
+\end_layout
+
+\begin_layout Standard
+Line 7-11 : The first form of the class constructor.
+ It execute the Tango::DeviceImpl class constructor with the two parameters.
+ Note that the device name passed to this constructor as a C++ string is
+ passed to the Tango::DeviceImpl
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceImpl
+\end_layout
+
+\end_inset
+
+ constructor as a classical C string.
+ Then the 
+\emph on
+init_device
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+init-device
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method is executed.
+\end_layout
+
+\begin_layout Standard
+Line 13-17 : The second form of the class constructor.
+ It execute the Tango::DeviceImpl class constructor with its two parameters.
+ Then the 
+\emph on
+init_device
+\emph default
+ method is executed.
+\end_layout
+
+\begin_layout Standard
+Line 19-23: The third form of constructor.
+ Again, it execute the Tango::DeviceImpl class constructor with its three
+ parameters.
+ Then the 
+\emph on
+init_device
+\emph default
+ method is executed.
+\end_layout
+
+\begin_layout Standard
+Line 25-41 : The 
+\emph on
+init_device
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+init-device
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ All the device data initialization is done in this method.
+ The device properties are also retrieved from database with a call to the
+ 
+\emph on
+get_device_properties
+\emph default
+ method at line 40.
+ The device data member called 
+\emph on
+ptr
+\emph default
+ is initialized with allocated memory at line 38.
+ It is not needed to have this pointer, it has been added only for educational
+ purpose.
+\end_layout
+
+\begin_layout Standard
+Line 43-46 : The 
+\emph on
+delete_device
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+delete-device
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ The rule of this method is to free memory allocated in the 
+\emph on
+init_device
+\emph default
+ method.
+ In our case , only the device data member 
+\emph on
+ptr
+\emph default
+ is allocated in the 
+\emph on
+init_device
+\emph default
+ method.
+ Therefore, its memory is freed at line 45.
+ This method is called by the automatically added Init command before it
+ calls the 
+\emph on
+init_device
+\emph default
+ method.
+ It is also called by the device destructor.
+\end_layout
+
+\begin_layout Paragraph
+The methods used for the DevReadDirection command
+\end_layout
+
+\begin_layout Standard
+The DevReadDirection command is created using the template command method.
+ Therefore, there is no specific class needed for this command but only
+ one object of the TemplCommandInOut class.
+ This command needs two methods which are the 
+\emph on
+dev_read_direction
+\emph default
+ method and the 
+\emph on
+direct_cmd_allowed
+\emph default
+ method.
+ The 
+\emph on
+direct_cmd_allowed
+\emph default
+ method defines here implements exactly the same behavior than the default
+ one.
+ This method has been used only for pedagogic issue.
+ The 
+\emph on
+dev_read_direction
+\emph default
+ method will be executed by the 
+\emph on
+execute
+\emph default
+ method of the TemplCommandInOut
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TemplCommandInOut
+\end_layout
+
+\end_inset
+
+ class.
+ The 
+\emph on
+direct_cmd_allowed
+\emph default
+ method will be executed by the 
+\emph on
+is_allowed
+\emph default
+ method of the TemplCommandInOut class.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+1  DevLong StepperMotor::dev_read_direction(DevLong axis)
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          if (axis < 0 || axis > AGSM_MAX_MOTORS)
+\end_layout
+
+\begin_layout Standard
+     4          {
+\end_layout
+
+\begin_layout Standard
+     5                  WARNING_STREAM << "Steppermotor::dev_read_direction():
+ axis out of range !";
+\end_layout
+
+\begin_layout Standard
+     6                  WARNING_STREAM << endl;
+\end_layout
+
+\begin_layout Standard
+     7                  TangoSys_OMemStream o;
+\end_layout
+
+\begin_layout Standard
+     8                  
+\end_layout
+
+\begin_layout Standard
+     9                  o << "Axis number " << axis << " out of range" <<
+ ends;
+\end_layout
+
+\begin_layout Standard
+    10                  throw_exception((const char *)"StepperMotor_OutOfRange",
+\end_layout
+
+\begin_layout Standard
+    11                                  o.str(),
+\end_layout
+
+\begin_layout Standard
+    12                                  (const char *)"StepperMotor::dev_read_di
+rection");
+\end_layout
+
+\begin_layout Standard
+    13          }
+\end_layout
+
+\begin_layout Standard
+    14  
+\end_layout
+
+\begin_layout Standard
+    15          return direction[axis];
+\end_layout
+
+\begin_layout Standard
+    16  }
+\end_layout
+
+\begin_layout Standard
+    17  
+\end_layout
+
+\begin_layout Standard
+    18  
+\end_layout
+
+\begin_layout Standard
+    19  bool StepperMotor::direct_cmd_allowed(const CORBA::Any &in_data)
+\end_layout
+
+\begin_layout Standard
+    20  {
+\end_layout
+
+\begin_layout Standard
+    21          INFO_STREAM << "In direct_cmd_allowed() method" << endl;
+\end_layout
+
+\begin_layout Standard
+    22          
+\end_layout
+
+\begin_layout Standard
+    23          return true;
+\end_layout
+
+\begin_layout Standard
+    24  }
+\end_layout
+
+\begin_layout Standard
+    25  
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1-16 : The 
+\emph on
+dev_read_direction
+\emph default
+ method
+\end_layout
+
+\begin_layout Standard
+Line 5-12 : Throw exception to client if the received axis number is out
+ of range
+\end_layout
+
+\begin_layout Standard
+Line 7 : A TangoSys_OMemStream is used as stream.
+ The TangoSys_OMemStream has been defined in improve portability across
+ platform.
+ For Unix like operating system, it is a ostrtream type.
+ For operating system with a full implementation of the standard library,
+ it is a ostringstream type.
+\end_layout
+
+\begin_layout Standard
+Line 19-24 : The 
+\emph on
+direct_cmd_allowed
+\emph default
+ method.
+ The command input data is passed to this method in case of it is needed
+ to take the decision.
+ This data is still packed into the CORBA Any object.
+\end_layout
+
+\begin_layout Paragraph
+The methods used for the Position attribute
+\end_layout
+
+\begin_layout Standard
+To enable reading of attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+, the StepperMotor class must re-define two or three methods called 
+\emph on
+read_attr_hardware
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attr-hardware
+\end_layout
+
+\end_inset
+
+(), read_<Attribute_name>()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-Position
+\end_layout
+
+\end_inset
+
+
+\emph default
+ and if necessary a method called 
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+is_<Attribute_name>_allowed().
+
+\emph default
+ The aim of the first one is to read the hardware.
+ It will be called only once at the beginning of each read_attribute CORBA
+ call.
+ The second method aim is to build the exact data for the wanted attribute
+ and to store this value into the Attribute object.
+ Special care has been taken in order to minimize the number of data copy
+ and allocation.
+ The data passed to the Attribute object as attribute value is passed using
+ pointers.
+ It must be allocated by the method
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+It can also be data declared as object data members or memory declared as
+ static
+\end_layout
+
+\end_inset
+
+ and the Attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Attribute
+\end_layout
+
+\end_inset
+
+ object will not free this memory.
+ Data members called attr_<Attribute_name>_read are foreseen for this usage.
+ The 
+\emph on
+read_attr_hardware()
+\emph default
+ method receives a vector of long which are indexes into the main attributes
+ vector of the attributes to be read.
+ The 
+\emph on
+read_Position()
+\emph default
+ method receives a reference to the Attribute object.
+ The third method (
+\emph on
+is_Position_allowed()
+\emph default
+) aim is to allow or dis-allow, the attribute reading.
+ In some cases, some attributes can be read only if some conditions are
+ met.
+ If this method returns true, the 
+\emph on
+read_<Attribute_name>()
+\emph default
+ method will be called.
+ Otherwise, an error will be generated for the attribute.
+ This method receives one argument which is an emumeration describing the
+ attribute request type (read or write).
+ In our example, the reading of the Position attribute is allowed only if
+ the device state is ON.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  void StepperMotor::read_attr_hardware(vector<long> &attr_list)
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          INFO_STREAM << "In read_attr_hardware for " << attr_list.size();
+\end_layout
+
+\begin_layout Standard
+     4          INFO_STREAM << " attribute(s)" << endl;
+\end_layout
+
+\begin_layout Standard
+     5  
+\end_layout
+
+\begin_layout Standard
+     6          for (long i = 0;i < attr_list.size();i++)
+\end_layout
+
+\begin_layout Standard
+     7          {
+\end_layout
+
+\begin_layout Standard
+     8                  string attr_name;
+\end_layout
+
+\begin_layout Standard
+     9                  attr_name = dev_attr->get_attr_by_ind(attr_list[i]).get_n
+ame();
+\end_layout
+
+\begin_layout Standard
+    10  
+\end_layout
+
+\begin_layout Standard
+    11                  if (attr_name == "Position")
+\end_layout
+
+\begin_layout Standard
+    12                  {
+\end_layout
+
+\begin_layout Standard
+    13                          attr_Position_read = &(position[0]);
+\end_layout
+
+\begin_layout Standard
+    14                  }
+\end_layout
+
+\begin_layout Standard
+    15                  else if (attr_name == "Direction")
+\end_layout
+
+\begin_layout Standard
+    16                  {
+\end_layout
+
+\begin_layout Standard
+    17                          attr_Direction_read = &(direction[0]);
+\end_layout
+
+\begin_layout Standard
+    18                  }
+\end_layout
+
+\begin_layout Standard
+    19          }
+\end_layout
+
+\begin_layout Standard
+    20  }
+\end_layout
+
+\begin_layout Standard
+    21  
+\end_layout
+
+\begin_layout Standard
+    22  void read_Position(Tango::Attribute &att)
+\end_layout
+
+\begin_layout Standard
+    23  {
+\end_layout
+
+\begin_layout Standard
+    24          att.set_value(attr_Position_read);
+\end_layout
+
+\begin_layout Standard
+    25  }
+\end_layout
+
+\begin_layout Standard
+    26  
+\end_layout
+
+\begin_layout Standard
+    27  bool is_Position_allowed(Tango::AttReqType req)
+\end_layout
+
+\begin_layout Standard
+    28  {
+\end_layout
+
+\begin_layout Standard
+    29          if (req == Tango::WRITE_REQ)
+\end_layout
+
+\begin_layout Standard
+    30                  return false;
+\end_layout
+
+\begin_layout Standard
+    31          else
+\end_layout
+
+\begin_layout Standard
+    32          {
+\end_layout
+
+\begin_layout Standard
+    33                  if (get_state() == Tango::ON)
+\end_layout
+
+\begin_layout Standard
+    34                          return true;
+\end_layout
+
+\begin_layout Standard
+    35                  else
+\end_layout
+
+\begin_layout Standard
+    36                          return false;
+\end_layout
+
+\begin_layout Standard
+    37          }
+\end_layout
+
+\begin_layout Standard
+    38  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 6 : A loop on each attribute to be read
+\end_layout
+
+\begin_layout Standard
+Line 9 : Get attribute name
+\end_layout
+
+\begin_layout Standard
+Line 11 : Test on attribute name
+\end_layout
+
+\begin_layout Standard
+Line 13 : Read hardware (pretty simple in our case)
+\end_layout
+
+\begin_layout Standard
+Line 24 : Set attribute value in Attribute object using the 
+\emph on
+set_value()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+set-value
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ This method will also initializes the attribute quality factor to Tango::ATTR_V
+ALID
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ATTR-VALID
+\end_layout
+
+\end_inset
+
+ if no alarm level are defined and will set the attribute returned date.
+ It is also possible to use a method called 
+\emph on
+set_value_date_quality()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+set-value-date-quality
+\end_layout
+
+\end_inset
+
+
+\emph default
+ which allows the user to set the attribute quality factor as well as the
+ attribute date.
+\end_layout
+
+\begin_layout Standard
+Line 33 : Test on device state
+\end_layout
+
+\begin_layout Paragraph
+The methods used for the SetPosition attribute
+\end_layout
+
+\begin_layout Standard
+To enable writing of attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+, the StepperMotor class must re-define one or two methods called 
+\emph on
+write_<Attribute_name>()
+\emph default
+ and if necessary a method called 
+\emph on
+is_<Attribute_name>_allowed().
+
+\emph default
+ The aim of the first one is to write the hardware.
+ The 
+\emph on
+write_Position()
+\emph default
+ method receives a reference to the WAttribute object.
+ The value to write is in this WAttribute object.
+ The third method (
+\emph on
+is_Position_allowed()
+\emph default
+) aim is to allow or dis-allow, the attribute writing.
+ In some cases, some attributes can be write only if some conditions are
+ met.
+ If this method returns true, the 
+\emph on
+write_<Attribute_name>()
+\emph default
+ method will be called.
+ Otherwise, an error will be generated for the attribute.
+ This method receives one argument which is an emumeration describing the
+ attribute request type (read or write).
+ For read/write attribute, this method is the same for reading and writing.
+ The input argument value makes the difference.
+\end_layout
+
+\begin_layout Standard
+For our example, it is always possible to write the SetPosition attribute.
+ Therefore, the StepperMotor class only defines a 
+\emph on
+write_SetPosition()
+\emph default
+ method.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  void StepperMotor::write_SetPosition(Tango::WAttribute &att)
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          att.get_write_value(sttr_SetPosition_write);
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5          INFO_STREAM << "Attribute SetPosition value = ";
+\end_layout
+
+\begin_layout Standard
+     6          INFO_STREAM << attr_SetPosition_write << endl;
+\end_layout
+
+\begin_layout Standard
+     7  
+\end_layout
+
+\begin_layout Standard
+     8          position[0] = attr_SetPosition_write;
+\end_layout
+
+\begin_layout Standard
+     9  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 3 : Retrieve new attribute value
+\end_layout
+
+\begin_layout Standard
+Line 5-6 : Send some messages using Tango Logging system
+\end_layout
+
+\begin_layout Standard
+Line 8 : Set the hardware (pretty simple in our case)
+\end_layout
+
+\begin_layout Paragraph
+Retrieving device properties
+\end_layout
+
+\begin_layout Standard
+Retrieving properties
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+properties
+\end_layout
+
+\end_inset
+
+ is fairly simple with the use of the database object.
+ Each Tango device is an aggregate with a DbDevice object (see figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Dvice pattern figure"
+
+\end_inset
+
+).
+ This has been grouped in a method called 
+\emph on
+get_device_properties
+\emph default
+().
+ The classes and methods of the Dbxxx objects are described in the Tango
+ API documentation.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  void DocDs::get_device_property()
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          Tango::DbData   data;
+\end_layout
+
+\begin_layout Standard
+     4          data.push_back(DbDatum("Max"));
+\end_layout
+
+\begin_layout Standard
+     5          data.push_back(DbDatum("Min"));
+\end_layout
+
+\begin_layout Standard
+     6  
+\end_layout
+
+\begin_layout Standard
+     7          get_db_device()->get_property(data);
+\end_layout
+
+\begin_layout Standard
+     8  
+\end_layout
+
+\begin_layout Standard
+     9          if (data[0].is_empty()==false)
+\end_layout
+
+\begin_layout Standard
+    10                  data[0]  >>  max;
+\end_layout
+
+\begin_layout Standard
+    11          if (data[1].is_empty()==false)
+\end_layout
+
+\begin_layout Standard
+    12                  data[1]  >>  min;
+\end_layout
+
+\begin_layout Standard
+    13  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 4-5 : Two DbDatum (one per property) are stored into a DbData object
+\end_layout
+
+\begin_layout Standard
+Line 7 : Call the database to retrieve properties value
+\end_layout
+
+\begin_layout Standard
+Line 9-10 : If the Max property is defined in the database, extract its
+ value from the DbDatum object and store it in a device data member
+\end_layout
+
+\begin_layout Standard
+Line 11-12 : If the Min property is defined in the database, extract its
+ value from the DbDatum object and store it in a device data member
+\end_layout
+
+\begin_layout Paragraph
+The remaining methods
+\end_layout
+
+\begin_layout Standard
+The remaining methods are the 
+\emph on
+dev_state, dev_status, always_executed_hook
+\emph default
+, 
+\emph on
+dev_read_position
+\emph default
+ and 
+\emph on
+read_Direction()
+\emph default
+ methods.
+ The 
+\emph on
+dev_state
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+dev-state
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method parameters are fixed.
+ It does not receive any input parameter and must return a Tango_DevState
+ data type.
+ The 
+\emph on
+dev_status
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+dev-status
+\end_layout
+
+\end_inset
+
+
+\emph default
+ parameters are also fixed.
+ It does not receive any input parameter and must return a Tango string.
+ The 
+\emph on
+always_executed_hook
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+always-executed-hook
+\end_layout
+
+\end_inset
+
+
+\emph default
+ receives nothing and return nothing.
+ The 
+\emph on
+dev_read_position
+\emph default
+ method input parameter is the motor number as a long and the returned parameter
+ is the motor position also as a long data type.
+ The 
+\emph on
+read_Direction()
+\emph default
+ method is the method for reading the Direction attribute.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+1  DevLong StepperMotor::dev_read_position(DevLong axis)
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3  
+\end_layout
+
+\begin_layout Standard
+     4          if (axis < 0 || axis > AGSM_MAX_MOTORS)
+\end_layout
+
+\begin_layout Standard
+     5          {
+\end_layout
+
+\begin_layout Standard
+     6                  WARNING_STREAM << "Steppermotor::dev_read_position():
+ axis out of range !";
+\end_layout
+
+\begin_layout Standard
+     7                  WARNING_STREAM << endl;
+\end_layout
+
+\begin_layout Standard
+     8                  
+\end_layout
+
+\begin_layout Standard
+     9                  TangoSys_OMemStream o;
+\end_layout
+
+\begin_layout Standard
+    10                  
+\end_layout
+
+\begin_layout Standard
+    11                  o << "Axis number " << axis << " out of range" <<
+ ends;
+\end_layout
+
+\begin_layout Standard
+    12                  throw_exception((const char *)"StepperMotor_OutOfRange",
+\end_layout
+
+\begin_layout Standard
+    13                                  o.str(),
+\end_layout
+
+\begin_layout Standard
+    14                                  (const char *)"StepperMotor::dev_read_po
+sition");
+\end_layout
+
+\begin_layout Standard
+    15          }
+\end_layout
+
+\begin_layout Standard
+    16  
+\end_layout
+
+\begin_layout Standard
+    17          return position[axis];
+\end_layout
+
+\begin_layout Standard
+    18  }
+\end_layout
+
+\begin_layout Standard
+    19  
+\end_layout
+
+\begin_layout Standard
+    20  void always_executed_hook()
+\end_layout
+
+\begin_layout Standard
+    21  {
+\end_layout
+
+\begin_layout Standard
+    22          INFO_STREAM << "In the always_executed_hook method << endl;
+\end_layout
+
+\begin_layout Standard
+    23  }
+\end_layout
+
+\begin_layout Standard
+    24  
+\end_layout
+
+\begin_layout Standard
+    25  Tango_DevState StepperMotor::dev_state()
+\end_layout
+
+\begin_layout Standard
+    26  {
+\end_layout
+
+\begin_layout Standard
+    27          INFO_STREAM << "In StepperMotor state command" << endl;
+\end_layout
+
+\begin_layout Standard
+    28          return DeviceImpl::dev_state();
+\end_layout
+
+\begin_layout Standard
+    29  }
+\end_layout
+
+\begin_layout Standard
+    30  
+\end_layout
+
+\begin_layout Standard
+    31  Tango_DevString StepperMotor::dev_status()
+\end_layout
+
+\begin_layout Standard
+    32  {
+\end_layout
+
+\begin_layout Standard
+    33          INFO_STREAM << "In StepperMotor status command" << endl;
+\end_layout
+
+\begin_layout Standard
+    34          return DeviceImpl::dev_status();
+\end_layout
+
+\begin_layout Standard
+    35  }
+\end_layout
+
+\begin_layout Standard
+    36  
+\end_layout
+
+\begin_layout Standard
+    37  void read_Direction(Tango::Attribute att)
+\end_layout
+
+\begin_layout Standard
+    38  {
+\end_layout
+
+\begin_layout Standard
+    39          att.set_value(attr_Direction_read);
+\end_layout
+
+\begin_layout Standard
+    40  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1-18 : The 
+\emph on
+dev_read_position
+\emph default
+ method
+\end_layout
+
+\begin_layout Standard
+Line 6-14 : Throw exception to client if the received axis number is out
+ of range
+\end_layout
+
+\begin_layout Standard
+Line 9 : A TangoSys_OMemStream is used as stream.
+ The TangoSys_OMemStream has been defined in improve portability across
+ platform.
+ For Unix like operating system, it is a ostrtream type.
+ For operating system with a full implementation of the standard library,
+ it is a ostringstream type.
+\end_layout
+
+\begin_layout Standard
+Line 20-23 : The 
+\emph on
+always_executed_hook
+\emph default
+ method.
+ It does nothing.
+ It has been included here only as pedagogic usage.
+\end_layout
+
+\begin_layout Standard
+Line 25-29 : The 
+\emph on
+dev_state
+\emph default
+ method.
+ It does exactly what the default 
+\emph on
+dev_state
+\emph default
+ does.
+ It has been included here only as pedagogic usage
+\end_layout
+
+\begin_layout Standard
+Line 31-35 : The 
+\emph on
+dev_status
+\emph default
+ method.
+ It does exactly what the default 
+\emph on
+dev_statu
+\emph default
+s does.
+ It has been included here only as pedagogic usage
+\end_layout
+
+\begin_layout Standard
+Line 37-40 : The 
+\emph on
+read_Direction
+\emph default
+ method.
+ Simply set the Attribute object internal value
+\end_layout
+
+\begin_layout Subsubsection
+Using Java
+\end_layout
+
+\begin_layout Paragraph
+The constructor
+\end_layout
+
+\begin_layout Standard
+The constructor take a reference to the StepperMotorClass instance as first
+ parameter
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+The StepperMotorClass inherits from the DeviceClass and therefore is a DeviceCla
+ss
+\end_layout
+
+\end_inset
+
+.
+ The second parameter is the device name as a Java string.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  package StepperMotor;
+\end_layout
+
+\begin_layout Standard
+     2  
+\end_layout
+
+\begin_layout Standard
+     3  import java.util.*;
+\end_layout
+
+\begin_layout Standard
+     4  import org.omg.CORBA.*;
+\end_layout
+
+\begin_layout Standard
+     5  import fr.esrf.Tango.*;
+\end_layout
+
+\begin_layout Standard
+     6  import fr.esrf.TangoDs.*;
+\end_layout
+
+\begin_layout Standard
+     7  
+\end_layout
+
+\begin_layout Standard
+     8  public class StepperMotor extends DeviceImpl implements TangoConst
+\end_layout
+
+\begin_layout Standard
+     9  {
+\end_layout
+
+\begin_layout Standard
+    10          protected final int SM_MAX_MOTORS = 8;
+\end_layout
+
+\begin_layout Standard
+    11          
+\end_layout
+
+\begin_layout Standard
+    12          protected int[]                 axis = new int[SM_MAX_MOTORS];
+\end_layout
+
+\begin_layout Standard
+    13          protected int[]                 position = new int[SM_MAX_MOTORS
+];
+\end_layout
+
+\begin_layout Standard
+    14          protected int[]                 direction = new int[SM_MAX_MOTOR
+S];     
+\end_layout
+
+\begin_layout Standard
+    15          protected int[]                 state = new int[SM_MAX_MOTORS];
+\end_layout
+
+\begin_layout Standard
+    16          
+\end_layout
+
+\begin_layout Standard
+    17          protected int[]                 attr_Direction_read = new
+ int[1];
+\end_layout
+
+\begin_layout Standard
+    18          protected int[]                 attr_Position_read = new
+ int[1];
+\end_layout
+
+\begin_layout Standard
+    19          protected int                   attr_SetPosition_write;
+\end_layout
+
+\begin_layout Standard
+    20                  
+\end_layout
+
+\begin_layout Standard
+    21  
+\end_layout
+
+\begin_layout Standard
+    22          StepperMotor(DeviceClass cl,String s,String desc,
+\end_layout
+
+\begin_layout Standard
+    23                       DevState state,String status) throws DevFailed
+\end_layout
+
+\begin_layout Standard
+    24          {
+\end_layout
+
+\begin_layout Standard
+    25                  super(cl,s,desc,state,status);
+\end_layout
+
+\begin_layout Standard
+    26                  init_device();
+\end_layout
+
+\begin_layout Standard
+    27          }
+\end_layout
+
+\begin_layout Standard
+    28  
+\end_layout
+
+\begin_layout Standard
+    29          public void init_device()
+\end_layout
+
+\begin_layout Standard
+    30          {
+\end_layout
+
+\begin_layout Standard
+    31                  System.out.println("StepperMotor() create motor "
+ + dev_name);
+\end_layout
+
+\begin_layout Standard
+    32  
+\end_layout
+
+\begin_layout Standard
+    33                  int i;
+\end_layout
+
+\begin_layout Standard
+    34  
+\end_layout
+
+\begin_layout Standard
+    35                  for (i=0; i< SM_MAX_MOTORS; i++)
+\end_layout
+
+\begin_layout Standard
+    36                  {
+\end_layout
+
+\begin_layout Standard
+    37                          axis[i] = 0;
+\end_layout
+
+\begin_layout Standard
+    38                          position[i] = 0;
+\end_layout
+
+\begin_layout Standard
+    39                          direction[i] = 0;
+\end_layout
+
+\begin_layout Standard
+    40                          state[i] = 0;
+\end_layout
+
+\begin_layout Standard
+    41                  }
+\end_layout
+
+\begin_layout Standard
+    42  
+\end_layout
+
+\begin_layout Standard
+    43          }
+\end_layout
+
+\begin_layout Standard
+    44  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 3-6: Import different packages.
+ The first one (
+\series bold
+java.lang.util
+\series default
+) is a classical Java package from the JDK.
+ The second one (
+\series bold
+org.omg.CORBA
+\series default
+) is a package
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+package
+\end_layout
+
+\end_inset
+
+ which contains all the CORBA related classes.
+ The third one (
+\series bold
+fr.esrf.Tango
+\series default
+) is the package generated by the IDL compiler from the Tango IDL file.
+ The last one (
+\series bold
+fr.esrf.TangoDs
+\series default
+) is the name of the package with all the root classes of the device server
+ pattern.
+\end_layout
+
+\begin_layout Standard
+Line 8 : The StepperMotor class inherits from the DeviceImpl
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceImpl
+\end_layout
+
+\end_inset
+
+ class and implements the 
+\series bold
+TangoConst
+\series default
+ interface.
+ The TangoConst
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TangoConst
+\end_layout
+
+\end_inset
+
+ interface does not defines any method but simply defines constant variables.
+ The TangoConst interface is a member of the TangoDs package.
+\end_layout
+
+\begin_layout Standard
+Line 10 : Define an internal constant
+\end_layout
+
+\begin_layout Standard
+Line 12-15 : Device internal variable
+\end_layout
+
+\begin_layout Standard
+Line 17-19 : Device internal variable linked to attributes
+\end_layout
+
+\begin_layout Standard
+Line 22-27 : The class constructor.
+ It execute the DeviceImpl class constructor with five parameters.
+ Then the 
+\emph on
+init_device
+\emph default
+ method is executed.
+\end_layout
+
+\begin_layout Standard
+Line 29-43 : The 
+\emph on
+init_device
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+init-device
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ All the device data initialization is done in this method.
+\end_layout
+
+\begin_layout Paragraph
+The methods used for the DevReadDirection command
+\end_layout
+
+\begin_layout Standard
+The DevReadDirection command is created using the template command method.
+ Therefore, there is no specific class needed for this command but only
+ one object of the TemplCommandInOut class.
+ This command needs two methods which are the 
+\emph on
+dev_read_direction
+\emph default
+ method and the 
+\emph on
+direct_cmd_allowed
+\emph default
+ method.
+ The 
+\emph on
+direct_cmd_allowed
+\emph default
+ method defines here implements exactly the same behavior than the default
+ one.
+ This method has been used only for pedagogic issue.
+ The 
+\emph on
+dev_read_direction
+\emph default
+ method will be executed by the 
+\emph on
+execute
+\emph default
+ method of the TemplCommandInOut class.
+ The 
+\emph on
+direct_cmd_allowed
+\emph default
+ method will be executed by the 
+\emph on
+is_allowed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+is-allowed
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method of the TemplCommandInOut
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TemplCommandInOut
+\end_layout
+
+\end_inset
+
+ class.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  public int dev_read_direction(int axis) throws DevFailed
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          if (axis < 0 || axis > SM_MAX_MOTORS)
+\end_layout
+
+\begin_layout Standard
+     4          {
+\end_layout
+
+\begin_layout Standard
+     5                  Util.out1.println("Steppermotor.dev_read_direction():
+ axis out of range !");
+\end_layout
+
+\begin_layout Standard
+     6                  
+\end_layout
+
+\begin_layout Standard
+     7                  StringBuffer o = new StringBuffer("Axis number ");
+\end_layout
+
+\begin_layout Standard
+     8                  o.append(axis);
+\end_layout
+
+\begin_layout Standard
+     9                  o.append(" out of range");
+\end_layout
+
+\begin_layout Standard
+    10                  
+\end_layout
+
+\begin_layout Standard
+    11                  Except.throw_exception("StepperMotor_AxisOutOfRange",
+\end_layout
+
+\begin_layout Standard
+    12                                         o.toString(),
+\end_layout
+
+\begin_layout Standard
+    13                                         "StepperMotor.dev_read_direction()
+");
+\end_layout
+
+\begin_layout Standard
+    14          }
+\end_layout
+
+\begin_layout Standard
+    15  
+\end_layout
+
+\begin_layout Standard
+    16          return direction[axis];
+\end_layout
+
+\begin_layout Standard
+    17  }
+\end_layout
+
+\begin_layout Standard
+    18  
+\end_layout
+
+\begin_layout Standard
+    19  public boolean direct_cmd_allowed(Any data_in)
+\end_layout
+
+\begin_layout Standard
+    20  {
+\end_layout
+
+\begin_layout Standard
+    21          Util.out2.println("In StepperMotor.direct_cmd_allowed method");
+\end_layout
+
+\begin_layout Standard
+    22  
+\end_layout
+
+\begin_layout Standard
+    23          return true;
+\end_layout
+
+\begin_layout Standard
+    24  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1-17 : The 
+\emph on
+dev_read_direction
+\emph default
+ method
+\end_layout
+
+\begin_layout Standard
+Line 3-14 : Throw exception to client if the received axis number is out
+ of range
+\end_layout
+
+\begin_layout Standard
+Line 19-24 : The 
+\emph on
+direct_cmd_allowed
+\emph default
+ method.
+ The command input data is passed to this method in case of it is needed
+ to take the decision.
+ This data is still packed into the CORBA Any object.
+\end_layout
+
+\begin_layout Paragraph
+The write attribute related method
+\end_layout
+
+\begin_layout Standard
+To enable writing of writable attributes, the StepperMotor class must re-define
+ a method called 
+\emph on
+write_attr_hardware()
+\emph default
+.
+ The aim of this method is to write the hardware.
+ This method receives a vector of Integer objects as parameters.
+ These data are the indexes of the attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+ to be written into the main attribute vector stored in the MultiAttribute
+ object.
+ Methods of the MultiAttribute class allow the retrieval of the the correct
+ attribute object from these indexes.
+ The value to be written is stored in the WAttribute object and can be retrieved
+ with WAttribute class methods called 
+\emph on
+get_xx_write_value()
+\emph default
+.
+ A data member called 
+\emph on
+attr_<Attribute_name>_write
+\emph default
+ is foreseen to temporary store this extracted value.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  public void write_attr_hardware(Vector attr_list)
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          Util.out2.println("In write_attr_hardware for "+attr_list.size()+"
+ attribute(s)");
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5          for (int i = 0;i < attr_list.size();i++)
+\end_layout
+
+\begin_layout Standard
+     6          {
+\end_layout
+
+\begin_layout Standard
+     7                  int ind = ((Integer)(attr_list.elementAt(i))).intValue();
+\end_layout
+
+\begin_layout Standard
+     8                  WAttribute att = dev_attr.get_w_attr_by_ind(ind);
+\end_layout
+
+\begin_layout Standard
+     9                  String att_name = att.get_name();
+\end_layout
+
+\begin_layout Standard
+    10  
+\end_layout
+
+\begin_layout Standard
+    11                  if (att_name.equals("SetPosition") == true)
+\end_layout
+
+\begin_layout Standard
+    12                  {
+\end_layout
+
+\begin_layout Standard
+    13                         attr_SetPosition_write = att.get_lg_write_value();
+\end_layout
+
+\begin_layout Standard
+    14                          Util.out2.println("Attribute SetPosition value
+ = "+attr_SetPosition_write);
+\end_layout
+
+\begin_layout Standard
+    15                          position[0] = attr_SetPosition_write;
+\end_layout
+
+\begin_layout Standard
+    16                  }
+\end_layout
+
+\begin_layout Standard
+    17          }
+\end_layout
+
+\begin_layout Standard
+    18  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 5 : A loop on each attribute to be written
+\end_layout
+
+\begin_layout Standard
+Line 7-9 : Retrieve attribute name
+\end_layout
+
+\begin_layout Standard
+Line 11 : A test on attribute name
+\end_layout
+
+\begin_layout Standard
+Line 13 : Retrieve new attribute value
+\end_layout
+
+\begin_layout Standard
+Line 15 : Set the hardware (very simple in our example)
+\end_layout
+
+\begin_layout Paragraph
+The read attribute related methods
+\end_layout
+
+\begin_layout Standard
+To enable reading of attributes, the StepperMotor class must re-define two
+ methods called 
+\emph on
+read_attr_hardware
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attr-hardware
+\end_layout
+
+\end_inset
+
+()
+\emph default
+ and 
+\emph on
+read_attr
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attr
+\end_layout
+
+\end_inset
+
+().
+
+\emph default
+ The aim of the first one is to read the hardware.
+ It will be called only once at the beginning of each read_attributes CORBA
+ call.
+ The second method aim is to build the exact data for the wanted attribute
+ and to store this value into the Attribute object.
+ This method will be called for each attribute to be read.
+ Special care has been taken in order to minimize the number of data copy
+ and allocation.
+ The data passed to the Attribute object as attribute value is passed using
+ pointers.
+ It must be allocated by the method
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+It can also be data declared as object data members or memory declared as
+ static
+\end_layout
+
+\end_inset
+
+ and the Attribute object will not free this memory.
+ Data members called attr_<Attribute_name>_read are foreseen for this usage.
+ As for the 
+\emph on
+write_attr_hardware()
+\emph default
+ method, the 
+\emph on
+read_attr_hardware()
+\emph default
+ method receives a vector of long which are indexes into the main attributes
+ vector of the attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+ to be read.
+ The 
+\emph on
+read_attr()
+\emph default
+ method receives a reference to the Attribute object.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  public void read_attr_hardware(Vector attr_list)
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          Util.out2.println("In read_attr_hardware for "+attr_list.size()+"
+ attribute(s)");
+\end_layout
+
+\begin_layout Standard
+     4          for (int i = 0;i< attr_list.size();i++)
+\end_layout
+
+\begin_layout Standard
+     5          {
+\end_layout
+
+\begin_layout Standard
+     6                  int ind = ((Integer)(attr_list.elementAt(i))).intValue();
+\end_layout
+
+\begin_layout Standard
+     7                  String attr_name = dev_attr.get_attr_by_ind(ind).get_name(
+);
+\end_layout
+
+\begin_layout Standard
+     8                  
+\end_layout
+
+\begin_layout Standard
+     9                  if (attr_name == "Position")
+\end_layout
+
+\begin_layout Standard
+    10                  {
+\end_layout
+
+\begin_layout Standard
+    11                          attr_Position_read[0] = position[0];
+\end_layout
+
+\begin_layout Standard
+    12                  }
+\end_layout
+
+\begin_layout Standard
+    13                  else if (attr_name == "Direction")
+\end_layout
+
+\begin_layout Standard
+    14                  {
+\end_layout
+
+\begin_layout Standard
+    15                          attr_Direction_read[0] = direction[0];
+\end_layout
+
+\begin_layout Standard
+    16                  }
+\end_layout
+
+\begin_layout Standard
+    17          }       
+\end_layout
+
+\begin_layout Standard
+    18  }
+\end_layout
+
+\begin_layout Standard
+    19  
+\end_layout
+
+\begin_layout Standard
+    20  
+\end_layout
+
+\begin_layout Standard
+    21  public void read_attr(Attribute attr) throws DevFailed
+\end_layout
+
+\begin_layout Standard
+    22  {
+\end_layout
+
+\begin_layout Standard
+    23          String attr_name = attr.get_name();
+\end_layout
+
+\begin_layout Standard
+    24          Util.out2.println("In read_attr for attribute "+attr_name);
+\end_layout
+
+\begin_layout Standard
+    25          if (attr_name.equals("Position") == true)
+\end_layout
+
+\begin_layout Standard
+    26          {
+\end_layout
+
+\begin_layout Standard
+    27                  attr.set_value(attr_Position_read);
+\end_layout
+
+\begin_layout Standard
+    28          }
+\end_layout
+
+\begin_layout Standard
+    29          else if (attr_name.equals("Direction") == true)
+\end_layout
+
+\begin_layout Standard
+    30          {
+\end_layout
+
+\begin_layout Standard
+    31                  attr.set_value(attr_Direction_read);
+\end_layout
+
+\begin_layout Standard
+    32          }
+\end_layout
+
+\begin_layout Standard
+    33  }       
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 4 : A loop on each attribute to be read
+\end_layout
+
+\begin_layout Standard
+Line 6 -7: Get attribute name
+\end_layout
+
+\begin_layout Standard
+Line9 : Test on attribute name
+\end_layout
+
+\begin_layout Standard
+Line 11 : Read hardware (pretty simple in our case)
+\end_layout
+
+\begin_layout Standard
+Line 23 : Get attribute name
+\end_layout
+
+\begin_layout Standard
+Line 25 : Test on attribute name
+\end_layout
+
+\begin_layout Standard
+Line 27 : Set attribute value in Attribute object
+\end_layout
+
+\begin_layout Paragraph
+Retrieving device properties
+\end_layout
+
+\begin_layout Standard
+Retrieving properties
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+properties
+\end_layout
+
+\end_inset
+
+ is fairly simple with the use of the database object.
+ Each Tango device is an aggregate with a DbDevice object (see figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Dvice pattern figure"
+
+\end_inset
+
+).
+ This has been grouped in a method called 
+\emph on
+get_device_properties
+\emph default
+().
+ The classes and methods of the Dbxxx objects are described in the Tango
+ API documentation.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  void public get_device_property() throws DevFailed
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          String[] prop_names = {"Max","Min"};
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5          DbDatum[] res_value = db_dev.get_property(prop_names);
+\end_layout
+
+\begin_layout Standard
+     6  
+\end_layout
+
+\begin_layout Standard
+     7          if (res_value[0].is_empty() == false)
+\end_layout
+
+\begin_layout Standard
+     8                  min = res_value[0].extractInt();
+\end_layout
+
+\begin_layout Standard
+     9          if (res_value[1].is_empty() == false)
+\end_layout
+
+\begin_layout Standard
+    10                  max = res_value[1].extractInt();
+\end_layout
+
+\begin_layout Standard
+    11  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 3 : Define the names of the properties to be retrieved
+\end_layout
+
+\begin_layout Standard
+Line 5 : Call the database to retrieve properties value
+\end_layout
+
+\begin_layout Standard
+Line 7-8 : If the Max property is defined in the database, extract its value
+ from the DbDatum object and store it in a device data member
+\end_layout
+
+\begin_layout Standard
+Line 9-10 : If the Min property is defined in the database, extract its
+ value from the DbDatum object and store it in a device data member
+\end_layout
+
+\begin_layout Paragraph
+The remaining methods
+\end_layout
+
+\begin_layout Standard
+The remaining methods are the 
+\emph on
+dev_state, dev_status, always_executed_hook
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+always-executed-hook
+\end_layout
+
+\end_inset
+
+()
+\emph default
+ and 
+\emph on
+dev_read_position
+\emph default
+ methods.
+ The 
+\emph on
+dev_state
+\emph default
+ method parameters are fixed.
+ It does not receive any input parameter and must return a DevState data
+ type.
+ The 
+\emph on
+dev_status
+\emph default
+ parameters are also fixed.
+ It does not receive any input parameter and must return reference to a
+ Java string.
+ The 
+\emph on
+always_executed_hook
+\emph default
+ receives nothing and return nothing The 
+\emph on
+dev_read_position
+\emph default
+ method input parameter is the motor number as an int and the returned parameter
+ is the motor position also as an int data type.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  int dev_read_position(int axis) throws DevFailed
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3  
+\end_layout
+
+\begin_layout Standard
+     4          if (axis < 0 || axis > SM_MAX_MOTORS)
+\end_layout
+
+\begin_layout Standard
+     5          {
+\end_layout
+
+\begin_layout Standard
+     6                  Util.out1.println("Steppermotor.dev_read_position():
+ axis out of range !");
+\end_layout
+
+\begin_layout Standard
+     7  
+\end_layout
+
+\begin_layout Standard
+     8                  StringBuffer o = new StringBuffer("Axis number ");
+\end_layout
+
+\begin_layout Standard
+     9                  o.append(axis);
+\end_layout
+
+\begin_layout Standard
+    10                  o.append(" out of range");
+\end_layout
+
+\begin_layout Standard
+    11                  
+\end_layout
+
+\begin_layout Standard
+    12                  Except.throw_exception("StepperMotor_AxisOutOfRange",
+\end_layout
+
+\begin_layout Standard
+    13                                         o.toString(),
+\end_layout
+
+\begin_layout Standard
+    14                                         "StepperMotor.dev_read_position()"
+);
+\end_layout
+
+\begin_layout Standard
+    15          }
+\end_layout
+
+\begin_layout Standard
+    16  
+\end_layout
+
+\begin_layout Standard
+    17          return position[axis];
+\end_layout
+
+\begin_layout Standard
+    18  }
+\end_layout
+
+\begin_layout Standard
+    19  
+\end_layout
+
+\begin_layout Standard
+    20  public void always_executed_hook()
+\end_layout
+
+\begin_layout Standard
+    21  {
+\end_layout
+
+\begin_layout Standard
+    22          Util.out2.println("In always_executed_hook method");    
+\end_layout
+
+\begin_layout Standard
+    23  }
+\end_layout
+
+\begin_layout Standard
+    24  
+\end_layout
+
+\begin_layout Standard
+    25  public DevState dev_state() throws DevFailed
+\end_layout
+
+\begin_layout Standard
+    26  {
+\end_layout
+
+\begin_layout Standard
+    27          Util.out2.println("In StepperMotor state command");
+\end_layout
+
+\begin_layout Standard
+    28          return super.dev_state();
+\end_layout
+
+\begin_layout Standard
+    29  }
+\end_layout
+
+\begin_layout Standard
+    30  
+\end_layout
+
+\begin_layout Standard
+    31  public String dev_status() throws DevFailed
+\end_layout
+
+\begin_layout Standard
+    32  {
+\end_layout
+
+\begin_layout Standard
+    33          Util.out2.println("In StepperMotor status command");
+\end_layout
+
+\begin_layout Standard
+    34          return super.dev_status();
+\end_layout
+
+\begin_layout Standard
+    35  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1-18 : The 
+\emph on
+dev_read_position
+\emph default
+ method
+\end_layout
+
+\begin_layout Standard
+Line 4-15 : Throw exception to client if the received axis number is out
+ of range
+\end_layout
+
+\begin_layout Standard
+Line 20-23 : The 
+\emph on
+always_executed_hook
+\emph default
+ method.It does nothing.
+ It has been included here only as pedagogic usage.
+\end_layout
+
+\begin_layout Standard
+Line 25-29 : The 
+\emph on
+dev_state
+\emph default
+ method.
+ It does exactly what the default 
+\emph on
+dev_state
+\emph default
+ does.
+ It has been included here only as pedagogic usage
+\end_layout
+
+\begin_layout Standard
+Line 31-35 : The 
+\emph on
+dev_status
+\emph default
+ method.
+ It does exactly what the default 
+\emph on
+dev_status
+\emph default
+ does.
+ It has been included here only as pedagogic usage.
+\end_layout
+
+\begin_layout Section
+Device server under Windows
+\end_layout
+
+\begin_layout Standard
+Two kind of programs are available under Windows
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Windows
+\end_layout
+
+\end_inset
+
+.
+ These kinds of programs are called console
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+console
+\end_layout
+
+\end_inset
+
+ application or Windows application.
+ A console application is started from a MS-DOS window and is very similar
+ to classical UNIX program.
+ A Windows application is most of the time not started from a MS-DOS window
+ and is generally a graphical application without standard input/output.
+ Writing a device server in a console application is straight forward following
+ the rules described in the previous sub-chapters.
+ Writing a device server in a Windows application needs some changes detailed
+ in the following sub-chapters.
+\end_layout
+
+\begin_layout Subsection
+The Tango device server graphical
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+graphical
+\end_layout
+
+\end_inset
+
+ interface
+\end_layout
+
+\begin_layout Standard
+Within the Windows operating system, most of the running application has
+ a window user interface.
+ This is also true for the Windows Tango device server.
+ Using or not this interface is up to the device server programmer.
+ The choice is done with an argument to the 
+\emph on
+server_init
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+server-init
+\end_layout
+
+\end_inset
+
+()
+\emph default
+ method of the Tango::Util
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Util
+\end_layout
+
+\end_inset
+
+ class.
+ This interface is pretty simple and is based on three windows which are
+ :
+\end_layout
+
+\begin_layout Itemize
+The device server main window
+\end_layout
+
+\begin_layout Itemize
+The device server console window
+\end_layout
+
+\begin_layout Itemize
+The device server help window
+\end_layout
+
+\begin_layout Subsubsection
+The device server main window
+\end_layout
+
+\begin_layout Standard
+This window looks like :
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Tango device server main window
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Graphics
+	filename nt_server/main.ps
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Four menus are available in this window.
+ The File menu allows the user to exit the device server.
+ The View menu allows you to display/hide the device server console window.
+ The Debug menu allows the user to change the server output verbose
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+verbose
+\end_layout
+
+\end_inset
+
+ level.
+ All the outputs goes to the console window even if it is hidden.
+ The Help menu displays the help window.
+ The device server name is displayed in the window title.
+ The text displayed at the bottom of the window has a default value (the
+ one displayed in this window dump) but may be changed by the device server
+ programmer using the 
+\emph on
+set_main_window_text(
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+set-main-window-text
+\end_layout
+
+\end_inset
+
+)
+\emph default
+ method of the Tango::Util class.
+ If used, this method must be called prior to the call of the 
+\emph on
+server_init()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+server-init
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ Refer to 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+ for a complete description of this method.
+\end_layout
+
+\begin_layout Subsubsection
+The console window
+\end_layout
+
+\begin_layout Standard
+This window looks like :
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Graphics
+	filename nt_server/cons.ps
+	width 14cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+It simply displays all the logging
+\emph on
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+logging
+\end_layout
+
+\end_inset
+
+
+\emph default
+ message when a console target is used in the device server.
+ 
+\end_layout
+
+\begin_layout Subsubsection
+The help window
+\end_layout
+
+\begin_layout Standard
+This window looks like :
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Graphics
+	filename nt_server/help.ps
+	width 9cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This window displays 
+\end_layout
+
+\begin_layout Itemize
+The device server name
+\end_layout
+
+\begin_layout Itemize
+The Tango library release
+\end_layout
+
+\begin_layout Itemize
+The Tango IDL definition release
+\end_layout
+
+\begin_layout Itemize
+The device server release.
+ The device server programmer may set this release number using the 
+\emph on
+set_server_version()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+set-server-version
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method of the Tango::Util
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Util
+\end_layout
+
+\end_inset
+
+ class.
+ If used, this must be done prior to the call of the 
+\emph on
+server_init()
+\emph default
+ method.
+ If the 
+\emph on
+set_server_version()
+\emph default
+ method is not used, x.y is displays as version number.
+ Refer to 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "TANGO_ref_man"
+
+\end_inset
+
+ for a complete description of this method.
+\end_layout
+
+\begin_layout Subsection
+MFC device server
+\end_layout
+
+\begin_layout Standard
+There is no 
+\emph on
+main
+\emph default
+ function within a classical MFC
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+MFC
+\end_layout
+
+\end_inset
+
+ program.
+ Most of the time, your application is represented by one instance of a
+ C++ class which inherits from the MFC CWinApp class.
+ This CWinApp class has several methods that you may overload in your applicatio
+n class.
+ For a device server to run correctly, you must overload two methods of
+ the CWinApp class.
+ These methods are the 
+\emph on
+InitInstance()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+InitInstance
+\end_layout
+
+\end_inset
+
+
+\emph default
+ and 
+\emph on
+ExitInstance()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ExitInstance
+\end_layout
+
+\end_inset
+
+
+\emph default
+ methods.
+ The rule of these methods is obvious following their names.
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+Remember that if the Tango device server graphical user interface is used,
+ you must link your device server with the Tango windows resource
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+resource
+\end_layout
+
+\end_inset
+
+ file
+\series default
+.
+ This is done by adding the Tango resource file to the Project Settings/Link/Inp
+ut/Object, library modules window in VC++.
+\end_layout
+
+\begin_layout Subsubsection
+The InitInstance method
+\end_layout
+
+\begin_layout Standard
+The code to be added here is the equivalent of the code written in a classical
+ 
+\emph on
+main()
+\emph default
+ function.
+ Don't forget to add the 
+\emph on
+tango.h
+\emph default
+ file in the list of included files.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1 BOOL FluidsApp::InitInstance()
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          AfxEnableControlContainer();
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5          // Standard initialization
+\end_layout
+
+\begin_layout Standard
+     6          // If you are not using these features and wish to reduce
+ the size
+\end_layout
+
+\begin_layout Standard
+     7          //  of your final executable, you should remove from the
+ following
+\end_layout
+
+\begin_layout Standard
+     8          //  the specific initialization routines you do not need.
+\end_layout
+
+\begin_layout Standard
+     9  
+\end_layout
+
+\begin_layout Standard
+    10  #ifdef _AFXDLL
+\end_layout
+
+\begin_layout Standard
+    11          Enable3dControls();                     // Call this when
+ using MFC in a shared DLL
+\end_layout
+
+\begin_layout Standard
+    12  #else
+\end_layout
+
+\begin_layout Standard
+    13          Enable3dControlsStatic();       // Call this when linking
+ to MFC statically
+\end_layout
+
+\begin_layout Standard
+    14  #endif
+\end_layout
+
+\begin_layout Standard
+    15          Tango::Util *tg;
+\end_layout
+
+\begin_layout Standard
+    16          try
+\end_layout
+
+\begin_layout Standard
+    17          {
+\end_layout
+
+\begin_layout Standard
+    18          
+\end_layout
+
+\begin_layout Standard
+    19                  tg = Tango::Util::init(m_hInstance,m_nCmdShow);
+\end_layout
+
+\begin_layout Standard
+    20  
+\end_layout
+
+\begin_layout Standard
+    21                  tg->server_init(true);
+\end_layout
+
+\begin_layout Standard
+    22  
+\end_layout
+
+\begin_layout Standard
+    23                  tg->server_run();
+\end_layout
+
+\begin_layout Standard
+    24  
+\end_layout
+
+\begin_layout Standard
+    25          }
+\end_layout
+
+\begin_layout Standard
+    26          catch (bad_alloc)
+\end_layout
+
+\begin_layout Standard
+    27          {
+\end_layout
+
+\begin_layout Standard
+    28                  MessageBox((HWND)NULL,"Memory error","Command line",MB_I
+CONSTOP);
+\end_layout
+
+\begin_layout Standard
+    29                  return(FALSE);
+\end_layout
+
+\begin_layout Standard
+    30          }
+\end_layout
+
+\begin_layout Standard
+    31          catch (Tango::DevFailed &e)
+\end_layout
+
+\begin_layout Standard
+    32          {
+\end_layout
+
+\begin_layout Standard
+    33                  MessageBox((HWND)NULL,,e.errors[0].desc.in(),"Command
+ line",MB_ICONSTOP);
+\end_layout
+
+\begin_layout Standard
+    34                  return(FALSE);
+\end_layout
+
+\begin_layout Standard
+    35          }
+\end_layout
+
+\begin_layout Standard
+    36          catch (CORBA::Exception &)
+\end_layout
+
+\begin_layout Standard
+    37          {
+\end_layout
+
+\begin_layout Standard
+    38                  MessageBox((HWND)NULL,"Exception CORBA","Command
+ line",MB_ICONSTOP);
+\end_layout
+
+\begin_layout Standard
+    39                  return(FALSE);
+\end_layout
+
+\begin_layout Standard
+    40          }
+\end_layout
+
+\begin_layout Standard
+    41  
+\end_layout
+
+\begin_layout Standard
+    42          m_pMainWnd = new CWnd;
+\end_layout
+
+\begin_layout Standard
+    43          m_pMainWnd->Attach(tg->get_ds_main_window());
+\end_layout
+
+\begin_layout Standard
+    44  
+\end_layout
+
+\begin_layout Standard
+    45          return TRUE;
+\end_layout
+
+\begin_layout Standard
+    46  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 19 : Initialise Tango system.
+ This method also analises the argument used in command line.
+\end_layout
+
+\begin_layout Standard
+Line 21 : Create Tango classes requesting the Tango Windows graphical
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+graphical
+\end_layout
+
+\end_inset
+
+ interface to be used
+\end_layout
+
+\begin_layout Standard
+Line 23 : Start Network listener.
+ Note that under NT, this call returns in the contrary of UNIX like operating
+ system.
+\end_layout
+
+\begin_layout Standard
+Line 26-30 : Display a message box in case of memory allocation error and
+ leave method with a return value set to false in order to stop the process
+\end_layout
+
+\begin_layout Standard
+Line 31-35 : Display a message box in case of error during server initialization
+ phase.
+\end_layout
+
+\begin_layout Standard
+Line 36-40 : Display a message box in case of error other than memory allocation.
+ Leave method with a return value set to false in order to stop the process.
+\end_layout
+
+\begin_layout Standard
+Line 37-38 : Create a MFC
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+MFC
+\end_layout
+
+\end_inset
+
+ main window and attach the Tango graphical interface main window to this
+ MFC window.
+\end_layout
+
+\begin_layout Subsubsection
+The ExitInstance
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ExitInstance
+\end_layout
+
+\end_inset
+
+ method
+\end_layout
+
+\begin_layout Standard
+This method is called when the application is stopped.
+ For Tango device server, its rule is to destroy the Tango::Util singleton
+ if this one has been correctly constructed.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  int FluidsApp::ExitInstance()
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          bool del = true;
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5          try
+\end_layout
+
+\begin_layout Standard
+     6          {
+\end_layout
+
+\begin_layout Standard
+     7                  Tango::Util *tg = Tango::Util::instance();
+\end_layout
+
+\begin_layout Standard
+     8          }
+\end_layout
+
+\begin_layout Standard
+     9          catch(Tango::DevFailed)
+\end_layout
+
+\begin_layout Standard
+    10          {
+\end_layout
+
+\begin_layout Standard
+    11                  del = false;
+\end_layout
+
+\begin_layout Standard
+    12          }
+\end_layout
+
+\begin_layout Standard
+    13  
+\end_layout
+
+\begin_layout Standard
+    14          if (del == true)
+\end_layout
+
+\begin_layout Standard
+    15                  delete (Tango::Util::instance());
+\end_layout
+
+\begin_layout Standard
+    16  
+\end_layout
+
+\begin_layout Standard
+    17          return CWinApp::ExitInstance();
+\end_layout
+
+\begin_layout Standard
+    18  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 7 : Try to retrieve the Tango::Util singleton.
+ If this one has not been constructed correctly, this call will throw an
+ exception.
+\end_layout
+
+\begin_layout Standard
+Line 9-12 : Catch the exception in case of incomplete Tango::Util singleton
+ construction
+\end_layout
+
+\begin_layout Standard
+Line 14-15 : Delete the Tango::Util singleton.
+ This will unregister the Tango device server from the Tango database.
+\end_layout
+
+\begin_layout Standard
+Line 17 : Execute the 
+\emph on
+ExitInstance
+\emph default
+ method of the CWinApp class.
+\end_layout
+
+\begin_layout Standard
+If you don't want to use the Tango device server graphical interface, do
+ not pass any parameter to the 
+\emph on
+server_init()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+server-init
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method and instead of the code display in lines 37 and 38 in the previous
+ example of the 
+\emph on
+InitInstance()
+\emph default
+ method, use your own code to initialize your own application.
+\end_layout
+
+\begin_layout Subsubsection
+Example of how to build a Windows device server MFC based
+\end_layout
+
+\begin_layout Standard
+This sub-chapter gives an example of what it is needed to do to build a
+ MFC Windows device server.
+ Rather than being a list of actions to strictly follow, this is some general
+ rules of how using VC++ to build a Tango device server using MFC.
+\end_layout
+
+\begin_layout Enumerate
+Create your device server using Pogo.
+ For a class named MyMotor, the following files will be needed : 
+\emph on
+class_factory.cpp
+\emph default
+, 
+\emph on
+MyMotorClass.h
+\emph default
+, 
+\emph on
+MyMotorClass.cpp
+\emph default
+, 
+\emph on
+MyMotor.h
+\emph default
+ and 
+\emph on
+MyMotor.cpp.
+\end_layout
+
+\begin_layout Enumerate
+On a Windows computer running VC++, create a new project of type 
+\begin_inset Quotes eld
+\end_inset
+
+MFC app Wizard (exe)
+\begin_inset Quotes erd
+\end_inset
+
+ using static MFC
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+MFC
+\end_layout
+
+\end_inset
+
+ libs.
+ Ask for a dialog based project without ActiveX controls.
+\end_layout
+
+\begin_layout Enumerate
+Copy the five files generated by Pogo to the Windows computer and add them
+ to your project
+\end_layout
+
+\begin_layout Enumerate
+Remove the dialog window files (xxxDlg.cpp and xxxDlg.h), the Resource include
+ file and the resource script file from your project
+\end_layout
+
+\begin_layout Enumerate
+Add #include <stdafx.h> as first line of the include files list in 
+\emph on
+class_factory.cpp
+\emph default
+, 
+\emph on
+MyMotorClass.cpp
+\emph default
+ and 
+\emph on
+MyMotor.cpp
+\emph default
+ file.
+ Also add your own directory and the Tango include directory to the project
+ pre-compiler include directories list.
+\end_layout
+
+\begin_layout Enumerate
+Enable RTTI in your project settings (see chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Compiling NT"
+
+\end_inset
+
+)
+\end_layout
+
+\begin_layout Enumerate
+Change your application class: 
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+Add the definition of an 
+\emph on
+ExitInstance
+\emph default
+ method in the declaration file.
+ (xxx.h file)
+\end_layout
+
+\begin_layout Enumerate
+Remove the include of the dialog window file in the xxx.cpp file and add
+ an include of the Tango master include files (tango.h)
+\end_layout
+
+\begin_layout Enumerate
+Replace the 
+\emph on
+InitInstance
+\emph default
+() method as described in previous sub-chapter.
+ (xx.cpp file)
+\end_layout
+
+\begin_layout Enumerate
+Add an 
+\emph on
+ExitInstance()
+\emph default
+ method as described in previous sub-chapter (xxx.cpp file)
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Add all the libraries needed to compile a Tango device server (see chapter
+ 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Compiling NT"
+
+\end_inset
+
+) and the Tango resource file to the linker Object/Libraries modules.
+\end_layout
+
+\begin_layout Subsection
+Win32 application
+\end_layout
+
+\begin_layout Standard
+Even if it is more natural to use the C++ structure of the MFC class to
+ write a Tango device server, it is possible to write a device server as
+ a Win32
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Win32
+\end_layout
+
+\end_inset
+
+ application.
+ Instead of having a 
+\emph on
+main()
+\emph default
+ function as the application entry point, the operating system, provides
+ a 
+\emph on
+WinMain()
+\emph default
+ function as the application entry point.
+ Some code must be added to this 
+\emph on
+WinMain
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+WinMain
+\end_layout
+
+\end_inset
+
+
+\emph default
+ function in order to support Tango device server.
+ Don't forget to add the 
+\emph on
+tango
+\emph default
+.
+\emph on
+h
+\emph default
+ file in the list of included files.
+ If you are using the project files generated by Pogo, don't forget to change
+ the linker SUBSYSTEM option to "Windows" (Under Linker/System in the project
+ properties window).
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  int APIENTRY WinMain(HINSTANCE hInstance,
+\end_layout
+
+\begin_layout Standard
+     2                       HINSTANCE hPrevInstance,
+\end_layout
+
+\begin_layout Standard
+     3                       LPSTR     lpCmdLine,
+\end_layout
+
+\begin_layout Standard
+     4                       int       nCmdShow)
+\end_layout
+
+\begin_layout Standard
+     5  {
+\end_layout
+
+\begin_layout Standard
+     6          MSG msg;
+\end_layout
+
+\begin_layout Standard
+     7          Tango::Util *tg;
+\end_layout
+
+\begin_layout Standard
+     8  
+\end_layout
+
+\begin_layout Standard
+     9          try
+\end_layout
+
+\begin_layout Standard
+    10          {
+\end_layout
+
+\begin_layout Standard
+    11                  tg = Tango::Util::init(hInstance,nCmdShow);
+\end_layout
+
+\begin_layout Standard
+    12  
+\end_layout
+
+\begin_layout Standard
+    13                  string txt;
+\end_layout
+
+\begin_layout Standard
+    14                  txt = "Blabla first line
+\backslash
+n";
+\end_layout
+
+\begin_layout Standard
+    15                  txt = txt + "Blabla second line
+\backslash
+n";
+\end_layout
+
+\begin_layout Standard
+    16                  txt = txt + "Blabla third line
+\backslash
+n";
+\end_layout
+
+\begin_layout Standard
+    17                  tg->set_main_window_text(txt);
+\end_layout
+
+\begin_layout Standard
+    18                  tg->set_server_version("2.2");
+\end_layout
+
+\begin_layout Standard
+    19  
+\end_layout
+
+\begin_layout Standard
+    20                  tg->server_init(true);
+\end_layout
+
+\begin_layout Standard
+    21  
+\end_layout
+
+\begin_layout Standard
+    22                  tg->server_run();
+\end_layout
+
+\begin_layout Standard
+    23  
+\end_layout
+
+\begin_layout Standard
+    24          }
+\end_layout
+
+\begin_layout Standard
+    25          catch (bad_alloc)
+\end_layout
+
+\begin_layout Standard
+    26          {
+\end_layout
+
+\begin_layout Standard
+    27                  MessageBox((HWND)NULL,"Memory error","Command line",MB_I
+CONSTOP);
+\end_layout
+
+\begin_layout Standard
+    28                  return (FALSE);
+\end_layout
+
+\begin_layout Standard
+    29          }
+\end_layout
+
+\begin_layout Standard
+    30          catch (Tango::DevFailed &e)
+\end_layout
+
+\begin_layout Standard
+    31          {
+\end_layout
+
+\begin_layout Standard
+    32                  MessageBox((HWND)NULL,e.errors[0].desc.in(),"Command
+ line",MB_ICONSTOP);
+\end_layout
+
+\begin_layout Standard
+    33                  return (FALSE);
+\end_layout
+
+\begin_layout Standard
+    34          }
+\end_layout
+
+\begin_layout Standard
+    35          catch (CORBA::Exception &)
+\end_layout
+
+\begin_layout Standard
+    36          {
+\end_layout
+
+\begin_layout Standard
+    37                  MessageBox((HWND)NULL,"Exception CORBA","Command
+ line",MB_ICONSTOP);
+\end_layout
+
+\begin_layout Standard
+    38                  return(FALSE);
+\end_layout
+
+\begin_layout Standard
+    39          }
+\end_layout
+
+\begin_layout Standard
+    40  
+\end_layout
+
+\begin_layout Standard
+    41          while (GetMessage(&msg, NULL, 0, 0)) 
+\end_layout
+
+\begin_layout Standard
+    42          {
+\end_layout
+
+\begin_layout Standard
+    43                  TranslateMessage(&msg);
+\end_layout
+
+\begin_layout Standard
+    44                  DispatchMessage(&msg);
+\end_layout
+
+\begin_layout Standard
+    45          }
+\end_layout
+
+\begin_layout Standard
+    46  
+\end_layout
+
+\begin_layout Standard
+    47          delete tg;
+\end_layout
+
+\begin_layout Standard
+    48  
+\end_layout
+
+\begin_layout Standard
+    49          return msg.wParam;
+\end_layout
+
+\begin_layout Standard
+    50  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 11 : Create the Tango::Util
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Util
+\end_layout
+
+\end_inset
+
+ singleton
+\end_layout
+
+\begin_layout Standard
+Line 13-18 : Set parameters for the graphical interface
+\end_layout
+
+\begin_layout Standard
+Line 20 : Initialize Tango device server requesting the display of the graphical
+ interface
+\end_layout
+
+\begin_layout Standard
+Line 22 : Run the device server
+\end_layout
+
+\begin_layout Standard
+Line 25-39 : Display a message box for all the kinds of error during Tango
+ device server initialization phase and exit WinMain
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+WinMain
+\end_layout
+
+\end_inset
+
+ function.
+\end_layout
+
+\begin_layout Standard
+Line 41-45 : The Windows message loop
+\end_layout
+
+\begin_layout Standard
+Line 47 : Delete the Tango::Util singleton.
+ This class destructor unregisters the device server from the Tango database.
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+Remember that if the Tango device server graphical user interface is used,
+ you must add the Tango windows resource
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+resource
+\end_layout
+
+\end_inset
+
+ file
+\series default
+ 
+\series bold
+to your project
+\series default
+.
+\end_layout
+
+\begin_layout Standard
+If you don't want to use the tango device server graphical user interface,
+ do not use any parameter in the call of the 
+\emph on
+server_init()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+server-init
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method and do not link your device server with the Tango Windows resource
+ file.
+\end_layout
+
+\begin_layout Subsection
+Device server as NT service
+\end_layout
+
+\begin_layout Standard
+With Windows NT, if you want to have processes which survive to logoff sequence
+ and/or are automatically started during computer startup sequence, you
+ have to write them as service
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+service
+\end_layout
+
+\end_inset
+
+.
+ It is possible to write Tango device server as service.
+ You need to
+\end_layout
+
+\begin_layout Enumerate
+Write a class which inherits from a pre-written Tango class called NTService.
+ This class must have a 
+\emph on
+start
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+start
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ 
+\end_layout
+
+\begin_layout Enumerate
+Write a main function following a predefined skeleton.
+\end_layout
+
+\begin_layout Subsubsection
+The service class
+\end_layout
+
+\begin_layout Standard
+It must inherits from the 
+\emph on
+NTService
+\emph default
+ class and defines a 
+\emph on
+start
+\emph default
+ method.
+ The NTService
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+NTService
+\end_layout
+
+\end_inset
+
+ class must be constructed with one argument which is the device server
+ executable
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+executable
+\end_layout
+
+\end_inset
+
+ name.
+ The 
+\emph on
+start
+\emph default
+ method has three arguments which are the number of arguments passed to
+ the method, the argument list and a reference to an object used to log
+ info in the NT event system.
+ The first two args must be passed to the Tango::Util::init method and the
+ last one is used to log error or info messages.
+ The class definition file looks like
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  #include <tango.h>
+\end_layout
+
+\begin_layout Standard
+     2  #include <ntservice.h>
+\end_layout
+
+\begin_layout Standard
+     3  
+\end_layout
+
+\begin_layout Standard
+     4  class MYService: public Tango::NTService
+\end_layout
+
+\begin_layout Standard
+     5  {
+\end_layout
+
+\begin_layout Standard
+     6  public:
+\end_layout
+
+\begin_layout Standard
+     7          MYService(char *);
+\end_layout
+
+\begin_layout Standard
+     8  
+\end_layout
+
+\begin_layout Standard
+     9          void start(int,char **,Tango::NTEventLogger *);
+\end_layout
+
+\begin_layout Standard
+    10  };
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1-2 : Some include files
+\end_layout
+
+\begin_layout Standard
+Line 4 : The MYService class inherits from 
+\emph on
+Tango::NTService
+\emph default
+ class
+\end_layout
+
+\begin_layout Standard
+Line 7 : Constructor with one parameter
+\end_layout
+
+\begin_layout Standard
+Line 9 : The 
+\emph on
+start()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+start
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The class source code looks like
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  #include <myservice.h>
+\end_layout
+
+\begin_layout Standard
+     2  #include <tango.h>
+\end_layout
+
+\begin_layout Standard
+     3  
+\end_layout
+
+\begin_layout Standard
+     4  using namespace std;
+\end_layout
+
+\begin_layout Standard
+     5  
+\end_layout
+
+\begin_layout Standard
+     6  MYService::MYService(char *exec_name):NTService(exec_name)
+\end_layout
+
+\begin_layout Standard
+     7  {
+\end_layout
+
+\begin_layout Standard
+     8  }
+\end_layout
+
+\begin_layout Standard
+     9  
+\end_layout
+
+\begin_layout Standard
+    10  void MYService::start(int argc,char **argv,Tango::NTEventLogger
+ *logger)
+\end_layout
+
+\begin_layout Standard
+    11  {
+\end_layout
+
+\begin_layout Standard
+    12          Tango::Util *tg;
+\end_layout
+
+\begin_layout Standard
+    13          try
+\end_layout
+
+\begin_layout Standard
+    14          {
+\end_layout
+
+\begin_layout Standard
+    15                  Tango::Util::_service = true;
+\end_layout
+
+\begin_layout Standard
+    16  
+\end_layout
+
+\begin_layout Standard
+    17                  tg = Tango::Util::init(argc,argv);
+\end_layout
+
+\begin_layout Standard
+    18  
+\end_layout
+
+\begin_layout Standard
+    19                  tg->server_init();
+\end_layout
+
+\begin_layout Standard
+    20  
+\end_layout
+
+\begin_layout Standard
+    21                  tg->server_run();
+\end_layout
+
+\begin_layout Standard
+    22          }
+\end_layout
+
+\begin_layout Standard
+    23          catch (bad_alloc)
+\end_layout
+
+\begin_layout Standard
+    24          {
+\end_layout
+
+\begin_layout Standard
+    25                  logger->error("Can't allocate memory to store device
+ object");
+\end_layout
+
+\begin_layout Standard
+    26          }
+\end_layout
+
+\begin_layout Standard
+    27          catch (Tango::DevFailed &e)
+\end_layout
+
+\begin_layout Standard
+    28          {
+\end_layout
+
+\begin_layout Standard
+    29                  logger->error(e.errors[0].desc.in());
+\end_layout
+
+\begin_layout Standard
+    30          }
+\end_layout
+
+\begin_layout Standard
+    31          catch (CORBA::Exception &)
+\end_layout
+
+\begin_layout Standard
+    32          {
+\end_layout
+
+\begin_layout Standard
+    33                  logger->error("CORBA Exception");
+\end_layout
+
+\begin_layout Standard
+    34          }
+\end_layout
+
+\begin_layout Standard
+    35  }
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 6-8 : The MYService class constructor code.
+\end_layout
+
+\begin_layout Standard
+Line 15 : Set to true the 
+\emph on
+_service
+\emph default
+ static variable of the 
+\emph on
+Tango::Util
+\emph default
+ class.
+\end_layout
+
+\begin_layout Standard
+Line 17-21 : Classical Tango device server startup code
+\end_layout
+
+\begin_layout Standard
+Line 23-34 : Exception management.
+ Please, note that within a service.
+ it is not possible to print data on a console.
+ This method receives a reference to a logger
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+logger
+\end_layout
+
+\end_inset
+
+ object.
+ This object sends all its output to the Windows NT event
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+event
+\end_layout
+
+\end_inset
+
+ system.
+ It is used to send messages when an exception has occurred.
+\end_layout
+
+\begin_layout Subsubsection
+The main function
+\end_layout
+
+\begin_layout Standard
+The main function is used to create one instance of the class describing
+ the service, to check the service option and to run the service.
+ The code looks like :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  #include <tango.h>
+\end_layout
+
+\begin_layout Standard
+     2  #include <MYService.h>
+\end_layout
+
+\begin_layout Standard
+     3  
+\end_layout
+
+\begin_layout Standard
+     4  using namespace std;
+\end_layout
+
+\begin_layout Standard
+     5  
+\end_layout
+
+\begin_layout Standard
+     6  
+\end_layout
+
+\begin_layout Standard
+     7  int main(int argc,char *argv[])
+\end_layout
+
+\begin_layout Standard
+     8  {
+\end_layout
+
+\begin_layout Standard
+     9          MYService service(argv[0]);
+\end_layout
+
+\begin_layout Standard
+    10          
+\end_layout
+
+\begin_layout Standard
+    11          int ret;
+\end_layout
+
+\begin_layout Standard
+    12          if ((ret = service.options(argc,argv)) <= 0)
+\end_layout
+
+\begin_layout Standard
+    13                  return ret;
+\end_layout
+
+\begin_layout Standard
+    14          
+\end_layout
+
+\begin_layout Standard
+    15          service.run(argc,argv);
+\end_layout
+
+\begin_layout Standard
+    16          
+\end_layout
+
+\begin_layout Standard
+    17          return 0;
+\end_layout
+
+\begin_layout Standard
+    18  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 9 : Create one instance of the MYService class with the executable
+ name as parameter
+\end_layout
+
+\begin_layout Standard
+Line 12 : Check service option with the 
+\emph on
+options()
+\emph default
+ method inherited from the NTService
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+NTService
+\end_layout
+
+\end_inset
+
+ class.
+\end_layout
+
+\begin_layout Standard
+Line 15 : Run the service.
+ The 
+\emph on
+run()
+\emph default
+ method is inherited from the NTService class.
+ This method will after some NT initialization sequence execute the user
+ 
+\emph on
+start()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+start
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+\end_layout
+
+\begin_layout Subsubsection
+Service options and messages
+\end_layout
+
+\begin_layout Standard
+When a Tango device server is written as a Windows NT service, it supports
+ several new options.
+ These option are linked to Windows NT service
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+service
+\end_layout
+
+\end_inset
+
+ usage.
+\end_layout
+
+\begin_layout Standard
+Before it can be used, a service must be installed.
+ A name and a title is associated to each service.
+ For Tango device server used as service, the service name is build from
+ the executable name followed by the underscore character and the instance
+ name.
+ For example, a device server service executable file named 
+\begin_inset Quotes eld
+\end_inset
+
+opc
+\begin_inset Quotes erd
+\end_inset
+
+ and started with 
+\begin_inset Quotes eld
+\end_inset
+
+fluids
+\begin_inset Quotes erd
+\end_inset
+
+ as instance name, will be named 
+\begin_inset Quotes eld
+\end_inset
+
+opc_fluids
+\begin_inset Quotes erd
+\end_inset
+
+.
+ The title string is built from the service executable name followed by
+ the sentence 
+\begin_inset Quotes eld
+\end_inset
+
+Tango device server
+\begin_inset Quotes erd
+\end_inset
+
+ and the instance name between parenthesis.
+ In the previous example, the service title will be 
+\begin_inset Quotes eld
+\end_inset
+
+opc Tango device server (fluids)
+\begin_inset Quotes erd
+\end_inset
+
+.
+ Once a service is installed, you can configure it with the 
+\begin_inset Quotes eld
+\end_inset
+
+Services
+\begin_inset Quotes erd
+\end_inset
+
+ application of the control panel.
+ Services title are displayed by this application and allow the user to
+ select one specific service.
+ Once a service is selected, it is possible to start/stop it and to configure
+ its startup type as manual (with the Services application) or as automatic.
+ When the automatic mode is chosen, the service starts when the computer
+ is started.
+ In this case, the service executable code must resides on the computer
+ local disk.
+\end_layout
+
+\begin_layout Standard
+Tango device server logs message in the Windows event
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+event
+\end_layout
+
+\end_inset
+
+ system when the service is started or stopped.
+ You can see these messages with the 
+\begin_inset Quotes eld
+\end_inset
+
+Event Viewer
+\begin_inset Quotes erd
+\end_inset
+
+ application (Start->Programs->Administrative tools->Event Viewer) and choose
+ the Application events.
+\end_layout
+
+\begin_layout Standard
+The new options are -i, -s, -u, -h and -d.
+\end_layout
+
+\begin_layout Itemize
+-i : Install the service
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+service
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+-s : Install the service and choose the automatic startup mode
+\end_layout
+
+\begin_layout Itemize
+-u : Un-install the service
+\end_layout
+
+\begin_layout Itemize
+-dbg : Run in console mode to debug service.
+ The service must have been installed prior to used it.
+ The classical -v device server option can be used with the -d option.
+\end_layout
+
+\begin_layout Standard
+On the command line, all these options must be used after the device server
+ instance name (
+\begin_inset Quotes eld
+\end_inset
+
+opc fluids -i
+\begin_inset Quotes erd
+\end_inset
+
+ to install the service, 
+\begin_inset Quotes eld
+\end_inset
+
+opc fluids -u
+\begin_inset Quotes erd
+\end_inset
+
+ to un-install the service, 
+\begin_inset Quotes eld
+\end_inset
+
+opc fluids -v -d
+\begin_inset Quotes erd
+\end_inset
+
+ to debug the service)
+\end_layout
+
+\begin_layout Subsubsection
+Tango device server using MFC as Windows NT service
+\end_layout
+
+\begin_layout Standard
+If your Tango device server uses MFC
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+MFC
+\end_layout
+
+\end_inset
+
+ and must be written as a Windows NT service, follow these rules :
+\end_layout
+
+\begin_layout Itemize
+Don't forget to add the 
+\emph on
+stdafx.h
+\emph default
+ file as the first file included in all the source files making the project.
+\end_layout
+
+\begin_layout Itemize
+Comment out the definition of VC_EXTRALEAN in the 
+\emph on
+stdafx.h
+\emph default
+ file.
+\end_layout
+
+\begin_layout Itemize
+Change the pre-processor definitions, replace _WINDOWS by _CONSOLE
+\end_layout
+
+\begin_layout Itemize
+Add the /SUBSYSTEM:CONSOLE option in the linker options window of the project
+ settings.
+\end_layout
+
+\begin_layout Itemize
+Add a call to initialize the MFC (
+\emph on
+AfxWinInit()
+\emph default
+) in the service main function
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  int main(int argc,char *argv[])
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          if (!AfxWinInit(::GetModuleHandle(NULL),NULL,::GetCommandLine(),
+0))
+\end_layout
+
+\begin_layout Standard
+     4          {
+\end_layout
+
+\begin_layout Standard
+     5                  cerr << "Can't initialise MFC !" << endl;
+\end_layout
+
+\begin_layout Standard
+     6                  return -1;
+\end_layout
+
+\begin_layout Standard
+     7          }
+\end_layout
+
+\begin_layout Standard
+     8  
+\end_layout
+
+\begin_layout Standard
+     9          service serv(argv[0]);
+\end_layout
+
+\begin_layout Standard
+    10  
+\end_layout
+
+\begin_layout Standard
+    11          int ret;
+\end_layout
+
+\begin_layout Standard
+    12          if ((ret = serv.options(argc,argv)) <= 0)
+\end_layout
+
+\begin_layout Standard
+    13                  return ret;
+\end_layout
+
+\begin_layout Standard
+    14  
+\end_layout
+
+\begin_layout Standard
+    15          serv.run(argc,argv);
+\end_layout
+
+\begin_layout Standard
+    16  
+\end_layout
+
+\begin_layout Standard
+    17          return 0;
+\end_layout
+
+\begin_layout Standard
+    18  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 3 : The MFC classes are initialized with the 
+\emph on
+AfxWinInit()
+\emph default
+ function call.
+\end_layout
+
+\begin_layout Section
+Compiling, linking and executing a TANGO device server process
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Compiling,-linking-and"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Compiling and linking a C++ device server
+\end_layout
+
+\begin_layout Subsubsection
+On UNIX like operating system 
+\end_layout
+
+\begin_layout Paragraph
+Supported development tools
+\end_layout
+
+\begin_layout Standard
+The supported compiler for Linux is 
+\series bold
+gcc
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+gcc
+\end_layout
+
+\end_inset
+
+
+\series default
+ release 2.95.3 and above.
+ For Solaris with its native C++ compiler, CC release 5.3 is supported (FORTE
+ C++ 6 Update 2).
+ Please, note that to debug a Tango device server running under Linux
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Linux
+\end_layout
+
+\end_inset
+
+, 
+\series bold
+gdb
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+gdb
+\end_layout
+
+\end_inset
+
+
+\series default
+ release 5 and above is needed in order to correctly handle threads.
+\end_layout
+
+\begin_layout Paragraph
+Compiling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+compiling
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+TANGO for C++ uses omniORB (release 4) as underlying CORBA Object Request
+ Broker 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "OOC page"
+
+\end_inset
+
+.
+ To compile a TANGO device server, your include search path must be set
+ to :
+\end_layout
+
+\begin_layout Itemize
+The omniORB include directory
+\end_layout
+
+\begin_layout Itemize
+The Tango include directory
+\end_layout
+
+\begin_layout Itemize
+Your development directory
+\end_layout
+
+\begin_layout Paragraph
+Linking
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+linking
+\end_layout
+
+\end_inset
+
+ 
+\end_layout
+
+\begin_layout Standard
+To build a running device server process, you need to link your code with
+ several libraries.
+ Nine of them are always the same whatever the operating system used is.
+ These nine libraries are:
+\end_layout
+
+\begin_layout Itemize
+The Tango libraries (called 
+\series bold
+libtango
+\series default
+ and 
+\series bold
+liblog4tango
+\series default
+)
+\end_layout
+
+\begin_layout Itemize
+Three omniORB
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+omniORB
+\end_layout
+
+\end_inset
+
+ package libraries (called 
+\series bold
+libomniORB4
+\series default
+, 
+\series bold
+libomniDynamic4
+\series default
+ and 
+\series bold
+libCOS4)
+\end_layout
+
+\begin_layout Itemize
+The omniORB threading library (called 
+\series bold
+libomnithread
+\series default
+)
+\end_layout
+
+\begin_layout Standard
+On top of that, you need additional libraries depending on the operating
+ system :
+\end_layout
+
+\begin_layout Itemize
+For Solaris, add the posix4 library (
+\series bold
+libposix4
+\series default
+), the socket library (
+\series bold
+libsocket
+\series default
+), the nsl library (
+\series bold
+libnsl
+\series default
+) and the posix thread library (
+\series bold
+libpthread
+\series default
+)
+\end_layout
+
+\begin_layout Itemize
+For Linux, add the posix thread library (
+\series bold
+libpthread
+\series default
+)
+\end_layout
+
+\begin_layout Standard
+The following table summarizes the necessary options to compile a Tango
+ C++ device server.
+ Obviously, the options -I and -L must be updated to reflect your file system
+ organization.
+ 
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="3" columns="3">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="block" valignment="middle" width="70mm">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Operating system
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Compiling option
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Linking option
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Solaris CC
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+-mt -I..
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none" width="10in">
+\begin_inset Text
+
+\begin_layout Plain Layout
+-mt -L..
+ -ltango -llog4tango -lomniORB4 -lomniDynamic4 -lCOS4 -lomnithread -lposix4
+ -lsocket -lnsl -lpthread
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Linux gcc
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+-D_REENTRANT -I..
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+-L..
+ -ltango -llog4tango -lomniORB4 -lomniDynamic4 -lCOS4 -lomnithread -lpthread
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The following is an example of a Makefile for Linux.
+ Obviously, all the paths are set to the ESRF file system structure.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  #
+\end_layout
+
+\begin_layout Standard
+     2  #               Makefile to generate a Tango server
+\end_layout
+
+\begin_layout Standard
+     3  #
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5  CC = c++
+\end_layout
+
+\begin_layout Standard
+     6  BIN_DIR = suse82
+\end_layout
+
+\begin_layout Standard
+     7  TANGO_HOME = /segfs/tango
+\end_layout
+
+\begin_layout Standard
+     8  
+\end_layout
+
+\begin_layout Standard
+     9  INCLUDE_DIRS = -I $(TANGO_HOME)/include/$(BIN_DIR) 
+\backslash
+
+\end_layout
+
+\begin_layout Standard
+    10                 -I .
+\end_layout
+
+\begin_layout Standard
+    11  
+\end_layout
+
+\begin_layout Standard
+    12  LIB_DIRS = -L $(TANGO_HOME)/lib/$(BIN_DIR)
+\end_layout
+
+\begin_layout Standard
+    13  
+\end_layout
+
+\begin_layout Standard
+    14  
+\end_layout
+
+\begin_layout Standard
+    15  CXXFLAGS =  -D_REENTRANT $(INCLUDE_DIRS)
+\end_layout
+
+\begin_layout Standard
+    16  LFLAGS =  $(LIB_DIRS) -ltango 
+\backslash
+
+\end_layout
+
+\begin_layout Standard
+    17                        -llog4tango 
+\backslash
+
+\end_layout
+
+\begin_layout Standard
+    18                        -lomniORB4 
+\backslash
+
+\end_layout
+
+\begin_layout Standard
+    19                        -lomniDynamic4 
+\backslash
+
+\end_layout
+
+\begin_layout Standard
+    20                        -lCOS4 
+\backslash
+
+\end_layout
+
+\begin_layout Standard
+    21                        -lomnithread 
+\backslash
+
+\end_layout
+
+\begin_layout Standard
+    22                        -lpthread
+\end_layout
+
+\begin_layout Standard
+    23  
+\end_layout
+
+\begin_layout Standard
+    24  
+\end_layout
+
+\begin_layout Standard
+    25  SVC_OBJS =      main.o 
+\backslash
+
+\end_layout
+
+\begin_layout Standard
+    26                  classfactory.o 
+\backslash
+
+\end_layout
+
+\begin_layout Standard
+    27                  steppermotorclass.o 
+\backslash
+
+\end_layout
+
+\begin_layout Standard
+    28                  steppermotor.o
+\end_layout
+
+\begin_layout Standard
+    29  
+\end_layout
+
+\begin_layout Standard
+    30  
+\end_layout
+
+\begin_layout Standard
+    31  .SUFFIXES:      .o .cpp
+\end_layout
+
+\begin_layout Standard
+    32  .cpp.o:
+\end_layout
+
+\begin_layout Standard
+    33          $(CC) $(CXXFLAGS) -c $<
+\end_layout
+
+\begin_layout Standard
+    34          
+\end_layout
+
+\begin_layout Standard
+    35                          
+\end_layout
+
+\begin_layout Standard
+    36  all: StepperMotor
+\end_layout
+
+\begin_layout Standard
+    37  
+\end_layout
+
+\begin_layout Standard
+    38  StepperMotor:   $(SVC_OBJS)
+\end_layout
+
+\begin_layout Standard
+    39          $(CC) $(SVC_OBJS) -o $(BIN_DIR)/StepperMotor $(LFLAGS)
+\end_layout
+
+\begin_layout Standard
+    40          
+\end_layout
+
+\begin_layout Standard
+    41  clean:
+\end_layout
+
+\begin_layout Standard
+    42          rm -f *.o core
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Standard
+Line 5-7 : Define Makefile macros
+\end_layout
+
+\begin_layout Standard
+Line 9-10 : Set the include file search path
+\end_layout
+
+\begin_layout Standard
+Line 12 : Set the linker library search path
+\end_layout
+
+\begin_layout Standard
+Line 15 : The compiler option setting
+\end_layout
+
+\begin_layout Standard
+Line 16-22 : The linker option setting
+\end_layout
+
+\begin_layout Standard
+Line 25-28 : All the object files needed to build the executable
+\end_layout
+
+\begin_layout Standard
+Line 31-33 : Define rules to generate object files
+\end_layout
+
+\begin_layout Standard
+Line 36 : Define a 
+\begin_inset Quotes eld
+\end_inset
+
+all
+\begin_inset Quotes erd
+\end_inset
+
+ dependency
+\end_layout
+
+\begin_layout Standard
+Line 38-39 : How to generate the StepperMotor device server executable
+\end_layout
+
+\begin_layout Standard
+Line 41-42 : Define a 
+\begin_inset Quotes eld
+\end_inset
+
+clean
+\begin_inset Quotes erd
+\end_inset
+
+ dependency
+\end_layout
+
+\begin_layout Subsubsection
+On Windows using Developer Studio
+\begin_inset CommandInset label
+LatexCommand label
+name "Compiling NT"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Supported Windows
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Windows
+\end_layout
+
+\end_inset
+
+ compiler for Tango is Visual C++ release 7 and above.
+ Most problems in building a Windows device server revolve around the /M
+ compiler switch family.
+ This switch family controls which run-time library names are embedded in
+ the object files, and consequently which libraries are used during linking
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+linking
+\end_layout
+
+\end_inset
+
+.
+ Attempt to mix and match compiler settings and libraries can cause link
+ error and even if successful, may produce undefined run-time behavior.
+\end_layout
+
+\begin_layout Standard
+Selecting the correct /M switch in Developer Studio is done through a dialog
+ box.
+ To open this dialog box, click on the 
+\begin_inset Quotes eld
+\end_inset
+
+Project
+\begin_inset Quotes erd
+\end_inset
+
+ menu and select the 
+\begin_inset Quotes eld
+\end_inset
+
+Settings
+\begin_inset Quotes erd
+\end_inset
+
+ option.
+ To change the compiler switch click on the 
+\begin_inset Quotes eld
+\end_inset
+
+C/C++
+\begin_inset Quotes erd
+\end_inset
+
+ tab and select 
+\begin_inset Quotes eld
+\end_inset
+
+Code Generation
+\begin_inset Quotes erd
+\end_inset
+
+ from the 
+\begin_inset Quotes eld
+\end_inset
+
+Category
+\begin_inset Quotes erd
+\end_inset
+
+ drop-down list.
+ The 
+\begin_inset Quotes eld
+\end_inset
+
+Use run-time library
+\begin_inset Quotes erd
+\end_inset
+
+ drop-down list is used to change the compiler switch.
+ By looking at the string in the 
+\begin_inset Quotes eld
+\end_inset
+
+Project options
+\begin_inset Quotes erd
+\end_inset
+
+ edit box, you can see what the switch value is for the drop-down list selection.
+\end_layout
+
+\begin_layout Itemize
+Single-threaded = /ML
+\end_layout
+
+\begin_layout Itemize
+Multithreaded = /MT (Supported)
+\end_layout
+
+\begin_layout Itemize
+Multithreaded DLL = /MD (Supported)
+\end_layout
+
+\begin_layout Itemize
+Debug Single-threaded = /MLd
+\end_layout
+
+\begin_layout Itemize
+Debug Multithreaded = /MTd (Supported)
+\end_layout
+
+\begin_layout Itemize
+Debug Multithreaded DLL = /MDd (Supported)
+\end_layout
+
+\begin_layout Standard
+Compiling a file with a value of the /M switch family will impose at link
+ phase the use of libraries also compiled with the same value of the /M
+ switch family.
+ If you compiled your source code with the /MT option (Multithreaded), you
+ must link it with libraries also compiled with the /MT option.
+\end_layout
+
+\begin_layout Standard
+The omniORB package used by TANGO, makes extensive use of exceptions and
+ RTTI
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+RTTI stands for 
+\series bold
+R
+\series default
+un 
+\series bold
+T
+\series default
+ime 
+\series bold
+T
+\series default
+ype 
+\series bold
+I
+\series default
+dentification
+\end_layout
+
+\end_inset
+
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+RTTI
+\end_layout
+
+\end_inset
+
+.
+ This requires the /GX and /GR options be enabled when compiling.
+ The setting can be found in Developer Studio in the 
+\begin_inset Quotes eld
+\end_inset
+
+Project Settings
+\begin_inset Quotes erd
+\end_inset
+
+ dialog box.
+ Click on the 
+\begin_inset Quotes eld
+\end_inset
+
+C/C++
+\begin_inset Quotes erd
+\end_inset
+
+ tab and select 
+\begin_inset Quotes eld
+\end_inset
+
+C++ language
+\begin_inset Quotes erd
+\end_inset
+
+ in the 
+\begin_inset Quotes eld
+\end_inset
+
+Category
+\begin_inset Quotes erd
+\end_inset
+
+ drop-down list.
+ 
+\end_layout
+
+\begin_layout Standard
+On 32 bits computer, omniORB and TANGO relies on the preprocessor identifier
+ 
+\series bold
+WIN32
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+WIN32
+\end_layout
+
+\end_inset
+
+ being defined in order to configure itself.
+ On 64 bits computer (x64 architecture), the preprocessor identifier 
+\series bold
+WIN64
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+WIN64
+\end_layout
+
+\end_inset
+
+ has to be defined.
+ If you build an application using static libraries (option /MT or /MTd),
+ you must add 
+\series bold
+_WINSTATIC
+\series default
+ to the list of the preprocessor identifiers.
+ If you build an application using DLL
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DLL
+\end_layout
+
+\end_inset
+
+ (option /MD or /MDd), you must add 
+\series bold
+LOG4TANGO_HAS_DLL
+\series default
+ and 
+\series bold
+TANGO_HAS_DLL
+\series default
+ to the list of preprocessor identifiers.
+\end_layout
+
+\begin_layout Standard
+To build a running device server process, you need to link your code with
+ several libraries on top of the Windows libraries.
+ These libraries are:
+\end_layout
+
+\begin_layout Itemize
+The Tango libraries (called 
+\series bold
+tango.lib
+\series default
+ and 
+\series bold
+log4tango.lib
+\series default
+ or 
+\series bold
+tangod.lib
+\series default
+ and 
+\series bold
+log4tangod.lib
+\series default
+ for debug mode)
+\end_layout
+
+\begin_layout Itemize
+The omniORB
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+omniORB
+\end_layout
+
+\end_inset
+
+ package libraries (see next table)
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="7" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Compile mode
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Libraries
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Debug Multithreaded
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+omniORB4d.lib, omniDynamic4d.lib, omnithreadd.lib and COS4d.lib
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Multithreaded
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+omniORB4.lib, omniDynamic4.lib, omnithread.lib and COS4.lib
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Debug Multithreaded DLL
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+omniORB414_rtd.lib, omniDynamic414_rtd.lib, omnithread34_rtd.lib,
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+and COS414_rtd.lib
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Multithreaded DLL
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+omniORB414_rt.lib, omniDynamic414_rt.lib, omnithread34_rt.lib
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+and COS414_rt.lib
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Windows network libraries (
+\series bold
+mswsock.lib
+\series default
+ and 
+\series bold
+ws2_32.lib
+\series default
+)
+\end_layout
+
+\begin_layout Itemize
+Windows graphic library (
+\series bold
+comctl32.lib
+\series default
+)
+\end_layout
+
+\begin_layout Standard
+To add these libraries in Developer Studio, open the 
+\begin_inset Quotes eld
+\end_inset
+
+Project Settings
+\begin_inset Quotes erd
+\end_inset
+
+ dialog box and click on the 
+\begin_inset Quotes eld
+\end_inset
+
+Link
+\begin_inset Quotes erd
+\end_inset
+
+ tab.
+ Select 
+\begin_inset Quotes eld
+\end_inset
+
+Input
+\begin_inset Quotes erd
+\end_inset
+
+ from the 
+\begin_inset Quotes eld
+\end_inset
+
+Category
+\begin_inset Quotes erd
+\end_inset
+
+ drop-down list and add these library names to the list of library in the
+ 
+\begin_inset Quotes eld
+\end_inset
+
+Object/library modules
+\begin_inset Quotes erd
+\end_inset
+
+ box.
+ 
+\end_layout
+
+\begin_layout Standard
+The 
+\begin_inset Quotes eld
+\end_inset
+
+Win32 Debug
+\begin_inset Quotes erd
+\end_inset
+
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+Win32 Release
+\begin_inset Quotes erd
+\end_inset
+
+ configuration that you change with the 
+\begin_inset Quotes eld
+\end_inset
+
+Build/Set active configuration
+\begin_inset Quotes erd
+\end_inset
+
+ menu changes the /M switch compiler.
+ For instance, if you select a 
+\begin_inset Quotes eld
+\end_inset
+
+Win32 Debug
+\begin_inset Quotes erd
+\end_inset
+
+ configuration in a "non-DLL" project, use the omniORB4d.lib, omniDynamic4d.lib
+ and omnithreadd.lib libraries and the tango.lib library in the 
+\emph on
+debug
+\emph default
+ directory (at the ESRF).
+ If you select the 
+\begin_inset Quotes eld
+\end_inset
+
+Win32 Release
+\begin_inset Quotes erd
+\end_inset
+
+ configuration, use the omniORB4.lib, omniDynamic4.lib and omnithread.lib libraries
+ and the tango.lib library in the 
+\emph on
+release
+\emph default
+ directory (at the ESRF).
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+WARNING
+\series default
+: In some cases, the Microsoft Visual Studio wizard used during project
+ creation generates an include file called 
+\emph on
+Stdafx.h
+\emph default
+.
+ If this file itself includes windows.h file, you have to add the preprocessor
+ macro _WIN32_WINNT
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+-WIN32-WINNT
+\end_layout
+
+\end_inset
+
+ and set it to 0x0400.
+\end_layout
+
+\begin_layout Subsection
+Running a C++ device server
+\begin_inset CommandInset label
+LatexCommand label
+name "Env variable"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+To run a C++ Tango device server, you must set an environment variable.
+ This environment variable is called 
+\series bold
+TANGO_HOST
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TANGO-HOST
+\end_layout
+
+\end_inset
+
+
+\series default
+ and has a fixed syntax which is
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+ 
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+TANGO_HOST=<host>:<port>
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+The host field is the host name where the TANGO database device server is
+ running.
+ The port field is the port number on which this server is listening.
+ For instance, a valid syntax is TANGO_HOST=dumela:10000.
+ For UNIX like operating system, setting environment variable is possible
+ with the 
+\emph on
+export
+\emph default
+ or 
+\emph on
+setenv
+\emph default
+ command depending on the shell used.
+ For Windows NT, setting environment variable is possible with the 
+\begin_inset Quotes eld
+\end_inset
+
+Environment
+\begin_inset Quotes erd
+\end_inset
+
+ tab of the 
+\begin_inset Quotes eld
+\end_inset
+
+System
+\begin_inset Quotes erd
+\end_inset
+
+ application in the control panel.
+\end_layout
+
+\begin_layout Standard
+If you need to start a Tango device server on a pre-defined port
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+port
+\end_layout
+
+\end_inset
+
+ (For Tango database device server or device server without database usage),
+ you must use one of the underlying ORB option 
+\emph on
+endPoint
+\emph default
+ like 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+myserver myinstance_name -ORBendPoint giop:tcp::<port number>
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Compiling a Java device server
+\end_layout
+
+\begin_layout Subsubsection
+Supported java release
+\end_layout
+
+\begin_layout Standard
+Tango device server written using Java language needs release 
+\series bold
+1.4.0
+\series default
+ (or above) of the Java environment.
+ 
+\end_layout
+
+\begin_layout Subsubsection
+Setting the CLASSPATH
+\end_layout
+
+\begin_layout Standard
+To correctly compile a Java Tango device server, the CLASSPATH
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CLASSPATH
+\end_layout
+
+\end_inset
+
+ environment variable must be set to :
+\end_layout
+
+\begin_layout Itemize
+The Tango jar file.
+ All Tango and TangoDs package
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+package
+\end_layout
+
+\end_inset
+
+ classes have been stored in this jar file.
+ On top of that, this file also includes all the CORBA ORB classes (JacORB
+ classes).
+ This file is named TangORB.jar
+\end_layout
+
+\begin_layout Itemize
+The jar file with all the JDK classes (not always necessary, could be implicit)
+\end_layout
+
+\begin_layout Itemize
+Your own directory
+\end_layout
+
+\begin_layout Standard
+For UNIX like operating system, setting environment variable is done with
+ the 
+\emph on
+export
+\emph default
+ or 
+\emph on
+setenv
+\emph default
+ command depending on the shell used.
+ For Windows NT, setting environment variable is possible with the 
+\begin_inset Quotes eld
+\end_inset
+
+Environment
+\begin_inset Quotes erd
+\end_inset
+
+ tab of the 
+\begin_inset Quotes eld
+\end_inset
+
+System
+\begin_inset Quotes erd
+\end_inset
+
+ application in the control panel.
+\end_layout
+
+\begin_layout Subsubsection
+Makefile
+\end_layout
+
+\begin_layout Standard
+The following is an example of a Makefile for a Java Tango device server.
+ Obviously, all the paths are set to the ESRF file system structure.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  #
+\end_layout
+
+\begin_layout Standard
+     2  #               Makefile to generate a TANGO java device server
+\end_layout
+
+\begin_layout Standard
+     3  #
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5  JAVAC = javac -classpath $(CLASSPATH):..
+\end_layout
+
+\begin_layout Standard
+     6  
+\end_layout
+
+\begin_layout Standard
+     7  # ------------------------------------------------
+\end_layout
+
+\begin_layout Standard
+     8  #
+\end_layout
+
+\begin_layout Standard
+     9  #               The compiler flags
+\end_layout
+
+\begin_layout Standard
+    10  #
+\end_layout
+
+\begin_layout Standard
+    11  #-------------------------------------------------
+\end_layout
+
+\begin_layout Standard
+    12  
+\end_layout
+
+\begin_layout Standard
+    13  JAVAFLAGS = -g
+\end_layout
+
+\begin_layout Standard
+    14  
+\end_layout
+
+\begin_layout Standard
+    15  #-------------------------------------------------
+\end_layout
+
+\begin_layout Standard
+    16  
+\end_layout
+
+\begin_layout Standard
+    17  
+\end_layout
+
+\begin_layout Standard
+    18  CL_LIST =       DevReadPositionCmd.class 
+\backslash
+
+\end_layout
+
+\begin_layout Standard
+    19                  StepperMotor.class 
+\backslash
+
+\end_layout
+
+\begin_layout Standard
+    20                  StepperMotorClass.class
+\end_layout
+
+\begin_layout Standard
+    21  
+\end_layout
+
+\begin_layout Standard
+    22  PACKAGE = server
+\end_layout
+
+\begin_layout Standard
+    23          
+\end_layout
+
+\begin_layout Standard
+    24  #
+\end_layout
+
+\begin_layout Standard
+    25  # Rule for compiling
+\end_layout
+
+\begin_layout Standard
+    26  #
+\end_layout
+
+\begin_layout Standard
+    27          
+\end_layout
+
+\begin_layout Standard
+    28  .SUFFIXES:      .class .java
+\end_layout
+
+\begin_layout Standard
+    29  .java.class:
+\end_layout
+
+\begin_layout Standard
+    30          $(JAVAC) $(JAVAFLAGS) $<
+\end_layout
+
+\begin_layout Standard
+    31                  
+\end_layout
+
+\begin_layout Standard
+    32  #---------------------------------------------------
+\end_layout
+
+\begin_layout Standard
+    33  
+\end_layout
+
+\begin_layout Standard
+    34  
+\end_layout
+
+\begin_layout Standard
+    35  all:    $(PACKAGE)
+\end_layout
+
+\begin_layout Standard
+    36          
+\end_layout
+
+\begin_layout Standard
+    37  $(PACKAGE):     $(CL_LIST)
+\end_layout
+
+\begin_layout Standard
+    38                                                                 
+                         
+\end_layout
+
+\begin_layout Standard
+    39  clean:
+\end_layout
+
+\begin_layout Standard
+    40          rm -f *.class
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 5 : Definition of the java compiler
+\end_layout
+
+\begin_layout Standard
+Line 13 : The java compiler flag
+\end_layout
+
+\begin_layout Standard
+Line 18 : List of class to be compiled
+\end_layout
+
+\begin_layout Standard
+Line 28 : Define a dependency name
+\end_layout
+
+\begin_layout Standard
+Line 29-30 : Define how source files must be compiled
+\end_layout
+
+\begin_layout Standard
+Line 35 : The 
+\begin_inset Quotes eld
+\end_inset
+
+all
+\begin_inset Quotes erd
+\end_inset
+
+ dependency
+\end_layout
+
+\begin_layout Standard
+Line 47 : The device server dependency
+\end_layout
+
+\begin_layout Standard
+Line 39-40 : The 
+\begin_inset Quotes eld
+\end_inset
+
+clean
+\begin_inset Quotes erd
+\end_inset
+
+ dependency
+\end_layout
+
+\begin_layout Subsubsection
+Tango core software release number
+\end_layout
+
+\begin_layout Standard
+All the Tango core classes are packaged in the Tango.jar file.
+ A little utility tool called 
+\series bold
+TangoVers
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TangoVers
+\end_layout
+
+\end_inset
+
+
+\series default
+ allows a user to know which release of the Tango core classes he(she) is
+ using.
+ This utility is available only with Java 1.2 virtual machine.
+ To run this utility, simply type
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+ 
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+TangoVers <path to Tango.jar file>
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center} 
+\end_layout
+
+\end_inset
+
+if the directory /segfs/tango/bin is in your PATH environment variable.
+\end_layout
+
+\begin_layout Subsection
+Running a Java device server
+\end_layout
+
+\begin_layout Standard
+A correct setting of the CLASSPATH environment variable is not enough to
+ run a Java Tango device server.
+ You must also set a Java system property.
+ The name of the system property is 
+\series bold
+TANGO_HOST
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TANGO-HOST
+\end_layout
+
+\end_inset
+
+
+\series default
+ and its syntax is the same than the syntax described in chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Env variable"
+
+\end_inset
+
+.
+ Setting a Java system property is done by using -D option of the java interpret
+er command.
+ To run a Java Tango device server, the command line must start with 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+java -DTANGO_HOST=<host>:<port> xxxx
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center} 
+\end_layout
+
+\end_inset
+
+As all the device server files are part of a package
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+package
+\end_layout
+
+\end_inset
+
+, you have to run this command in the directory above the package directory.
+ For instance, for our StepperMotor device server started with 
+\emph on
+et
+\emph default
+ as instance name, all files must be stored in a directory called StepperMotor
+ and the command line must be 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+java -DTANGO_HOST=<host>:<port> StepperMotor/StepperMotor et
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+ run from the directory above the StepperMotor one.
+\end_layout
+
+\begin_layout Standard
+If you need to start a Tango device server on a pre-defined port
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+port
+\end_layout
+
+\end_inset
+
+ (For Tango database device server or device server without database usage),
+ you must use one of the underlying ORB option OAPort like 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+java -DOAPort=<port number> myserver myinstance_name 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Advanced programming techniques
+\end_layout
+
+\begin_layout Standard
+The basic techniques for implementing device server pattern are required
+ by each device server programmer.
+ In certain situations, it is however necessary to do things out of the
+ ordinary.
+ This chapter will look into programming techniques which permit the device
+ server serve more than simply the network.
+\end_layout
+
+\begin_layout Subsection
+Receiving signal (C++ specific)
+\end_layout
+
+\begin_layout Standard
+It is 
+\series bold
+UNSAFE
+\series default
+ to use any CORBA call in a signal handler.
+ It is also UNSAFE to use some system calls in a signal handler.
+ Tango device server solved this problem by using threads
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+thread
+\end_layout
+
+\end_inset
+
+.
+ A specific thread is started to handle signals
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+signal
+\end_layout
+
+\end_inset
+
+.
+ Therefore, every Tango device server is automatically a threaded process.
+ This allows the programmer to write the code which must be executed when
+ a signal is received as ordinary code.
+ All device server threads masks all signals except the specific signal
+ thread which is permanently waiting for signal.
+ If a signal is sent to a device server process, only the signal thread
+ will receive it because it is the single thread which does not mask signals.
+\end_layout
+
+\begin_layout Standard
+Nevertheless, signal management is not trivial and some care have to be
+ taken.
+ The signal management differs from operating system to operating system.
+ It is not recommended that you install your own signal routine using any
+ of the signal routines provided by the operating system calls or library.
+ 
+\end_layout
+
+\begin_layout Paragraph
+Using Linux
+\end_layout
+
+\begin_layout Standard
+The classical thread library is used by the Tango device server.
+ The thread management offered by the Linux
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Linux
+\end_layout
+
+\end_inset
+
+ kernel and this library is a pure kernel-thread based implementation.
+ This means that each thread is seen as a process (each thread has a separate
+ PID, the 
+\emph on
+ps
+\emph default
+ command displays one line for each thread) even if they are not real process.
+ For a Tango device server, a 
+\emph on
+ps
+\emph default
+ command will show you several threads.
+ One of them is the signal thread (the fifth one).
+ Chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Threading"
+
+\end_inset
+
+ details how thread are managed within a Tango device server or client.
+\end_layout
+
+\begin_layout Standard
+The PID stored in the Tango database is the PID of the signal thread.
+ All signals should be sent to the signal thread.
+ To kill a server from a console window, the PID of the signal thread should
+ be used.
+ The Linux thread library is using the SIGUSR1 and SIGUSR2 signal for its
+ own purpose.
+ It is forbidden to use these two signals in a Linux
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Linux
+\end_layout
+
+\end_inset
+
+ Tango device server.
+ The Tango core classes will refuse to install something for these two signals.
+\end_layout
+
+\begin_layout Standard
+Nevertheless, the Linux thread library is not fully POSIX compliant about
+ thread and signal management.
+ The POSIX specification says that an asynchronous signal must be delivered
+ to one of the thread of the program which does not block the signal (it
+ is not specified which).
+ Using this Linux thread library, the signal is delivered to the thread
+ it is been sent to, based on the PID of the thread.
+ If that thread is currently blocking the signal, the signal remains pending...This
+ is a problem for Tango device server under Linux using the 
+\emph on
+alarm()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+alarm()
+\end_layout
+
+\end_inset
+
+
+\emph default
+ system call.
+ In this case, the system will send the signal to the device server thread
+ which has called 
+\emph on
+alarm()
+\emph default
+ and not to the device server signal management thread.
+ A special case of the 
+\emph on
+register_signa
+\emph default
+l method (detailed in the next sub-chapter) have been developed for such
+ case.
+ This is available only for Linux.
+\end_layout
+
+\begin_layout Paragraph
+Using Solaris
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Solaris
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+There is no restriction on the signal to be used.
+ 
+\end_layout
+
+\begin_layout Subsubsection
+Using signal
+\end_layout
+
+\begin_layout Standard
+It is possible for C++ device server to receive signals from drivers or
+ other processes.
+ The TDSOM supports receiving signal at two levels: the device level and
+ the class level.
+ Supporting signal at the device level means that it is possible to specify
+ interest into receiving signal on a device basis.
+ This feature is supported via three methods defined in the DeviceImpl
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceImpl
+\end_layout
+
+\end_inset
+
+ class.
+ These methods are called 
+\emph on
+register_signal
+\emph default
+, 
+\emph on
+unregister_signal
+\emph default
+ and s
+\emph on
+ignal_handler
+\emph default
+.
+\end_layout
+
+\begin_layout Standard
+The 
+\series bold
+\emph on
+register_signal
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+register-signal
+\end_layout
+
+\end_inset
+
+
+\series default
+\emph default
+ method has one parameter which is the signal number.
+ This method informs the device server signal system that the device want
+ to be informed when the signal passed as parameter is received by the process.
+ There is a special case for Linux as explained in the previous sub-chapter.
+ It is possible to register a signal to be executed in the a signal handler
+ context (with all its restrictions).
+ This is done with a second parameter to this 
+\emph on
+register_signal
+\emph default
+ method.
+ This second parameter is simply a boolean data.
+ If it is true, the signal_handler will be executed in a signal handler
+ context in the device server main thread.
+ A default value (false) has been defined for this parameter.
+\end_layout
+
+\begin_layout Standard
+The 
+\series bold
+\emph on
+unregister_signal
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+unregister-signal
+\end_layout
+
+\end_inset
+
+
+\series default
+\emph default
+ method also have an input parameter which is the signal number.
+ This method removes the device from the list of object which should be
+ warned when the signal is received by the process.
+\end_layout
+
+\begin_layout Standard
+The 
+\series bold
+\emph on
+signal_handler
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+signal-handler
+\end_layout
+
+\end_inset
+
+
+\series default
+\emph default
+ method is the method which is triggered when a signal is received if the
+ corresponding 
+\emph on
+register_signal
+\emph default
+ has been executed.
+ This method is defined as virtual and can be redefined by the user.
+ It has one input argument which is the signal number.
+\end_layout
+
+\begin_layout Standard
+The same three methods also exist in the DeviceClass
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceClass
+\end_layout
+
+\end_inset
+
+ class.
+ Their action and their usage are similar to the DeviceImpl class methods.
+ Installing a signal at the class level does not mean that all the device
+ belonging to this class will receive the signal.
+ This only means that the 
+\emph on
+signal_handler
+\emph default
+ method of the DeviceClass instance will be executed.
+ This is useful if an action has to be executed once for a class of devices
+ when a signal is received.
+\end_layout
+
+\begin_layout Standard
+The following code is an example with our stepper motor device server configured
+ via the database to serve three motors.
+ These motors have the following names : id04/motor/01, id04/motor/02 and
+ id04/motor/03.
+ The signal SIGALRM (alarm signal) must be propagated only to the motor
+ number 2 (id04/motor/02)
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  void StepperMotor::init_device()
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          cout << "StepperMotor::StepperMotor() create motor " <<
+ dev_name << endl;
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5          long i;
+\end_layout
+
+\begin_layout Standard
+     6  
+\end_layout
+
+\begin_layout Standard
+     7          for (i=0; i< AGSM_MAX_MOTORS; i++)
+\end_layout
+
+\begin_layout Standard
+     8          {
+\end_layout
+
+\begin_layout Standard
+     9                  axis[i] = 0;
+\end_layout
+
+\begin_layout Standard
+    10                  position[i] = 0;
+\end_layout
+
+\begin_layout Standard
+    11                  direction[i] = 0;
+\end_layout
+
+\begin_layout Standard
+    12          }
+\end_layout
+
+\begin_layout Standard
+    13  
+\end_layout
+
+\begin_layout Standard
+    14          if (dev_name == "id04/motor/02")
+\end_layout
+
+\begin_layout Standard
+    15                  register_signal(SIGALRM);
+\end_layout
+
+\begin_layout Standard
+    16  }
+\end_layout
+
+\begin_layout Standard
+    17  
+\end_layout
+
+\begin_layout Standard
+    18  StepperMotor::~StepperMotor()
+\end_layout
+
+\begin_layout Standard
+    19  {
+\end_layout
+
+\begin_layout Standard
+    20          unregister_signal(SIGALRM);
+\end_layout
+
+\begin_layout Standard
+    21  }
+\end_layout
+
+\begin_layout Standard
+    22  
+\end_layout
+
+\begin_layout Standard
+    23  void StepperMotor::signal_handler(long signo)
+\end_layout
+
+\begin_layout Standard
+    24  {
+\end_layout
+
+\begin_layout Standard
+    25          INFO_STREAM << "Inside signal handler for signal " << signo
+ << endl;
+\end_layout
+
+\begin_layout Standard
+    26  
+\end_layout
+
+\begin_layout Standard
+    27  //      Do what you want here
+\end_layout
+
+\begin_layout Standard
+    28  
+\end_layout
+
+\begin_layout Standard
+    29  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The 
+\emph on
+init_device
+\emph default
+ method is modified.
+\end_layout
+
+\begin_layout Standard
+Line 14-15 : The device name is checked and if it is the correct name, the
+ device is registered in the list of device wanted to receive the SIGALARM
+ signal.
+\end_layout
+
+\begin_layout Standard
+The destructor is also modified
+\end_layout
+
+\begin_layout Standard
+Line 20 : Unregister the device from the list of devices which should receives
+ the SIGALRM signal.
+ Note that unregister a signal for a device which has not previously registered
+ its interest for this signal does nothing.
+\end_layout
+
+\begin_layout Standard
+The 
+\emph on
+signal_handler
+\emph default
+ method is redefined
+\end_layout
+
+\begin_layout Standard
+Line 25 : Print signal number
+\end_layout
+
+\begin_layout Standard
+Line 27 : Do what you have to do when the signal SIGALRM is received.
+\end_layout
+
+\begin_layout Standard
+If all devices must be warned when the device server process receives the
+ signal SIGALRM, removes line 14 in the 
+\emph on
+init_device
+\emph default
+ method.
+\end_layout
+
+\begin_layout Subsubsection
+Exiting a device server gracefully
+\end_layout
+
+\begin_layout Standard
+A device server
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+server
+\end_layout
+
+\end_inset
+
+ has to exit
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+exit
+\end_layout
+
+\end_inset
+
+ gracefully by unregistering itself from the database.
+ The necessary action to gracefully exit are automatically executed on reception
+ of the following signal
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+signal
+\end_layout
+
+\end_inset
+
+ :
+\end_layout
+
+\begin_layout Itemize
+SIGINT, SIGTERM, SIGHUP and SIGQUIT for device server running on Solaris
+ or Linux
+\end_layout
+
+\begin_layout Itemize
+SIGINT, SIGTERM, SIGABRT and SIGBREAK for device server running on Windows-NT
+\end_layout
+
+\begin_layout Standard
+This does not prevents device server to also register interest at device
+ or class levels for those signals.
+ The user installed 
+\emph on
+signal_handler
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+signal-handler
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method will first be called before the graceful exit.
+\end_layout
+
+\begin_layout Subsection
+Inheriting
+\begin_inset CommandInset label
+LatexCommand label
+name "Inheriting"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This sub-chapter details how it is possible to inherit
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+inherit
+\end_layout
+
+\end_inset
+
+ from an existing device pattern implementation.
+ As the device pattern includes more than a single class, inheriting from
+ an existing device pattern needs some explanations.
+\end_layout
+
+\begin_layout Standard
+Let us suppose that the existing device pattern implementation is for devices
+ of class A.
+ This means that classes A and AClass already exists plus classes for all
+ commands offered by device of class A.
+ One new device pattern
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+pattern
+\end_layout
+
+\end_inset
+
+ implementation for device of class B must be written with all the features
+ offered by class A plus some new one.
+ This is easily done with the inheritance.
+ Writing a device pattern implementation for device of class B which inherits
+ from device of class A means :
+\end_layout
+
+\begin_layout Itemize
+Write the BClass class
+\end_layout
+
+\begin_layout Itemize
+Write the B class
+\end_layout
+
+\begin_layout Itemize
+Write B class specific commands
+\end_layout
+
+\begin_layout Itemize
+Eventually redefine A class commands
+\end_layout
+
+\begin_layout Subsubsection
+Using C++
+\end_layout
+
+\begin_layout Standard
+The miscellaneous code fragments given below detail only what has to be
+ updated to support device pattern inheritance
+\end_layout
+
+\begin_layout Paragraph
+Writing the BClass
+\end_layout
+
+\begin_layout Standard
+As you can guess, BClass has to inherit from AClass.
+ The 
+\emph on
+command_factory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-factory
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method must also be adapted.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  namespace B
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3  
+\end_layout
+
+\begin_layout Standard
+     4  class BClass : public A::AClass
+\end_layout
+
+\begin_layout Standard
+     5  {
+\end_layout
+
+\begin_layout Standard
+     6  .....
+\end_layout
+
+\begin_layout Standard
+     7  }
+\end_layout
+
+\begin_layout Standard
+     8  
+\end_layout
+
+\begin_layout Standard
+     9  BClass::command_factory()
+\end_layout
+
+\begin_layout Standard
+    10  {
+\end_layout
+
+\begin_layout Standard
+    11          A::AClass::command_factory();
+\end_layout
+
+\begin_layout Standard
+    12  
+\end_layout
+
+\begin_layout Standard
+    13          command_list.push_back(....);
+\end_layout
+
+\begin_layout Standard
+    14  }
+\end_layout
+
+\begin_layout Standard
+    15  
+\end_layout
+
+\begin_layout Standard
+    16  } /* End of B namespace */
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : Open the B namespace
+\end_layout
+
+\begin_layout Standard
+Line 4 : BClass inherits from AClass which is defined in the A namespace.
+\end_layout
+
+\begin_layout Standard
+Line 11 : Only the 
+\emph on
+command_factory
+\emph default
+ method of the BClass will be called at start-up.
+ To create the AClass commands, the 
+\emph on
+command_factory
+\emph default
+ method of the AClass must also be executed.
+ This is the reason of the line
+\end_layout
+
+\begin_layout Standard
+Line 13 : Create BClass commands
+\end_layout
+
+\begin_layout Paragraph
+Writing the B class
+\end_layout
+
+\begin_layout Standard
+As you can guess, B has to inherits
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+inherit
+\end_layout
+
+\end_inset
+
+ from A.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  namespace B
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3  
+\end_layout
+
+\begin_layout Standard
+     4  class B : public A:A
+\end_layout
+
+\begin_layout Standard
+     5  {
+\end_layout
+
+\begin_layout Standard
+     6          .....
+\end_layout
+
+\begin_layout Standard
+     7  };
+\end_layout
+
+\begin_layout Standard
+     8  
+\end_layout
+
+\begin_layout Standard
+     9  B::B(Tango::DeviceClass *cl,const char *s):A::A(cl,s)
+\end_layout
+
+\begin_layout Standard
+    10  {
+\end_layout
+
+\begin_layout Standard
+    11          ....
+\end_layout
+
+\begin_layout Standard
+    12          init_device();
+\end_layout
+
+\begin_layout Standard
+    13  }
+\end_layout
+
+\begin_layout Standard
+    14  
+\end_layout
+
+\begin_layout Standard
+    15  void B::init_device()
+\end_layout
+
+\begin_layout Standard
+    16  {
+\end_layout
+
+\begin_layout Standard
+    17          ....
+\end_layout
+
+\begin_layout Standard
+    18  }
+\end_layout
+
+\begin_layout Standard
+    19  
+\end_layout
+
+\begin_layout Standard
+    20  } /* End of B namespace */
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : Open the B namespace.
+\end_layout
+
+\begin_layout Standard
+Line 4 : B inherits from A which is defined in the A namespace
+\end_layout
+
+\begin_layout Standard
+Line 9 : The B constructor calls the right A constructor
+\end_layout
+
+\begin_layout Paragraph
+Writing B class specific command
+\end_layout
+
+\begin_layout Standard
+Noting special here.
+ Write these classes as usual
+\end_layout
+
+\begin_layout Paragraph
+Redefining A class command
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+It is possible to redefine a command which already exist in class A 
+\series bold
+only if the command is created
+\series default
+ 
+\series bold
+using the inheritance
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+inheritance
+\end_layout
+
+\end_inset
+
+ model
+\series default
+ (but keeping its input and output argument types).
+ The method which really execute the class A command is a method implemented
+ in the A class.
+ This method must be defined as 
+\series bold
+virtual.
+
+\series default
+ In class B, you can redefine the method executing the command and implement
+ it following the needs of the B class.
+\end_layout
+
+\begin_layout Subsubsection
+Using Java
+\end_layout
+
+\begin_layout Standard
+The miscellaneous code fragments given below detail only what has to be
+ updated to support device pattern inheritance
+\end_layout
+
+\begin_layout Paragraph
+Writing the BClass
+\end_layout
+
+\begin_layout Standard
+As you can guess, BClass has to inherit from AClass.
+ Some change must be done in the definition of the 
+\emph on
+init
+\emph default
+ and 
+\emph on
+instance
+\emph default
+ methods.
+ The 
+\emph on
+command_factory
+\emph default
+ method must also be adapted.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  public class BClass extends AClass implements TangoConst
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          public static AClass init(String name) throws DevFailed
+\end_layout
+
+\begin_layout Standard
+     4          {
+\end_layout
+
+\begin_layout Standard
+     5  
+\end_layout
+
+\begin_layout Standard
+     6          }
+\end_layout
+
+\begin_layout Standard
+     7  
+\end_layout
+
+\begin_layout Standard
+     8          public static AClass instance()
+\end_layout
+
+\begin_layout Standard
+     9          {
+\end_layout
+
+\begin_layout Standard
+    10  
+\end_layout
+
+\begin_layout Standard
+    11         }
+\end_layout
+
+\begin_layout Standard
+    12  
+\end_layout
+
+\begin_layout Standard
+    13          public void command_factory()
+\end_layout
+
+\begin_layout Standard
+    14          {
+\end_layout
+
+\begin_layout Standard
+    15                  super.command_factory();
+\end_layout
+
+\begin_layout Standard
+    16  
+\end_layout
+
+\begin_layout Standard
+    17                  command_list.addElement(....);
+\end_layout
+
+\begin_layout Standard
+    18          }
+\end_layout
+
+\begin_layout Standard
+    19  };
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : BClass inherits from AClass and implements TangoConst interface
+\end_layout
+
+\begin_layout Standard
+Line 3 : The return data type of the 
+\emph on
+init
+\emph default
+ method must be the same as the type defines in the AClass (therefore a
+ reference to AClass) otherwise, the compiler complains.
+ BClass inherits from AClass and a reference to a BClass is also a reference
+ to the AClass
+\end_layout
+
+\begin_layout Standard
+Line 8 : The return data type of the 
+\emph on
+instance
+\emph default
+ method must also be adapted as explained for the 
+\emph on
+init
+\emph default
+ method
+\end_layout
+
+\begin_layout Standard
+Line 15 : Only the 
+\emph on
+command_factory
+\emph default
+ method of the BClass will be called at start-up.
+ To create the AClass commands, the 
+\emph on
+command_factory
+\emph default
+ method of the AClass must also be executed.
+ This is the reason of the line
+\end_layout
+
+\begin_layout Standard
+Line 17 : Create BClass commands
+\end_layout
+
+\begin_layout Paragraph
+Writing the B class
+\end_layout
+
+\begin_layout Standard
+As you can guess, B has to inherits from A.
+ The 
+\emph on
+init_device
+\emph default
+ method must be adapted, the constructor has to be modified and an instance
+ variable must be added
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  public class B extends A implements TangoConst
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          boolean constructed = false;
+\end_layout
+
+\begin_layout Standard
+     4  
+\end_layout
+
+\begin_layout Standard
+     5          A(DeviceClass cl,String s)
+\end_layout
+
+\begin_layout Standard
+     6          {
+\end_layout
+
+\begin_layout Standard
+     7                  super(cl,s);
+\end_layout
+
+\begin_layout Standard
+     8                  constructed = true;
+\end_layout
+
+\begin_layout Standard
+     9                  ...
+\end_layout
+
+\begin_layout Standard
+    10                  init_device();
+\end_layout
+
+\begin_layout Standard
+    11          }
+\end_layout
+
+\begin_layout Standard
+    12  
+\end_layout
+
+\begin_layout Standard
+    13          public void init_device()
+\end_layout
+
+\begin_layout Standard
+    14          {
+\end_layout
+
+\begin_layout Standard
+    15                  if (constructed == false)
+\end_layout
+
+\begin_layout Standard
+    16                  {
+\end_layout
+
+\begin_layout Standard
+    17                          return;
+\end_layout
+
+\begin_layout Standard
+    18                  }
+\end_layout
+
+\begin_layout Standard
+    19                  super.init_device();
+\end_layout
+
+\begin_layout Standard
+    20  
+\end_layout
+
+\begin_layout Standard
+    21                  ...
+\end_layout
+
+\begin_layout Standard
+    22          }
+\end_layout
+
+\begin_layout Standard
+    23  };
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 1 : B inherits from A and implements TangoConst interface
+\end_layout
+
+\begin_layout Standard
+Line 3 : A boolean initialized to false is added as instance variable
+\end_layout
+
+\begin_layout Standard
+Line 8 : The constructor is modified to set the constructed boolean to true
+ after all the super classes have been created and before the call to the
+ 
+\emph on
+init_device
+\emph default
+ method.
+\end_layout
+
+\begin_layout Standard
+Line 15-18 : The 
+\emph on
+init_device
+\emph default
+ method immediately returns if the constructed boolean is false (if the
+ super classes are not correctly created)
+\end_layout
+
+\begin_layout Standard
+Line 19 : The 
+\emph on
+init_device
+\emph default
+ method of class A is called
+\end_layout
+
+\begin_layout Paragraph
+Writing B class specific command
+\end_layout
+
+\begin_layout Standard
+Noting special here.
+ Write these classes as usual
+\end_layout
+
+\begin_layout Paragraph
+Redefining A class command
+\end_layout
+
+\begin_layout Standard
+It is possible to to redefine a command which already exist in class A 
+\series bold
+only if the command is created using the inheritance model
+\series default
+ (but keeping its input and output argument types).
+ The method which really execute the class A command is a method implemented
+ in the A class.
+ With Java, it is possible to redefine all methods except those which are
+ declared as 
+\begin_inset Quotes eld
+\end_inset
+
+final
+\begin_inset Quotes erd
+\end_inset
+
+.
+ Therefore, in class B, you can redefine the method executing the command
+ and implement it following the needs of the B class.
+ The following is an example for a command xxx which is programmed to call
+ a 
+\emph on
+my_cmd
+\emph default
+ method
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+In the command 
+\emph on
+execute
+\emph default
+ method
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+     1  public class A extends DeviceImpl implements TangoConst
+\end_layout
+
+\begin_layout Standard
+     2  {
+\end_layout
+
+\begin_layout Standard
+     3          public void my_cmd(long input)
+\end_layout
+
+\begin_layout Standard
+     4          {
+\end_layout
+
+\begin_layout Standard
+     5          }
+\end_layout
+
+\begin_layout Standard
+     6  }
+\end_layout
+
+\begin_layout Standard
+     7  
+\end_layout
+
+\begin_layout Standard
+     8  public class B extends A implements TangoConst
+\end_layout
+
+\begin_layout Standard
+     9  {
+\end_layout
+
+\begin_layout Standard
+    10          public void my_cmd(long input)
+\end_layout
+
+\begin_layout Standard
+    11          {
+\end_layout
+
+\begin_layout Standard
+    12          }
+\end_layout
+
+\begin_layout Standard
+    13  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Line 3 : The 
+\emph on
+my_cmd
+\emph default
+ method is defined in class A
+\end_layout
+
+\begin_layout Standard
+Line 10 : The 
+\emph on
+my_cmd
+\emph default
+ method is redefined in class B
+\end_layout
+
+\begin_layout Standard
+Inside the device pattern, the device object is created as an instance of
+ class B
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+By the 
+\emph on
+device_factory
+\emph default
+ method of the BClass class
+\end_layout
+
+\end_inset
+
+.
+ Java will call the 
+\emph on
+my_cmd
+\emph default
+ method of the B class when the command is received.
+ It is still possible to call the 
+\emph on
+my_cmd
+\emph default
+ method of the A class with the help of the Java 
+\begin_inset Quotes eld
+\end_inset
+
+super
+\begin_inset Quotes erd
+\end_inset
+
+ keyword inside the code of the 
+\emph on
+my_cmd
+\emph default
+ method of the B class.
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Subsection
+Using another device pattern implementation within the same server
+\end_layout
+
+\begin_layout Standard
+It is often necessary that inside the same device server
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+server
+\end_layout
+
+\end_inset
+
+, a method executing a command needs a command of another class to be executed.
+ For instance, a device pattern implementation for a device driven by a
+ serial line class can use the command offered by a serial line class embedded
+ within the same device server process.
+ To execute one of the command (or any other CORBA
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CORBA
+\end_layout
+
+\end_inset
+
+ operations/attributes) of the serial line class, just call it as a normal
+ client will do by using one instance of the Deviceproxy class
+\emph on
+.
+
+\emph default
+ The ORB will recognize that all the devices are inside the same process
+ and will execute calls as a local
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+local
+\end_layout
+
+\end_inset
+
+ calls.
+ To create the DeviceProxy class instance, the only thing you need to know
+ is the name of the device you gave to the serial line device.
+ Retrieving this could be easily done by a Tango device property.
+ The DeviceProxy class is fully described in chapters related to the Java
+ or C++ Tango Application Programming Interface (API)
+\begin_inset VSpace bigskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset label
+LatexCommand label
+name "BlackPicture"
+
+\end_inset
+
+
+\begin_inset Graphics
+	filename ../dance/tango-08-39.jpg
+	lyxscale 60
+	scale 60
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/doc/src/ds_writing/line.tex b/doc/src/ds_writing/line.tex
new file mode 100644
index 0000000..1ba963f
--- /dev/null
+++ b/doc/src/ds_writing/line.tex
@@ -0,0 +1,6 @@
+\begin{flushleft}
+\begin{picture}(0,0)
+\thicklines
+\put(0,0){\line(1,0){400}}
+\end{picture}
+\end{flushleft}
diff --git a/doc/src/ds_writing/r_attribute.eps b/doc/src/ds_writing/r_attribute.eps
new file mode 100644
index 0000000..2310405
--- /dev/null
+++ b/doc/src/ds_writing/r_attribute.eps
@@ -0,0 +1,307 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: r_attribute.eps
+%%Creator: fig2dev Version 3.2 Patchlevel 3d
+%%CreationDate: Wed Sep 29 13:58:10 2004
+%%For: taurel at wow (E.Taurel,,,)
+%%BoundingBox: 0 0 586 297
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 297 moveto 0 0 lineto 586 0 lineto 586 297 lineto closepath clip newpath
+-33.3 318.2 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+  bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+  4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+10 setmiterlimit
+ 0.06299 0.06299 sc
+%
+% Fig objects follow
+%
+% Polyline
+7.500 slw
+n 2340 990 m
+ 2340 1170 l gs col0 s gr 
+% Polyline
+gs  clippath
+2085 1200 m 2085 1140 l 1933 1140 l 2053 1170 l 1933 1200 l cp
+eoclip
+n 990 1170 m
+ 2070 1170 l gs col0 s gr gr
+
+% arrowhead
+n 1933 1200 m 2053 1170 l 1933 1140 l  col0 s
+% Polyline
+n 2160 1170 m 2520 1170 l 2520 4590 l 2160 4590 l
+ cp gs col0 s gr 
+% Polyline
+n 2340 4590 m
+ 2340 4770 l gs col0 s gr 
+% Polyline
+n 8640 1350 m 9000 1350 l 9000 1930 l 8640 1930 l
+ cp gs col0 s gr 
+% Polyline
+n 8640 2160 m 9000 2160 l 9000 2740 l 8640 2740 l
+ cp gs col0 s gr 
+% Polyline
+n 8640 2970 m 9000 2970 l 9000 3550 l 8640 3550 l
+ cp gs col0 s gr 
+% Polyline
+n 8640 3780 m 9000 3780 l 9000 4360 l 8640 4360 l
+ cp gs col0 s gr 
+% Polyline
+n 5400 2880 m 5760 2880 l 5760 3590 l 5400 3590 l
+ cp gs col0 s gr 
+% Polyline
+n 5400 3690 m 5760 3690 l 5760 4400 l 5400 4400 l
+ cp gs col0 s gr 
+/Times-Roman ff 180.00 scf sf
+1710 810 m
+gs 1 -1 sc (StepperMotor object) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+900 1080 m
+gs 1 -1 sc (read_attribute) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+4860 810 m
+gs 1 -1 sc (PositionAttr class) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+2700 1260 m
+gs 1 -1 sc (always_executed_hook) col0 sh gr
+% Polyline
+n 8820 1080 m
+ 8820 1350 l gs col0 s gr 
+% Polyline
+n 8820 1980 m
+ 8820 2160 l gs col0 s gr 
+% Polyline
+n 8820 2790 m
+ 8820 2970 l gs col0 s gr 
+% Polyline
+n 8820 3600 m
+ 8820 3780 l gs col0 s gr 
+% Polyline
+n 8820 4410 m
+ 8820 4680 l gs col0 s gr 
+% Polyline
+gs  clippath
+8565 1380 m 8565 1320 l 8413 1320 l 8533 1350 l 8413 1380 l cp
+eoclip
+n 2610 1350 m
+ 8550 1350 l gs col0 s gr gr
+
+% arrowhead
+n 8413 1380 m 8533 1350 l 8413 1320 l  col0 s
+% Polyline
+gs  clippath
+2595 1860 m 2595 1920 l 2747 1920 l 2627 1890 l 2747 1860 l cp
+eoclip
+n 8550 1890 m
+ 2610 1890 l gs col0 s gr gr
+
+% arrowhead
+n 2747 1860 m 2627 1890 l 2747 1920 l  col0 s
+% Polyline
+gs  clippath
+8565 2190 m 8565 2130 l 8413 2130 l 8533 2160 l 8413 2190 l cp
+eoclip
+n 2610 2160 m
+ 8550 2160 l gs col0 s gr gr
+
+% arrowhead
+n 8413 2190 m 8533 2160 l 8413 2130 l  col0 s
+% Polyline
+gs  clippath
+2595 2670 m 2595 2730 l 2747 2730 l 2627 2700 l 2747 2670 l cp
+eoclip
+n 8550 2700 m
+ 2610 2700 l gs col0 s gr gr
+
+% arrowhead
+n 2747 2670 m 2627 2700 l 2747 2730 l  col0 s
+% Polyline
+gs  clippath
+8565 3000 m 8565 2940 l 8413 2940 l 8533 2970 l 8413 3000 l cp
+eoclip
+n 5850 2970 m
+ 8550 2970 l gs col0 s gr gr
+
+% arrowhead
+n 8413 3000 m 8533 2970 l 8413 2940 l  col0 s
+% Polyline
+gs  clippath
+5835 3480 m 5835 3540 l 5987 3540 l 5867 3510 l 5987 3480 l cp
+eoclip
+n 8550 3510 m
+ 5850 3510 l gs col0 s gr gr
+
+% arrowhead
+n 5987 3480 m 5867 3510 l 5987 3540 l  col0 s
+% Polyline
+gs  clippath
+8565 3810 m 8565 3750 l 8413 3750 l 8533 3780 l 8413 3810 l cp
+eoclip
+n 5850 3780 m
+ 8550 3780 l gs col0 s gr gr
+
+% arrowhead
+n 8413 3810 m 8533 3780 l 8413 3750 l  col0 s
+% Polyline
+gs  clippath
+5835 4290 m 5835 4350 l 5987 4350 l 5867 4320 l 5987 4290 l cp
+eoclip
+n 8550 4320 m
+ 5850 4320 l gs col0 s gr gr
+
+% arrowhead
+n 5987 4290 m 5867 4320 l 5987 4350 l  col0 s
+% Polyline
+n 5580 2790 m
+ 5580 2880 l gs col0 s gr 
+% Polyline
+n 5580 3600 m
+ 5580 3690 l gs col0 s gr 
+% Polyline
+n 5580 4410 m
+ 5580 4590 l gs col0 s gr 
+% Polyline
+n 5580 2250 m
+ 5580 2610 l gs col0 s gr 
+% Polyline
+n 5580 1440 m 5580 1530 l 5580 1620 l 5580 1710 l
+ 5580 1800 l gs col0 s gr 
+% Polyline
+n 5580 1080 m
+ 5580 1260 l gs col0 s gr 
+% Polyline
+n 5580 1980 m
+ 5580 2070 l gs col0 s gr 
+% Polyline
+gs  clippath
+5325 2910 m 5325 2850 l 5173 2850 l 5293 2880 l 5173 2910 l cp
+eoclip
+n 2700 2880 m
+ 5310 2880 l gs col0 s gr gr
+
+% arrowhead
+n 5173 2910 m 5293 2880 l 5173 2850 l  col0 s
+% Polyline
+gs  clippath
+2595 3570 m 2595 3630 l 2747 3630 l 2627 3600 l 2747 3570 l cp
+eoclip
+n 5310 3600 m
+ 2610 3600 l gs col0 s gr gr
+
+% arrowhead
+n 2747 3570 m 2627 3600 l 2747 3630 l  col0 s
+% Polyline
+gs  clippath
+5325 3720 m 5325 3660 l 5173 3660 l 5293 3690 l 5173 3720 l cp
+eoclip
+n 2610 3690 m
+ 5310 3690 l gs col0 s gr gr
+
+% arrowhead
+n 5173 3720 m 5293 3690 l 5173 3660 l  col0 s
+% Polyline
+gs  clippath
+2595 4380 m 2595 4440 l 2747 4440 l 2627 4410 l 2747 4380 l cp
+eoclip
+n 5310 4410 m
+ 2610 4410 l gs col0 s gr gr
+
+% arrowhead
+n 2747 4380 m 2627 4410 l 2747 4440 l  col0 s
+% Polyline
+n 540 360 m 9810 360 l 9810 5040 l 540 5040 l
+ cp gs col0 s gr 
+/Times-Roman ff 180.00 scf sf
+2700 2070 m
+gs 1 -1 sc (read_attr_hardware) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+2700 3060 m
+gs 1 -1 sc (is_allowed) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+5940 2880 m
+gs 1 -1 sc (is_Position_allowed) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+2700 3870 m
+gs 1 -1 sc (read) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+5940 3690 m
+gs 1 -1 sc (read_Position) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+7920 810 m
+gs 1 -1 sc (StepperMotor object) col0 sh gr
+$F2psEnd
+rs
diff --git a/doc/src/ds_writing/startup.eps b/doc/src/ds_writing/startup.eps
new file mode 100644
index 0000000..dbd85c5
--- /dev/null
+++ b/doc/src/ds_writing/startup.eps
@@ -0,0 +1,382 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: startup.eps
+%%Creator: fig2dev Version 3.2 Patchlevel 1
+%%CreationDate: Mon Mar 18 09:55:39 2002
+%%For: taurel at spica1.esrf.fr (E.Taurel,,,)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 1000 320
+%%Pages: 0
+%%BeginSetup
+%%EndSetup
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-44.0 364.0 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+  bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+  4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+n -1000 6772 m -1000 -1000 l 17572 -1000 l 17572 6772 l cp clip
+ 0.06299 0.06299 sc
+% Polyline
+7.500 slw
+ [60] 0 sd
+gs  clippath
+2760 1500 m 2880 1530 l 2760 1560 l 2895 1560 l 2895 1500 l cp
+clip
+n 990 1530 m 2880 1530 l gs col0 s gr gr
+ [] 0 sd
+% arrowhead
+n 2760 1500 m 2880 1530 l 2760 1560 l  col0 s
+% Polyline
+ [60] 0 sd
+gs  clippath
+2760 2580 m 2880 2610 l 2760 2640 l 2895 2640 l 2895 2580 l cp
+clip
+n 990 2610 m 2880 2610 l gs col0 s gr gr
+ [] 0 sd
+% arrowhead
+n 2760 2580 m 2880 2610 l 2760 2640 l  col0 s
+% Polyline
+ [60] 0 sd
+gs  clippath
+2760 3300 m 2880 3330 l 2760 3360 l 2895 3360 l 2895 3300 l cp
+clip
+n 990 3330 m 2880 3330 l gs col0 s gr gr
+ [] 0 sd
+% arrowhead
+n 2760 3300 m 2880 3330 l 2760 3360 l  col0 s
+% Polyline
+ [60] 0 sd
+n 3150 1080 m 3150 1530 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 4950 1080 m 4950 1530 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 6300 1080 m 6300 1710 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 7380 1080 m 7380 1890 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 8550 1080 m 8550 2070 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+gs  clippath
+4560 1500 m 4680 1530 l 4560 1560 l 4695 1560 l 4695 1500 l cp
+clip
+n 3420 1530 m 4680 1530 l gs col0 s gr gr
+ [] 0 sd
+% arrowhead
+n 4560 1500 m 4680 1530 l 4560 1560 l  col0 s
+% Polyline
+ [60] 0 sd
+gs  clippath
+5910 1680 m 6030 1710 l 5910 1740 l 6045 1740 l 6045 1680 l cp
+clip
+n 5220 1710 m 6030 1710 l gs col0 s gr gr
+ [] 0 sd
+% arrowhead
+n 5910 1680 m 6030 1710 l 5910 1740 l  col0 s
+% Polyline
+ [60] 0 sd
+gs  clippath
+7080 1860 m 7200 1890 l 7080 1920 l 7215 1920 l 7215 1860 l cp
+clip
+n 6570 1890 m 7020 1890 l 7200 1890 l gs col0 s gr gr
+ [] 0 sd
+% arrowhead
+n 7080 1860 m 7200 1890 l 7080 1920 l  col0 s
+% Polyline
+ [60] 0 sd
+gs  clippath
+8250 2040 m 8370 2070 l 8250 2100 l 8385 2100 l 8385 2040 l cp
+clip
+n 7650 2070 m 8370 2070 l gs col0 s gr gr
+ [] 0 sd
+% arrowhead
+n 8250 2040 m 8370 2070 l 8250 2100 l  col0 s
+% Polyline
+ [60] 0 sd
+n 5220 1890 m 6030 1890 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 5220 2070 m 6030 2070 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 6570 2070 m 7110 2070 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 7650 2790 m 8280 2790 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 6570 2790 m 7110 2790 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 5220 2790 m 6030 2790 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 3420 2790 m 4680 2790 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 6570 3510 m 7110 3510 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 5220 3510 m 6120 3510 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 3420 3510 m 4680 3510 l gs col0 s gr  [] 0 sd
+% Polyline
+n 2970 1530 m 3330 1530 l 3330 5580 l 2970 5580 l cp gs col0 s gr 
+% Polyline
+n 4770 1530 m 5130 1530 l 5130 5580 l 4770 5580 l cp gs col0 s gr 
+% Polyline
+n 6120 1710 m 6480 1710 l 6480 5580 l 6120 5580 l cp gs col0 s gr 
+% Polyline
+n 7200 1890 m 7560 1890 l 7560 5580 l 7200 5580 l cp gs col0 s gr 
+% Polyline
+n 8370 2070 m 8730 2070 l 8730 5580 l 8370 5580 l cp gs col0 s gr 
+% Polyline
+n 9450 2790 m 9810 2790 l 9810 5580 l 9450 5580 l cp gs col0 s gr 
+% Polyline
+ [60] 0 sd
+n 9630 1080 m 9630 2790 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 7605 3510 m 8325 3510 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 13050 1080 m 13050 3510 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 14490 1080 m 14490 3510 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+gs  clippath
+14100 3480 m 14220 3510 l 14100 3540 l 14235 3540 l 14235 3480 l cp
+clip
+n 13320 3510 m 14220 3510 l gs col0 s gr gr
+ [] 0 sd
+% arrowhead
+n 14100 3480 m 14220 3510 l 14100 3540 l  col0 s
+% Polyline
+n 12870 3510 m 13230 3510 l 13230 5580 l 12870 5580 l cp gs col0 s gr 
+% Polyline
+n 14310 3510 m 14670 3510 l 14670 5580 l 14310 5580 l cp gs col0 s gr 
+% Polyline
+n 15660 3780 m 16020 3780 l 16020 5580 l 15660 5580 l cp gs col0 s gr 
+% Polyline
+ [60] 0 sd
+n 15840 1080 m 15840 3780 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+gs  clippath
+15450 3750 m 15570 3780 l 15450 3810 l 15585 3810 l 15585 3750 l cp
+clip
+n 14760 3780 m 15570 3780 l gs col0 s gr gr
+ [] 0 sd
+% arrowhead
+n 15450 3750 m 15570 3780 l 15450 3810 l  col0 s
+% Polyline
+n 11520 3150 m 11880 3150 l 11880 5580 l 11520 5580 l cp gs col0 s gr 
+% Polyline
+ [60] 0 sd
+n 11700 1260 m 11700 3150 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+gs  clippath
+11310 3120 m 11430 3150 l 11310 3180 l 11445 3180 l 11445 3120 l cp
+clip
+n 9900 3150 m 11430 3150 l gs col0 s gr gr
+ [] 0 sd
+% arrowhead
+n 11310 3120 m 11430 3150 l 11310 3180 l  col0 s
+% Polyline
+ [60] 0 sd
+n 8820 3150 m 9360 3150 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 7650 3150 m 8280 3150 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 6570 3150 m 7110 3150 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 5220 3150 m 6030 3150 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 3420 3150 m 4680 3150 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+gs  clippath
+2760 2940 m 2880 2970 l 2760 3000 l 2895 3000 l 2895 2940 l cp
+clip
+n 990 2970 m 2880 2970 l gs col0 s gr gr
+ [] 0 sd
+% arrowhead
+n 2760 2940 m 2880 2970 l 2760 3000 l  col0 s
+% Polyline
+ [60] 0 sd
+n 8820 3510 m 9360 3510 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+n 9900 3510 m 11430 3510 l gs col0 s gr  [] 0 sd
+% Polyline
+ [60] 0 sd
+gs  clippath
+12660 3480 m 12780 3510 l 12660 3540 l 12795 3540 l 12795 3480 l cp
+clip
+n 11970 3510 m 12780 3510 l gs col0 s gr gr
+ [] 0 sd
+% arrowhead
+n 12660 3480 m 12780 3510 l 12660 3540 l  col0 s
+% Polyline
+ [60] 0 sd
+gs  clippath
+9240 2760 m 9360 2790 l 9240 2820 l 9375 2820 l 9375 2760 l cp
+clip
+n 8820 2790 m 9360 2790 l gs col0 s gr gr
+ [] 0 sd
+% arrowhead
+n 9240 2760 m 9360 2790 l 9240 2820 l  col0 s
+% Polyline
+n 720 720 m 16560 720 l 16560 5760 l 720 5760 l cp gs col0 s gr 
+/Courier ff 180.00 scf sf
+1080 1440 m
+gs 1 -1 sc (init) col0 sh gr
+/Courier ff 180.00 scf sf
+990 2520 m
+gs 1 -1 sc (command_factory) col0 sh gr
+/Courier ff 180.00 scf sf
+990 3240 m
+gs 1 -1 sc (device_factory) col0 sh gr
+/Courier ff 180.00 scf sf
+2340 990 m
+gs 1 -1 sc (StepperMotorClass) col0 sh gr
+/Courier ff 180.00 scf sf
+4410 990 m
+gs 1 -1 sc (DeviceClass) col0 sh gr
+/Courier ff 180.00 scf sf
+5310 1620 m
+gs 1 -1 sc (new) col0 sh gr
+/Courier ff 180.00 scf sf
+6660 1800 m
+gs 1 -1 sc (new) col0 sh gr
+/Courier ff 180.00 scf sf
+7830 1980 m
+gs 1 -1 sc (new) col0 sh gr
+/Courier ff 180.00 scf sf
+9270 990 m
+gs 1 -1 sc (DevReadPosition) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+15390 990 m
+gs 1 -1 sc (Attribute\(s\)) col0 sh gr
+/Courier ff 180.00 scf sf
+12510 990 m
+gs 1 -1 sc (StepperMotor) col0 sh gr
+/Courier ff 180.00 scf sf
+14040 990 m
+gs 1 -1 sc (DeviceImpl) col0 sh gr
+/Courier ff 180.00 scf sf
+9000 2700 m
+gs 1 -1 sc (new) col0 sh gr
+/Courier ff 180.00 scf sf
+10890 3060 m
+gs 1 -1 sc (new) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+12240 3420 m
+gs 1 -1 sc (new) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+15030 3690 m
+gs 1 -1 sc (new) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+990 2880 m
+gs 1 -1 sc (attribute_factory) col0 sh gr
+/Times-Roman ff 210.00 scf sf
+10980 990 m
+gs 1 -1 sc (Attribute list) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+5985 990 m
+gs 1 -1 sc (Status) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+7110 990 m
+gs 1 -1 sc (State) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+8370 990 m
+gs 1 -1 sc (Init) col0 sh gr
+$F2psEnd
+rs
diff --git a/doc/src/ds_writing/w_attribute.eps b/doc/src/ds_writing/w_attribute.eps
new file mode 100644
index 0000000..fc87e7a
--- /dev/null
+++ b/doc/src/ds_writing/w_attribute.eps
@@ -0,0 +1,277 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: w_attribute.eps
+%%Creator: fig2dev Version 3.2 Patchlevel 3d
+%%CreationDate: Fri Oct  1 13:24:10 2004
+%%For: taurel at wow (E.Taurel,,,)
+%%BoundingBox: 0 0 586 297
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 297 moveto 0 0 lineto 586 0 lineto 586 297 lineto closepath clip newpath
+-33.3 318.2 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+  bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+  4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+10 setmiterlimit
+ 0.06299 0.06299 sc
+%
+% Fig objects follow
+%
+% Polyline
+7.500 slw
+n 2340 990 m
+ 2340 1170 l gs col0 s gr 
+% Polyline
+gs  clippath
+2085 1200 m 2085 1140 l 1933 1140 l 2053 1170 l 1933 1200 l cp
+eoclip
+n 990 1170 m
+ 2070 1170 l gs col0 s gr gr
+
+% arrowhead
+n 1933 1200 m 2053 1170 l 1933 1140 l  col0 s
+% Polyline
+n 2160 1170 m 2520 1170 l 2520 4590 l 2160 4590 l
+ cp gs col0 s gr 
+% Polyline
+n 2340 4590 m
+ 2340 4770 l gs col0 s gr 
+% Polyline
+n 8640 1350 m 9000 1350 l 9000 1930 l 8640 1930 l
+ cp gs col0 s gr 
+% Polyline
+n 8640 2970 m 9000 2970 l 9000 3550 l 8640 3550 l
+ cp gs col0 s gr 
+% Polyline
+n 8640 3780 m 9000 3780 l 9000 4360 l 8640 4360 l
+ cp gs col0 s gr 
+% Polyline
+n 5400 2880 m 5760 2880 l 5760 3590 l 5400 3590 l
+ cp gs col0 s gr 
+% Polyline
+n 5400 3690 m 5760 3690 l 5760 4400 l 5400 4400 l
+ cp gs col0 s gr 
+/Times-Roman ff 180.00 scf sf
+1710 810 m
+gs 1 -1 sc (StepperMotor object) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+4860 810 m
+gs 1 -1 sc (PositionAttr class) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+2700 1260 m
+gs 1 -1 sc (always_executed_hook) col0 sh gr
+% Polyline
+n 8820 1080 m
+ 8820 1350 l gs col0 s gr 
+% Polyline
+n 8820 3600 m
+ 8820 3780 l gs col0 s gr 
+% Polyline
+n 8820 4410 m
+ 8820 4680 l gs col0 s gr 
+% Polyline
+gs  clippath
+8565 1380 m 8565 1320 l 8413 1320 l 8533 1350 l 8413 1380 l cp
+eoclip
+n 2610 1350 m
+ 8550 1350 l gs col0 s gr gr
+
+% arrowhead
+n 8413 1380 m 8533 1350 l 8413 1320 l  col0 s
+% Polyline
+gs  clippath
+2595 1860 m 2595 1920 l 2747 1920 l 2627 1890 l 2747 1860 l cp
+eoclip
+n 8550 1890 m
+ 2610 1890 l gs col0 s gr gr
+
+% arrowhead
+n 2747 1860 m 2627 1890 l 2747 1920 l  col0 s
+% Polyline
+gs  clippath
+8565 3000 m 8565 2940 l 8413 2940 l 8533 2970 l 8413 3000 l cp
+eoclip
+n 5850 2970 m
+ 8550 2970 l gs col0 s gr gr
+
+% arrowhead
+n 8413 3000 m 8533 2970 l 8413 2940 l  col0 s
+% Polyline
+gs  clippath
+5835 3480 m 5835 3540 l 5987 3540 l 5867 3510 l 5987 3480 l cp
+eoclip
+n 8550 3510 m
+ 5850 3510 l gs col0 s gr gr
+
+% arrowhead
+n 5987 3480 m 5867 3510 l 5987 3540 l  col0 s
+% Polyline
+gs  clippath
+5835 4290 m 5835 4350 l 5987 4350 l 5867 4320 l 5987 4290 l cp
+eoclip
+n 8550 4320 m
+ 5850 4320 l gs col0 s gr gr
+
+% arrowhead
+n 5987 4290 m 5867 4320 l 5987 4350 l  col0 s
+% Polyline
+n 5580 2790 m
+ 5580 2880 l gs col0 s gr 
+% Polyline
+n 5580 3600 m
+ 5580 3690 l gs col0 s gr 
+% Polyline
+n 5580 4410 m
+ 5580 4590 l gs col0 s gr 
+% Polyline
+n 5580 1080 m
+ 5580 1260 l gs col0 s gr 
+% Polyline
+gs  clippath
+5325 2910 m 5325 2850 l 5173 2850 l 5293 2880 l 5173 2910 l cp
+eoclip
+n 2700 2880 m
+ 5310 2880 l gs col0 s gr gr
+
+% arrowhead
+n 5173 2910 m 5293 2880 l 5173 2850 l  col0 s
+% Polyline
+gs  clippath
+2595 3570 m 2595 3630 l 2747 3630 l 2627 3600 l 2747 3570 l cp
+eoclip
+n 5310 3600 m
+ 2610 3600 l gs col0 s gr gr
+
+% arrowhead
+n 2747 3570 m 2627 3600 l 2747 3630 l  col0 s
+% Polyline
+gs  clippath
+5325 3720 m 5325 3660 l 5173 3660 l 5293 3690 l 5173 3720 l cp
+eoclip
+n 2610 3690 m
+ 5310 3690 l gs col0 s gr gr
+
+% arrowhead
+n 5173 3720 m 5293 3690 l 5173 3660 l  col0 s
+% Polyline
+gs  clippath
+2595 4380 m 2595 4440 l 2747 4440 l 2627 4410 l 2747 4380 l cp
+eoclip
+n 5310 4410 m
+ 2610 4410 l gs col0 s gr gr
+
+% arrowhead
+n 2747 4380 m 2627 4410 l 2747 4440 l  col0 s
+% Polyline
+n 540 360 m 9810 360 l 9810 5040 l 540 5040 l
+ cp gs col0 s gr 
+% Polyline
+gs  clippath
+8565 3810 m 8565 3750 l 8413 3750 l 8533 3780 l 8413 3810 l cp
+eoclip
+n 5850 3780 m
+ 8550 3780 l gs col0 s gr gr
+
+% arrowhead
+n 8413 3810 m 8533 3780 l 8413 3750 l  col0 s
+% Polyline
+n 5580 1980 m
+ 5580 2880 l gs col0 s gr 
+% Polyline
+n 5580 1395 m
+ 5580 1800 l gs col0 s gr 
+% Polyline
+n 8820 2025 m
+ 8820 2970 l gs col0 s gr 
+/Times-Roman ff 180.00 scf sf
+2700 3060 m
+gs 1 -1 sc (is_allowed) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+5940 2880 m
+gs 1 -1 sc (is_Position_allowed) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+7920 810 m
+gs 1 -1 sc (StepperMotor object) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+2700 3870 m
+gs 1 -1 sc (write) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+5940 3735 m
+gs 1 -1 sc (write_Position) col0 sh gr
+/Times-Roman ff 180.00 scf sf
+765 1080 m
+gs 1 -1 sc (write_attribute) col0 sh gr
+$F2psEnd
+rs
diff --git a/doc/src/gen_api/genapi.lyx b/doc/src/gen_api/genapi.lyx
new file mode 100644
index 0000000..4188931
--- /dev/null
+++ b/doc/src/gen_api/genapi.lyx
@@ -0,0 +1,9862 @@
+#LyX 1.6.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 345
+\begin_document
+\begin_header
+\textclass Tango_book
+\begin_preamble
+\usepackage{a4wide}
+\end_preamble
+\use_default_options false
+\language english
+\inputencoding latin1
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_amsmath 1
+\use_esint 0
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\secnumdepth 5
+\tocdepth 4
+\paragraph_separation skip
+\defskip medskip
+\quotes_language english
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\author "" 
+\author "" 
+\end_header
+
+\begin_body
+
+\begin_layout Chapter
+Writing a TANGO client using TANGO APIs
+\end_layout
+
+\begin_layout Section
+Introduction
+\end_layout
+
+\begin_layout Standard
+\noindent
+TANGO devices and database are implemented using the TANGO device server
+ model.
+ To access them the user has the CORBA interface e.g.
+ command_inout(), write_attributes() etc.
+ defined by the idl file.
+ These methods are very low-level and assume a good working knowledge of
+ CORBA.
+ In order to simplify this access, high-level api in C++ and Java have been
+ implemented which hides all CORBA aspects of TANGO.
+ In addition the api hides details like how to connect to a device via the
+ database, how to reconnect after a device has been restarted, how to correctly
+ pack and unpack attributes and so on by implementing these in a manner
+ transparent to the user.
+ The api provides a unified error handling for all TANGO and CORBA errors.
+ Unlike the CORBA C++ bindings the TANGO api supports native C++ data types
+ e.g.
+ strings and vectors.
+\end_layout
+
+\begin_layout Standard
+This chapter describes how to use these API's.
+ It is not a reference guide.
+ See chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:The-TANGO-C++"
+
+\end_inset
+
+ for the C++ API details or chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:TANGO-Java-API"
+
+\end_inset
+
+ for a Java API reference guide.
+\end_layout
+
+\begin_layout Section
+\noindent
+Getting Started
+\end_layout
+
+\begin_layout Standard
+Refer to the chapter "Getting Started" for an example on getting start with
+ the C++ or Java api.
+\end_layout
+
+\begin_layout Section
+\noindent
+Basic Philosophy
+\end_layout
+
+\begin_layout Standard
+\noindent
+The basic philosophy is to have high level classes to deal with Tango devices.
+ To communicate with Tango device, uses the 
+\series bold
+DeviceProxy
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceProxy
+\end_layout
+
+\end_inset
+
+
+\series default
+ class.
+ To send/receive data to/from Tango device, uses the 
+\series bold
+DeviceData
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceData
+\end_layout
+
+\end_inset
+
+
+\series default
+ or 
+\series bold
+DeviceAttribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceAttribute
+\end_layout
+
+\end_inset
+
+
+\series default
+ classes.
+ To communicate with a group of devices, use the 
+\series bold
+Group
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Group
+\end_layout
+
+\end_inset
+
+
+\series default
+ class.
+ If you are interested only in some attributes provided by a Tango device,
+ uses the 
+\series bold
+AttributeProxy
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AttributeProxy
+\end_layout
+
+\end_inset
+
+
+\series default
+ class.
+ Even if the Tango database is implemented as any other devices (and therefore
+ accessible with one instance of a DeviceProxy class), specific high level
+ classes have been developped to query it.
+ Uses the 
+\series bold
+Database
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Database
+\end_layout
+
+\end_inset
+
+, 
+\series bold
+DbDevice
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DbDevice
+\end_layout
+
+\end_inset
+
+, 
+\series bold
+DbClass
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DbClass
+\end_layout
+
+\end_inset
+
+, 
+\series bold
+DbServer
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DbServer
+\end_layout
+
+\end_inset
+
+
+\series default
+ or 
+\series bold
+DbData
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DbData
+\end_layout
+
+\end_inset
+
+
+\series default
+ classes when interfacing the Tango database.
+ Callback for asynchronous requests or events are implemented via a 
+\series bold
+CallBack
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CallBack
+\end_layout
+
+\end_inset
+
+
+\series default
+ class.
+ An utility class called 
+\series bold
+ApiUtil
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ ApiUtil
+\end_layout
+
+\end_inset
+
+
+\series default
+ is also available.
+\end_layout
+
+\begin_layout Section
+Data types
+\end_layout
+
+\begin_layout Standard
+The definition of the basic data type you can transfert using Tango is:
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="17" columns="2">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0pt">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango type name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+C++ equivalent type
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevBoolean
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+boolean
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevShort
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+short
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevLong
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+int (always 32 bits data)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevLong64
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+long long on 32 bits chip or long on 64 bits chip
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+always 64 bits data
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevFloat
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+float
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevDouble
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevString
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+char *
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevEncoded
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+structure with 2 fields: a string and an array of unsigned char
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Only for attribute
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevUChar
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned char
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevUShort
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned short
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevULong
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned int (always 32 bits data)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevULong64
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+unsigned long long on 32 bits chip or unsigned long on 64 bits chip
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+always 64 bits data
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+DevState
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Tango specific data type
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Using commands, you are able to transfert all these data types (excepted
+ the DevEncoded data type), array of these basic types and two other Tango
+ specific data types called DevVarLongStringArray and DevVarDoubleStringArray.
+ Attribute also supports the DevEncoded data type.
+ See chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Data exchange"
+
+\end_inset
+
+ to get details about them.
+ You are also able to create attributes using any of these basic data types
+ to transfer data between clients and servers.
+\end_layout
+
+\begin_layout Section
+Request model
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Request-model"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+For the most important API remote calls (command_inout, read_attribute(s)
+ and write_attribute(s)), Tango supports two kind of requests which are
+ the synchronous model and the asynchronous model.
+ Synchronous
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+synchronous
+\end_layout
+
+\end_inset
+
+ model means that the client wait (and is blocked) for the server to send
+ an answer.
+ Asynchronous
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+asynchronous
+\end_layout
+
+\end_inset
+
+ model means that the client does not wait for the server to send an answer.
+ The client sends the request and immediately returns allowing the CPU to
+ do anything else (like updating a graphical user interface).
+ Within Tango, there are two ways to retrieve the server answer when using
+ asynchronous model.
+ They are:
+\end_layout
+
+\begin_layout Enumerate
+The polling
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+polling
+\end_layout
+
+\end_inset
+
+ mode
+\end_layout
+
+\begin_layout Enumerate
+The callback
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+callback
+\end_layout
+
+\end_inset
+
+ mode
+\end_layout
+
+\begin_layout Standard
+In polling mode, the client executes a specific call to check if the answer
+ is arrived.
+ If this is not the case, an exception is thrown.
+ If the reply is there, it is returned to the caller and if the reply was
+ an exception, it is re-thrown.
+ There are two calls to check if the reply is arrived:
+\end_layout
+
+\begin_layout Itemize
+Call which does not wait before the server answer is returned to the caller.
+\end_layout
+
+\begin_layout Itemize
+Call which wait with timeout before returning the server answer to the caller
+ (or throw the exception) if the answer is not arrived.
+\end_layout
+
+\begin_layout Standard
+In callback model, the caller must supply a callback method which will be
+ executed when the command returns.
+ They are two sub-modes:
+\end_layout
+
+\begin_layout Enumerate
+The pull
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+pull
+\end_layout
+
+\end_inset
+
+ callback mode
+\end_layout
+
+\begin_layout Enumerate
+The push
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+push
+\end_layout
+
+\end_inset
+
+ callback mode
+\end_layout
+
+\begin_layout Standard
+In the pull callback
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+callback
+\end_layout
+
+\end_inset
+
+ mode, the callback is triggered if the server answer is arrived when the
+ client decide it by calling a 
+\emph on
+synchronization
+\emph default
+ method (The client pull-out the answer).
+ In push mode, the callback is executed as soon as the reply arrives in
+ a separate thread (The server pushes the answer to the client).
+\end_layout
+
+\begin_layout Subsection
+Synchronous model
+\end_layout
+
+\begin_layout Standard
+Synchronous access to Tango device are provided using the 
+\emph on
+DeviceProxy
+\emph default
+ or 
+\emph on
+AttributeProxy
+\emph default
+ class.
+ For the 
+\emph on
+DeviceProxy
+\emph default
+ class, the main synchronous call methods are :
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+command_inout()
+\emph default
+ to execute a Tango device command
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+read_attribute()
+\emph default
+ or 
+\emph on
+read_attributes()
+\emph default
+ to read a Tango device attribute(s)
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+write_attribute()
+\emph default
+ or 
+\emph on
+write_attributes()
+\emph default
+ to write a Tango device attribute
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+write_read_attribute()
+\emph default
+ to write then read a Tango device attribute
+\end_layout
+
+\begin_layout Standard
+For commands, data are send/received to/from device using the 
+\emph on
+DeviceData
+\emph default
+ class.
+ For attributes, data are send/received to/from device attribute using the
+ 
+\emph on
+DeviceAttribute
+\emph default
+ class.
+\end_layout
+
+\begin_layout Standard
+In some cases, only attributes provided by a Tango device are interesting
+ for the application.
+ You can use the 
+\emph on
+AttributeProxy
+\emph default
+ class.
+ Its main synchronous methods are :
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+read()
+\emph default
+ to read the attribute value
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+write()
+\emph default
+ to write the attribute value
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+write_read()
+\emph default
+ to write then read the attribute value
+\end_layout
+
+\begin_layout Standard
+Data are transmitted using the 
+\emph on
+DeviceAttribute
+\emph default
+ class.
+\end_layout
+
+\begin_layout Subsection
+Asynchronous model
+\end_layout
+
+\begin_layout Standard
+Asynchronous access to Tango device are provided using 
+\emph on
+DeviceProxy
+\emph default
+ or 
+\emph on
+AttributeProxy, CallBack
+\emph default
+ and 
+\emph on
+ApiUtil
+\emph default
+ classes methods.
+ The main asynchronous call methods and used classes are :
+\end_layout
+
+\begin_layout Itemize
+To execute a command on a device
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+
+\emph on
+DeviceProxy::command_inout_asynch()
+\emph default
+ and 
+\emph on
+DeviceProxy::command_inout_reply()
+\emph default
+ in polling model.
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+DeviceProxy::command_inout_asynch()
+\emph default
+, 
+\emph on
+DeviceProxy::get_asynch_replies()
+\emph default
+ and 
+\emph on
+CallBack
+\emph default
+ class in callback pull model
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+DeviceProxy::command_inout_asynch()
+\emph default
+, 
+\emph on
+ApiUtil::set_asynch_cb_sub_model()
+\emph default
+ and 
+\emph on
+CallBack
+\emph default
+ class in callback push model
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+To read a device attribute 
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+
+\emph on
+DeviceProxy::read_attribute_asynch()
+\emph default
+ and 
+\emph on
+DeviceProxy::read_attribute_reply()
+\emph default
+ in polling model
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+DeviceProxy::read_attribute_asynch()
+\emph default
+, 
+\emph on
+DeviceProxy::get_asynch_replies()
+\emph default
+ and 
+\emph on
+CallBack
+\emph default
+ class in callback pull model.
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+DeviceProxy::read_attribute_asynch()
+\emph default
+, 
+\emph on
+ApiUtil::set_asynch_cb_sub_model()
+\emph default
+ and 
+\emph on
+CallBack
+\emph default
+ class in callback push model
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+To write a device attribute
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+
+\emph on
+DeviceProxy::write_attribute_asynch()
+\emph default
+ in polling model
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+DeviceProxy::write_attribute_asynch()
+\emph default
+ and 
+\emph on
+CallBack
+\emph default
+ class in callback pull model
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+DeviceProxy::write_attribute_asynch()
+\emph default
+, 
+\emph on
+ApiUtil::set_asynch_cb_sub_model()
+\emph default
+ and 
+\emph on
+CallBack
+\emph default
+ class in callback push model
+\end_layout
+
+\end_deeper
+\begin_layout Standard
+For commands, data are send/received to/from device using the 
+\emph on
+DeviceData
+\emph default
+ class.
+ For attributes, data are send/received to/from device attribute using the
+ 
+\emph on
+DeviceAttribute
+\emph default
+ class.
+ It is also possible to generate asynchronous request(s) using the 
+\emph on
+AttributeProxy
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AttributeProxy
+\end_layout
+
+\end_inset
+
+
+\emph default
+ class following the same schema than above.
+ Methods to use are :
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+read_asynch(
+\emph default
+) and 
+\emph on
+read_reply()
+\emph default
+ to asynchronously read the attribute value
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+write_asynch()
+\emph default
+ and 
+\emph on
+write_reply()
+\emph default
+ to asynchronously write the attribute value
+\end_layout
+
+\begin_layout Section
+Events
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+event
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Introduction
+\end_layout
+
+\begin_layout Standard
+Events are a critical part of any distributed control system.
+ Their aim is to provide a communication mechanism which is fast and efficient.
+ 
+\end_layout
+
+\begin_layout Standard
+The standard CORBA communication paradigm is a synchronous or asynchronous
+ two-way call.
+ In this paradigm the call is initiated by the client who contacts the server.
+ The server handles the client's request and sends the answer to the client
+ or throws an exception which the client catches.
+ This paradigm involves two calls to receive a single answer and requires
+ the client to be active in initiating the request.
+ If the client has a permanent interest in a value he is obliged to poll
+ the server for an update in a value every time.
+ This is not efficient in terms of network bandwidth nor in terms of client
+ programming.
+\end_layout
+
+\begin_layout Standard
+For clients who are permanently interested in values the event-driven communicat
+ion paradigm is a more efficient and natural way of programming.
+ In this paradigm the client registers her interest once in an event (value).
+ After that the server informs the client every time the event has occurred.
+ This paradigm avoids the client polling, frees it for doing other things,
+ is fast and makes efficient use of the network.
+\end_layout
+
+\begin_layout Standard
+The rest of this chapter explains how the TANGO events are implemented and
+ the application programmer's interface.
+\end_layout
+
+\begin_layout Subsection
+Event definition
+\end_layout
+
+\begin_layout Standard
+TANGO events represent an alternative channel for reading TANGO device attribute
+s
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+.
+ Device attributes values are sent to all subscribed clients when an event
+ occurs.
+ Events can be an attribute value change, a change in the data quality or
+ a periodically send event.
+ The clients continue receiving events as long as they stay subscribed.
+ Most of the time, the device server polling thread detects the event and
+ then pushes the device attribute value to all clients.
+ Nevertheless, in some cases, the delay introduced by the polling thread
+ in the event propagation is detrimental.
+ For such cases, some API calls directly push the event.
+ The omniNotify
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+omniNotify
+\end_layout
+
+\end_inset
+
+ implementation of the CORBA Notification service
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Notification Service
+\end_layout
+
+\end_inset
+
+ is used to dispatch events.
+\end_layout
+
+\begin_layout Subsection
+Event types
+\end_layout
+
+\begin_layout Standard
+The following five event types have been implemented in TANGO :
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+change
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+change
+\end_layout
+
+\end_inset
+
+
+\series default
+ - an event is triggered and the attribute value is sent when the attribute
+ value changes significantly.
+ The exact meaning of significant is device attribute dependent.
+ For analog and digital values this is a delta fixed per attribute, for
+ string values this is any non-zero change i.e.
+ if the new attribute value is not equal to the previous attribute value.
+ The delta can either be specified as a relative or absolute change.
+ The delta is the same for all clients unless a filter is specified (see
+ below).
+ To easily write applications using the change event, it is also triggered
+ in the following case :
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+When a spectrum or image attribute size changes.
+\end_layout
+
+\begin_layout Enumerate
+At event subscription time
+\end_layout
+
+\begin_layout Enumerate
+When the polling thread receives an exception during attribute reading
+\end_layout
+
+\begin_layout Enumerate
+When the polling thread detects that the attribute quality factor has changed.
+\end_layout
+
+\begin_layout Enumerate
+The first good reading of the attribute after the polling thread has received
+ exception when trying to read the attribute
+\end_layout
+
+\begin_layout Enumerate
+The first time the polling thread detects that the attribute quality factor
+ has changed from INVALID to something else
+\end_layout
+
+\begin_layout Enumerate
+When a change event is pushed manually from the device server code.
+ (
+\emph on
+DeviceImpl::push_change_event()
+\emph default
+).
+\end_layout
+
+\begin_layout Enumerate
+By the methods Attribute::set_quality() and Attribute::set_value_date_quality()
+ if a client has subscribed to the change event on the attribute.
+ This has been implemented for cases where the delay introduced by the polling
+ thread in the event propagation is not authorized.
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+
+\series bold
+periodic
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+periodic
+\end_layout
+
+\end_inset
+
+
+\series default
+ - an event is sent at a fixed periodic interval.
+ The frequency of this event is determined by the 
+\emph on
+event_period
+\emph default
+ property of the attribute and the polling frequency.
+ The polling frequency determines the highest frequency at which the attribute
+ is read.
+ The event_period determines the highest frequency at which the periodic
+ event is sent.
+ Note if the event_period is not an integral number of the polling period
+ there will be a beating of the two frequencies
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+note: the polling is not synchronized is currently not synchronized on the
+ hour
+\end_layout
+
+\end_inset
+
+.
+ Clients can reduce the frequency at which they receive periodic events
+ by specifying a filter on the periodic event counter.
+ 
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+archive
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+archive
+\end_layout
+
+\end_inset
+
+
+\series default
+ - an event is sent if one of the archiving conditions is satisfied.
+ Archiving conditions are defined via properties in the database.
+ These can be a mixture of delta_change and periodic.
+ Archive events can be send from the polling thread or can be manually pushed
+ from the device server code (
+\emph on
+DeviceImpl::push_archive_event()
+\emph default
+).
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+attribute configuration
+\series default
+ - an event is sent if the attribute configuration is changed.
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+data ready
+\series default
+ - This event is sent when coded by the device server programmer who uses
+ a specific method of one of the Tango device server class to fire the event
+ (
+\emph on
+DeviceImpl::push_data_ready_event()
+\emph default
+).
+ The rule of this event is to inform a client that it is now possible to
+ read an attribute.
+ This could be useful in case of attribute with many data.
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+user
+\series default
+ - The criteria and configuration of these user events are managed by the
+ device server programmer who uses a specific method of one of the Tango
+ device server class to fire the event (
+\emph on
+DeviceImpl::push_event()
+\emph default
+).
+\end_layout
+
+\begin_layout Standard
+The first three above events are automatically generated by the TANGO library
+ or fired by the user code.
+ Even number 4 is only automatically sent by the library and the last two
+ are fired only by the user code.
+\end_layout
+
+\begin_layout Subsection
+Event filtering
+\end_layout
+
+\begin_layout Standard
+The CORBA Notification Service allows event filtering.
+ This means that a client can ask the Notification Service to send the event
+ only if some filter is evaluated to true.
+ Within the Tango control system, some pre-defined fields can be used as
+ filter.
+ These fields depend on the event type.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="18" columns="4">
+<features islongtable="true">
+<column alignment="center" valignment="top" width="0pt">
+<column alignment="center" valignment="top" width="0in">
+<column alignment="center" valignment="top" width="0in">
+<column alignment="center" valignment="top" width="0in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Event type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Filterable field name
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Filterable field value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+type
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+delta_change_rel
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Relative change (in %) since last event
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+delta_change_abs
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Absolute change since last event
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+quality
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Is set to 1 when the attribute quality factor has
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+changed, otherwise it is 0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family roman
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+forced_event
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Is set to 1 when the event was fired on exception 
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+or a quality factor set to invalid
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+periodic
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+counter
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Incremented each time the event is sent
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+long
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+delta_change_rel
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Relative change (in %) since last event
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+delta_change_abs
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Absolute change since last event
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+quality
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Is set to 1 when the attribute quality factor has
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+changed, otherwise it is 0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+archive
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Incremented each time the event is sent
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+counter
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+for periodic reason.
+ Set to -1 if event
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+long
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+sent for change reason
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family roman
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+forced_event
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Is set to 1 when the event was fired on exception
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+or a quality factor set to invalid
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+delta_event
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Number of milli-seconds since previous event
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Filter are defined as a string following a grammar defined by CORBA.
+ It is defined in 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Notif_doc"
+
+\end_inset
+
+.
+ The following example shows you the most common use of these filters in
+ the Tango world :
+\end_layout
+
+\begin_layout Itemize
+To receive periodic event one out of every three, the filter must be 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+"$counter % 3 == 0"
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+To receive change event only if the relative change is greater than 20 %
+ (positive and negative), the filter must be 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+"$delta_change_rel >= 20 or $delta_change_rel <= -20"
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+To receive a change event only on quality change, the filter must be 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+"$quality == 1"
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+For user events, the filter field name(s) and their value are defined by
+ the device server programmer.
+\end_layout
+
+\begin_layout Subsection
+Application Programmer's Interface
+\end_layout
+
+\begin_layout Standard
+How to setup and use the TANGO events ? The interfaces described here are
+ intended as user friendly interfaces to the underlying CORBA calls.
+ The interface is modeled after the asynchronous
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+asynchronous
+\end_layout
+
+\end_inset
+
+ 
+\emph on
+command_inout()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-inout()
+\end_layout
+
+\end_inset
+
+
+\emph default
+ interface so as to maintain coherency.
+ The event system supports 
+\series bold
+push callback model
+\series default
+ as well as the 
+\series bold
+pull callback model.
+\end_layout
+
+\begin_layout Standard
+The two event reception modes are:
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+Push callback model
+\series default
+ : On event reception a callbacks method gets immediately executed.
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+Pull callback model
+\series default
+ : The event will be buffered the client until the client is ready to receive
+ the event data.
+ The client triggers the execution of the callback method.
+\end_layout
+
+\begin_layout Standard
+The event reception buffer in the 
+\series bold
+pull callback model
+\series default
+, is implemented as a round robin buffer.
+ The client can choose the size when subscribing for the event.
+ This way the client can set-up different ways to receive events.
+\end_layout
+
+\begin_layout Itemize
+Event reception buffer size = 1 : The client is interested only in the value
+ of the last event received.
+ All other events that have been received since the last reading are discarded.
+\end_layout
+
+\begin_layout Itemize
+Event reception buffer size > 1 : The client has chosen to keep an event
+ history of a given size.
+ When more events arrive since the last reading, older events will be discarded.
+\end_layout
+
+\begin_layout Itemize
+Event reception buffer size = ALL_EVENTS : The client buffers all received
+ events.
+ The buffer size is unlimited and only restricted by the available memory
+ for the client.
+\end_layout
+
+\begin_layout Subsubsection
+Configuring events
+\end_layout
+
+\begin_layout Standard
+The attribute configuration set is used to configure under what conditions
+ events
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+event
+\end_layout
+
+\end_inset
+
+ are generated.
+ A set of standard attribute properties (part of the standard attribute
+ configuration) are read from the database at device startup time and used
+ to configure the event engine.
+ If there are no properties defined then default values specified in the
+ code are used.
+ 
+\end_layout
+
+\begin_layout Paragraph
+change
+\end_layout
+
+\begin_layout Standard
+The attribute properties and their default values for the "change" event
+ are :
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+rel_change
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+rel-change
+\end_layout
+
+\end_inset
+
+
+\series default
+ - a property of maximum 2 values.
+ It specifies the positive and negative relative change of the attribute
+ value w.r.t.
+ the value of the previous change event which will trigger the event.
+ If the attribute is a spectrum or an image then a change event is generated
+ if any one of the attribute value's satisfies the above criterium.
+ If only one property is specified then it is used for the positive and
+ negative change.
+ If no property is specified, no events are generated.
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+abs_change
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+abs-change
+\end_layout
+
+\end_inset
+
+
+\series default
+ - a property of maximum 2 values.It specifies the positive and negative
+ absolute change of the attribute value w.r.t the value of the previous change
+ event which will trigger the event.
+ If the attribute is a spectrum or an image then a change event is generated
+ if any one of the attribute value's satisfies the above criterium.
+ If only one property is specified then it is used for the positive and
+ negative change.
+ If no properties are specified then the relative change is used.
+\end_layout
+
+\begin_layout Paragraph
+periodic
+\end_layout
+
+\begin_layout Standard
+The attribute properties and their default values for the "periodic" event
+ are :
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+event_period
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+event-period
+\end_layout
+
+\end_inset
+
+
+\series default
+ - the minimum time between events (in milliseconds).
+ If no property is specified then a default value of 1 second is used.
+\end_layout
+
+\begin_layout Paragraph
+archive
+\end_layout
+
+\begin_layout Standard
+The attribute properties and their default values for the "archive" event
+ are :
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+archive_rel_change
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+archive-rel-change
+\end_layout
+
+\end_inset
+
+
+\series default
+ - a property of maximum 2 values which specifies the positive and negative
+ relative change w.r.t.
+ the previous attribute value which will trigger the event.
+ If the attribute is a spectrum or an image then an archive event is generated
+ if any one of the attribute value's satisfies the above criterium.
+ If only one property is specified then it is used for the positive and
+ negative change.
+ If no properties are specified then no events are generate.
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+archive_abs_change
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+archive-abs-change
+\end_layout
+
+\end_inset
+
+
+\series default
+ - a property of maximum 2 values which specifies the positive and negative
+ absolute change w.r.t the previous attribute value which will trigger the
+ event.
+ If the attribute is a spectrum or an image then an archive event is generated
+ if any one of the attribute value's satisfies the above criterium.
+ If only one property is specified then it is used for the positive and
+ negative change.
+ If no properties are specified then the relative change is used.
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+archive_period
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+archive-period
+\end_layout
+
+\end_inset
+
+
+\series default
+ - the minimum time between archive events (in milliseconds).
+ If no property is specified, no periodic archiving events are send.
+\end_layout
+
+\begin_layout Subsubsection
+C++ Clients
+\end_layout
+
+\begin_layout Standard
+This is the interface for clients who want to receive events
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+event
+\end_layout
+
+\end_inset
+
+.
+ The main action of the client is to subscribe and unsubscribe to events.
+ Once the client has subscribed to one or more events the events are received
+ in a separate thread by the client.
+\end_layout
+
+\begin_layout Standard
+Two reception modes are possible:
+\end_layout
+
+\begin_layout Itemize
+On event reception a callbacks method gets immediately executed.
+\end_layout
+
+\begin_layout Itemize
+The event will be buffered until the client until the client is ready to
+ receive the event data.
+\end_layout
+
+\begin_layout Standard
+The mode to be used has to be chosen when subscribing for the event.
+\end_layout
+
+\begin_layout Paragraph
+Subscribing to events
+\end_layout
+
+\begin_layout Standard
+The client call to subscribe to an event is named 
+\emph on
+DeviceProxy::subscribe_event()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+subscribe-event
+\end_layout
+
+\end_inset
+
+
+\emph default
+ .
+ During the event subscription the client has to choose the event reception
+ mode to use.
+ 
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+Push model
+\series default
+:
+\end_layout
+
+\begin_layout LyX-Code
+int DeviceProxy::subscribe_event( 
+\end_layout
+
+\begin_layout LyX-Code
+             const string &attribute, 
+\end_layout
+
+\begin_layout LyX-Code
+             Tango::EventType event, 
+\end_layout
+
+\begin_layout LyX-Code
+             Tango::CallBack *callback, 
+\end_layout
+
+\begin_layout LyX-Code
+             const vector<string> &filters,
+\end_layout
+
+\begin_layout LyX-Code
+             bool stateless = false);
+\end_layout
+
+\begin_layout Standard
+The client implements a callback method which is triggered when the event
+ is received.
+ Note that this callback method will be executed by a thread started by
+ the underlying ORB.
+ This thread is not the application main thread.
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+Pull model
+\series default
+:
+\end_layout
+
+\begin_layout LyX-Code
+int DeviceProxy::subscribe_event( 
+\end_layout
+
+\begin_layout LyX-Code
+             const string &attribute, 
+\end_layout
+
+\begin_layout LyX-Code
+             Tango::EventType event, 
+\end_layout
+
+\begin_layout LyX-Code
+             int event_queue_size, 
+\end_layout
+
+\begin_layout LyX-Code
+             const vector<string> &filters,
+\end_layout
+
+\begin_layout LyX-Code
+             bools stateless = false);
+\end_layout
+
+\begin_layout Standard
+The client chooses the size of the round robin event reception buffer.
+ Arriving events will be buffered until the client uses 
+\emph on
+DeviceProxy::get_events()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+get-events
+\end_layout
+
+\end_inset
+
+
+\emph default
+ to extract the event data.
+\end_layout
+
+\begin_layout Standard
+On top of the user filter defined by the 
+\emph on
+filters
+\emph default
+ parameter, basic filtering is done based on the reason specified and the
+ event type.
+ For example when reading the state and the reason specified is "change"
+ the event will be fired only when the state changes.
+ Events consist of an attribute name and the event reason.
+ A standard set of reasons are implemented by the system, additional device
+ specific reasons can be implemented by device servers programmers.
+ 
+\end_layout
+
+\begin_layout Standard
+The stateless flag = false indicates that the event subscription will only
+ succeed when the given attribute is known and available in the Tango system.
+ Setting stateless = true will make the subscription succeed, even if an
+ attribute of this name was never known.
+ The real event subscription will happen when the given attribute will be
+ available in the Tango system.
+\end_layout
+
+\begin_layout Standard
+Note that in this model, the callback method will be executed by the thread
+ doing the 
+\emph on
+DeviceProxy::get_events()
+\emph default
+ call.
+\end_layout
+
+\begin_layout Paragraph
+The CallBack class
+\end_layout
+
+\begin_layout Standard
+In C++, the client has to implement a class inheriting from the Tango CallBack
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CallBack
+\end_layout
+
+\end_inset
+
+ class and pass this to the 
+\emph on
+DeviceProxy::subscribe_event()
+\emph default
+ method.
+ The CallBack class is the same class as the one proposed for the TANGO
+ asynchronous call.
+ This is as follows for events :
+\end_layout
+
+\begin_layout LyX-Code
+class MyCallback : public Tango::CallBack
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   .
+\end_layout
+
+\begin_layout LyX-Code
+   .
+\end_layout
+
+\begin_layout LyX-Code
+   .
+\end_layout
+
+\begin_layout LyX-Code
+   virtual push_event(Tango::EventData *);
+\end_layout
+
+\begin_layout LyX-Code
+   virtual push_event(Tango::AttrConfEventData *);
+\end_layout
+
+\begin_layout LyX-Code
+   virtual push_event(Tango::DataReadyEventData *);
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+where EventData
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+EventData
+\end_layout
+
+\end_inset
+
+ is defined as follows :
+\end_layout
+
+\begin_layout LyX-Code
+class EventData 
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   DeviceProxy *device;
+\end_layout
+
+\begin_layout LyX-Code
+   string &attr_name;
+\end_layout
+
+\begin_layout LyX-Code
+   string &event;
+\end_layout
+
+\begin_layout LyX-Code
+   DeviceAttribute *attr_value;
+\end_layout
+
+\begin_layout LyX-Code
+   bool err;
+\end_layout
+
+\begin_layout LyX-Code
+   DevErrorList &errors;
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+AttrConfEventData
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AttrConfEventData
+\end_layout
+
+\end_inset
+
+ is defined as follows :
+\end_layout
+
+\begin_layout LyX-Code
+class AttrConfEventData 
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   DeviceProxy *device;
+\end_layout
+
+\begin_layout LyX-Code
+   string &attr_name;
+\end_layout
+
+\begin_layout LyX-Code
+   string &event;
+\end_layout
+
+\begin_layout LyX-Code
+   AttributeInfoEx*attr_conf;
+\end_layout
+
+\begin_layout LyX-Code
+   bool err;
+\end_layout
+
+\begin_layout LyX-Code
+   DevErrorList &errors;
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+and DataReadyEventData
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DataReadyEventData
+\end_layout
+
+\end_inset
+
+ is defined as follows :
+\end_layout
+
+\begin_layout LyX-Code
+class DataReadyEventData 
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   DeviceProxy *device;
+\end_layout
+
+\begin_layout LyX-Code
+   string &attr_name;
+\end_layout
+
+\begin_layout LyX-Code
+   string &event;
+\end_layout
+
+\begin_layout LyX-Code
+   int attr_data_type;
+\end_layout
+
+\begin_layout LyX-Code
+   int ctr;
+\end_layout
+
+\begin_layout LyX-Code
+   bool err;
+\end_layout
+
+\begin_layout LyX-Code
+   DevErrorList &errors;
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+In push model, there are some cases (same callback used for events coming
+ from different devices hosted in device server process running on different
+ hosts) where the callback method could be executed concurently by different
+ threads started by the ORB.
+ The user has to code his callback method in a 
+\series bold
+thread
+\series default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+thread
+\end_layout
+
+\end_inset
+
+ 
+\series bold
+safe
+\series default
+ manner.
+\end_layout
+
+\begin_layout Paragraph
+Unsubscribing from an event 
+\end_layout
+
+\begin_layout Standard
+Unsubscribe a client from receiving the event specified by 
+\emph on
+event_id
+\emph default
+ is done by calling the 
+\emph on
+DeviceProxy::unsubscribe_event()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+unsubscribe-event
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method :
+\end_layout
+
+\begin_layout LyX-Code
+void DeviceProxy::unsubscribe_event(int event_id);
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Paragraph
+Extract buffered event data
+\end_layout
+
+\begin_layout Standard
+When the pull model was chosen during the event subscription, the received
+ event data can be extracted with 
+\emph on
+DeviceProxy::get_events()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+get-events
+\end_layout
+
+\end_inset
+
+.
+
+\emph default
+ Two possibilities are available for data extraction.
+ Either a callback method can be executed for every event in the buffer
+ when using
+\end_layout
+
+\begin_layout LyX-Code
+int DeviceProxy::get_events( 
+\end_layout
+
+\begin_layout LyX-Code
+             int event_id, 
+\end_layout
+
+\begin_layout LyX-Code
+             CallBack *cb);
+\end_layout
+
+\begin_layout Standard
+Or all the event data can be directly extracted as EventDataList
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+EventDataList
+\end_layout
+
+\end_inset
+
+, AttrConfEventDataList
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+AttrConfEventDataList
+\end_layout
+
+\end_inset
+
+ or DataReadyEventDataList
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DataReadyEventDataList
+\end_layout
+
+\end_inset
+
+ when using
+\end_layout
+
+\begin_layout LyX-Code
+int DeviceProxy::get_events( 
+\end_layout
+
+\begin_layout LyX-Code
+             int event_id, 
+\end_layout
+
+\begin_layout LyX-Code
+             EventDataList &event_list);
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+int DeviceProxy::get_events( 
+\end_layout
+
+\begin_layout LyX-Code
+             int event_id, 
+\end_layout
+
+\begin_layout LyX-Code
+             AttrConfEventDataList &event_list);
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+int DeviceProxy::get_events( 
+\end_layout
+
+\begin_layout LyX-Code
+             int event_id, 
+\end_layout
+
+\begin_layout LyX-Code
+             DataReadyEventDataList &event_list);
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+The event data lists are vectors of EventData, AttrConfEventData or DataReadyEve
+ntData pointers with special destructor and clean-up methods to ease the
+ memory handling.
+\end_layout
+
+\begin_layout LyX-Code
+class EventDataList:public vector<EventData *>
+\end_layout
+
+\begin_layout LyX-Code
+class AttrConfEventDataList:public vector<AttrConfEventData *>
+\end_layout
+
+\begin_layout LyX-Code
+class DataReadyEventDataList:public vector<DataReadyEventDataList *>
+\end_layout
+
+\begin_layout Paragraph
+Example
+\end_layout
+
+\begin_layout Standard
+Here is a typical code example of a client to register and receive events
+ without specifying additional filters.
+ First, you have to define a callback
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CallBack
+\end_layout
+
+\end_inset
+
+ method as follows:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+class DoubleEventCallBack : public Tango::CallBack 
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   void push_event(Tango::EventData*);
+\end_layout
+
+\begin_layout LyX-Code
+}; 
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+void DoubleEventCallBack::push_event(Tango::EventData *myevent)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+    Tango::DevVarDoubleArray *double_value;
+\end_layout
+
+\begin_layout LyX-Code
+    try
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+        cout << "DoubleEventCallBack::push_event(): called attribute " 
+\end_layout
+
+\begin_layout LyX-Code
+             << myevent->attr_name
+\end_layout
+
+\begin_layout LyX-Code
+             << " event "
+\end_layout
+
+\begin_layout LyX-Code
+             << myevent->event 
+\end_layout
+
+\begin_layout LyX-Code
+             << " (err="
+\end_layout
+
+\begin_layout LyX-Code
+             << myevent->err
+\end_layout
+
+\begin_layout LyX-Code
+             << ")" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+         if (!myevent->err)
+\end_layout
+
+\begin_layout LyX-Code
+         {
+\end_layout
+
+\begin_layout LyX-Code
+             myevent->attr_value >> double_value;
+\end_layout
+
+\begin_layout LyX-Code
+             cout << "double value "
+\end_layout
+
+\begin_layout LyX-Code
+                  << (*double_value)[0]
+\end_layout
+
+\begin_layout LyX-Code
+                  << endl;
+\end_layout
+
+\begin_layout LyX-Code
+             delete double_value;
+\end_layout
+
+\begin_layout LyX-Code
+         }
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    catch (...)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+         cout << "DoubleEventCallBack::push_event(): could not extract data
+ !
+\backslash
+n";
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Then the main code must subscribe
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+evebt-subscribe
+\end_layout
+
+\end_inset
+
+ to the event and choose the push or the pull model for event reception.
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+Push model
+\series default
+:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+DoubleEventCallBack *double_callback = new DoubleEventCallBack; 
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> my_filters;
+\end_layout
+
+\begin_layout LyX-Code
+      
+\end_layout
+
+\begin_layout LyX-Code
+Tango::DeviceProxy *mydevice = new Tango::DeviceProxy("my/device/1");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+int event_id;
+\end_layout
+
+\begin_layout LyX-Code
+const string attr_name("current");
+\end_layout
+
+\begin_layout LyX-Code
+event_id = mydevice->subscribe_event(attr_name, 
+\end_layout
+
+\begin_layout LyX-Code
+                         Tango::CHANGE_EVENT,
+\end_layout
+
+\begin_layout LyX-Code
+                         double_callback,
+\end_layout
+
+\begin_layout LyX-Code
+                         my_filters);
+\end_layout
+
+\begin_layout LyX-Code
+cout << "event_client() id = " << event_id << endl;
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+// The callback methods are executed by the Tango event reception thread.
+\end_layout
+
+\begin_layout LyX-Code
+// The main thread is not concerned of event reception.
+\end_layout
+
+\begin_layout LyX-Code
+// Whatch out with synchronisation and data access in a multi threaded environme
+nt!
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+sleep(1000); // wait for events
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+event_test->unsubscribe_event(event_id);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+Pull model
+\series default
+:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+DoubleEventCallBack *double_callback = new DoubleEventCallBack; 
+\end_layout
+
+\begin_layout LyX-Code
+vector<string> my_filters;
+\end_layout
+
+\begin_layout LyX-Code
+int event_queue_size = 100; // keep the last 100 events
+\end_layout
+
+\begin_layout LyX-Code
+      
+\end_layout
+
+\begin_layout LyX-Code
+Tango::DeviceProxy *mydevice = new Tango::DeviceProxy("my/device/1");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+int event_id;
+\end_layout
+
+\begin_layout LyX-Code
+const string attr_name("current");
+\end_layout
+
+\begin_layout LyX-Code
+event_id = mydevice->subscribe_event(attr_name, 
+\end_layout
+
+\begin_layout LyX-Code
+                         Tango::CHANGE_EVENT,
+\end_layout
+
+\begin_layout LyX-Code
+                         event_queue_size,
+\end_layout
+
+\begin_layout LyX-Code
+                         my_filters);
+\end_layout
+
+\begin_layout LyX-Code
+cout << "event_client() id = " << event_id << endl;
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+// Check every 3 seconds whether new events have arrived and trigger the
+ callback method 
+\end_layout
+
+\begin_layout LyX-Code
+// for the new events.
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+for (int i=0; i < 100; i++)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+    sleep (3); 
+\end_layout
+
+\begin_layout LyX-Code
+    
+\end_layout
+
+\begin_layout LyX-Code
+    // Read the stored event data from the queue and call the callback method
+ for every event.
+\end_layout
+
+\begin_layout LyX-Code
+    mydevice->get_events(event_id, double_callback);
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+event_test->unsubscribe_event(event_id);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Java Clients
+\end_layout
+
+\begin_layout Standard
+This is the interface for java clients who want to receive events
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+event
+\end_layout
+
+\end_inset
+
+.
+ There are two ways to receive events using the TANGO java API :
+\end_layout
+
+\begin_layout Enumerate
+Using Callback.
+\end_layout
+
+\begin_layout Enumerate
+Using Java listener
+\end_layout
+
+\begin_layout Standard
+Using callback, is very similar to a C++ clients.
+ Using listener is more in the Java philosophy.
+\end_layout
+
+\begin_layout Paragraph
+Using CallBack
+\end_layout
+
+\begin_layout Standard
+In Java when using callback, the client has to implement a class inheriting
+ from the Tango CallBack
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CallBack
+\end_layout
+
+\end_inset
+
+ class and pass this to the 
+\emph on
+DeviceProxy.subscribe_event()
+\emph default
+ method.
+ The CallBack class is the same class as the one proposed for the TANGO
+ asynchronous call.
+ This is as follows for events :
+\end_layout
+
+\begin_layout LyX-Code
+class MyCallback extends CallBack
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   .
+\end_layout
+
+\begin_layout LyX-Code
+   .
+\end_layout
+
+\begin_layout LyX-Code
+   .
+\end_layout
+
+\begin_layout LyX-Code
+   public void push_event(EventData evt)
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+     
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+where EventData
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+EventData
+\end_layout
+
+\end_inset
+
+ is similar to the C++ EventData class.
+ To subscribe to an event, use the 
+\emph on
+DeviceProxy.subscribe_event()
+\emph default
+ method.
+ To unsubscribe from an event, use the 
+\emph on
+DeviceProxy.unsubscribe_event()
+\emph default
+ method.
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Paragraph
+Using listeners
+\end_layout
+
+\begin_layout Standard
+The Tango API defined four Java interfaces called
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+ITangoChangeListener
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ITangoChangeListener
+\end_layout
+
+\end_inset
+
+
+\emph default
+ for the change event
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+ITangoPeriodicListener
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ITangoPeriodicListener
+\end_layout
+
+\end_inset
+
+
+\emph default
+ for the periodic event
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+ITangoQualityChangeListener
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ITangoQualityChangeListener
+\end_layout
+
+\end_inset
+
+
+\emph default
+ for the quality change event
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+ITangoArchiveListener
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+ITangoArchiveListener
+\end_layout
+
+\end_inset
+
+
+\emph default
+ for the archive event
+\end_layout
+
+\begin_layout Standard
+All these interfaces defined one method respectively called 
+\emph on
+change()
+\emph default
+, 
+\emph on
+periodic()
+\emph default
+, 
+\emph on
+qualityChange()
+\emph default
+ and 
+\emph on
+archive()
+\emph default
+ which will be called when the event is received.
+ The user must write a class implementing the interface for which he (she)
+ want to receive event.
+\end_layout
+
+\begin_layout Standard
+To install or remove a listener, use the 
+\emph on
+TangoEventsAdapter
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+TangoEventsAdapter
+\end_layout
+
+\end_inset
+
+
+\emph default
+ class which has methods to install/remove listeners for the four different
+ types of listener.
+ This TangoEventAdapter class is created from the Tango device name.
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Subparagraph
+Example
+\end_layout
+
+\begin_layout Standard
+Here is a typical example of what a client will need to do to register for
+ and receive events.
+ First, you have to define a class implementing an interface as follows:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+class DoubleEventListener implements ITangoPeriodicListener
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   public void periodic(TangoPeriodicEvent event)
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+      DeviceAttribute attr = event.getValue();
+\end_layout
+
+\begin_layout LyX-Code
+      double[] double_value;
+\end_layout
+
+\begin_layout LyX-Code
+      try
+\end_layout
+
+\begin_layout LyX-Code
+      {
+\end_layout
+
+\begin_layout LyX-Code
+         double_value =   attr.extractDoubleArray();
+\end_layout
+
+\begin_layout LyX-Code
+         System.out.println(" double value " + double_value[0]);
+\end_layout
+
+\begin_layout LyX-Code
+      }
+\end_layout
+
+\begin_layout LyX-Code
+      catch (Exception e)
+\end_layout
+
+\begin_layout LyX-Code
+      {                    
+\end_layout
+
+\begin_layout LyX-Code
+         System.out.println(
+\end_layout
+
+\begin_layout LyX-Code
+"DoubleEventListener.periodic() : could not extract data!");
+\end_layout
+
+\begin_layout LyX-Code
+      }
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+} 
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The main code looks like (suppose the device generating event is called
+ 
+\emph on
+my/event/tester
+\emph default
+ and the attribute name is 
+\emph on
+double_event
+\emph default
+) :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+DoubleEventListener listener = new DoubleEventListener();
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+TangoEventsAdapter adapter = new TangoEventsAdapter("my/event/tester") ;
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+String[] filters = new String[0];
+\end_layout
+
+\begin_layout LyX-Code
+adapter.addTangoPeriodicListener(listener,"double_event",filters); 
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Section
+Group
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+group
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+A Tango Group provides the user with a single point of control for a collection
+ of devices.
+ By analogy, one could see a Tango Group as a proxy for a collection of
+ devices.
+ For instance, the Tango Group API supplies a 
+\emph on
+command_inout()
+\emph default
+ method to execute the same command on all the elements of a group.
+ 
+\end_layout
+
+\begin_layout Standard
+A Tango Group is also a hierarchical object.
+ In other words, it is possible to build a group of both groups and individual
+ devices.
+ This feature allows creating logical views of the control system - each
+ view representing a hierarchical family of devices or a sub-system.
+ 
+\end_layout
+
+\begin_layout Standard
+In this chapter, we will use the term 
+\emph on
+hierarchy
+\emph default
+ to refer to a group and its sub-groups.
+ The term 
+\emph on
+Group
+\emph default
+ designates to the local set of devices attached to a specific Group.
+ 
+\end_layout
+
+\begin_layout Subsection
+Getting started with Tango group
+\end_layout
+
+\begin_layout Standard
+The quickest way of getting started is to study an example\SpecialChar \ldots{}
+
+\end_layout
+
+\begin_layout Standard
+Imagine we are vacuum engineers who need to monitor and control hundreds
+ of gauges distributed over the 16 cells of a large-scale instrument.
+ Each cell contains several penning and pirani gauges.
+ It also contains one "strange" gauge.
+ Our main requirement is to be able to control the whole set of gauges,
+ a family of gauges located into a particular cell (e.g.
+ all the penning gauges of the 6th cell) or a single gauge (e.g.
+ the strange gauge of the 7th cell).
+ Using a Tango Group, such features are quite straightforward to obtain.
+ 
+\end_layout
+
+\begin_layout Standard
+Reading the description of the problem, the device hierarchy becomes obvious.
+ Our "gauges" group will have the following structure: 
+\end_layout
+
+\begin_layout LyX-Code
+-> gauges
+\end_layout
+
+\begin_layout LyX-Code
+  |  -> cell-01
+\end_layout
+
+\begin_layout LyX-Code
+  |     |-> inst-c01/vac-gauge/strange 
+\end_layout
+
+\begin_layout LyX-Code
+  |     |-> penning 
+\end_layout
+
+\begin_layout LyX-Code
+  |     |   |-> inst-c01/vac-gauge/penning-01 
+\end_layout
+
+\begin_layout LyX-Code
+  |     |   |-> inst-c01/vac-gauge/penning-02 
+\end_layout
+
+\begin_layout LyX-Code
+  |     |   |- ...
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  |     |   |-> inst-c01/vac-gauge/penning-xx 
+\end_layout
+
+\begin_layout LyX-Code
+  |     |-> pirani 
+\end_layout
+
+\begin_layout LyX-Code
+  |         |-> inst-c01/vac-gauge/pirani-01
+\end_layout
+
+\begin_layout LyX-Code
+  |         |-> ...
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  |         |-> inst-c01/vac-gauge/pirani-xx 
+\end_layout
+
+\begin_layout LyX-Code
+  |  -> cell-02
+\end_layout
+
+\begin_layout LyX-Code
+  |     |-> inst-c02/vac-gauge/strange 
+\end_layout
+
+\begin_layout LyX-Code
+  |     |-> penning 
+\end_layout
+
+\begin_layout LyX-Code
+  |     |   |-> inst-c02/vac-gauge/penning-01 
+\end_layout
+
+\begin_layout LyX-Code
+  |     |   |-> ...
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  |     | 
+\end_layout
+
+\begin_layout LyX-Code
+  |     |-> pirani 
+\end_layout
+
+\begin_layout LyX-Code
+  |     |   |-> ...
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  |  -> cell-03 
+\end_layout
+
+\begin_layout LyX-Code
+  |     |-> ...
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  |         | -> ...
+ 
+\end_layout
+
+\begin_layout Standard
+In the C++, such a hierarchy can be build as follows (basic version): 
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step0: create the root group 
+\end_layout
+
+\begin_layout LyX-Code
+Tango::Group *gauges = new Tango::Group("gauges");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step1: create a group for the n-th cell
+\end_layout
+
+\begin_layout LyX-Code
+Tango::Group *cell = new Tango::Group("cell-01");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step2: make the cell a sub-group of the root group 
+\end_layout
+
+\begin_layout LyX-Code
+gauges->add(cell);
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step3: create a "penning" group 
+\end_layout
+
+\begin_layout LyX-Code
+Tango::Group *gauge_family = new Tango::Group("penning");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step4: add all penning gauges located into the cell (note the wildcard)
+\end_layout
+
+\begin_layout LyX-Code
+gauge_family->add("inst-c01/vac-gauge/penning*");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step5: add the penning gauges to the cell
+\end_layout
+
+\begin_layout LyX-Code
+cell->add(gauge_family);
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step6: create a "pirani" group 
+\end_layout
+
+\begin_layout LyX-Code
+gauge_family = new Tango::Group("pirani");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step7: add all pirani gauges located into the cell (note the wildcard)
+\end_layout
+
+\begin_layout LyX-Code
+gauge_family->add("inst-c01/vac-gauge/pirani*");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step8: add the pirani gauges to the cell
+\end_layout
+
+\begin_layout LyX-Code
+cell->add(gauge_family);
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step9: add the "strange" gauge to the cell
+\end_layout
+
+\begin_layout LyX-Code
+cell->add("inst-c01/vac-gauge/strange");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- repeat step 1 to 9 for the remaining cells
+\end_layout
+
+\begin_layout LyX-Code
+cell = new Tango::Group("cell-02");
+\end_layout
+
+\begin_layout LyX-Code
+...
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+ 
+\end_layout
+
+\begin_layout Standard
+Here is the Java version: 
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.TangoApi.Group;
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step0: create the root group Group
+\end_layout
+
+\begin_layout LyX-Code
+gauges = new Group("gauges");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step1: create a group for the n-th cell
+\end_layout
+
+\begin_layout LyX-Code
+Group cell = new Group("cell-01");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step2: make the cell a sub-group of the root group
+\end_layout
+
+\begin_layout LyX-Code
+gauges.add(cell);
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step3: create a "penning" group
+\end_layout
+
+\begin_layout LyX-Code
+Group gauge_family = new Group("penning");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step4: add all penning gauges located into the cell (note the wildcard)
+\end_layout
+
+\begin_layout LyX-Code
+gauge_family.add("inst-c01/vac-gauge/penning*");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step5: add the penning gauges to the cell
+\end_layout
+
+\begin_layout LyX-Code
+cell.add(gauge_family);
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step6: create a "pirani" group
+\end_layout
+
+\begin_layout LyX-Code
+gauge_family = new Group("pirani");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step7: add all pirani gauges located into the cell (note the wildcard)
+\end_layout
+
+\begin_layout LyX-Code
+gauge_family.add("inst-c01/vac-gauge/pirani*");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step8: add the pirani gauges to the cell cell.add(gauge_family);
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- step9: add the "strange" gauge to the cell
+\end_layout
+
+\begin_layout LyX-Code
+cell.add("inst-c01/vac-gauge/strange");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//- repeat step 1 to 9 for the remaining cells
+\end_layout
+
+\begin_layout LyX-Code
+cell = new Group("cell-02");
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+Important note
+\series default
+: There is no particular order to create the hierarchy.
+ However, the insertion order of the devices is conserved throughout the
+ lifecycle of the Group and cannot be changed.
+ That way, the Group implementation can guarantee the order in which results
+ are returned (see below).
+ 
+\end_layout
+
+\begin_layout Standard
+Keeping a reference to the root group
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+group
+\end_layout
+
+\end_inset
+
+ is enough to manage the whole hierarchy (i.e.
+ there no need to keep trace of the sub-groups or individual devices).
+ The Group interface provides methods to retrieve a sub-group or an individual
+ device.
+ 
+\end_layout
+
+\begin_layout Standard
+Be aware that a C++ group allways gets the ownership of its children and
+ deletes them when it is itself deleted.
+ Therefore, never try to delete a Group (respectively a DeviceProxy) returned
+ by a call to 
+\emph on
+Tango::Group::get_group()
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+get-group
+\end_layout
+
+\end_inset
+
+ (respectively to 
+\emph on
+Tango::Group::get_device()
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+get-device
+\end_layout
+
+\end_inset
+
+).
+ Use the 
+\emph on
+Tango::Group::remove()
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+remove
+\end_layout
+
+\end_inset
+
+ method instead (see the Tango Group class API documentation for details).
+ 
+\end_layout
+
+\begin_layout Standard
+We can now perform any action on any element of our "gauges" group.
+ For instance, let's ping the whole hierarchy to be sure that all devices
+ are alive.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- ping the whole hierarchy 
+\end_layout
+
+\begin_layout LyX-Code
+if (gauges->ping() == true)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+    std::cout << "all devices alive" << std::endl;
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+else
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+    std::cout << "at least one dead/busy/locked/...
+ device" << std::endl;
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+ 
+\end_layout
+
+\begin_layout Subsection
+Forward or not forward
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+forward
+\end_layout
+
+\end_inset
+
+?
+\end_layout
+
+\begin_layout Standard
+Since a Tango Group is a hierarchical object, any action performed on a
+ group can be forwarded to its sub-groups.
+ Most of the methods in the Group interface have a so-called 
+\emph on
+forward
+\emph default
+ option controlling this propagation.
+ When set to 
+\emph on
+false
+\emph default
+, the action is only performed on the local set of devices.
+ Otherwise, the action is also forwarded to the sub-groups, in other words,
+ propagated along the hierarchy.
+ In C++ , the forward option defaults to true (thanks to the C++ default
+ argument value).
+ There is no such mechanism in Java and the forward option must be systematicall
+y specified.
+\end_layout
+
+\begin_layout Subsection
+Executing a command
+\end_layout
+
+\begin_layout Standard
+As a proxy for a collection of devices, the Tango Group provides an interface
+ similar to the DeviceProxy's.
+ For the execution of a command, the Group
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+group
+\end_layout
+
+\end_inset
+
+ interface contains several implementations of the 
+\emph on
+command_inout
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-inout
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method.
+ Both synchronous and asynchronous forms are supported.
+ 
+\end_layout
+
+\begin_layout Subsubsection
+Obtaining command results
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Obt-cmd-results"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Command results are returned using a Tango::GroupCmdReplyList
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GroupCmdReplyList
+\end_layout
+
+\end_inset
+
+.
+ This is nothing but a vector containing a Tango::GroupCmdReply
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GroupCmdReply
+\end_layout
+
+\end_inset
+
+ for each device in the group.
+ The Tango::GroupCmdReply contains the actual data (i.e.
+ the Tango::DeviceData).
+ By inheritance, it may also contain any error occurred during the execution
+ of the command (in which case the data is invalid).
+ 
+\end_layout
+
+\begin_layout Standard
+We previously indicated that the Tango Group implementation guarantees that
+ the command results are returned in the order in which its elements were
+ attached to the group.
+ For instance, if g1 is a group containing three devices attached in the
+ following order:
+\end_layout
+
+\begin_layout LyX-Code
+g1->add("my/device/01");
+\end_layout
+
+\begin_layout LyX-Code
+g1->add("my/device/03");
+\end_layout
+
+\begin_layout LyX-Code
+g1->add("my/device/02");
+\end_layout
+
+\begin_layout Standard
+the results of 
+\end_layout
+
+\begin_layout LyX-Code
+Tango::GroupCmdReplyList crl = g1->command_inout("Status");
+\end_layout
+
+\begin_layout Standard
+will be organized as follows:
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+crl[0]
+\emph default
+ contains the status of my/device/01 
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+crl[1]
+\emph default
+ contains the status of my/device/03 
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+crl[2]
+\emph default
+ contains the status of my/device/02
+\end_layout
+
+\begin_layout Standard
+Things get more complicated if sub-groups are added "between" devices.
+\end_layout
+
+\begin_layout LyX-Code
+g2->add("my/device/04");
+\end_layout
+
+\begin_layout LyX-Code
+g2->add("my/device/05");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+g4->add("my/device/08");
+\end_layout
+
+\begin_layout LyX-Code
+g4->add("my/device/09");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+g3->add("my/device/06");
+\end_layout
+
+\begin_layout LyX-Code
+g3->add(g4);
+\end_layout
+
+\begin_layout LyX-Code
+g3->add("my/device/07");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+g1->add("my/device/01");
+\end_layout
+
+\begin_layout LyX-Code
+g1->add(g2);
+\end_layout
+
+\begin_layout LyX-Code
+g1->add("my/device/03");
+\end_layout
+
+\begin_layout LyX-Code
+g1->add(g3);
+\end_layout
+
+\begin_layout LyX-Code
+g1->add("my/device/02");
+\end_layout
+
+\begin_layout Standard
+The result order in the Tango::GroupCmdReplyList depends on the value of
+ the forward
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+forward
+\end_layout
+
+\end_inset
+
+ option.
+ If set to 
+\emph on
+true
+\emph default
+, the results will be organized as follows:
+\end_layout
+
+\begin_layout LyX-Code
+Tango::GroupCmdReplyList crl = g1->command_inout("Status", true);
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+crl[0]
+\emph default
+ contains the status of my/device/01 which belongs to g1
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+crl[1]
+\emph default
+ contains the status of my/device/04 which belongs to g1.g2
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+crl[2]
+\emph default
+ contains the status of my/device/05 which belongs to g1.g2
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+crl[3]
+\emph default
+ contains the status of my/device/03 which belongs to g1
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+crl[4]
+\emph default
+ contains the status of my/device/06 which belongs to g1.g3
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+crl[5]
+\emph default
+ contains the status of my/device/08 which belongs to g1.g3.g4
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+crl[6]
+\emph default
+ contains the status of my/device/09 which belongs to g1.g3.g 
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+crl[7]
+\emph default
+ contains the status of my/device/07 which belongs to g1.g3
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+crl[8]
+\emph default
+ contains the status of my/device/02 which belongs to g1 
+\end_layout
+
+\begin_layout Standard
+If the forward option is set to 
+\emph on
+false
+\emph default
+, the results are:
+\end_layout
+
+\begin_layout LyX-Code
+Tango::GroupCmdReplyList crl = g1->command_inout("Status", false); 
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+crl[0]
+\emph default
+ contains the status of my/device/01 which belongs to g 
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+crl[1]
+\emph default
+ contains the status of my/device/03 which belongs to g1
+\begin_inset Newline newline
+\end_inset
+
+
+\emph on
+crl[2]
+\emph default
+ contains the status of my/device/02 which belongs to g1
+\end_layout
+
+\begin_layout Standard
+The Tango::GroupCmdReply contains some public members allowing the identificatio
+n of both the device (Tango::GroupCmdReply::dev_name
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+dev-name
+\end_layout
+
+\end_inset
+
+) and the command (Tango::GroupCmdReply::obj_name
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+obj-name
+\end_layout
+
+\end_inset
+
+).
+ It means that, depending of your application, you can associate a response
+ with its source using its position in the response list or using the Tango::Gro
+upCmdReply::dev_name member.
+\end_layout
+
+\begin_layout Subsubsection
+Case 1: a command, no argument
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Case-1"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+As an example, we execute the Status command on the whole hierarchy synchronousl
+y.
+\end_layout
+
+\begin_layout LyX-Code
+Tango::GroupCmdReplyList crl = gauges->command_inout("Status");
+\end_layout
+
+\begin_layout Standard
+As a first step in the results processing, it could be interesting to check
+ value returned by the 
+\emph on
+has_failed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+has-failed
+\end_layout
+
+\end_inset
+
+()
+\emph default
+ method of the GroupCmdReplyList
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GroupCmdReplyList
+\end_layout
+
+\end_inset
+
+.
+ If it is set to true, it means that at least one error occurred during
+ the execution of the command (i.e.
+ at least one device gave error).
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+if (crl.has_failed())
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+    cout << "at least one error occurred" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+else
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+    cout << "no error " << endl;
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In Java, we should write:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.TangoApi.Group;
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+GroupCmdReplyList crl = gauges.command_inout("Status",true);
+\end_layout
+
+\begin_layout LyX-Code
+if (crl.has_failed())
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   System.out.println("at least one error occurred");
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+else
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   System.out.println("no error");
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Now, we have to process each "individual response" in the list.
+ 
+\end_layout
+
+\begin_layout Subsubsection
+A few words on error handling and data extraction
+\end_layout
+
+\begin_layout Standard
+Depending of the application and/or the developer's programming habits,
+ each individual error can be handle by the C++ (or Java) exception
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+exception
+\end_layout
+
+\end_inset
+
+ mechanism or using the dedicated 
+\emph on
+has_failed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+has-failed
+\end_layout
+
+\end_inset
+
+()
+\emph default
+ method.
+ The GroupReply
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GroupReply
+\end_layout
+
+\end_inset
+
+ class - which is the mother class of both GroupCmdReply
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GroupCmdReply
+\end_layout
+
+\end_inset
+
+ and GroupAttrReply
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GroupAttrReply
+\end_layout
+
+\end_inset
+
+ - contains a static method to enable (or disable) exceptions called 
+\emph on
+enable_exception()
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+enable-exception()
+\end_layout
+
+\end_inset
+
+.
+ By default, exceptions are disabled (in both Java and C++).
+ The following example is proposed with both exceptions enable and disable.
+ 
+\end_layout
+
+\begin_layout Standard
+In C++, data can be extracted directly from an individual reply.
+ The GroupCmdReply interface contains a template operator >> allowing the
+ extraction of any supported Tango type (in fact the actual data extraction
+ is delegated to DeviceData::operator >>).
+ One dedicated extract method is also provided in order to extract DevVarLongStr
+ingArray and DevVarDoubleStringArray types to std::vectors.
+\end_layout
+
+\begin_layout Standard
+Error and data handling C++ example:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//-------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- synch.
+ group command example with exception enabled
+\end_layout
+
+\begin_layout LyX-Code
+//-------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- enable exceptions and save current mode
+\end_layout
+
+\begin_layout LyX-Code
+bool last_mode = GroupReply::enable_exception(true);
+\end_layout
+
+\begin_layout LyX-Code
+//- process each response in the list ...
+\end_layout
+
+\begin_layout LyX-Code
+for (int r = 0; r < crl.size(); r++)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- enter a try/catch block
+\end_layout
+
+\begin_layout LyX-Code
+   try
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+//- try to extract the data from the r-th reply
+\end_layout
+
+\begin_layout LyX-Code
+//- suppose data contains a double
+\end_layout
+
+\begin_layout LyX-Code
+       double ans;
+\end_layout
+
+\begin_layout LyX-Code
+       crl[r] >> ans;
+\end_layout
+
+\begin_layout LyX-Code
+       cout << crl[r].dev_name()
+\end_layout
+
+\begin_layout LyX-Code
+            << "::"
+\end_layout
+
+\begin_layout LyX-Code
+            << crl[r].obj_name()
+\end_layout
+
+\begin_layout LyX-Code
+            << " returned "
+\end_layout
+
+\begin_layout LyX-Code
+            << ans
+\end_layout
+
+\begin_layout LyX-Code
+            << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    catch (const DevFailed& df)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- DevFailed caught while trying to extract the data from reply
+\end_layout
+
+\begin_layout LyX-Code
+      for (int err = 0; err < df.errors.length(); err++)
+\end_layout
+
+\begin_layout LyX-Code
+      {
+\end_layout
+
+\begin_layout LyX-Code
+           cout << "error: " << df.errors[err].desc.in() << endl;
+\end_layout
+
+\begin_layout LyX-Code
+      }
+\end_layout
+
+\begin_layout LyX-Code
+//- alternatively, one can use crl[r].get_err_stack() see below
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    catch (...)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+       cout << "unknown exception caught";
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+//- restore last exception mode (if needed)
+\end_layout
+
+\begin_layout LyX-Code
+GroupReply::enable_exception(last_mode);
+\end_layout
+
+\begin_layout LyX-Code
+//- Clear the response list (if reused later in the code)
+\end_layout
+
+\begin_layout LyX-Code
+crl.reset();
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//-------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- synch.
+ group command example with exception disabled
+\end_layout
+
+\begin_layout LyX-Code
+//-------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- disable exceptions and save current mode bool
+\end_layout
+
+\begin_layout LyX-Code
+last_mode = GroupReply::enable_exception(false);
+\end_layout
+
+\begin_layout LyX-Code
+//- process each response in the list ...
+\end_layout
+
+\begin_layout LyX-Code
+for (int r = 0; r < crl.size(); r++)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- did the r-th device give error?
+\end_layout
+
+\begin_layout LyX-Code
+    if (crl[r].has_failed() == true)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- printout error description
+\end_layout
+
+\begin_layout LyX-Code
+       cout << "an error occurred while executing "
+\end_layout
+
+\begin_layout LyX-Code
+            << crl[r].obj_name()
+\end_layout
+
+\begin_layout LyX-Code
+            << " on " 
+\end_layout
+
+\begin_layout LyX-Code
+            << crl[r].dev_name() << endl;
+\end_layout
+
+\begin_layout LyX-Code
+//- dump error stack
+\end_layout
+
+\begin_layout LyX-Code
+       const DevErrorList& el = crl[r].get_err_stack();
+\end_layout
+
+\begin_layout LyX-Code
+       for (int err = 0; err < el.size(); err++)
+\end_layout
+
+\begin_layout LyX-Code
+       {
+\end_layout
+
+\begin_layout LyX-Code
+           cout << el[err].desc.in();
+\end_layout
+
+\begin_layout LyX-Code
+       }
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    else
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- no error (suppose data contains a double)
+\end_layout
+
+\begin_layout LyX-Code
+       double ans;
+\end_layout
+
+\begin_layout LyX-Code
+       bool result = crl[r] >> ans;
+\end_layout
+
+\begin_layout LyX-Code
+       if (result == false)
+\end_layout
+
+\begin_layout LyX-Code
+       {
+\end_layout
+
+\begin_layout LyX-Code
+           cout << "could not extract double from "
+\end_layout
+
+\begin_layout LyX-Code
+                << crl[r].dev_name()
+\end_layout
+
+\begin_layout LyX-Code
+                << " reply"
+\end_layout
+
+\begin_layout LyX-Code
+                << endl;
+\end_layout
+
+\begin_layout LyX-Code
+       }
+\end_layout
+
+\begin_layout LyX-Code
+       else
+\end_layout
+
+\begin_layout LyX-Code
+       {
+\end_layout
+
+\begin_layout LyX-Code
+           cout << crl[r].dev_name()
+\end_layout
+
+\begin_layout LyX-Code
+                << "::"
+\end_layout
+
+\begin_layout LyX-Code
+                << crl[r].obj_name()
+\end_layout
+
+\begin_layout LyX-Code
+                << " returned "
+\end_layout
+
+\begin_layout LyX-Code
+                << ans
+\end_layout
+
+\begin_layout LyX-Code
+                << endl;
+\end_layout
+
+\begin_layout LyX-Code
+       }
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+//- restore last exception mode (if needed)
+\end_layout
+
+\begin_layout LyX-Code
+GroupReply::enable_exception(last_mode);
+\end_layout
+
+\begin_layout LyX-Code
+//- Clear the response list (if reused later in the code)
+\end_layout
+
+\begin_layout LyX-Code
+crl.reset();
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Error and data handling Java example:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//-------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- synch.
+ group command example with exception enabled
+\end_layout
+
+\begin_layout LyX-Code
+//-------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- enable exceptions and save current mode
+\end_layout
+
+\begin_layout LyX-Code
+boolean last_mode = GroupReply.enable_exception(true);
+\end_layout
+
+\begin_layout LyX-Code
+//- process each response in the list ...
+\end_layout
+
+\begin_layout LyX-Code
+Iterator it = crl.iterator();
+\end_layout
+
+\begin_layout LyX-Code
+//- try to extract the data from the each reply
+\end_layout
+
+\begin_layout LyX-Code
+//- suppose data contains a double
+\end_layout
+
+\begin_layout LyX-Code
+double ans;
+\end_layout
+
+\begin_layout LyX-Code
+while (it.hasNext())
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- cast from Object to GroupCmdreply
+\end_layout
+
+\begin_layout LyX-Code
+GroupCmdreply     cr = (GroupCmdreply)it.next();
+\end_layout
+
+\begin_layout LyX-Code
+//- enter a try/catch block
+\end_layout
+
+\begin_layout LyX-Code
+    try
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- extract value from data (may throw DevFailed)
+\end_layout
+
+\begin_layout LyX-Code
+       ans = get_data().extractDouble();
+\end_layout
+
+\begin_layout LyX-Code
+//- verbose
+\end_layout
+
+\begin_layout LyX-Code
+       System.out.println(cr.dev_name()
+\end_layout
+
+\begin_layout LyX-Code
+                        + "::"
+\end_layout
+
+\begin_layout LyX-Code
+                        + cr.obj_name()
+\end_layout
+
+\begin_layout LyX-Code
+                        + " returned "
+\end_layout
+
+\begin_layout LyX-Code
+                        + ans);
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    catch (DevFailed d)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- DevFailed caught while trying to extract the data from reply
+\end_layout
+
+\begin_layout LyX-Code
+       for (int err = 0; err < d.errors.length; err++)
+\end_layout
+
+\begin_layout LyX-Code
+       {
+\end_layout
+
+\begin_layout LyX-Code
+          System.out.println("error: " + d.errors[err].desc);
+\end_layout
+
+\begin_layout LyX-Code
+       }
+\end_layout
+
+\begin_layout LyX-Code
+//- alternatively, one can use cr.get_err_stack() see below
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    catch (Exception e)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+       System.out.println("unknown exception caught");
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+//- restore last exception mode (if needed)
+\end_layout
+
+\begin_layout LyX-Code
+GroupReply.enable_exception(last_mode);
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//-------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- synch.
+ group command example with exception disabled
+\end_layout
+
+\begin_layout LyX-Code
+//-------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- disable exceptions and save current mode
+\end_layout
+
+\begin_layout LyX-Code
+boolean last_mode = GroupReply.enable_exception(false);
+\end_layout
+
+\begin_layout LyX-Code
+//- process each response in the list ...
+\end_layout
+
+\begin_layout LyX-Code
+Iterator it = crl.iterator();
+\end_layout
+
+\begin_layout LyX-Code
+//- try to extract the data from the each reply
+\end_layout
+
+\begin_layout LyX-Code
+while (it.hasNext())
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- cast from Object to GroupCmdreply
+\end_layout
+
+\begin_layout LyX-Code
+    GroupCmdreply cr = (GroupCmdreply)it.next();
+\end_layout
+
+\begin_layout LyX-Code
+//- did the device give error?
+\end_layout
+
+\begin_layout LyX-Code
+    if (cr.has_failed() == true)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- printout error description
+\end_layout
+
+\begin_layout LyX-Code
+       System.out.println("an error occurred while executing "
+\end_layout
+
+\begin_layout LyX-Code
+               + cr.obj_name()
+\end_layout
+
+\begin_layout LyX-Code
+               + " on " 
+\end_layout
+
+\begin_layout LyX-Code
+               + cr.dev_name());
+\end_layout
+
+\begin_layout LyX-Code
+//- dump error stack
+\end_layout
+
+\begin_layout LyX-Code
+       DevError[] de = cr.get_err_stack();
+\end_layout
+
+\begin_layout LyX-Code
+       for (int err = 0; err < de.length; err++)
+\end_layout
+
+\begin_layout LyX-Code
+       {
+\end_layout
+
+\begin_layout LyX-Code
+          System.out.println("error: " + de[err].desc);
+\end_layout
+
+\begin_layout LyX-Code
+       }
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    else
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- no error (suppose data contains a double)
+\end_layout
+
+\begin_layout LyX-Code
+       double ans = cr.get_data().extractDouble();
+\end_layout
+
+\begin_layout LyX-Code
+//- verbose
+\end_layout
+
+\begin_layout LyX-Code
+       System.out.println(cr.dev_name()
+\end_layout
+
+\begin_layout LyX-Code
+                          + "::"
+\end_layout
+
+\begin_layout LyX-Code
+                          + cr.obj_name() 
+\end_layout
+
+\begin_layout LyX-Code
+                          + " returned " 
+\end_layout
+
+\begin_layout LyX-Code
+                          + ans);
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+//- restore last exception mode (if needed)
+\end_layout
+
+\begin_layout LyX-Code
+GroupReply.enable_exception(last_mode);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Now execute the same command asynchronously.
+ C++ example:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//-------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- asynch.
+ group command example (C++ example)
+\end_layout
+
+\begin_layout LyX-Code
+//-------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+long request_id = gauges->command_inout_asynch("Status");
+\end_layout
+
+\begin_layout LyX-Code
+//- do some work
+\end_layout
+
+\begin_layout LyX-Code
+do_some_work();
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+//- get results
+\end_layout
+
+\begin_layout LyX-Code
+crl = gauges->command_inout_reply(request_id);
+\end_layout
+
+\begin_layout LyX-Code
+//- process responses as previously describe in the synch.
+ implementation
+\end_layout
+
+\begin_layout LyX-Code
+for (int r = 0; r < crl.size(); r++)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- data processing and error handling goes here
+\end_layout
+
+\begin_layout LyX-Code
+//- copy/paste code from previous example
+\end_layout
+
+\begin_layout LyX-Code
+.
+ .
+ .
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+//- clear the response list (if reused later in the code)
+\end_layout
+
+\begin_layout LyX-Code
+crl.reset();
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The same asynchronous example in Java:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//-------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- asynch.
+ group command example (Java example)
+\end_layout
+
+\begin_layout LyX-Code
+//-------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+int request_id = gauges.command_inout_asynch("Status",false,true);
+\end_layout
+
+\begin_layout LyX-Code
+//- do some work
+\end_layout
+
+\begin_layout LyX-Code
+do_some_work();
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+//- get results
+\end_layout
+
+\begin_layout LyX-Code
+crl = gauges.command_inout_reply(request_id);
+\end_layout
+
+\begin_layout LyX-Code
+//- process responses as previously describe in the synch.
+ implementation
+\end_layout
+
+\begin_layout LyX-Code
+Iterator it = crl.iterator();
+\end_layout
+
+\begin_layout LyX-Code
+//- try to extract the data from the each reply
+\end_layout
+
+\begin_layout LyX-Code
+while (it.hasNext())
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- data processing and error handling goes here
+\end_layout
+
+\begin_layout LyX-Code
+//- copy/paste code from previous example
+\end_layout
+
+\begin_layout LyX-Code
+.
+ .
+ .
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Case 2: a command, one argument
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Case-2"
+
+\end_inset
+
+ 
+\end_layout
+
+\begin_layout Standard
+Here, we give an example in which the same input argument is applied to
+ all devices in the group (or its sub-groups).
+ 
+\end_layout
+
+\begin_layout Standard
+In C++:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- the argument value
+\end_layout
+
+\begin_layout LyX-Code
+double d = 0.1;
+\end_layout
+
+\begin_layout LyX-Code
+//- insert it into the TANGO generic container for command: DeviceData
+\end_layout
+
+\begin_layout LyX-Code
+Tango::DeviceData dd;
+\end_layout
+
+\begin_layout LyX-Code
+dd << d;
+\end_layout
+
+\begin_layout LyX-Code
+//- execute the command: Dev_Void SetDummyFactor (Dev_Double)
+\end_layout
+
+\begin_layout LyX-Code
+Tango::GroupCmdReplyList crl = gauges->command_inout("SetDummyFactor", dd);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In Java: 
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- the argument value
+\end_layout
+
+\begin_layout LyX-Code
+double d = 0.1;
+\end_layout
+
+\begin_layout LyX-Code
+//- insert it into the TANGO generic container for command: DeviceData
+\end_layout
+
+\begin_layout LyX-Code
+DeviceData dd = new DeviceData();
+\end_layout
+
+\begin_layout LyX-Code
+dd.insert(d);
+\end_layout
+
+\begin_layout LyX-Code
+//- execute the command: Dev_Void SetDummyFactor (Dev_Double)
+\end_layout
+
+\begin_layout LyX-Code
+GroupCmdReplyList crl = gauges.command_inout("SetDummyFactor", dd, false,
+ true);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Since the SetDummyFactor command does not return any value, the individual
+ replies (i.e.
+ the GroupCmdReply) do not contain any data.
+ However, we have to check their 
+\emph on
+has_failed
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+has-failed
+\end_layout
+
+\end_inset
+
+()
+\emph default
+ method returned value to be sure that the command completed successfully
+ on each device (acknowledgement).
+ Note that in such a case, exceptions are useless since we never try to
+ extract data from the replies.
+ 
+\end_layout
+
+\begin_layout Standard
+In C++ we should have something like: 
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- no need to process the results if no error occurred (Dev_Void command)
+\end_layout
+
+\begin_layout LyX-Code
+if (crl.has_failed())
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- at least one error occurred
+\end_layout
+
+\begin_layout LyX-Code
+    for (int r = 0; r < crl.size(); r++)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- handle errors here (see previous C++ examples)
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+//- clear the response list (if reused later in the code)
+\end_layout
+
+\begin_layout LyX-Code
+crl.reset();
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+While in Java
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- no need to process the results if no error occurred (Dev_Void command)
+\end_layout
+
+\begin_layout LyX-Code
+if (crl.has_failed())
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- at least one error occurred
+\end_layout
+
+\begin_layout LyX-Code
+   for (int r = 0; r < crl.length; r++)
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+//- handle errors here (see previous Java examples)
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+See case 1 for an example of asynchronous command.
+\end_layout
+
+\begin_layout Subsubsection
+Case 3: a command, several arguments
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Case-3"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Here, we give an example in which a 
+\series bold
+specific
+\series default
+ input argument is applied to each device in the hierarchy.
+ In order to use this form of command_inout
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-inout
+\end_layout
+
+\end_inset
+
+, the user must have an "a priori" and "perfect" knowledge of the devices
+ order in the hierarchy.
+ In such a case, command arguments are passed in an "array" (with one entry
+ for each device in the hierarchy).
+\end_layout
+
+\begin_layout Standard
+The C++ implementation provides a template method which accepts a std::vector
+ of "C++ type for command argument".
+ This allows passing any kind of data using a single method.
+\end_layout
+
+\begin_layout Standard
+Since templates are not (already) supported in Java, the implementation
+ is somewhat different and an array of DeviceData is used to pass the specific
+ arguments.
+ 
+\end_layout
+
+\begin_layout Standard
+In both cases (C++ and Java), the size of this vector must equal the number
+ of device in the hierarchy (respectively the number of device in the group)
+ if the forward
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+forward
+\end_layout
+
+\end_inset
+
+ option is set to true (respectively set to false).
+ Otherwise, an exception
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+exception
+\end_layout
+
+\end_inset
+
+ is thrown.
+\end_layout
+
+\begin_layout Standard
+The first item in the vector is applied to the first device in the hierarchy,
+ the second to the second device in the hierarchy, and so on\SpecialChar \ldots{}
+That's why the
+ user must have a "perfect" knowledge of the devices order in the hierarchy.
+ 
+\end_layout
+
+\begin_layout Standard
+Assuming that gauges are ordered by name, the SetDummyFactor command can
+ be executed on group "cell-01" (and its sub-groups) as follows:
+\end_layout
+
+\begin_layout Standard
+Remember, "cell-01" has the following internal structure: 
+\end_layout
+
+\begin_layout LyX-Code
+-> gauges
+\end_layout
+
+\begin_layout LyX-Code
+   | -> cell-01
+\end_layout
+
+\begin_layout LyX-Code
+   |    |-> inst-c01/vac-gauge/strange
+\end_layout
+
+\begin_layout LyX-Code
+   |    |-> penning
+\end_layout
+
+\begin_layout LyX-Code
+   |    |   |-> inst-c01/vac-gauge/penning-01
+\end_layout
+
+\begin_layout LyX-Code
+   |    |   |-> inst-c01/vac-gauge/penning-02
+\end_layout
+
+\begin_layout LyX-Code
+   |    |   |-> ...
+\end_layout
+
+\begin_layout LyX-Code
+   |    |   |-> inst-c01/vac-gauge/penning-xx
+\end_layout
+
+\begin_layout LyX-Code
+   |    |-> pirani
+\end_layout
+
+\begin_layout LyX-Code
+   |        |-> inst-c01/vac-gauge/pirani-01
+\end_layout
+
+\begin_layout LyX-Code
+   |        |-> ...
+\end_layout
+
+\begin_layout LyX-Code
+   |        |-> inst-c01/vac-gauge/pirani-xx
+\end_layout
+
+\begin_layout Standard
+Passing a specific argument to each device in C++:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- get a reference to the target group
+\end_layout
+
+\begin_layout LyX-Code
+Tango::Group *g = gauges->get_group("cell-01");
+\end_layout
+
+\begin_layout LyX-Code
+//- get number of device in the hierarchy (starting at cell-01)
+\end_layout
+
+\begin_layout LyX-Code
+long n_dev = g->get_size(true);
+\end_layout
+
+\begin_layout LyX-Code
+//- Build argin list
+\end_layout
+
+\begin_layout LyX-Code
+std::vector<double> argins(n_dev);
+\end_layout
+
+\begin_layout LyX-Code
+//- argument for inst-c01/vac-gauge/strange
+\end_layout
+
+\begin_layout LyX-Code
+argins[0] = 0.0;
+\end_layout
+
+\begin_layout LyX-Code
+//- argument for inst-c01/vac-gauge/penning-01
+\end_layout
+
+\begin_layout LyX-Code
+argins[1] = 0.1;
+\end_layout
+
+\begin_layout LyX-Code
+//- argument for inst-c01/vac-gauge/penning-02
+\end_layout
+
+\begin_layout LyX-Code
+argins[2] = 0.2;
+\end_layout
+
+\begin_layout LyX-Code
+//- argument for remaining devices in cell-01.penning
+\end_layout
+
+\begin_layout LyX-Code
+.
+ .
+ .
+\end_layout
+
+\begin_layout LyX-Code
+//- argument for devices in cell-01.pirani
+\end_layout
+
+\begin_layout LyX-Code
+.
+ .
+ .
+\end_layout
+
+\begin_layout LyX-Code
+//- the reply list
+\end_layout
+
+\begin_layout LyX-Code
+Tango::GroupCmdReplyList crl;
+\end_layout
+
+\begin_layout LyX-Code
+//- enter a try/catch block (see below)
+\end_layout
+
+\begin_layout LyX-Code
+try
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- execute the command
+\end_layout
+
+\begin_layout LyX-Code
+    crl = g->command_inout("SetDummyFactor", argins, true);
+\end_layout
+
+\begin_layout LyX-Code
+    if (crl.has_failed())
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- error handling goes here (see case 1)
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+catch (const DevFailed& df)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- see below
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+crl.reset();
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+If we want to execute the command locally on "cell-01" (i.e.
+ not on its sub-groups), we should write the following C++ code:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- get a reference to the target group
+\end_layout
+
+\begin_layout LyX-Code
+Tango::Group *g = gauges->get_group("cell-01");
+\end_layout
+
+\begin_layout LyX-Code
+//- get number of device in the group (starting at cell-01)
+\end_layout
+
+\begin_layout LyX-Code
+long n_dev = g->get_size(false);
+\end_layout
+
+\begin_layout LyX-Code
+//- Build argin list
+\end_layout
+
+\begin_layout LyX-Code
+std::vector<double> argins(n_dev);
+\end_layout
+
+\begin_layout LyX-Code
+//- argins for inst-c01/vac-gauge/penning-01
+\end_layout
+
+\begin_layout LyX-Code
+argins[0] = 0.1;
+\end_layout
+
+\begin_layout LyX-Code
+//- argins for inst-c01/vac-gauge/penning-02
+\end_layout
+
+\begin_layout LyX-Code
+argins[1] = 0.2;
+\end_layout
+
+\begin_layout LyX-Code
+//- argins for remaining devices in cell-01.penning
+\end_layout
+
+\begin_layout LyX-Code
+.
+ .
+ .
+\end_layout
+
+\begin_layout LyX-Code
+//- the reply list
+\end_layout
+
+\begin_layout LyX-Code
+Tango::GroupCmdReplyList crl;
+\end_layout
+
+\begin_layout LyX-Code
+//- enter a try/catch block (see below)
+\end_layout
+
+\begin_layout LyX-Code
+try
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- execute the command
+\end_layout
+
+\begin_layout LyX-Code
+    crl = g->command_inout("SetDummyFactor", argins, false);
+\end_layout
+
+\begin_layout LyX-Code
+    if (crl.has_failed())
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- error handling goes here (see case 1)
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+catch (const DevFailed& df)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- see below
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+crl.reset();
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Passing a specific argument to each device in Java:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- get a reference to the target group
+\end_layout
+
+\begin_layout LyX-Code
+Group g = gauges.get_group("cell-01");
+\end_layout
+
+\begin_layout LyX-Code
+//- get pre-build arguments list for the whole hierarchy (starting at cell-01)
+\end_layout
+
+\begin_layout LyX-Code
+DeviceData[] argins = g.get_command_specific_argument_list(true);
+\end_layout
+
+\begin_layout LyX-Code
+//- argument for inst-c01/vac-gauge/strange
+\end_layout
+
+\begin_layout LyX-Code
+argins[0].insert(0.0);
+\end_layout
+
+\begin_layout LyX-Code
+//- argument for inst-c01/vac-gauge/penning-01
+\end_layout
+
+\begin_layout LyX-Code
+argins[1].insert(0.1);
+\end_layout
+
+\begin_layout LyX-Code
+//- argument for inst-c01/vac-gauge/penning-02
+\end_layout
+
+\begin_layout LyX-Code
+argins[2].insert(0.2);
+\end_layout
+
+\begin_layout LyX-Code
+//- argument for remaining devices in cell-01.penning
+\end_layout
+
+\begin_layout LyX-Code
+.
+ .
+ .
+\end_layout
+
+\begin_layout LyX-Code
+//- argument for devices in cell-01.pirani
+\end_layout
+
+\begin_layout LyX-Code
+.
+ .
+ .
+\end_layout
+
+\begin_layout LyX-Code
+//- the reply list GroupCmdReplyList
+\end_layout
+
+\begin_layout LyX-Code
+crl = null;
+\end_layout
+
+\begin_layout LyX-Code
+//- enter a try/catch block (see below)
+\end_layout
+
+\begin_layout LyX-Code
+try
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- execute the command
+\end_layout
+
+\begin_layout LyX-Code
+    crl = g.command_inout("SetDummyFactor", argins, false, true);
+\end_layout
+
+\begin_layout LyX-Code
+    if (crl.has_failed())
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- error handling goes here (see case 1)
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+catch (DevFailed d)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- see below
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Note: if we want to execute the command locally on "cell-01" (i.e.
+ not on its sub-groups), we should write the following code:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- get a reference to the target group
+\end_layout
+
+\begin_layout LyX-Code
+Group g = gauges.get_group("cell-01");
+\end_layout
+
+\begin_layout LyX-Code
+//- get pre-build arguments list for the group (starting at cell-01)
+\end_layout
+
+\begin_layout LyX-Code
+DeviceData[] argins = g.get_command_specific_argument_list(false);
+\end_layout
+
+\begin_layout LyX-Code
+//- argins for inst-c01/vac-gauge/penning-01
+\end_layout
+
+\begin_layout LyX-Code
+argins[0].insert(0.1);
+\end_layout
+
+\begin_layout LyX-Code
+//- argins for inst-c01/vac-gauge/penning-02
+\end_layout
+
+\begin_layout LyX-Code
+argins[1].insert(0.2);
+\end_layout
+
+\begin_layout LyX-Code
+//- argins for remaining devices in cell-01.penning
+\end_layout
+
+\begin_layout LyX-Code
+.
+ .
+ .
+\end_layout
+
+\begin_layout LyX-Code
+//- the reply list 
+\end_layout
+
+\begin_layout LyX-Code
+GroupCmdReplyList crl;
+\end_layout
+
+\begin_layout LyX-Code
+//- enter a try/catch block (see below)
+\end_layout
+
+\begin_layout LyX-Code
+try
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- execute the command
+\end_layout
+
+\begin_layout LyX-Code
+    crl = g.command_inout("SetDummyFactor", argins, false, false);
+\end_layout
+
+\begin_layout LyX-Code
+    if (crl.has_failed())
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- error handling goes here (see case 1)
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+catch (DevFailed d)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- see below
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This form of 
+\emph on
+command_inout
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+command-inout
+\end_layout
+
+\end_inset
+
+
+\emph default
+ (the one that accepts an array of value as its input argument), may throw
+ an exception
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+exception
+\end_layout
+
+\end_inset
+
+ 
+\series bold
+before
+\series default
+ executing the command if the number of elements in the input array does
+ not match the number of individual devices in the group
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+group
+\end_layout
+
+\end_inset
+
+ or in the hierarchy (depending on the forward option).
+ 
+\end_layout
+
+\begin_layout Standard
+Java developers should use the 
+\emph on
+Group.get_command_specific_argument_list
+\emph default
+ helper method (see previous example).
+ It guarantees than the "returned array" has the right number of elements.
+ This array may be kept and reused as far as the group size is not changed
+ (i.e.
+ no add or remove of elements).
+\end_layout
+
+\begin_layout Standard
+An asynchronous version of this method is also available.
+ See case 1 for an example of asynchronous command.
+\end_layout
+
+\begin_layout Subsection
+Reading attribute(s)
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Read-attr"
+
+\end_inset
+
+ 
+\end_layout
+
+\begin_layout Standard
+In order to read attribute(s), the Group
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+group
+\end_layout
+
+\end_inset
+
+ interface contains several implementations of the 
+\emph on
+read_attribute()
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attribute
+\end_layout
+
+\end_inset
+
+ and 
+\emph on
+read_attributes()
+\emph default
+ methods.
+ Both synchronous and asynchronous forms are supported.
+ Reading several attributes is very similar to reading a single attribute.
+ Simply replace the std::string used for attribute name by a vector of std::stri
+ng with one element for each attribute name.
+ In case of read_attributes() call, the order of attribute value returned
+ in the GroupAttrReplyList is all attributes for first element in the group
+ followed by all attributes for the second group element and so on.
+\end_layout
+
+\begin_layout Subsubsection
+Obtaining attribute values
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:O-attr-values"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Attribute values are returned using a GroupAttrReplyList
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GroupAttrReplyList
+\end_layout
+
+\end_inset
+
+.
+ This is nothing but an array containing a GroupAttrReply
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GroupAttrReply
+\end_layout
+
+\end_inset
+
+ for each device in the group.
+ The GroupAttrReply contains the actual data (i.e.
+ the DeviceAttribute).
+ By inheritance, it may also contain any error occurred during the execution
+ of the command (in which case the data is invalid).
+ 
+\end_layout
+
+\begin_layout Standard
+Here again, the Tango Group implementation guarantees that the attribute
+ values are returned in the order in which its elements were attached to
+ the group.
+ See Obtaining command results for details.
+\end_layout
+
+\begin_layout Standard
+The GroupAttrReply contains some public methods allowing the identification
+ of both the device (GroupAttrReply::dev_name
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+dev-name
+\end_layout
+
+\end_inset
+
+) and the attribute (GroupAttrReply::obj_name
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+obj-name
+\end_layout
+
+\end_inset
+
+).
+ It means that, depending of your application, you can associate a response
+ with its source using its position in the response list or using the Tango::Gro
+upAttrReply::dev_name member.
+\end_layout
+
+\begin_layout Subsubsection
+A few words on error handling and data extraction
+\end_layout
+
+\begin_layout Standard
+Here again, depending of the application and/or the developer's programming
+ habits, each individual error can be handle by the C++ exception
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+exception
+\end_layout
+
+\end_inset
+
+ mechanism or using the dedicated 
+\emph on
+has_failed
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+has-failed
+\end_layout
+
+\end_inset
+
+
+\emph on
+()
+\emph default
+ method.
+ The GroupReply
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GroupReply
+\end_layout
+
+\end_inset
+
+ class - which is the mother class of both GroupCmdReply
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GroupCmdReply
+\end_layout
+
+\end_inset
+
+ and GroupAttrReply
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+GroupAttrReply
+\end_layout
+
+\end_inset
+
+ - contains a static method to enable (or disable) exceptions called 
+\emph on
+enable_exception()
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+enable-exception()
+\end_layout
+
+\end_inset
+
+.
+ By default, exceptions are disabled (in both Java and C++).
+ The following example is proposed with both exceptions enable and disable.
+ 
+\end_layout
+
+\begin_layout Standard
+In C++, data can be extracted directly from an individual reply.
+ The GroupAttrReply interface contains a template operator>> allowing the
+ extraction of any supported Tango type (in fact the actual data extraction
+ is delegated to DeviceAttribute::operator>>).
+ 
+\end_layout
+
+\begin_layout Standard
+Reading an attribute is very similar to executing a command.
+ 
+\end_layout
+
+\begin_layout Standard
+Reading an attribute in C++:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//-----------------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- synch.
+ read "vacuum" attribute on each device in the hierarchy
+\end_layout
+
+\begin_layout LyX-Code
+//- with exceptions enabled - C++ example
+\end_layout
+
+\begin_layout LyX-Code
+//-----------------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- enable exceptions and save current mode
+\end_layout
+
+\begin_layout LyX-Code
+bool last_mode = GroupReply::enable_exception(true);
+\end_layout
+
+\begin_layout LyX-Code
+//- read attribute
+\end_layout
+
+\begin_layout LyX-Code
+Tango::GroupAttrReplyList arl = gauges->read_attribute("vacuum");
+\end_layout
+
+\begin_layout LyX-Code
+//- for each response in the list ...
+\end_layout
+
+\begin_layout LyX-Code
+for (int r = 0; r < arl.size(); r++)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- enter a try/catch block
+\end_layout
+
+\begin_layout LyX-Code
+   try
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+//- try to extract the data from the r-th reply
+\end_layout
+
+\begin_layout LyX-Code
+//- suppose data contains a double
+\end_layout
+
+\begin_layout LyX-Code
+      double ans;
+\end_layout
+
+\begin_layout LyX-Code
+      arl[r] >> ans;
+\end_layout
+
+\begin_layout LyX-Code
+      cout << arl[r].dev_name()
+\end_layout
+
+\begin_layout LyX-Code
+           << "::"
+\end_layout
+
+\begin_layout LyX-Code
+           << arl[r].obj_name()
+\end_layout
+
+\begin_layout LyX-Code
+           << " value is "
+\end_layout
+
+\begin_layout LyX-Code
+           << ans << endl;
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+   catch (const DevFailed& df)
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+//- DevFailed caught while trying to extract the data from reply
+\end_layout
+
+\begin_layout LyX-Code
+      for (int err = 0; err < df.errors.length(); err++)
+\end_layout
+
+\begin_layout LyX-Code
+      {
+\end_layout
+
+\begin_layout LyX-Code
+         cout << "error: " << df.errors[err].desc.in() << endl;
+\end_layout
+
+\begin_layout LyX-Code
+      }
+\end_layout
+
+\begin_layout LyX-Code
+//- alternatively, one can use arl[r].get_err_stack() see below
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+   catch (...)
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+      cout << "unknown exception caught";
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+//- restore last exception mode (if needed)
+\end_layout
+
+\begin_layout LyX-Code
+GroupReply::enable_exception(last_mode);
+\end_layout
+
+\begin_layout LyX-Code
+//- clear the reply list (if reused later in the code)
+\end_layout
+
+\begin_layout LyX-Code
+arl.reset();
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Reading an attribute in Java:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//-----------------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- synch.
+ read "vacuum" attribute on each device in the hierarchy
+\end_layout
+
+\begin_layout LyX-Code
+//- with exceptions enabled - Java example
+\end_layout
+
+\begin_layout LyX-Code
+//-----------------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- enable exceptions and save current mode
+\end_layout
+
+\begin_layout LyX-Code
+boolean last_mode = GroupReply.enable_exception(true);
+\end_layout
+
+\begin_layout LyX-Code
+//- read attribute
+\end_layout
+
+\begin_layout LyX-Code
+GroupAttrReplyList arl = gauges.read_attribute("vacuum",true);
+\end_layout
+
+\begin_layout LyX-Code
+//- try to extract the data from the each reply
+\end_layout
+
+\begin_layout LyX-Code
+//- suppose data contains a double
+\end_layout
+
+\begin_layout LyX-Code
+double ans;
+\end_layout
+
+\begin_layout LyX-Code
+while (it.hasNext())
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- cast from Object to GroupAttrReply
+\end_layout
+
+\begin_layout LyX-Code
+    GroupAttrReply ar = (GroupAttrreply)it.next();
+\end_layout
+
+\begin_layout LyX-Code
+//- enter a try/catch block
+\end_layout
+
+\begin_layout LyX-Code
+    try
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- extract value from data (may throw DevFailed)
+\end_layout
+
+\begin_layout LyX-Code
+ans = get_data().extractDouble();
+\end_layout
+
+\begin_layout LyX-Code
+//- verbose
+\end_layout
+
+\begin_layout LyX-Code
+       System.out.println(cr.dev_name()
+\end_layout
+
+\begin_layout LyX-Code
+                        + "::"
+\end_layout
+
+\begin_layout LyX-Code
+                        + cr.obj_name()
+\end_layout
+
+\begin_layout LyX-Code
+                        + " returned "
+\end_layout
+
+\begin_layout LyX-Code
+                        + ans);
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    catch (DevFailed d)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- DevFailed caught while trying to extract the data from reply
+\end_layout
+
+\begin_layout LyX-Code
+        for (int err = 0; err < d.errors.length; err++)
+\end_layout
+
+\begin_layout LyX-Code
+        {
+\end_layout
+
+\begin_layout LyX-Code
+           System.out.println("error: " + d.errors[err].desc);
+\end_layout
+
+\begin_layout LyX-Code
+        }
+\end_layout
+
+\begin_layout LyX-Code
+//- alternatively, one can use cr.get_err_stack() see below
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    catch (Exception e)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+        System.out.println("unknown exception caught");
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+//- restore last exception mode (if needed)
+\end_layout
+
+\begin_layout LyX-Code
+GroupReply.enable_exception(last_mode);
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In C++, an asynchronous version of the previous example could be:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- read the attribute asynchronously
+\end_layout
+
+\begin_layout LyX-Code
+long request_id = gauges->read_attribute_asynch("vacuum");
+\end_layout
+
+\begin_layout LyX-Code
+//- do some work
+\end_layout
+
+\begin_layout LyX-Code
+do_some_work();
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+//- get results
+\end_layout
+
+\begin_layout LyX-Code
+Tango::GroupAttrReplyList arl = gauges->read_attribute_reply(request_id);
+\end_layout
+
+\begin_layout LyX-Code
+//- process replies as previously described in the synch.
+ implementation
+\end_layout
+
+\begin_layout LyX-Code
+for (int r = 0; r < arl.size(); r++)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- data processing and/or error handling goes here
+\end_layout
+
+\begin_layout LyX-Code
+...
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+//- clear the reply list (if reused later in the code)
+\end_layout
+
+\begin_layout LyX-Code
+arl.reset();
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The same asynchronous example in Java:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- read the attribute asynchronously
+\end_layout
+
+\begin_layout LyX-Code
+int request_id = gauges.read_attribute_asynch("vacuum",true);
+\end_layout
+
+\begin_layout LyX-Code
+//- do some work
+\end_layout
+
+\begin_layout LyX-Code
+do_some_work();
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+//- get results
+\end_layout
+
+\begin_layout LyX-Code
+GroupAttrReplyList arl = gauges.read_attribute_reply(request_id);
+\end_layout
+
+\begin_layout LyX-Code
+Iterator it = arl.iterator();
+\end_layout
+
+\begin_layout LyX-Code
+//- try to extract the data from the each reply
+\end_layout
+
+\begin_layout LyX-Code
+while (it.hasNext())
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- data processing and error handling goes here
+\end_layout
+
+\begin_layout LyX-Code
+//- copy/paste code from previous example
+\end_layout
+
+\begin_layout LyX-Code
+.
+ .
+ .
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Writing an attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+ 
+\end_layout
+
+\begin_layout Standard
+The Group interface contains several implementations of the 
+\emph on
+write_attribute()
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+write-attribute
+\end_layout
+
+\end_inset
+
+ method.
+ Both synchronous and asynchronous forms are supported.
+ However, writing more than one attribute at a time is not supported.
+\end_layout
+
+\begin_layout Subsubsection
+Obtaining acknowledgement
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:O-ack"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Acknowledgements are returned using a GroupReplyList.
+ This is nothing but an array containing a GroupReply for each device in
+ the group.
+ The GroupReply may contain any error occurred during the execution of the
+ command.
+ The return value of the 
+\emph on
+has_failed
+\emph default
+
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+has-failed
+\end_layout
+
+\end_inset
+
+
+\emph on
+()
+\emph default
+ method indicates whether an error occurred or not.
+ If this flag is set to true, the 
+\emph on
+GroupReply::get_err_stack()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+get-err-stack
+\end_layout
+
+\end_inset
+
+
+\emph default
+ method gives error details.
+ 
+\end_layout
+
+\begin_layout Standard
+Here again, the Tango Group
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+group
+\end_layout
+
+\end_inset
+
+ implementation guarantees that the attribute values are returned in the
+ order in which its elements were attached to the group.
+ See Obtaining command results for details.
+\end_layout
+
+\begin_layout Standard
+The GroupReply contains some public members allowing the identification
+ of both the device (GroupReply::dev_name
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+dev-name
+\end_layout
+
+\end_inset
+
+) and the attribute (GroupReply::obj_name
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+obj-name
+\end_layout
+
+\end_inset
+
+).
+ It means that, depending of your application, you can associate a response
+ with its source using its position in the response list or using the GroupReply
+::dev_name member.
+\end_layout
+
+\begin_layout Subsubsection
+Case 1: one value for all devices
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Case-1-writing"
+
+\end_inset
+
+ 
+\end_layout
+
+\begin_layout Standard
+Here, we give an example in which the same attribute value is written on
+ all devices in the group (or its sub-groups).
+ Exceptions are supposed to be disabled.
+\end_layout
+
+\begin_layout Standard
+Writing an attribute in C++:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//-----------------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- synch.
+ write "dummy" attribute on each device in the hierarchy
+\end_layout
+
+\begin_layout LyX-Code
+//-----------------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- assume each device support a "dummy" writable attribute
+\end_layout
+
+\begin_layout LyX-Code
+//- insert the value to be written into a generic container
+\end_layout
+
+\begin_layout LyX-Code
+Tango::DeviceAttribute value(std::string("dummy"), 3.14159);
+\end_layout
+
+\begin_layout LyX-Code
+//- write the attribute
+\end_layout
+
+\begin_layout LyX-Code
+Tango::GroupReplyList rl = gauges->write_attribute(value);
+\end_layout
+
+\begin_layout LyX-Code
+//- any error?
+\end_layout
+
+\begin_layout LyX-Code
+if (rl.has_failed() == false)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+    cout << "no error" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+else
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+    cout << "at least one error occurred" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+//- for each response in the list ...
+\end_layout
+
+\begin_layout LyX-Code
+    for (int r = 0; r < rl.size(); r++)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- did the r-th device give error?
+\end_layout
+
+\begin_layout LyX-Code
+       if (rl[r].has_failed() == true)
+\end_layout
+
+\begin_layout LyX-Code
+       {
+\end_layout
+
+\begin_layout LyX-Code
+//- printout error description
+\end_layout
+
+\begin_layout LyX-Code
+           cout << "an error occurred while reading " 
+\end_layout
+
+\begin_layout LyX-Code
+                << rl[r].obj_name()
+\end_layout
+
+\begin_layout LyX-Code
+                << " on "
+\end_layout
+
+\begin_layout LyX-Code
+                << rl[r].dev_name()
+\end_layout
+
+\begin_layout LyX-Code
+                << endl;
+\end_layout
+
+\begin_layout LyX-Code
+//- dump error stack
+\end_layout
+
+\begin_layout LyX-Code
+           const DevErrorList& el = rl[r].get_err_stack();
+\end_layout
+
+\begin_layout LyX-Code
+           for (int err = 0; err < el.size(); err++)
+\end_layout
+
+\begin_layout LyX-Code
+           {
+\end_layout
+
+\begin_layout LyX-Code
+              cout << el[err].desc.in();
+\end_layout
+
+\begin_layout LyX-Code
+           }
+\end_layout
+
+\begin_layout LyX-Code
+        }
+\end_layout
+
+\begin_layout LyX-Code
+     }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+//- clear the reply list (if reused later in the code)
+\end_layout
+
+\begin_layout LyX-Code
+rl.reset();
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Writing an attribute in Java:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//-----------------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- synch.
+ write "dummy" attribute on each device in the hierarchy
+\end_layout
+
+\begin_layout LyX-Code
+//-----------------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+//- assume each device support a "dummy" writable attribute
+\end_layout
+
+\begin_layout LyX-Code
+//- insert the value to be written into a generic container
+\end_layout
+
+\begin_layout LyX-Code
+DeviceAttribute value = new DeviceAttribute("dummy"), 3.14159);
+\end_layout
+
+\begin_layout LyX-Code
+//- write the attribute
+\end_layout
+
+\begin_layout LyX-Code
+GroupReplyList rl = gauges.write_attribute(value,true);
+\end_layout
+
+\begin_layout LyX-Code
+//- any error?
+\end_layout
+
+\begin_layout LyX-Code
+if (rl.has_failed() == false)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+    System.out.println("no error");
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+else
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+    System.out.println("at least one error occurred");
+\end_layout
+
+\begin_layout LyX-Code
+//- for each response in the list ...
+ 
+\end_layout
+
+\begin_layout LyX-Code
+    Iterator it = rl.iterator();
+\end_layout
+
+\begin_layout LyX-Code
+    while (it.hasNext())
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- cast from Object to GroupReply
+\end_layout
+
+\begin_layout LyX-Code
+        GroupReply gr = (GroupReply)it.next();
+\end_layout
+
+\begin_layout LyX-Code
+//- did the r-th device give error?
+\end_layout
+
+\begin_layout LyX-Code
+        if (gr.has_failed())
+\end_layout
+
+\begin_layout LyX-Code
+        {
+\end_layout
+
+\begin_layout LyX-Code
+//- printout error description
+\end_layout
+
+\begin_layout LyX-Code
+            System.out.println("an error occurred while reading " 
+\end_layout
+
+\begin_layout LyX-Code
+                  + gr.obj_name()
+\end_layout
+
+\begin_layout LyX-Code
+                  + " on " 
+\end_layout
+
+\begin_layout LyX-Code
+                  + gr.dev_name());
+\end_layout
+
+\begin_layout LyX-Code
+//- dump error stack
+\end_layout
+
+\begin_layout LyX-Code
+            DevError[] el = gr.get_err_stack();
+\end_layout
+
+\begin_layout LyX-Code
+            for (int err = 0; err < el.length; err++)
+\end_layout
+
+\begin_layout LyX-Code
+            {
+\end_layout
+
+\begin_layout LyX-Code
+                System.out.println(el[err].desc);
+\end_layout
+
+\begin_layout LyX-Code
+            }
+\end_layout
+
+\begin_layout LyX-Code
+        }
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+ }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Here is a C++ asynchronous version:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- insert the value to be written into a generic container
+\end_layout
+
+\begin_layout LyX-Code
+Tango::DeviceAttribute value(std::string("dummy"), 3.14159);
+\end_layout
+
+\begin_layout LyX-Code
+//- write the attribute asynchronously
+\end_layout
+
+\begin_layout LyX-Code
+long request_id = gauges.write_attribute_asynch(value);
+\end_layout
+
+\begin_layout LyX-Code
+//- do some work
+\end_layout
+
+\begin_layout LyX-Code
+do_some_work();
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+//- get results
+\end_layout
+
+\begin_layout LyX-Code
+Tango::GroupReplyList rl = gauges->write_attribute_reply(request_id);
+\end_layout
+
+\begin_layout LyX-Code
+//- process replies as previously describe in the synch.
+ implementation ...
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The same asynchronous example in Java:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- insert the value to be written into a generic container
+\end_layout
+
+\begin_layout LyX-Code
+DeviceAttribute value = new DeviceAttribute("dummy", 3.14159);
+\end_layout
+
+\begin_layout LyX-Code
+//- write the attribute asynchronously
+\end_layout
+
+\begin_layout LyX-Code
+int request_id = gauges.write_attribute_asynch(value,true);
+\end_layout
+
+\begin_layout LyX-Code
+//- do some work
+\end_layout
+
+\begin_layout LyX-Code
+do_some_work();
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+//- get results
+\end_layout
+
+\begin_layout LyX-Code
+GroupReplyList rl = gauges.write_attribute_reply(request_id, 0);
+\end_layout
+
+\begin_layout LyX-Code
+//- process replies as previously describe in the synch.
+ implementation ...
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Case 2: a specific value per device
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Case-2-writing"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Here, we give an example in which a 
+\series bold
+specific
+\series default
+ attribute value is applied to each device in the hierarchy.
+ In order to use this form of 
+\emph on
+write_attribute()
+\emph default
+, the user must have an "a priori" and "perfect" knowledge of the devices
+ order in the hierarchy.
+ 
+\end_layout
+
+\begin_layout Standard
+The C++ implementation provides a template method which accepts a std::vector
+ of "C++ type for command argument".
+ This allows passing any kind of data using a single method.
+\end_layout
+
+\begin_layout Standard
+Since templates are not (already) supported in Java, the implementation
+ is somewhat different and an array of DeviceAttribute is used to pass the
+ specific arguments.
+ 
+\end_layout
+
+\begin_layout Standard
+In both cases (C++ and Java), the size of this vector must equal the number
+ of device in the hierarchy (respectively the number of device in the group)
+ if the forward
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+forward
+\end_layout
+
+\end_inset
+
+ option is set to true (respectively set to false).
+ Otherwise, an exception
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+exception
+\end_layout
+
+\end_inset
+
+ is thrown.
+\end_layout
+
+\begin_layout Standard
+The first item in the vector is applied to the first device in the group,
+ the second to the second device in the group, and so on\SpecialChar \ldots{}
+That's why the user
+ must have a "perfect" knowledge of the devices order in the group.
+ 
+\end_layout
+
+\begin_layout Standard
+Assuming that gauges are ordered by name, the dummy attribute can be written
+ as follows on group "cell-01" (and its sub-groups) as follows:
+\end_layout
+
+\begin_layout Standard
+Remember, "cell-01" has the following internal structure: 
+\end_layout
+
+\begin_layout LyX-Code
+-> gauges 
+\end_layout
+
+\begin_layout LyX-Code
+    | -> cell-01
+\end_layout
+
+\begin_layout LyX-Code
+    |     |-> inst-c01/vac-gauge/strange
+\end_layout
+
+\begin_layout LyX-Code
+    |     |-> penning
+\end_layout
+
+\begin_layout LyX-Code
+    |     |    |-> inst-c01/vac-gauge/penning-01
+\end_layout
+
+\begin_layout LyX-Code
+    |     |    |-> inst-c01/vac-gauge/penning-02
+\end_layout
+
+\begin_layout LyX-Code
+    |     |    |-> ...
+\end_layout
+
+\begin_layout LyX-Code
+    |     |    |-> inst-c01/vac-gauge/penning-xx
+\end_layout
+
+\begin_layout LyX-Code
+    |     |-> pirani
+\end_layout
+
+\begin_layout LyX-Code
+    |          |-> inst-c01/vac-gauge/pirani-01
+\end_layout
+
+\begin_layout LyX-Code
+    |          |-> ...
+\end_layout
+
+\begin_layout LyX-Code
+    |          |-> inst-c01/vac-gauge/pirani-xx
+\end_layout
+
+\begin_layout Standard
+C++ version:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- get a reference to the target group
+\end_layout
+
+\begin_layout LyX-Code
+Tango::Group *g = gauges->get_group("cell-01");
+\end_layout
+
+\begin_layout LyX-Code
+//- get number of device in the hierarchy (starting at cell-01)
+\end_layout
+
+\begin_layout LyX-Code
+long n_dev = g->get_size(true);
+\end_layout
+
+\begin_layout LyX-Code
+//- Build value list
+\end_layout
+
+\begin_layout LyX-Code
+std::vector<double> values(n_dev);
+\end_layout
+
+\begin_layout LyX-Code
+//- value for inst-c01/vac-gauge/strange
+\end_layout
+
+\begin_layout LyX-Code
+values[0] = 3.14159;
+\end_layout
+
+\begin_layout LyX-Code
+//- value for inst-c01/vac-gauge/penning-01
+\end_layout
+
+\begin_layout LyX-Code
+values[1] = 2 * 3.14159;
+\end_layout
+
+\begin_layout LyX-Code
+//- value for inst-c01/vac-gauge/penning-02
+\end_layout
+
+\begin_layout LyX-Code
+values[2] = 3 * 3.14159;
+\end_layout
+
+\begin_layout LyX-Code
+//- value for remaining devices in cell-01.penning
+\end_layout
+
+\begin_layout LyX-Code
+.
+ .
+ .
+\end_layout
+
+\begin_layout LyX-Code
+//- value for devices in cell-01.pirani
+\end_layout
+
+\begin_layout LyX-Code
+.
+ .
+ .
+\end_layout
+
+\begin_layout LyX-Code
+//- the reply list
+\end_layout
+
+\begin_layout LyX-Code
+Tango::GroupReplyList rl;
+\end_layout
+
+\begin_layout LyX-Code
+//- enter a try/catch block (see below)
+\end_layout
+
+\begin_layout LyX-Code
+try
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- write the "dummy" attribute
+\end_layout
+
+\begin_layout LyX-Code
+    rl = g->write_attribute("dummy", values, true);
+\end_layout
+
+\begin_layout LyX-Code
+    if (rl.has_failed())
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+//- error handling (see previous cases)
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+catch (const DevFailed& df)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- see below
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+rl.reset();
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Here is a Java version:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- get a reference to the target group
+\end_layout
+
+\begin_layout LyX-Code
+Group g = gauges.get_group("cell-01");
+\end_layout
+
+\begin_layout LyX-Code
+//- get pre-build arguments list for the whole hierarchy (starting at cell-01)
+\end_layout
+
+\begin_layout LyX-Code
+DeviceAttribute[] values = g.get_attribute_specific_value_list(true);
+\end_layout
+
+\begin_layout LyX-Code
+//- value for inst-c01/vac-gauge/strange
+\end_layout
+
+\begin_layout LyX-Code
+values[0] = 3.14159;
+\end_layout
+
+\begin_layout LyX-Code
+//- value for inst-c01/vac-gauge/penning-01
+\end_layout
+
+\begin_layout LyX-Code
+values[1] = 2 * 3.14159;
+\end_layout
+
+\begin_layout LyX-Code
+//- value for inst-c01/vac-gauge/penning-02
+\end_layout
+
+\begin_layout LyX-Code
+values[2] = 3 * 3.14159;
+\end_layout
+
+\begin_layout LyX-Code
+//- value for remaining devices in cell-01.penning
+\end_layout
+
+\begin_layout LyX-Code
+.
+ .
+ 
+\end_layout
+
+\begin_layout LyX-Code
+//- value for devices in cell-01.pirani
+\end_layout
+
+\begin_layout LyX-Code
+.
+ .
+ .
+\end_layout
+
+\begin_layout LyX-Code
+//- the reply list
+\end_layout
+
+\begin_layout LyX-Code
+GroupReplyList rl;
+\end_layout
+
+\begin_layout LyX-Code
+try
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- write the "dummy" attribute
+\end_layout
+
+\begin_layout LyX-Code
+rl = g.write_attribute("dummy", values, true);
+\end_layout
+
+\begin_layout LyX-Code
+   if (rl.has_failed())
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+//- error handling (see previous cases)
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+catch (DevFailed d)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- see below
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Note: if we want to execute the command locally on "cell-01" (i.e.
+ not on its sub-groups), we should write the following code (example is
+ only proposed for C++ - Java port is straightforward):
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+//- get a reference to the target group
+\end_layout
+
+\begin_layout LyX-Code
+Tango::Group *g = gauges->get_group("cell-01");
+\end_layout
+
+\begin_layout LyX-Code
+//- get number of device in the group
+\end_layout
+
+\begin_layout LyX-Code
+long n_dev = g->get_size(false);
+\end_layout
+
+\begin_layout LyX-Code
+//- Build value list
+\end_layout
+
+\begin_layout LyX-Code
+std::vector<double> values(n_dev);
+\end_layout
+
+\begin_layout LyX-Code
+//- value for inst-c01/vac-gauge/penning-01
+\end_layout
+
+\begin_layout LyX-Code
+values[0] = 2 * 3.14159;
+\end_layout
+
+\begin_layout LyX-Code
+//- value for inst-c01/vac-gauge/penning-02
+\end_layout
+
+\begin_layout LyX-Code
+values[1] = 3 * 3.14159;
+\end_layout
+
+\begin_layout LyX-Code
+//- value for remaining devices in cell-01.penning
+\end_layout
+
+\begin_layout LyX-Code
+.
+ .
+ .
+\end_layout
+
+\begin_layout LyX-Code
+//- the reply list
+\end_layout
+
+\begin_layout LyX-Code
+Tango::GroupReplyList rl;
+\end_layout
+
+\begin_layout LyX-Code
+//- enter a try/catch block (see below)
+\end_layout
+
+\begin_layout LyX-Code
+try
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- write the "dummy" attribute
+\end_layout
+
+\begin_layout LyX-Code
+   rl = g->write_attribute("dummy", values, false);
+\end_layout
+
+\begin_layout LyX-Code
+   if (rl.has_failed())
+\end_layout
+
+\begin_layout LyX-Code
+   {
+\end_layout
+
+\begin_layout LyX-Code
+//- error handling (see previous cases)
+\end_layout
+
+\begin_layout LyX-Code
+   }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+catch (const DevFailed& df)
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+//- see below
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout LyX-Code
+rl.reset();
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This form of 
+\emph on
+write_attribute()
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+write-attribute
+\end_layout
+
+\end_inset
+
+
+\emph default
+ (the one that accepts an array of value as its input argument), may throw
+ an exception before executing the command if the number of elements in
+ the input array does not match the number of individual devices in the
+ group or in the hierarchy (depending on the forward option).
+ 
+\end_layout
+
+\begin_layout Standard
+Java developers should use the 
+\emph on
+Group.get_attribute_specific_value_list
+\emph default
+ helper method (see previous example).
+ It guarantees than the "returned array" has the right number of elements.
+ This array may be kept and reused as far as the group size is not changed
+ (i.e.
+ no add or remove of elements).
+\end_layout
+
+\begin_layout Standard
+An asynchronous version of this method is also available.
+\end_layout
+
+\begin_layout Section
+Device locking
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Locking
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Starting with Tango release 7 (and device inheriting from Device_4Impl),
+ device locking is supported.
+ For instance, this feature could be used by an application doing a scan
+ on a synchrotron beam line.
+ In such a case, you want to move an actuator then read a sensor, move the
+ actuator again, read the sensor...You don't want the actuator to be moved
+ by another client while the application is doing the scan.
+ If the application doing the scan locks the actuator device, it will be
+ sure that this device is "reserved" for the application doing the scan
+ and other client will not be able to move it until the scan application
+ un-locks this actuator.
+\end_layout
+
+\begin_layout Standard
+A locked device is protected against:
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+command_inout
+\emph default
+ call except for device state and status requested via command and for the
+ set of commands defined as allowed following the definition of allowed
+ command in the Tango control access schema.
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+write_attribute
+\emph default
+ call
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+write_read_attribute
+\emph default
+ call
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+set_attribute_config
+\emph default
+ call
+\end_layout
+
+\begin_layout Itemize
+polling and logging commands related to the locked device
+\end_layout
+
+\begin_layout Standard
+Other clients trying to do one of these calls on a locked device will get
+ a DevFailed exception.
+ In case of application with locked device crashed, the lock will be automatical
+ly release after a defined interval.
+ The API provides a set of methods for application code to lock/unlock device.
+ These methods are:
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+DeviceProxy::lock()
+\emph default
+ and 
+\emph on
+DeviceProxy::unlock()
+\emph default
+ to lock/unlock device
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+DeviceProxy::locking_status()
+\emph default
+, 
+\emph on
+DeviceProxy::is_locked()
+\emph default
+, 
+\emph on
+DeviceProxy::is_locked_by_me()
+\emph default
+ and 
+\emph on
+DeviceProxy::get_locker()
+\emph default
+ to get locking information
+\end_layout
+
+\begin_layout Standard
+These methods are precisely described in the API reference chapters.
+\end_layout
+
+\begin_layout Section
+Reconnection
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+reconnection
+\end_layout
+
+\end_inset
+
+ and exception
+\end_layout
+
+\begin_layout Standard
+The Tango API automatically manages re-connection between client and server
+ in case of communication error during a network access between a client
+ and a server.
+ By default, when a communication error occurs, an exception is returned
+ to the caller and the connection is internally marked as bad.
+ On the next try to contact the device, the API will try to re-build the
+ network connection.
+ With the 
+\emph on
+set_transparency_reconnection
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+set-transparency-reconnection
+\end_layout
+
+\end_inset
+
+()
+\emph default
+ method of the DeviceProxy
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DeviceProxy
+\end_layout
+
+\end_inset
+
+ class, it is even possible not to have any exception thrown in case of
+ communication error.
+ The API will try to re-build the network connection as soon as it is detected
+ as bad.
+ This is the default mode.
+ See 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Reconnection-and-exception"
+
+\end_inset
+
+ for more details on this subject.
+\end_layout
+
+\begin_layout Section
+Thread
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+thread
+\end_layout
+
+\end_inset
+
+ safety
+\end_layout
+
+\begin_layout Standard
+Starting with Tango 7.2, some classes of the C++ API has been made thread
+ safe.
+ These classes are:
+\end_layout
+
+\begin_layout Itemize
+DeviceProxy
+\end_layout
+
+\begin_layout Itemize
+Database
+\end_layout
+
+\begin_layout Itemize
+Group
+\end_layout
+
+\begin_layout Itemize
+ApiUtil
+\end_layout
+
+\begin_layout Itemize
+AttributeProxy
+\end_layout
+
+\begin_layout Standard
+This means that it is possible to share between threads a pointer to a DevicePro
+xy instance.
+ It is safe to execute a call on this DeviceProxy instance while another
+ thread is also doing a call to the same DeviceProxy instance.
+ Obviously, this also means that it is possible to create thread local DevicePro
+xy instances and to execute method calls on these instances.
+ Nevertheless, data local to a DeviceProxy instance like its timeout are
+ not managed on a per thread basis.
+ For a DeviceProxy instance shared between two threads, if thread 1 changes
+ the instance timeout, thread 2 will also see this change.
+\end_layout
+
+\begin_layout Section
+Compiling and linking a Tango client
+\end_layout
+
+\begin_layout Standard
+Compiling and linking a Tango client is similar to compiling and linking
+ a Tango device server.
+ Please, refer to chapter "Compiling, Linking and executing a Tango device
+ server process" (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Compiling,-linking-and"
+
+\end_inset
+
+) to get all the details.
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset label
+LatexCommand label
+name "ThreeRicardo"
+
+\end_inset
+
+
+\begin_inset Graphics
+	filename ../dance/0066-reduc.jpg
+	lyxscale 80
+	scale 200
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/doc/src/gen_api/line.tex b/doc/src/gen_api/line.tex
new file mode 100644
index 0000000..1ba963f
--- /dev/null
+++ b/doc/src/gen_api/line.tex
@@ -0,0 +1,6 @@
+\begin{flushleft}
+\begin{picture}(0,0)
+\thicklines
+\put(0,0){\line(1,0){400}}
+\end{picture}
+\end{flushleft}
diff --git a/doc/src/intro/intro.lyx b/doc/src/intro/intro.lyx
new file mode 100644
index 0000000..a16844d
--- /dev/null
+++ b/doc/src/intro/intro.lyx
@@ -0,0 +1,325 @@
+#LyX 1.4.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 245
+\begin_document
+\begin_header
+\textclass Tango_book
+\begin_preamble
+\usepackage{a4wide}
+\end_preamble
+\language english
+\inputencoding latin1
+\fontscheme default
+\graphics default
+\paperfontsize default
+\spacing single
+\papersize default
+\use_geometry false
+\use_amsmath 1
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\secnumdepth 5
+\tocdepth 4
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes true
+\end_header
+
+\begin_body
+
+\begin_layout Chapter
+Introduction
+\end_layout
+
+\begin_layout Section
+Introduction to device server
+\end_layout
+
+\begin_layout Standard
+Device servers were first developed at the European Synchrotron radiation
+ Facility (ESRF
+\begin_inset LatexCommand \index{ESRF}
+
+\end_inset
+
+) for controlling the 6 Gev synchrotron radiation source.
+ This document is a Programmer's Manual on how to write TANGO device servers.
+ It will not go into the details of the ESRF
+\begin_inset LatexCommand \index{ESRF}
+
+\end_inset
+
+, nor its Control System nor any of the specific device servers in the Control
+ System.
+ The role of this document is to help programmers faced with the task of
+ writing TANGO device servers.
+\end_layout
+
+\begin_layout Standard
+Device servers have been developed at the ESRF
+\begin_inset LatexCommand \index{ESRF}
+
+\end_inset
+
+ in order to solve the main task of Control Systems viz provide read and
+ write access to all devices in a distributed system.
+ The problem of distributed device access is only part of the problem however.
+ The other part of the problem is providing a programming framework for
+ a large number of devices programmed by a large number of programmers each
+ having different levels of experience and style.
+\end_layout
+
+\begin_layout Standard
+Device servers have been written at the ESRF
+\begin_inset LatexCommand \index{ESRF}
+
+\end_inset
+
+ for a large variety of different devices.
+ Devices vary from serial line devices to devices interfaced by field-bus
+ to memory mapped VME cards or PC cards to entire data acquisition systems.
+ The definition of a device depends very much on the user's requirements.
+ In the simple case a device server can be used to hide the serial line
+ protocol required to communicate with a device.
+ For more complicated devices the device server can be used to hide the
+ entire complexity of the device timing, configuration and acquisition cycle
+ behind a set of high level commands.
+\end_layout
+
+\begin_layout Standard
+In this manual the process of how to write TANGO client (applications) and
+ device servers will be treated.
+ The manual has been organized as follows :
+\end_layout
+
+\begin_layout Itemize
+A getting started chapter.
+ 
+\end_layout
+
+\begin_layout Itemize
+The TANGO device server model is treated in chapter 3 
+\end_layout
+
+\begin_layout Itemize
+Generalities on the Tango Application Programmer Interfaces are given in
+ chapter 4 
+\end_layout
+
+\begin_layout Itemize
+The TANGO Java client Application Programmer Interface is described in chapter
+ 5 
+\end_layout
+
+\begin_layout Itemize
+Chapter 6 describes the TANGO C++ client Application Programmer Interface
+ 
+\end_layout
+
+\begin_layout Itemize
+Chapter 7 is an a programmer's guide for the Tango Application ToolKit (TangoATK
+).
+ This is a Java toolkit to help Tango Java application developers.
+ 
+\end_layout
+
+\begin_layout Itemize
+How to write a TANGO device server is explained in chapter 8 
+\end_layout
+
+\begin_layout Itemize
+Chapter 9 describes advanced Tango features 
+\end_layout
+
+\begin_layout Standard
+Throughout this manual examples of source code will be given in order to
+ illustrate what is meant.
+ Most examples have been taken from the StepperMotor class - a simulation
+ of a stepper motor which illustrates how a typical device server for a
+ stepper motor at the ESRF functions.
+\end_layout
+
+\begin_layout Section
+Device server history
+\end_layout
+
+\begin_layout Standard
+The concept of using device servers to access devices was first proposed
+ at the ESRF in 1989.
+ It has been successfully used as the heart of the ESRF
+\begin_inset LatexCommand \index{ESRF}
+
+\end_inset
+
+ Control System for the institute accelerator complex.
+ This Control System has been named TACO
+\begin_inset LatexCommand \index{TACO}
+
+\end_inset
+
+
+\begin_inset Foot
+status collapsed
+
+\begin_layout Standard
+TACO stands for 
+\series bold
+T
+\series default
+elescope and 
+\series bold
+A
+\series default
+ccelerator 
+\series bold
+C
+\series default
+ontrolled with 
+\series bold
+O
+\series default
+bjects
+\end_layout
+
+\end_inset
+
+.
+ Then, it has been decided to also used TACO to control devices in the beam-line
+s.
+ Today, more than 30 instances of TACO are running at the ESRF.
+ The main technologies used within TACO are the leading technologies of
+ the 80's.
+ The Sun Remote Procedure Call (RPC) is used to communicate over the network
+ between device server and applications, OS-9 is used on the front-end computers
+, C is the reference language to write device servers and clients and the
+ device server framework follows the MIT Widget model.
+ In 1999, a renewal of the control system was started.
+ In June 2002, Soleil
+\begin_inset LatexCommand \index{Soleil}
+
+\end_inset
+
+ and ESRF offically decide to collaborate to develop this renewal of the
+ old TACO control system.
+ Soleil is a French synchrotron radiation facility currently under construction
+ in the Paris suburbs.
+ See 
+\begin_inset LatexCommand \cite{Soleil_home_page}
+
+\end_inset
+
+ to get all information about Soleil.
+ In December 2003, Elettra
+\begin_inset LatexCommand \index{Elettra}
+
+\end_inset
+
+ joins the club.
+ Elettra is an Italian synchrotron radiation facility located in Trieste.
+ See 
+\begin_inset LatexCommand \cite{Elettra_home_page}
+
+\end_inset
+
+ to get all information about Elettra.
+ Then, beginning of 2005, ALBA
+\begin_inset LatexCommand \index{ALBA}
+
+\end_inset
+
+ also decided to join.
+ ALBA is a Spanish synchrotron radiation facility located in Barcelona.
+ See 
+\begin_inset LatexCommand \cite{Alba_WEB}
+
+\end_inset
+
+ to get all information about ALBA.
+ The new version of the Alba/Elettra/ESRF/Soleil control system is named
+ TANGO
+\begin_inset Foot
+status collapsed
+
+\begin_layout Standard
+TANGO stands for 
+\series bold
+TA
+\series default
+co 
+\series bold
+N
+\series default
+ext 
+\series bold
+G
+\series default
+eneration 
+\series bold
+O
+\series default
+bject
+\end_layout
+
+\end_inset
+
+ and is based on the 21 century technologies :
+\end_layout
+
+\begin_layout Itemize
+CORBA
+\begin_inset LatexCommand \index{CORBA}
+
+\end_inset
+
+
+\begin_inset Foot
+status collapsed
+
+\begin_layout Standard
+CORBA stands for 
+\series bold
+C
+\series default
+ommon 
+\series bold
+O
+\series default
+bject 
+\series bold
+R
+\series default
+equest 
+\series bold
+B
+\series default
+roker 
+\series bold
+A
+\series default
+rchitecture
+\end_layout
+
+\end_inset
+
+ to communicate between device server and clients 
+\end_layout
+
+\begin_layout Itemize
+C++ and Java as reference programming languages 
+\end_layout
+
+\begin_layout Itemize
+Linux, Solaris and Windows-NT as operating systems 
+\end_layout
+
+\begin_layout Itemize
+Modern object oriented design pattern
+\end_layout
+
+\end_body
+\end_document
diff --git a/doc/src/intro/line.tex b/doc/src/intro/line.tex
new file mode 100644
index 0000000..1ba963f
--- /dev/null
+++ b/doc/src/intro/line.tex
@@ -0,0 +1,6 @@
+\begin{flushleft}
+\begin{picture}(0,0)
+\thicklines
+\put(0,0){\line(1,0){400}}
+\end{picture}
+\end{flushleft}
diff --git a/doc/src/java_api/TangoApi.lyx b/doc/src/java_api/TangoApi.lyx
new file mode 100644
index 0000000..2895ba4
--- /dev/null
+++ b/doc/src/java_api/TangoApi.lyx
@@ -0,0 +1,491 @@
+#LyX 1.6.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 345
+\begin_document
+\begin_header
+\textclass Tango_book
+\begin_preamble
+\usepackage{a4wide}
+\end_preamble
+\use_default_options false
+\language english
+\inputencoding latin1
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\pdf_bookmarks true
+\pdf_bookmarksnumbered false
+\pdf_bookmarksopen false
+\pdf_bookmarksopenlevel 1
+\pdf_breaklinks false
+\pdf_pdfborder false
+\pdf_colorlinks true
+\pdf_backref false
+\pdf_pdfusetitle true
+\papersize default
+\use_geometry false
+\use_amsmath 1
+\use_esint 0
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\secnumdepth 4
+\tocdepth 5
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\author "" 
+\author "" 
+\end_header
+
+\begin_body
+
+\begin_layout Chapter
+TANGO Java API
+\begin_inset CommandInset label
+LatexCommand label
+name "cha:TANGO-Java-API"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+\noun on
+This chapter documents the JAVA API for the TANGO database and device servers.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Graphics
+	filename picture/architecture.eps
+	width 80text%
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 0.3cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Introduction
+\end_layout
+
+\begin_layout Subsection
+Description
+\end_layout
+
+\begin_layout Standard
+This chapter documents the high level interface for Java.
+ 
+\end_layout
+
+\begin_layout Subsubsection*
+Remarks:
+\end_layout
+
+\begin_layout Standard
+This java api is based on 
+\emph on
+Jacorb
+\emph default
+ 
+\noun on
+ORB
+\noun default
+ implementation.
+ The 
+\emph on
+Jacorb
+\emph default
+ and 
+\emph on
+Tango
+\emph default
+ classes are both available in TangORB.jar file.
+\end_layout
+
+\begin_layout Subsection
+Basic Philosophy
+\end_layout
+
+\begin_layout Standard
+The basic philosophy is to have high level classes for the database, properties,
+ device, group and database object info.
+ Classes also exist for sending and receiving database or device values.
+\end_layout
+
+\begin_layout Standard
+All classes and data types are defined in 
+\emph on
+fr.esrf.TangoApi
+\emph default
+ package.
+ Group related classes are in a package called 
+\emph on
+fr.esrf.TangoApi.Group.
+
+\emph default
+ Event related classes are in a package called 
+\emph on
+fr.esrf.TangoApi.events
+\end_layout
+
+\begin_layout Subsection
+Classes
+\end_layout
+
+\begin_layout Subsubsection
+Data object classes
+\end_layout
+
+\begin_layout Description
+DeviceData: Obect used to send and receive data on device.
+\end_layout
+
+\begin_layout Description
+DbDatum: Object used to put or get properties on database.
+\end_layout
+
+\begin_layout Description
+DbDevInfo: Object used to read device information on database.
+\end_layout
+
+\begin_layout Description
+DbDevImportInfo: Object used to read imported device information on database.
+\end_layout
+
+\begin_layout Description
+DbDevExportInfo: Object used to read exported device information on database.
+\end_layout
+
+\begin_layout Subsubsection
+Asynchronous callback related classes
+\end_layout
+
+\begin_layout Description
+CallBack: Object called at asynchronous call reply
+\end_layout
+
+\begin_layout Description
+CmdDoneEvent: Object to pass asynchronous command reply data to a CallBack
+ object.
+\end_layout
+
+\begin_layout Description
+ReadAttrEvent: Object to pass asynchronous read_attribute reply data to
+ a CallBack object.
+\end_layout
+
+\begin_layout Description
+AttrWrittenEvent: Object to pass asynchronous write_attribute reply data
+ to a CallBack object.
+\end_layout
+
+\begin_layout Subsubsection
+Devices and Database access classes
+\end_layout
+
+\begin_layout Description
+DeviceProxy: Device access (aggregates DbDevice class).
+\end_layout
+
+\begin_layout Description
+Group: Multiple device access class
+\end_layout
+
+\begin_layout Description
+Database: Direct access to TANGO database.
+\end_layout
+
+\begin_layout Description
+DbClass: Class properties access to TANGO database.
+\end_layout
+
+\begin_layout Description
+DbServer: Server properties access to TANGO database.
+\end_layout
+
+\begin_layout Description
+DbDevice Device properties access to TANGO database.
+\end_layout
+
+\begin_layout Subsection
+Reporting errors
+\end_layout
+
+\begin_layout Standard
+For the device and database classes, most methods throw a 
+\emph on
+DevFailed
+\emph default
+ exception in case of error.
+ See 
+\emph on
+Writing a TANGO Device Server
+\emph default
+ chapter 
+\emph on
+Reporting Errors
+\emph default
+ (
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Reporting-errors"
+
+\end_inset
+
+) , except those which specified.
+\end_layout
+
+\begin_layout Standard
+In opposite, for the data object classes, only the specified method throw
+ 
+\emph on
+DevFailed
+\emph default
+ exception in case of error.
+\end_layout
+
+\begin_layout Standard
+The reason field could be set to:
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+TangoApi_TANGO_HOST_NOT_SET
+\emph default
+ : The 
+\emph on
+TANGO_HOST
+\emph default
+ environment variable has not been set or has been set with a syntax error.
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+TangoApi_DATABASE_CONNECTION_FAILED
+\emph default
+ : The database server cannot be connected (bad 
+\emph on
+TANGO_HOST
+\emph default
+ or database server stopped).
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+TangoApi_CANNOT_IMPORT_DEVICE
+\emph default
+ : The device is exported but cannot be connected.
+\end_layout
+
+\begin_layout Itemize
+
+\emph on
+TangoApi_DEVICE_NOT_EXPORTED
+\emph default
+ : The device has not be exported.
+\end_layout
+
+\begin_layout Subsection
+Compiling a Java client
+\end_layout
+
+\begin_layout Subsubsection
+Supported java release
+\end_layout
+
+\begin_layout Standard
+Tango client written using Java language needs release 
+\series bold
+1.5.0
+\series default
+ (or above) of the Java environment.
+ 
+\end_layout
+
+\begin_layout Subsubsection
+Setting CLASSPATH and other environment variables
+\end_layout
+
+\begin_layout Standard
+To correctly compile a Java Tango client, the CLASSPATH
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+CLASSPATH
+\end_layout
+
+\end_inset
+
+ environment variable must be set to :
+\end_layout
+
+\begin_layout Itemize
+The jar file with all the Tango, TangoDs, TangoApi and Jacorb package
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+package
+\end_layout
+
+\end_inset
+
+ classes.
+ This file is named TangORB.jar
+\end_layout
+
+\begin_layout Itemize
+The jar file with all the JDK classes (not always necessary, could be implicit)
+\end_layout
+
+\begin_layout Itemize
+Your own package directory
+\end_layout
+
+\begin_layout Standard
+For UNIX like operating system, setting environment variable is done with
+ the 
+\emph on
+export
+\emph default
+ or 
+\emph on
+setenv
+\emph default
+ command depending on the shell used.
+ For Windows, setting environment variable is possible from the control
+ panel.
+\end_layout
+
+\begin_layout Standard
+The client/server timeout as been fixed by default to 3000 milliseconds
+ but it can be set to another value a startup using 
+\emph on
+TANGO_TIMEOUT
+\emph default
+ environement variable.
+\end_layout
+
+\begin_layout Standard
+eg : 
+\emph on
+java -DTANGO_HOST=hal:20000 -DTANGO_TIMEOUT=5000 mypackage.MyClient
+\end_layout
+
+\begin_layout Standard
+Will start 
+\emph on
+MyClient
+\emph default
+ class using the database server running on the host named 
+\emph on
+hal
+\emph default
+ on port 20000 with a command timeout of 5 seconds.
+\end_layout
+
+\begin_layout Section
+Reference manual
+\end_layout
+
+\begin_layout Standard
+The Tango Java API documentation is now managed using the Java tool javadoc
+ and is available online at
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+href{http://www.esrf.eu/computing/cs/tango/tango_doc/kernel_doc/tango_java_api/cla
+sses/index.html}{Tango Java API reference documentation}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{center}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/doc/src/java_api/line.tex b/doc/src/java_api/line.tex
new file mode 100644
index 0000000..1ba963f
--- /dev/null
+++ b/doc/src/java_api/line.tex
@@ -0,0 +1,6 @@
+\begin{flushleft}
+\begin{picture}(0,0)
+\thicklines
+\put(0,0){\line(1,0){400}}
+\end{picture}
+\end{flushleft}
diff --git a/doc/src/java_api/picture/architecture.eps b/doc/src/java_api/picture/architecture.eps
new file mode 100644
index 0000000..228f8b0
--- /dev/null
+++ b/doc/src/java_api/picture/architecture.eps
@@ -0,0 +1,477 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: architecture.eps
+%%Creator: fig2dev Version 3.2 Patchlevel 3c
+%%CreationDate: Thu Dec 11 17:00:25 2003
+%%For: verdier at splash (Pascal VERDIER)
+%%BoundingBox: 0 0 583 743
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 743 moveto 0 0 lineto 583 0 lineto 583 743 lineto closepath clip newpath
+-7.0 749.0 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+  bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+  4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+%%Page: 1 1
+10 setmiterlimit
+ 0.06000 0.06000 sc
+%
+% Fig objects follow
+%
+/Helvetica-Bold ff 180.00 scf sf
+4125 10800 m
+gs 1 -1 sc (AttributeProxy) col0 sh gr
+/Helvetica-Bold ff 150.00 scf sf
+3900 11775 m
+gs 1 -1 sc (read\(\)) col0 sh gr
+/Helvetica-Bold ff 150.00 scf sf
+3900 11925 m
+gs 1 -1 sc (write\(\)) col0 sh gr
+% Polyline
+15.000 slw
+n 1698 498 m
+ 7342 498 l gs col-1 s gr 
+/Helvetica-Bold ff 345.00 scf sf
+1627 357 m
+gs 1 -1 sc (TANGO   Java    API     Architecture) col-1 sh gr
+% Polyline
+7.500 slw
+n 146 3814 m
+ 2051 3814 l gs col-1 s gr 
+% Polyline
+n 146 4238 m
+ 2051 4238 l gs col-1 s gr 
+% Polyline
+15.000 slw
+n 146 3391 m 2051 3391 l 2051 4873 l 146 4873 l
+ cp gs col-1 s gr 
+/Helvetica-Bold ff 195.00 scf sf
+851 4097 m
+gs 1 -1 sc (name) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+357 4520 m
+gs 1 -1 sc (get_property\(\)) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+569 4732 m
+gs 1 -1 sc (.................) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+710 3673 m
+gs 1 -1 sc (DbClass) col-1 sh gr
+% Polyline
+7.500 slw
+n 146 7342 m
+ 2051 7342 l gs col-1 s gr 
+% Polyline
+n 146 7766 m
+ 2051 7766 l gs col-1 s gr 
+% Polyline
+15.000 slw
+n 146 6919 m 2051 6919 l 2051 8401 l 146 8401 l
+ cp gs col-1 s gr 
+/Helvetica-Bold ff 195.00 scf sf
+851 7624 m
+gs 1 -1 sc (name) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+428 8048 m
+gs 1 -1 sc (get_property\(\)) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+639 8259 m
+gs 1 -1 sc (.................) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+639 7201 m
+gs 1 -1 sc (DbDevice) col-1 sh gr
+% Polyline
+7.500 slw
+n 146 5578 m
+ 2051 5578 l gs col-1 s gr 
+% Polyline
+n 146 6002 m
+ 2051 6002 l gs col-1 s gr 
+% Polyline
+15.000 slw
+n 146 5155 m 2051 5155 l 2051 6637 l 146 6637 l
+ cp gs col-1 s gr 
+/Helvetica-Bold ff 195.00 scf sf
+851 5861 m
+gs 1 -1 sc (name) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+710 5437 m
+gs 1 -1 sc (DbServer) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+569 6566 m
+gs 1 -1 sc (.................) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+639 6425 m
+gs 1 -1 sc (put_info\(\)) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+639 6213 m
+gs 1 -1 sc (get_info\(\)) col-1 sh gr
+% Polyline
+7.500 slw
+n 1980 1980 m
+ 3462 1980 l gs col-1 s gr 
+% Polyline
+n 1980 2333 m
+ 3462 2333 l gs col-1 s gr 
+% Polyline
+15.000 slw
+n 1980 1557 m 3462 1557 l 3462 3109 l 1980 3109 l
+ cp gs col-1 s gr 
+/Helvetica-Bold ff 195.00 scf sf
+2192 2192 m
+gs 1 -1 sc (name) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+2121 1839 m
+gs 1 -1 sc (DbDatum) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+2192 2544 m
+gs 1 -1 sc (is_empty\(\)) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+2192 2756 m
+gs 1 -1 sc (insert\(\)) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+2192 2968 m
+gs 1 -1 sc (extract\(\)) col-1 sh gr
+% Polyline
+7.500 slw
+n 3744 4238 m
+ 5860 4238 l gs col-1 s gr 
+% Polyline
+15.000 slw
+n 3744 3885 m 5860 3885 l 5860 5367 l 3744 5367 l
+ cp gs col-1 s gr 
+/Helvetica-Bold ff 195.00 scf sf
+4308 4167 m
+gs 1 -1 sc (Database) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+3814 4520 m
+gs 1 -1 sc (get_class_property\(\)) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+3814 4943 m
+gs 1 -1 sc (get_device_property\(\)) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+4097 5226 m
+gs 1 -1 sc (...................) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+3814 4732 m
+gs 1 -1 sc (get_server_info\(\)) col-1 sh gr
+% Polyline
+7.500 slw
+n 4590 3462 m 4873 3462 l 4732 3179 l
+ 4590 3462 l  cp gs col-1 s gr 
+% Polyline
+n 4732 3462 m
+ 4732 3885 l gs col-1 s gr 
+% Polyline
+n 4732 3179 m
+ 4732 2827 l gs col-1 s gr 
+% Polyline
+15.000 slw
+n 3955 1274 m 5719 1274 l 5719 2827 l 3955 2827 l
+ cp gs col-1 s gr 
+% Polyline
+7.500 slw
+n 3955 1698 m
+ 5719 1698 l gs col-1 s gr 
+/Helvetica-Bold ff 165.00 scf sf
+4026 2192 m
+gs 1 -1 sc (set_timeout\(\)) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+4026 2403 m
+gs 1 -1 sc (get_timeout\(\)) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+4026 1980 m
+gs 1 -1 sc (reconnection\(\)) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+4026 2615 m
+gs 1 -1 sc (command_inout\(\)) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+4238 1557 m
+gs 1 -1 sc (Connection) col-1 sh gr
+% Polyline
+n 357 1980 m
+ 1839 1980 l gs col-1 s gr 
+% Polyline
+n 357 2333 m
+ 1839 2333 l gs col-1 s gr 
+% Polyline
+15.000 slw
+n 357 1557 m 1839 1557 l 1839 3109 l 357 3109 l
+ cp gs col-1 s gr 
+/Helvetica-Bold ff 195.00 scf sf
+569 2192 m
+gs 1 -1 sc (name) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+569 2544 m
+gs 1 -1 sc (is_empty\(\)) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+569 2756 m
+gs 1 -1 sc (insert\(\)) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+569 2968 m
+gs 1 -1 sc (extract\(\)) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+498 1909 m
+gs 1 -1 sc (DbAttribute) col-1 sh gr
+% Polyline
+n 6072 8471 m 7977 8471 l 7977 9459 l 6072 9459 l
+ cp gs col-1 s gr 
+% Polyline
+7.500 slw
+n 6072 8824 m
+ 7977 8824 l gs col-1 s gr 
+/Helvetica-Bold ff 195.00 scf sf
+6143 8753 m
+gs 1 -1 sc (DeviceDataHstory) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+6213 9177 m
+gs 1 -1 sc (getTime\(\)) col-1 sh gr
+% Polyline
+15.000 slw
+n 8118 6848 m 9811 6848 l 9811 7836 l 8118 7836 l
+ cp gs col-1 s gr 
+% Polyline
+7.500 slw
+n 8118 7201 m
+ 9811 7201 l gs col-1 s gr 
+/Helvetica-Bold ff 165.00 scf sf
+8330 7483 m
+gs 1 -1 sc (insert\(\)) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+8330 7695 m
+gs 1 -1 sc (extract\(\)) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+8189 7131 m
+gs 1 -1 sc (DeviceAttribute) col-1 sh gr
+% Polyline
+n 6143 7201 m
+ 7624 7201 l gs col-1 s gr 
+% Polyline
+15.000 slw
+n 6143 6848 m 7624 6848 l 7624 7836 l 6143 7836 l
+ cp gs col-1 s gr 
+/Helvetica-Bold ff 165.00 scf sf
+6354 7483 m
+gs 1 -1 sc (insert\(\)) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+6354 7695 m
+gs 1 -1 sc (extract\(\)) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+6284 7131 m
+gs 1 -1 sc (DeviceData) col-1 sh gr
+% Polyline
+7.500 slw
+n 4590 7201 m 4873 7201 l 4732 6919 l
+ 4590 7201 l  cp gs col-1 s gr 
+% Polyline
+n 4732 7201 m
+ 4732 7624 l gs col-1 s gr 
+% Polyline
+n 4732 6919 m
+ 4732 6566 l gs col-1 s gr 
+% Polyline
+15.000 slw
+n 3814 7624 m 5860 7624 l 5860 9529 l 3814 9529 l
+ cp gs col-1 s gr 
+% Polyline
+7.500 slw
+n 3814 8048 m
+ 5860 8048 l gs col-1 s gr 
+% Polyline
+n 3814 8471 m
+ 5860 8471 l gs col-1 s gr 
+% Polyline
+n 3673 8824 m 3532 8965 l 3673 9106 l 3814 8965 l
+ 3673 8824 l  cp gs col-1 s gr 
+/Helvetica-Bold ff 195.00 scf sf
+4520 8330 m
+gs 1 -1 sc (name) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+4097 7907 m
+gs 1 -1 sc (DeviceProxy) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+3885 8683 m
+gs 1 -1 sc (ping\(\)) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+3885 8894 m
+gs 1 -1 sc (command_list_query\(\)) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+3885 9106 m
+gs 1 -1 sc (info\(\)) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+3885 9318 m
+gs 1 -1 sc (...........................) col-1 sh gr
+% Polyline
+n 4590 10126 m 4873 10126 l 4732 9844 l
+ 4590 10126 l  cp gs col-1 s gr 
+% Polyline
+n 4732 10126 m
+ 4732 10549 l gs col-1 s gr 
+% Polyline
+n 4732 9844 m
+ 4732 9491 l gs col-1 s gr 
+% Polyline
+15.000 slw
+n 3814 10549 m 5860 10549 l 5860 12454 l 3814 12454 l
+ cp gs col-1 s gr 
+% Polyline
+7.500 slw
+n 3814 10950 m
+ 5860 10950 l gs col-1 s gr 
+% Polyline
+n 3814 11325 m
+ 5860 11325 l gs col-1 s gr 
+/Helvetica-Bold ff 165.00 scf sf
+3900 12300 m
+gs 1 -1 sc (...........................) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+3900 12150 m
+gs 1 -1 sc (info\(\)) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+4500 11175 m
+gs 1 -1 sc (name) col-1 sh gr
+/Helvetica-Bold ff 165.00 scf sf
+3900 11550 m
+gs 1 -1 sc (ping\(\)) col-1 sh gr
+% Polyline
+n 2192 7413 m 2051 7554 l 2192 7695 l 2333 7554 l
+ 2192 7413 l  cp gs col-1 s gr 
+% Polyline
+n 2192 5649 m 2051 5790 l 2192 5931 l 2333 5790 l
+ 2192 5649 l  cp gs col-1 s gr 
+% Polyline
+n 2192 3885 m 2051 4026 l 2192 4167 l 2333 4026 l
+ 2192 3885 l  cp gs col-1 s gr 
+% Polyline
+n 2333 4026 m 2897 4026 l 2897 7554 l
+ 2333 7554 l gs col-1 s gr 
+% Polyline
+n 2333 5790 m
+ 2897 5790 l gs col-1 s gr 
+% Polyline
+n 2897 4026 m
+ 3744 4026 l gs col-1 s gr 
+% Polyline
+gs  clippath
+5845 4561 m 5845 4621 l 5997 4621 l 5877 4591 l 5997 4561 l cp
+eoclip
+n 6495 5084 m 6213 5084 l 6213 4591 l
+ 5860 4591 l gs col-1 s gr gr
+
+% arrowhead
+n 5997 4561 m 5877 4591 l 5997 4621 l  col-1 s
+% Polyline
+15.000 slw
+n 6495 4732 m 8400 4732 l 8400 5719 l 6495 5719 l
+ cp gs col-1 s gr 
+% Polyline
+7.500 slw
+n 6495 5084 m
+ 8400 5084 l gs col-1 s gr 
+% Polyline
+n 4732 6566 m 8824 6566 l 8824 3109 l
+ 4732 3109 l gs col-1 s gr 
+% Polyline
+n 3532 8965 m 1063 8965 l
+ 1063 8401 l gs col-1 s gr 
+% Polyline
+n 8118 8894 m 7977 9036 l 8118 9177 l 8259 9036 l
+ 8118 8894 l  cp gs col-1 s gr 
+% Polyline
+n 8259 9036 m 8965 9036 l
+ 8965 7836 l gs col-1 s gr 
+% Polyline
+n 6707 8259 m 6989 8259 l 6848 7977 l
+ 6707 8259 l  cp gs col-1 s gr 
+% Polyline
+n 6848 7977 m
+ 6848 7836 l gs col-1 s gr 
+% Polyline
+n 6848 8259 m
+ 6848 8471 l gs col-1 s gr 
+/Helvetica-Bold ff 165.00 scf sf
+6002 4449 m
+gs 1 -1 sc (i...n) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+6566 5578 m
+gs 1 -1 sc (Database Objects) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+6707 5367 m
+gs 1 -1 sc (Static Vector of) col-1 sh gr
+/Helvetica-Bold ff 195.00 scf sf
+7130 5014 m
+gs 1 -1 sc (ApiUtil) col-1 sh gr
+$F2psEnd
+rs
diff --git a/doc/src/layouts/Tango_book.cls b/doc/src/layouts/Tango_book.cls
new file mode 100644
index 0000000..60a0c9d
--- /dev/null
+++ b/doc/src/layouts/Tango_book.cls
@@ -0,0 +1,750 @@
+%%
+%% This is file `book.cls',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% classes.dtx  (with options: `book')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%% 
+%% This file was generated from file(s) of the LaTeX base system.
+%% --------------------------------------------------------------
+%% 
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.2
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%    http://www.latex-project.org/lppl.txt
+%% and version 1.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%% 
+%% This file may only be distributed together with a copy of the LaTeX
+%% base system. You may however distribute the LaTeX base system without
+%% such generated files.
+%% 
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%% 
+%% \CharacterTable
+%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%%   Digits        \0\1\2\3\4\5\6\7\8\9
+%%   Exclamation   \!     Double quote  \"     Hash (number) \#
+%%   Dollar        \$     Percent       \%     Ampersand     \&
+%%   Acute accent  \'     Left paren    \(     Right paren   \)
+%%   Asterisk      \*     Plus          \+     Comma         \,
+%%   Minus         \-     Point         \.     Solidus       \/
+%%   Colon         \:     Semicolon     \;     Less than     \<
+%%   Equals        \=     Greater than  \>     Question mark \?
+%%   Commercial at \@     Left bracket  \[     Backslash     \\
+%%   Right bracket \]     Circumflex    \^     Underscore    \_
+%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
+%%   Right brace   \}     Tilde         \~}
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesClass{Tango_book}
+              [2001/04/21 v1.4e
+ Standard LaTeX document class]
+\newcommand\@ptsize{}
+\newif\if at restonecol
+\newif\if at titlepage
+\@titlepagetrue
+\newif\if at openright
+\newif\if at mainmatter \@mainmattertrue
+\if at compatibility\else
+\DeclareOption{a4paper}
+   {\setlength\paperheight {297mm}%
+    \setlength\paperwidth  {210mm}}
+\DeclareOption{a5paper}
+   {\setlength\paperheight {210mm}%
+    \setlength\paperwidth  {148mm}}
+\DeclareOption{b5paper}
+   {\setlength\paperheight {250mm}%
+    \setlength\paperwidth  {176mm}}
+\DeclareOption{letterpaper}
+   {\setlength\paperheight {11in}%
+    \setlength\paperwidth  {8.5in}}
+\DeclareOption{legalpaper}
+   {\setlength\paperheight {14in}%
+    \setlength\paperwidth  {8.5in}}
+\DeclareOption{executivepaper}
+   {\setlength\paperheight {10.5in}%
+    \setlength\paperwidth  {7.25in}}
+\DeclareOption{landscape}
+   {\setlength\@tempdima   {\paperheight}%
+    \setlength\paperheight {\paperwidth}%
+    \setlength\paperwidth  {\@tempdima}}
+\fi
+\if at compatibility
+  \renewcommand\@ptsize{0}
+\else
+\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
+\fi
+\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
+\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
+\if at compatibility\else
+\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
+\fi
+\DeclareOption{twoside}{\@twosidetrue  \@mparswitchtrue}
+\DeclareOption{draft}{\setlength\overfullrule{5pt}}
+\if at compatibility\else
+\DeclareOption{final}{\setlength\overfullrule{0pt}}
+\fi
+\DeclareOption{titlepage}{\@titlepagetrue}
+\if at compatibility\else
+\DeclareOption{notitlepage}{\@titlepagefalse}
+\fi
+\if at compatibility
+\@openrighttrue
+\else
+\DeclareOption{openright}{\@openrighttrue}
+\DeclareOption{openany}{\@openrightfalse}
+\fi
+\if at compatibility\else
+\DeclareOption{onecolumn}{\@twocolumnfalse}
+\fi
+\DeclareOption{twocolumn}{\@twocolumntrue}
+\DeclareOption{leqno}{\input{leqno.clo}}
+\DeclareOption{fleqn}{\input{fleqn.clo}}
+\DeclareOption{openbib}{%
+  \AtEndOfPackage{%
+   \renewcommand\@openbib at code{%
+      \advance\leftmargin\bibindent
+      \itemindent -\bibindent
+      \listparindent \itemindent
+      \parsep \z@
+      }%
+   \renewcommand\newblock{\par}}%
+}
+\ExecuteOptions{letterpaper,10pt,twoside,onecolumn,final,openright}
+\ProcessOptions
+\input{bk1\@ptsize.clo}
+\setlength\lineskip{1\p@}
+\setlength\normallineskip{1\p@}
+\renewcommand\baselinestretch{}
+\setlength\parskip{0\p@ \@plus \p@}
+\@lowpenalty   51
+\@medpenalty  151
+\@highpenalty 301
+\setcounter{topnumber}{2}
+\renewcommand\topfraction{.7}
+\setcounter{bottomnumber}{1}
+\renewcommand\bottomfraction{.3}
+\setcounter{totalnumber}{3}
+\renewcommand\textfraction{.2}
+\renewcommand\floatpagefraction{.5}
+\setcounter{dbltopnumber}{2}
+\renewcommand\dbltopfraction{.7}
+\renewcommand\dblfloatpagefraction{.5}
+\if at twoside
+  \def\ps at headings{%
+      \let\@oddfoot\@empty\let\@evenfoot\@empty
+      \def\@evenhead{\thepage\hfil\slshape\leftmark}%
+      \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+      \let\@mkboth\markboth
+    \def\chaptermark##1{%
+      \markboth {\MakeUppercase{%
+        \ifnum \c at secnumdepth >\m at ne
+          \if at mainmatter
+            \@chapapp\ \thechapter. \ %
+          \fi
+        \fi
+        ##1}}{}}%
+    \def\sectionmark##1{%
+      \markright {\MakeUppercase{%
+        \ifnum \c at secnumdepth >\z@
+          \thesection. \ %
+        \fi
+        ##1}}}}
+\else
+  \def\ps at headings{%
+    \let\@oddfoot\@empty
+    \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+    \let\@mkboth\markboth
+    \def\chaptermark##1{%
+      \markright {\MakeUppercase{%
+        \ifnum \c at secnumdepth >\m at ne
+          \if at mainmatter
+            \@chapapp\ \thechapter. \ %
+          \fi
+        \fi
+        ##1}}}}
+\fi
+\def\ps at myheadings{%
+    \let\@oddfoot\@empty\let\@evenfoot\@empty
+    \def\@evenhead{\thepage\hfil\slshape\leftmark}%
+    \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+    \let\@mkboth\@gobbletwo
+    \let\chaptermark\@gobble
+    \let\sectionmark\@gobble
+    }
+  \if at titlepage
+  \newcommand\maketitle{\begin{titlepage}%
+  \let\footnotesize\small
+  \let\footnoterule\relax
+  \let \footnote \thanks
+  \null\vfil
+  \vskip 60\p@
+  \begin{center}%
+    {\LARGE \@title \par}%
+    \vskip 3em%
+    {\large
+     \lineskip .75em%
+      \begin{tabular}[t]{c}%
+        \@author
+      \end{tabular}\par}%
+      \vskip 1.5em%
+    {\large \@date \par}%       % Set date in \large size.
+  \end{center}\par
+  \@thanks
+  \vfil\null
+  \end{titlepage}%
+  \setcounter{footnote}{0}%
+  \global\let\thanks\relax
+  \global\let\maketitle\relax
+  \global\let\@thanks\@empty
+  \global\let\@author\@empty
+  \global\let\@date\@empty
+  \global\let\@title\@empty
+  \global\let\title\relax
+  \global\let\author\relax
+  \global\let\date\relax
+  \global\let\and\relax
+}
+\else
+\newcommand\maketitle{\par
+  \begingroup
+    \renewcommand\thefootnote{\@fnsymbol\c at footnote}%
+    \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
+    \long\def\@makefntext##1{\parindent 1em\noindent
+            \hb at xt@1.8em{%
+                \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
+    \if at twocolumn
+      \ifnum \col at number=\@ne
+        \@maketitle
+      \else
+        \twocolumn[\@maketitle]%
+      \fi
+    \else
+      \newpage
+      \global\@topnum\z@   % Prevents figures from going at top of page.
+      \@maketitle
+    \fi
+    \thispagestyle{plain}\@thanks
+  \endgroup
+  \setcounter{footnote}{0}%
+  \global\let\thanks\relax
+  \global\let\maketitle\relax
+  \global\let\@maketitle\relax
+  \global\let\@thanks\@empty
+  \global\let\@author\@empty
+  \global\let\@date\@empty
+  \global\let\@title\@empty
+  \global\let\title\relax
+  \global\let\author\relax
+  \global\let\date\relax
+  \global\let\and\relax
+}
+\def\@maketitle{%
+  \newpage
+  \null
+  \vskip 2em%
+  \begin{center}%
+  \let \footnote \thanks
+    {\LARGE \@title \par}%
+    \vskip 1.5em%
+    {\large
+      \lineskip .5em%
+      \begin{tabular}[t]{c}%
+        \@author
+      \end{tabular}\par}%
+    \vskip 1em%
+    {\large \@date}%
+  \end{center}%
+  \par
+  \vskip 1.5em}
+\fi
+\newcommand*\chaptermark[1]{}
+\setcounter{secnumdepth}{4}
+\newcounter {part}
+\newcounter {chapter}
+\newcounter {section}[chapter]
+\newcounter {subsection}[section]
+\newcounter {subsubsection}[subsection]
+\newcounter {paragraph}[subsubsection]
+\newcounter {subparagraph}[paragraph]
+\renewcommand \thepart {\@Roman\c at part}
+\renewcommand \thechapter {\@arabic\c at chapter}
+\renewcommand \thesection {\thechapter.\@arabic\c at section}
+\renewcommand\thesubsection   {\thesection.\@arabic\c at subsection}
+\renewcommand\thesubsubsection{\thesubsection .\@arabic\c at subsubsection}
+\renewcommand\theparagraph    {\thesubsubsection.\@arabic\c at paragraph}
+\renewcommand\thesubparagraph {\theparagraph.\@arabic\c at subparagraph}
+\newcommand\@chapapp{\chaptername}
+\newcommand\frontmatter{%
+    \cleardoublepage
+  \@mainmatterfalse
+  \pagenumbering{roman}}
+\newcommand\mainmatter{%
+    \cleardoublepage
+  \@mainmattertrue
+  \pagenumbering{arabic}}
+\newcommand\backmatter{%
+  \if at openright
+    \cleardoublepage
+  \else
+    \clearpage
+  \fi
+  \@mainmatterfalse}
+\newcommand\part{%
+  \if at openright
+    \cleardoublepage
+  \else
+    \clearpage
+  \fi
+  \thispagestyle{plain}%
+  \if at twocolumn
+    \onecolumn
+    \@tempswatrue
+  \else
+    \@tempswafalse
+  \fi
+  \null\vfil
+  \secdef\@part\@spart}
+
+\def\@part[#1]#2{%
+    \ifnum \c at secnumdepth >-2\relax
+      \refstepcounter{part}%
+      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
+    \else
+      \addcontentsline{toc}{part}{#1}%
+    \fi
+    \markboth{}{}%
+    {\centering
+     \interlinepenalty \@M
+     \normalfont
+     \ifnum \c at secnumdepth >-2\relax
+       \huge\bfseries \partname\nobreakspace\thepart
+       \par
+       \vskip 20\p@
+     \fi
+     \Huge \bfseries #2\par}%
+    \@endpart}
+\def\@spart#1{%
+    {\centering
+     \interlinepenalty \@M
+     \normalfont
+     \Huge \bfseries #1\par}%
+    \@endpart}
+\def\@endpart{\vfil\newpage
+              \if at twoside
+               \if at openright
+                \null
+                \thispagestyle{empty}%
+                \newpage
+               \fi
+              \fi
+              \if at tempswa
+                \twocolumn
+              \fi}
+\newcommand\chapter{\if at openright\cleardoublepage\else\clearpage\fi
+                    \thispagestyle{plain}%
+                    \global\@topnum\z@
+                    \@afterindentfalse
+                    \secdef\@chapter\@schapter}
+\def\@chapter[#1]#2{\ifnum \c at secnumdepth >\m at ne
+                       \if at mainmatter
+                         \refstepcounter{chapter}%
+                         \typeout{\@chapapp\space\thechapter.}%
+                         \addcontentsline{toc}{chapter}%
+                                   {\protect\numberline{\thechapter}#1}%
+                       \else
+                         \addcontentsline{toc}{chapter}{#1}%
+                       \fi
+                    \else
+                      \addcontentsline{toc}{chapter}{#1}%
+                    \fi
+                    \chaptermark{#1}%
+                    \addtocontents{lof}{\protect\addvspace{10\p@}}%
+                    \addtocontents{lot}{\protect\addvspace{10\p@}}%
+                    \if at twocolumn
+                      \@topnewpage[\@makechapterhead{#2}]%
+                    \else
+                      \@makechapterhead{#2}%
+                      \@afterheading
+                    \fi}
+\def\@makechapterhead#1{%
+  \vspace*{50\p@}%
+  {\parindent \z@ \raggedright \normalfont
+    \ifnum \c at secnumdepth >\m at ne
+      \if at mainmatter
+        \huge\bfseries \@chapapp\space \thechapter
+        \par\nobreak
+        \vskip 20\p@
+      \fi
+    \fi
+    \interlinepenalty\@M
+    \Huge \bfseries #1\par\nobreak
+    \vskip 40\p@
+  }}
+\def\@schapter#1{\if at twocolumn
+                   \@topnewpage[\@makeschapterhead{#1}]%
+                 \else
+                   \@makeschapterhead{#1}%
+                   \@afterheading
+                 \fi}
+\def\@makeschapterhead#1{%
+  \vspace*{50\p@}%
+  {\parindent \z@ \raggedright
+    \normalfont
+    \interlinepenalty\@M
+    \Huge \bfseries  #1\par\nobreak
+    \vskip 40\p@
+  }}
+\newcommand\section{\@startsection {section}{1}{\z@}%
+                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
+                                   {2.3ex \@plus.2ex}%
+                                   {\normalfont\Large\bfseries}}
+\newcommand\subsection{\@startsection{subsection}{2}{\z@}%
+                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
+                                     {1.5ex \@plus .2ex}%
+                                     {\normalfont\large\bfseries}}
+\newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
+                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
+                                     {1.5ex \@plus .2ex}%
+                                     {\normalfont\normalsize\bfseries}}
+\newcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
+                                    {3.25ex \@plus1ex \@minus.2ex}%
+                                    {-1em}%
+                                    {\normalfont\normalsize\bfseries}}
+\newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
+                                       {3.25ex \@plus1ex \@minus .2ex}%
+                                       {-1em}%
+                                      {\normalfont\normalsize\bfseries}}
+\if at twocolumn
+  \setlength\leftmargini  {2em}
+\else
+  \setlength\leftmargini  {2.5em}
+\fi
+\leftmargin  \leftmargini
+\setlength\leftmarginii  {2.2em}
+\setlength\leftmarginiii {1.87em}
+\setlength\leftmarginiv  {1.7em}
+\if at twocolumn
+  \setlength\leftmarginv  {.5em}
+  \setlength\leftmarginvi {.5em}
+\else
+  \setlength\leftmarginv  {1em}
+  \setlength\leftmarginvi {1em}
+\fi
+\setlength  \labelsep  {.5em}
+\setlength  \labelwidth{\leftmargini}
+\addtolength\labelwidth{-\labelsep}
+\@beginparpenalty -\@lowpenalty
+\@endparpenalty   -\@lowpenalty
+\@itempenalty     -\@lowpenalty
+\renewcommand\theenumi{\@arabic\c at enumi}
+\renewcommand\theenumii{\@alph\c at enumii}
+\renewcommand\theenumiii{\@roman\c at enumiii}
+\renewcommand\theenumiv{\@Alph\c at enumiv}
+\newcommand\labelenumi{\theenumi.}
+\newcommand\labelenumii{(\theenumii)}
+\newcommand\labelenumiii{\theenumiii.}
+\newcommand\labelenumiv{\theenumiv.}
+\renewcommand\p at enumii{\theenumi}
+\renewcommand\p at enumiii{\theenumi(\theenumii)}
+\renewcommand\p at enumiv{\p at enumiii\theenumiii}
+\newcommand\labelitemi{\textbullet}
+\newcommand\labelitemii{\normalfont\bfseries \textendash}
+\newcommand\labelitemiii{\textasteriskcentered}
+\newcommand\labelitemiv{\textperiodcentered}
+\newenvironment{description}
+               {\list{}{\labelwidth\z@ \itemindent-\leftmargin
+                        \let\makelabel\descriptionlabel}}
+               {\endlist}
+\newcommand*\descriptionlabel[1]{\hspace\labelsep
+                                \normalfont\bfseries #1}
+\newenvironment{verse}
+               {\let\\\@centercr
+                \list{}{\itemsep      \z@
+                        \itemindent   -1.5em%
+                        \listparindent\itemindent
+                        \rightmargin  \leftmargin
+                        \advance\leftmargin 1.5em}%
+                \item\relax}
+               {\endlist}
+\newenvironment{quotation}
+               {\list{}{\listparindent 1.5em%
+                        \itemindent    \listparindent
+                        \rightmargin   \leftmargin
+                        \parsep        \z@ \@plus\p@}%
+                \item\relax}
+               {\endlist}
+\newenvironment{quote}
+               {\list{}{\rightmargin\leftmargin}%
+                \item\relax}
+               {\endlist}
+\if at compatibility
+\newenvironment{titlepage}
+    {%
+      \cleardoublepage
+      \if at twocolumn
+        \@restonecoltrue\onecolumn
+      \else
+        \@restonecolfalse\newpage
+      \fi
+      \thispagestyle{empty}%
+      \setcounter{page}\z@
+    }%
+    {\if at restonecol\twocolumn \else \newpage \fi
+    }
+\else
+\newenvironment{titlepage}
+    {%
+      \cleardoublepage
+      \if at twocolumn
+        \@restonecoltrue\onecolumn
+      \else
+        \@restonecolfalse\newpage
+      \fi
+      \thispagestyle{empty}%
+      \setcounter{page}\@ne
+    }%
+    {\if at restonecol\twocolumn \else \newpage \fi
+     \if at twoside\else
+        \setcounter{page}\@ne
+     \fi
+    }
+\fi
+\newcommand\appendix{\par
+  \setcounter{chapter}{0}%
+  \setcounter{section}{0}%
+  \gdef\@chapapp{\appendixname}%
+  \gdef\thechapter{\@Alph\c at chapter}}
+\setlength\arraycolsep{5\p@}
+\setlength\tabcolsep{6\p@}
+\setlength\arrayrulewidth{.4\p@}
+\setlength\doublerulesep{2\p@}
+\setlength\tabbingsep{\labelsep}
+\skip\@mpfootins = \skip\footins
+\setlength\fboxsep{3\p@}
+\setlength\fboxrule{.4\p@}
+\@addtoreset {equation}{chapter}
+\renewcommand\theequation
+  {\ifnum \c at chapter>\z@ \thechapter.\fi \@arabic\c at equation}
+\newcounter{figure}[chapter]
+\renewcommand \thefigure
+     {\ifnum \c at chapter>\z@ \thechapter.\fi \@arabic\c at figure}
+\def\fps at figure{tbp}
+\def\ftype at figure{1}
+\def\ext at figure{lof}
+\def\fnum at figure{\figurename\nobreakspace\thefigure}
+\newenvironment{figure}
+               {\@float{figure}}
+               {\end at float}
+\newenvironment{figure*}
+               {\@dblfloat{figure}}
+               {\end at dblfloat}
+\newcounter{table}[chapter]
+\renewcommand \thetable
+     {\ifnum \c at chapter>\z@ \thechapter.\fi \@arabic\c at table}
+\def\fps at table{tbp}
+\def\ftype at table{2}
+\def\ext at table{lot}
+\def\fnum at table{\tablename\nobreakspace\thetable}
+\newenvironment{table}
+               {\@float{table}}
+               {\end at float}
+\newenvironment{table*}
+               {\@dblfloat{table}}
+               {\end at dblfloat}
+\newlength\abovecaptionskip
+\newlength\belowcaptionskip
+\setlength\abovecaptionskip{10\p@}
+\setlength\belowcaptionskip{0\p@}
+\long\def\@makecaption#1#2{%
+  \vskip\abovecaptionskip
+  \sbox\@tempboxa{#1: #2}%
+  \ifdim \wd\@tempboxa >\hsize
+    #1: #2\par
+  \else
+    \global \@minipagefalse
+    \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
+  \fi
+  \vskip\belowcaptionskip}
+\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
+\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
+\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
+\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
+\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
+\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
+\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
+\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
+\newcommand\@pnumwidth{1.55em}
+\newcommand\@tocrmarg{2.55em}
+\newcommand\@dotsep{4.5}
+\setcounter{tocdepth}{4}
+\newcommand\tableofcontents{%
+    \if at twocolumn
+      \@restonecoltrue\onecolumn
+    \else
+      \@restonecolfalse
+    \fi
+    \chapter*{\contentsname
+        \@mkboth{%
+           \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
+    \@starttoc{toc}%
+    \if at restonecol\twocolumn\fi
+    }
+\newcommand*\l at part[2]{%
+  \ifnum \c at tocdepth >-2\relax
+    \addpenalty{-\@highpenalty}%
+    \addvspace{2.25em \@plus\p@}%
+    \setlength\@tempdima{3em}%
+    \begingroup
+      \parindent \z@ \rightskip \@pnumwidth
+      \parfillskip -\@pnumwidth
+      {\leavevmode
+       \large \bfseries #1\hfil \hb at xt@\@pnumwidth{\hss #2}}\par
+       \nobreak
+         \global\@nobreaktrue
+         \everypar{\global\@nobreakfalse\everypar{}}%
+    \endgroup
+  \fi}
+\newcommand*\l at chapter[2]{%
+  \ifnum \c at tocdepth >\m at ne
+    \addpenalty{-\@highpenalty}%
+    \vskip 1.0em \@plus\p@
+    \setlength\@tempdima{1.5em}%
+    \begingroup
+      \parindent \z@ \rightskip \@pnumwidth
+      \parfillskip -\@pnumwidth
+      \leavevmode \bfseries
+      \advance\leftskip\@tempdima
+      \hskip -\leftskip
+      #1\nobreak\hfil \nobreak\hb at xt@\@pnumwidth{\hss #2}\par
+      \penalty\@highpenalty
+    \endgroup
+  \fi}
+\newcommand*\l at section{\@dottedtocline{1}{1.5em}{2.3em}}
+\newcommand*\l at subsection{\@dottedtocline{2}{3.8em}{3.2em}}
+\newcommand*\l at subsubsection{\@dottedtocline{3}{7.0em}{4.1em}}
+\newcommand*\l at paragraph{\@dottedtocline{4}{10em}{5em}}
+\newcommand*\l at subparagraph{\@dottedtocline{5}{12em}{6em}}
+\newcommand\listoffigures{%
+    \if at twocolumn
+      \@restonecoltrue\onecolumn
+    \else
+      \@restonecolfalse
+    \fi
+    \chapter*{\listfigurename}%
+      \@mkboth{\MakeUppercase\listfigurename}%
+              {\MakeUppercase\listfigurename}%
+    \@starttoc{lof}%
+    \if at restonecol\twocolumn\fi
+    }
+\newcommand*\l at figure{\@dottedtocline{1}{1.5em}{2.3em}}
+\newcommand\listoftables{%
+    \if at twocolumn
+      \@restonecoltrue\onecolumn
+    \else
+      \@restonecolfalse
+    \fi
+    \chapter*{\listtablename}%
+      \@mkboth{%
+          \MakeUppercase\listtablename}%
+         {\MakeUppercase\listtablename}%
+    \@starttoc{lot}%
+    \if at restonecol\twocolumn\fi
+    }
+\let\l at table\l at figure
+\newdimen\bibindent
+\setlength\bibindent{1.5em}
+\newenvironment{thebibliography}[1]
+     {\chapter*{\bibname}%
+      \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
+      \list{\@biblabel{\@arabic\c at enumiv}}%
+           {\settowidth\labelwidth{\@biblabel{#1}}%
+            \leftmargin\labelwidth
+            \advance\leftmargin\labelsep
+            \@openbib at code
+            \usecounter{enumiv}%
+            \let\p at enumiv\@empty
+            \renewcommand\theenumiv{\@arabic\c at enumiv}}%
+      \sloppy
+      \clubpenalty4000
+      \@clubpenalty \clubpenalty
+      \widowpenalty4000%
+      \sfcode`\.\@m}
+     {\def\@noitemerr
+       {\@latex at warning{Empty `thebibliography' environment}}%
+      \endlist}
+\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em}
+\let\@openbib at code\@empty
+\newenvironment{theindex}
+               {\if at twocolumn
+                  \@restonecolfalse
+                \else
+                  \@restonecoltrue
+                \fi
+                \columnseprule \z@
+                \columnsep 35\p@
+                \twocolumn[\@makeschapterhead{\indexname}]%
+                \@mkboth{\MakeUppercase\indexname}%
+                        {\MakeUppercase\indexname}%
+                \thispagestyle{plain}\parindent\z@
+                \parskip\z@ \@plus .3\p@\relax
+                \let\item\@idxitem}
+               {\if at restonecol\onecolumn\else\clearpage\fi}
+\newcommand\@idxitem{\par\hangindent 40\p@}
+\newcommand\subitem{\@idxitem \hspace*{20\p@}}
+\newcommand\subsubitem{\@idxitem \hspace*{30\p@}}
+\newcommand\subsubsubitem{\@idxitem \hspace*{40\p@}}
+\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
+\renewcommand\footnoterule{%
+  \kern-3\p@
+  \hrule\@width.4\columnwidth
+  \kern2.6\p@}
+\@addtoreset{footnote}{chapter}
+\newcommand\@makefntext[1]{%
+    \parindent 1em%
+    \noindent
+    \hb at xt@1.8em{\hss\@makefnmark}#1}
+\newcommand\contentsname{Contents}
+\newcommand\listfigurename{List of Figures}
+\newcommand\listtablename{List of Tables}
+\newcommand\bibname{Bibliography}
+\newcommand\indexname{Index}
+\newcommand\figurename{Figure}
+\newcommand\tablename{Table}
+\newcommand\partname{Part}
+\newcommand\chaptername{Chapter}
+\newcommand\appendixname{Appendix}
+\def\today{\ifcase\month\or
+  January\or February\or March\or April\or May\or June\or
+  July\or August\or September\or October\or November\or December\fi
+  \space\number\day, \number\year}
+\setlength\columnsep{10\p@}
+\setlength\columnseprule{0\p@}
+\pagestyle{headings}
+\pagenumbering{arabic}
+\if at twoside
+\else
+  \raggedbottom
+\fi
+\if at twocolumn
+  \twocolumn
+  \sloppy
+  \flushbottom
+\else
+  \onecolumn
+\fi
+\endinput
+%%
+%% End of file `book.cls'.
diff --git a/doc/src/layouts/Tango_book.layout b/doc/src/layouts/Tango_book.layout
new file mode 100644
index 0000000..5c8c721
--- /dev/null
+++ b/doc/src/layouts/Tango_book.layout
@@ -0,0 +1,30 @@
+#% Do not delete the line below; configure depends on this
+#  \DeclareLaTeXClass{Tango_book}
+# Book textclass definition file. Taken from initial LyX source code
+# Author : Matthias Ettrich <ettrich at informatik.uni-tuebingen.de>
+# Transposed by Pascal André <andre at via.ecp.fr>
+# Heavily modifed and enhanced by serveral developers.
+
+# Input general definitions
+Input stdclass.inc
+
+# Global parameters.
+Sides		2
+PageStyle	Headings
+MaxCounter	Counter_Subsubsubsection
+
+# There is no abstract environment in book.cls
+NoStyle	Abstract
+	
+# a few changes to the bibliography
+Style Bibliography
+  TopSep		4
+  LabelString		Bibliography
+  # label font definition
+  LabelFont 
+    Series		Bold
+    Size		Huge
+  EndFont
+End
+
+
diff --git a/doc/src/layouts/stdsections.inc b/doc/src/layouts/stdsections.inc
new file mode 100644
index 0000000..0452ea0
--- /dev/null
+++ b/doc/src/layouts/stdsections.inc
@@ -0,0 +1,180 @@
+# Standard textclass definition file. Taken from initial LyX source code
+# Author : Matthias Ettrich <ettrich at informatik.uni-tuebingen.de>
+# Transposed by Pascal André <andre at via.ecp.fr>
+# Heavily modifed and enhanced by several developers.
+
+# This include files contains all numbered sectionning-related
+# commands that are useful for article-like document classes, but not
+# for letters.
+
+# Part style definition
+Style Part
+  Margin		Dynamic
+  LatexType		Command
+  LatexName		part
+  NeedProtect		1
+  NextNoIndent          1
+  Labelsep		xxx
+  ParSkip               0.4
+  TopSep                4
+  BottomSep             4
+  ParSep                0.8
+  Align			Center         
+  Alignpossible         Center
+  LabelType             Static
+  LabelString		"Part #"
+
+  # standard font definition
+  Font 
+    Series              Bold
+    Size                Huge
+  EndFont
+
+End
+  
+
+# Chapter style definition
+Style Chapter
+  Margin                Static
+  LatexType             Command
+  LatexName             chapter
+  NeedProtect		1
+  NextNoIndent          1
+  ParSkip               0.4
+  TopSep                4
+  BottomSep             0.8
+  ParSep                0.8
+  Align                 Block
+  AlignPossible         Block, Left
+  LabelType             Counter_Chapter
+  LabelString		"Chapter "
+  LabelStringAppendix   "Appendix "
+
+  # standard font definition
+  Font 
+    Series              Bold
+    Size                Huge
+  EndFont
+
+End
+
+# Section style definition
+Style Section
+  Margin		Dynamic
+  LatexType		Command
+  LatexName		section
+  NeedProtect		1
+  NextNoIndent		1
+  LabelSep		xxx
+  ParSkip		0.4
+  TopSep		1.3
+  BottomSep		0.7
+  ParSep		0.7
+  Align			Block
+  AlignPossible		Block, Left
+  LabelType		Counter_Section
+
+  # standard font definition
+  Font 
+    Series 		Bold
+    Size		Larger
+  EndFont
+
+End
+
+# Subsection style definition
+Style Subsection
+  Margin		Dynamic
+  LatexType		Command
+  LatexName		subsection
+  NeedProtect		1
+  NextNoIndent		1
+  LabelSep		xxx
+  ParSkip		0.4
+  TopSep		0.9
+  BottomSep		0.5
+  ParSep		0.5
+  Align			Block
+  AlignPossible		Block, Left
+  LabelType		Counter_Subsection
+
+  # standard font definition
+  Font 
+    Series 		Bold
+    Size		Large
+  EndFont
+
+End
+
+# Subsubsection style definition
+Style Subsubsection
+  Margin		Dynamic
+  LatexType		Command
+  LatexName		subsubsection
+  NeedProtect		1
+  NextNoIndent		1
+  LabelSep		xxx
+  ParSkip		0.4
+  TopSep		0.7
+  BottomSep		0.4
+  ParSep		0.4
+  Align			Block
+  AlignPossible		Block, Left
+  LabelType		Counter_Subsubsection
+
+  # standard font definition
+  Font 
+    Series 		Bold
+    Size		Normal
+  EndFont
+
+End
+
+# Paragraph style definition
+Style Paragraph
+  Margin		Dynamic
+  LatexType		Command
+  LatexName		paragraph
+  NeedProtect		1
+  NextNoIndent		1
+  LabelSep		xxx
+  ParSkip		0.4
+  TopSep		0.4
+  BottomSep		0
+  ParSep		0.4
+  Align			Block
+  AlignPossible		Block, Left
+  LabelType		Counter_Paragraph
+
+  # standard font definition
+  Font 
+    Series 		Bold
+    Size		Normal
+  EndFont
+
+End
+
+# Subparagraph style definition
+Style Subparagraph
+  Margin		Dynamic
+  LatexType		Command
+  LatexName		subparagraph
+  NeedProtect		1
+  NextNoIndent		0
+  LeftMargin		MM
+  LabelSep		xxx
+  ParSkip		0.4
+  TopSep		0.4
+  BottomSep		0
+  ParSep		0.4
+  Align			Block
+  AlignPossible		Block, Left
+  LabelType		Counter_SubParagraph
+
+  # standard font definition
+  Font 
+    Series 		Bold
+    Size		Normal
+  EndFont
+
+End
diff --git a/doc/src/layouts/styFiles.lst b/doc/src/layouts/styFiles.lst
new file mode 100644
index 0000000..ffa2a85
--- /dev/null
+++ b/doc/src/layouts/styFiles.lst
@@ -0,0 +1,601 @@
+/usr/share/texmf/tex/generic/babel/athnum.sty
+/usr/share/texmf/tex/generic/babel/austrian.sty
+/usr/share/texmf/tex/generic/babel/babel.sty
+/usr/share/texmf/tex/generic/babel/bahasa.sty
+/usr/share/texmf/tex/generic/babel/basque.sty
+/usr/share/texmf/tex/generic/babel/breton.sty
+/usr/share/texmf/tex/generic/babel/bulgarian.sty
+/usr/share/texmf/tex/generic/babel/catalan.sty
+/usr/share/texmf/tex/generic/babel/croatian.sty
+/usr/share/texmf/tex/generic/babel/czech.sty
+/usr/share/texmf/tex/generic/babel/danish.sty
+/usr/share/texmf/tex/generic/babel/dutch.sty
+/usr/share/texmf/tex/generic/babel/english.sty
+/usr/share/texmf/tex/generic/babel/esperanto.sty
+/usr/share/texmf/tex/generic/babel/estonian.sty
+/usr/share/texmf/tex/generic/babel/finnish.sty
+/usr/share/texmf/tex/generic/babel/francais.sty
+/usr/share/texmf/tex/generic/babel/galician.sty
+/usr/share/texmf/tex/generic/babel/germanb.sty
+/usr/share/texmf/tex/generic/babel/greek.sty
+/usr/share/texmf/tex/generic/babel/grmath.sty
+/usr/share/texmf/tex/generic/babel/hebcal.sty
+/usr/share/texmf/tex/generic/babel/hebfont.sty
+/usr/share/texmf/tex/generic/babel/hebrew.sty
+/usr/share/texmf/tex/generic/babel/hebrew_newcode.sty
+/usr/share/texmf/tex/generic/babel/hebrew_oldcode.sty
+/usr/share/texmf/tex/generic/babel/hebrew_p.sty
+/usr/share/texmf/tex/generic/babel/icelandic.sty
+/usr/share/texmf/tex/generic/babel/irish.sty
+/usr/share/texmf/tex/generic/babel/italian.sty
+/usr/share/texmf/tex/generic/babel/latin.sty
+/usr/share/texmf/tex/generic/babel/lsorbian.sty
+/usr/share/texmf/tex/generic/babel/magyar.sty
+/usr/share/texmf/tex/generic/babel/naustrian.sty
+/usr/share/texmf/tex/generic/babel/ngermanb.sty
+/usr/share/texmf/tex/generic/babel/norsk.sty
+/usr/share/texmf/tex/generic/babel/polish.sty
+/usr/share/texmf/tex/generic/babel/portuges.sty
+/usr/share/texmf/tex/generic/babel/romanian.sty
+/usr/share/texmf/tex/generic/babel/russianb.sty
+/usr/share/texmf/tex/generic/babel/samin.sty
+/usr/share/texmf/tex/generic/babel/scottish.sty
+/usr/share/texmf/tex/generic/babel/serbian.sty
+/usr/share/texmf/tex/generic/babel/slovak.sty
+/usr/share/texmf/tex/generic/babel/slovene.sty
+/usr/share/texmf/tex/generic/babel/spanish.sty
+/usr/share/texmf/tex/generic/babel/swedish.sty
+/usr/share/texmf/tex/generic/babel/turkish.sty
+/usr/share/texmf/tex/generic/babel/ukraineb.sty
+/usr/share/texmf/tex/generic/babel/usorbian.sty
+/usr/share/texmf/tex/generic/babel/welsh.sty
+/usr/share/texmf/tex/generic/german/german.sty
+/usr/share/texmf/tex/generic/german/ngerman.sty
+/usr/share/texmf/tex/generic/mfpic/mfpic.sty
+/usr/share/texmf/tex/generic/misc/localloc.sty
+/usr/share/texmf/tex/generic/misc/path.sty
+/usr/share/texmf/tex/generic/misc/poligraf.sty
+/usr/share/texmf/tex/generic/misc/psfig.sty
+/usr/share/texmf/tex/generic/misc/texnames.sty
+/usr/share/texmf/tex/generic/multido/multido.sty
+/usr/share/texmf/tex/generic/pictex/pictex.sty
+/usr/share/texmf/tex/generic/pictex/pictexwd.sty
+/usr/share/texmf/tex/generic/qpx/qpxmath.sty
+/usr/share/texmf/tex/generic/qtx/qtxmath.sty
+/usr/share/texmf/tex/generic/spanishb/spanishb.sty
+/usr/share/texmf/tex/generic/texdraw/texdraw.sty
+/usr/share/texmf/tex/generic/thumbpdf/thumbpdf.sty
+/usr/share/texmf/tex/generic/vietnam/dblaccnt.sty
+/usr/share/texmf/tex/generic/vietnam/t5.sty
+/usr/share/texmf/tex/generic/vietnam/vietnam.sty
+/usr/share/texmf/tex/generic/xypic/xy.sty
+/usr/share/texmf/tex/generic/xypic/xypic.sty
+/usr/share/texmf/tex/cslatex/nhelvet.sty
+/usr/share/texmf/tex/cslatex/ntimes.sty
+/usr/share/texmf/tex/csplain/czech.sty
+/usr/share/texmf/tex/csplain/slovak.sty
+/usr/share/texmf/tex/fontinst/base/fontdoc.sty
+/usr/share/texmf/tex/fontinst/base/fontinst.sty
+/usr/share/texmf/tex/fontinst/base/xfntinst.sty
+/usr/share/texmf/tex/generic/babel/athnum.sty
+/usr/share/texmf/tex/generic/babel/austrian.sty
+/usr/share/texmf/tex/generic/babel/babel.sty
+/usr/share/texmf/tex/generic/babel/bahasa.sty
+/usr/share/texmf/tex/generic/babel/basque.sty
+/usr/share/texmf/tex/generic/babel/breton.sty
+/usr/share/texmf/tex/generic/babel/bulgarian.sty
+/usr/share/texmf/tex/generic/babel/catalan.sty
+/usr/share/texmf/tex/generic/babel/croatian.sty
+/usr/share/texmf/tex/generic/babel/czech.sty
+/usr/share/texmf/tex/generic/babel/danish.sty
+/usr/share/texmf/tex/generic/babel/dutch.sty
+/usr/share/texmf/tex/generic/babel/english.sty
+/usr/share/texmf/tex/generic/babel/esperanto.sty
+/usr/share/texmf/tex/generic/babel/estonian.sty
+/usr/share/texmf/tex/generic/babel/finnish.sty
+/usr/share/texmf/tex/generic/babel/francais.sty
+/usr/share/texmf/tex/generic/babel/galician.sty
+/usr/share/texmf/tex/generic/babel/germanb.sty
+/usr/share/texmf/tex/generic/babel/greek.sty
+/usr/share/texmf/tex/generic/babel/grmath.sty
+/usr/share/texmf/tex/generic/babel/hebcal.sty
+/usr/share/texmf/tex/generic/babel/hebfont.sty
+/usr/share/texmf/tex/generic/babel/hebrew.sty
+/usr/share/texmf/tex/generic/babel/hebrew_newcode.sty
+/usr/share/texmf/tex/generic/babel/hebrew_oldcode.sty
+/usr/share/texmf/tex/generic/babel/hebrew_p.sty
+/usr/share/texmf/tex/generic/babel/icelandic.sty
+/usr/share/texmf/tex/generic/babel/irish.sty
+/usr/share/texmf/tex/generic/babel/italian.sty
+/usr/share/texmf/tex/generic/babel/latin.sty
+/usr/share/texmf/tex/generic/babel/lsorbian.sty
+/usr/share/texmf/tex/generic/babel/magyar.sty
+/usr/share/texmf/tex/generic/babel/naustrian.sty
+/usr/share/texmf/tex/generic/babel/ngermanb.sty
+/usr/share/texmf/tex/generic/babel/norsk.sty
+/usr/share/texmf/tex/generic/babel/polish.sty
+/usr/share/texmf/tex/generic/babel/portuges.sty
+/usr/share/texmf/tex/generic/babel/romanian.sty
+/usr/share/texmf/tex/generic/babel/russianb.sty
+/usr/share/texmf/tex/generic/babel/samin.sty
+/usr/share/texmf/tex/generic/babel/scottish.sty
+/usr/share/texmf/tex/generic/babel/serbian.sty
+/usr/share/texmf/tex/generic/babel/slovak.sty
+/usr/share/texmf/tex/generic/babel/slovene.sty
+/usr/share/texmf/tex/generic/babel/spanish.sty
+/usr/share/texmf/tex/generic/babel/swedish.sty
+/usr/share/texmf/tex/generic/babel/turkish.sty
+/usr/share/texmf/tex/generic/babel/ukraineb.sty
+/usr/share/texmf/tex/generic/babel/usorbian.sty
+/usr/share/texmf/tex/generic/babel/welsh.sty
+/usr/share/texmf/tex/generic/german/german.sty
+/usr/share/texmf/tex/generic/german/ngerman.sty
+/usr/share/texmf/tex/generic/mfpic/mfpic.sty
+/usr/share/texmf/tex/generic/misc/localloc.sty
+/usr/share/texmf/tex/generic/misc/path.sty
+/usr/share/texmf/tex/generic/misc/poligraf.sty
+/usr/share/texmf/tex/generic/misc/psfig.sty
+/usr/share/texmf/tex/generic/misc/texnames.sty
+/usr/share/texmf/tex/generic/multido/multido.sty
+/usr/share/texmf/tex/generic/pictex/pictex.sty
+/usr/share/texmf/tex/generic/pictex/pictexwd.sty
+/usr/share/texmf/tex/generic/qpx/qpxmath.sty
+/usr/share/texmf/tex/generic/qtx/qtxmath.sty
+/usr/share/texmf/tex/generic/spanishb/spanishb.sty
+/usr/share/texmf/tex/generic/texdraw/texdraw.sty
+/usr/share/texmf/tex/generic/thumbpdf/thumbpdf.sty
+/usr/share/texmf/tex/generic/vietnam/dblaccnt.sty
+/usr/share/texmf/tex/generic/vietnam/t5.sty
+/usr/share/texmf/tex/generic/vietnam/vietnam.sty
+/usr/share/texmf/tex/generic/xypic/xy.sty
+/usr/share/texmf/tex/generic/xypic/xypic.sty
+/usr/share/texmf/tex/plain/graphics/autopict.sty
+/usr/share/texmf/tex/amstex/base/amsppt.sty
+/usr/share/texmf/tex/latex/SIunits/SIunits.sty
+/usr/share/texmf/tex/latex/SIunits/binary.sty
+/usr/share/texmf/tex/latex/ae/ae.sty
+/usr/share/texmf/tex/latex/ae/aecompl.sty
+/usr/share/texmf/tex/latex/amscls/amsrbeta.sty
+/usr/share/texmf/tex/latex/amscls/amsrefs.sty
+/usr/share/texmf/tex/latex/amscls/amsthm.sty
+/usr/share/texmf/tex/latex/amscls/getwidth.sty
+/usr/share/texmf/tex/latex/amscls/ifoption.sty
+/usr/share/texmf/tex/latex/amscls/inicap.sty
+/usr/share/texmf/tex/latex/amscls/mathscinet.sty
+/usr/share/texmf/tex/latex/amscls/pcatcode.sty
+/usr/share/texmf/tex/latex/amscls/rkeyval.sty
+/usr/share/texmf/tex/latex/amscls/rkvbeta.sty
+/usr/share/texmf/tex/latex/amscls/textcmds.sty
+/usr/share/texmf/tex/latex/amscls/upref.sty
+/usr/share/texmf/tex/latex/amsfonts/amsfonts.sty
+/usr/share/texmf/tex/latex/amsfonts/amssymb.sty
+/usr/share/texmf/tex/latex/amsfonts/cmmib57.sty
+/usr/share/texmf/tex/latex/amsfonts/eucal.sty
+/usr/share/texmf/tex/latex/amsfonts/eufrak.sty
+/usr/share/texmf/tex/latex/amsfonts/euscript.sty
+/usr/share/texmf/tex/latex/amsmath/amsbsy.sty
+/usr/share/texmf/tex/latex/amsmath/amscd.sty
+/usr/share/texmf/tex/latex/amsmath/amsgen.sty
+/usr/share/texmf/tex/latex/amsmath/amsmath.sty
+/usr/share/texmf/tex/latex/amsmath/amsopn.sty
+/usr/share/texmf/tex/latex/amsmath/amstex.sty
+/usr/share/texmf/tex/latex/amsmath/amstext.sty
+/usr/share/texmf/tex/latex/amsmath/amsxtra.sty
+/usr/share/texmf/tex/latex/antp/antpolt.sty
+/usr/share/texmf/tex/latex/antt/antyktor.sty
+/usr/share/texmf/tex/latex/base/alltt.sty
+/usr/share/texmf/tex/latex/base/article.sty
+/usr/share/texmf/tex/latex/base/bezier.sty
+/usr/share/texmf/tex/latex/base/book.sty
+/usr/share/texmf/tex/latex/base/doc.sty
+/usr/share/texmf/tex/latex/base/exscale.sty
+/usr/share/texmf/tex/latex/base/fixltx2e.sty
+/usr/share/texmf/tex/latex/base/flafter.sty
+/usr/share/texmf/tex/latex/base/fleqn.sty
+/usr/share/texmf/tex/latex/base/fontenc.sty
+/usr/share/texmf/tex/latex/base/graphpap.sty
+/usr/share/texmf/tex/latex/base/ifthen.sty
+/usr/share/texmf/tex/latex/base/inputenc.sty
+/usr/share/texmf/tex/latex/base/latexsym.sty
+/usr/share/texmf/tex/latex/base/leqno.sty
+/usr/share/texmf/tex/latex/base/letter.sty
+/usr/share/texmf/tex/latex/base/makeidx.sty
+/usr/share/texmf/tex/latex/base/newlfont.sty
+/usr/share/texmf/tex/latex/base/oldlfont.sty
+/usr/share/texmf/tex/latex/base/openbib.sty
+/usr/share/texmf/tex/latex/base/pict2e.sty
+/usr/share/texmf/tex/latex/base/proc.sty
+/usr/share/texmf/tex/latex/base/report.sty
+/usr/share/texmf/tex/latex/base/shortvrb.sty
+/usr/share/texmf/tex/latex/base/showidx.sty
+/usr/share/texmf/tex/latex/base/slides.sty
+/usr/share/texmf/tex/latex/base/syntonly.sty
+/usr/share/texmf/tex/latex/base/t1enc.sty
+/usr/share/texmf/tex/latex/base/textcomp.sty
+/usr/share/texmf/tex/latex/base/tracefnt.sty
+/usr/share/texmf/tex/latex/bbm/bbm.sty
+/usr/share/texmf/tex/latex/bbold/bbold.sty
+/usr/share/texmf/tex/latex/caption/caption.sty
+/usr/share/texmf/tex/latex/caption/caption2.sty
+/usr/share/texmf/tex/latex/carlisle/blkarray.sty
+/usr/share/texmf/tex/latex/carlisle/colortbl.sty
+/usr/share/texmf/tex/latex/carlisle/comma.sty
+/usr/share/texmf/tex/latex/carlisle/dotlessj.sty
+/usr/share/texmf/tex/latex/carlisle/fix2col.sty
+/usr/share/texmf/tex/latex/carlisle/ltxtable.sty
+/usr/share/texmf/tex/latex/carlisle/nopageno.sty
+/usr/share/texmf/tex/latex/carlisle/plain.sty
+/usr/share/texmf/tex/latex/carlisle/pspicture.sty
+/usr/share/texmf/tex/latex/carlisle/remreset.sty
+/usr/share/texmf/tex/latex/carlisle/scalefnt.sty
+/usr/share/texmf/tex/latex/carlisle/textcase.sty
+/usr/share/texmf/tex/latex/carlisle/typehtml.sty
+/usr/share/texmf/tex/latex/ccfonts/ccfonts.sty
+/usr/share/texmf/tex/latex/cite/chapterbib.sty
+/usr/share/texmf/tex/latex/cite/cite.sty
+/usr/share/texmf/tex/latex/cite/drftcite.sty
+/usr/share/texmf/tex/latex/cite/overcite.sty
+/usr/share/texmf/tex/latex/cmbright/cmbright.sty
+/usr/share/texmf/tex/latex/concmath/concmath.sty
+/usr/share/texmf/tex/latex/curves/curves.sty
+/usr/share/texmf/tex/latex/curves/curvesls.sty
+/usr/share/texmf/tex/latex/cyrillic/lcy.sty
+/usr/share/texmf/tex/latex/dinbrief/dinbrief.sty
+/usr/share/texmf/tex/latex/dstroke/dsfont.sty
+/usr/share/texmf/tex/latex/eepic/eepic.sty
+/usr/share/texmf/tex/latex/eepic/eepicemu.sty
+/usr/share/texmf/tex/latex/eepic/epic.sty
+/usr/share/texmf/tex/latex/endfloat/endfloat.sty
+/usr/share/texmf/tex/latex/extsizes/autopagewidth.sty
+/usr/share/texmf/tex/latex/extsizes/extsizes.sty
+/usr/share/texmf/tex/latex/fancyhdr/extramarks.sty
+/usr/share/texmf/tex/latex/fancyhdr/fancyhdr.sty
+/usr/share/texmf/tex/latex/fancyhdr/fixmarks.sty
+/usr/share/texmf/tex/latex/fancyheadings/fancyheadings.sty
+/usr/share/texmf/tex/latex/fancyheadings/lastpage209.sty
+/usr/share/texmf/tex/latex/fancyvrb/fancyvrb.sty
+/usr/share/texmf/tex/latex/fancyvrb/fvrb-ex.sty
+/usr/share/texmf/tex/latex/fancyvrb/hbaw.sty
+/usr/share/texmf/tex/latex/fancyvrb/hcolor.sty
+/usr/share/texmf/tex/latex/fp/defpattern.sty
+/usr/share/texmf/tex/latex/fp/fp-addons.sty
+/usr/share/texmf/tex/latex/fp/fp-basic.sty
+/usr/share/texmf/tex/latex/fp/fp-eqn.sty
+/usr/share/texmf/tex/latex/fp/fp-eval.sty
+/usr/share/texmf/tex/latex/fp/fp-exp.sty
+/usr/share/texmf/tex/latex/fp/fp-pas.sty
+/usr/share/texmf/tex/latex/fp/fp-random.sty
+/usr/share/texmf/tex/latex/fp/fp-snap.sty
+/usr/share/texmf/tex/latex/fp/fp-trigo.sty
+/usr/share/texmf/tex/latex/fp/fp-upn.sty
+/usr/share/texmf/tex/latex/fp/fp.sty
+/usr/share/texmf/tex/latex/fp/lfp.sty
+/usr/share/texmf/tex/latex/g-brief/g-brief.sty
+/usr/share/texmf/tex/latex/graphics/color.sty
+/usr/share/texmf/tex/latex/graphics/epsfig.sty
+/usr/share/texmf/tex/latex/graphics/graphics.sty
+/usr/share/texmf/tex/latex/graphics/graphicx.sty
+/usr/share/texmf/tex/latex/graphics/keyval.sty
+/usr/share/texmf/tex/latex/graphics/lscape.sty
+/usr/share/texmf/tex/latex/graphics/pstcol.sty
+/usr/share/texmf/tex/latex/graphics/trig.sty
+/usr/share/texmf/tex/latex/hyperref/backref.sty
+/usr/share/texmf/tex/latex/hyperref/hyperref.sty
+/usr/share/texmf/tex/latex/hyperref/minitoc-hyper.sty
+/usr/share/texmf/tex/latex/hyperref/nameref.sty
+/usr/share/texmf/tex/latex/hyperref/nohyperref.sty
+/usr/share/texmf/tex/latex/hyperref/ntheorem-hyper.sty
+/usr/share/texmf/tex/latex/hyperref/xr-hyper.sty
+/usr/share/texmf/tex/latex/jknappen/greekctr.sty
+/usr/share/texmf/tex/latex/jknappen/mathbbol.sty
+/usr/share/texmf/tex/latex/jknappen/mathrsfs.sty
+/usr/share/texmf/tex/latex/koma-script/scraddr.sty
+/usr/share/texmf/tex/latex/koma-script/scrdate.sty
+/usr/share/texmf/tex/latex/koma-script/script.sty
+/usr/share/texmf/tex/latex/koma-script/script_l.sty
+/usr/share/texmf/tex/latex/koma-script/script_s.sty
+/usr/share/texmf/tex/latex/koma-script/scrlfile.sty
+/usr/share/texmf/tex/latex/koma-script/scrpage.sty
+/usr/share/texmf/tex/latex/koma-script/scrpage2.sty
+/usr/share/texmf/tex/latex/koma-script/scrtime.sty
+/usr/share/texmf/tex/latex/koma-script/typearea.sty
+/usr/share/texmf/tex/latex/labels/labels.sty
+/usr/share/texmf/tex/latex/labels/olabels.sty
+/usr/share/texmf/tex/latex/lucidabr/lucbmath.sty
+/usr/share/texmf/tex/latex/lucidabr/lucidabr.sty
+/usr/share/texmf/tex/latex/lucidabr/lucidbrb.sty
+/usr/share/texmf/tex/latex/lucidabr/lucidbry.sty
+/usr/share/texmf/tex/latex/lucidabr/lucmin.sty
+/usr/share/texmf/tex/latex/lucidabr/lucmtime.sty
+/usr/share/texmf/tex/latex/lucidabr/luctime.sty
+/usr/share/texmf/tex/latex/mathtime/mathpi.sty
+/usr/share/texmf/tex/latex/mathtime/mathtime.sty
+/usr/share/texmf/tex/latex/mdwtools/at.sty
+/usr/share/texmf/tex/latex/mdwtools/cmtt.sty
+/usr/share/texmf/tex/latex/mdwtools/doafter.sty
+/usr/share/texmf/tex/latex/mdwtools/footnote.sty
+/usr/share/texmf/tex/latex/mdwtools/mathenv.sty
+/usr/share/texmf/tex/latex/mdwtools/mdwlist.sty
+/usr/share/texmf/tex/latex/mdwtools/mdwmath.sty
+/usr/share/texmf/tex/latex/mdwtools/mdwtab.sty
+/usr/share/texmf/tex/latex/mdwtools/sverb.sty
+/usr/share/texmf/tex/latex/mdwtools/syntax.sty
+/usr/share/texmf/tex/latex/mflogo/mflogo.sty
+/usr/share/texmf/tex/latex/mfnfss/oldgerm.sty
+/usr/share/texmf/tex/latex/mfnfss/pandora.sty
+/usr/share/texmf/tex/latex/minitoc/minitoc.sty
+/usr/share/texmf/tex/latex/minitoc/mtcoff.sty
+/usr/share/texmf/tex/latex/misc/a4dutch.sty
+/usr/share/texmf/tex/latex/misc/a4wide.sty
+/usr/share/texmf/tex/latex/misc/a5.sty
+/usr/share/texmf/tex/latex/misc/a5comb.sty
+/usr/share/texmf/tex/latex/misc/acronym.sty
+/usr/share/texmf/tex/latex/misc/aeguill.sty
+/usr/share/texmf/tex/latex/misc/anysize.sty
+/usr/share/texmf/tex/latex/misc/apalike.sty
+/usr/share/texmf/tex/latex/misc/avantgar.sty
+/usr/share/texmf/tex/latex/misc/bar.sty
+/usr/share/texmf/tex/latex/misc/beton.sty
+/usr/share/texmf/tex/latex/misc/bibgerm.sty
+/usr/share/texmf/tex/latex/misc/bold-extra.sty
+/usr/share/texmf/tex/latex/misc/booktabs.sty
+/usr/share/texmf/tex/latex/misc/boxedminipage.sty
+/usr/share/texmf/tex/latex/misc/calrsfs.sty
+/usr/share/texmf/tex/latex/misc/cancel.sty
+/usr/share/texmf/tex/latex/misc/capt-of.sty
+/usr/share/texmf/tex/latex/misc/ccaption.sty
+/usr/share/texmf/tex/latex/misc/changebar.sty
+/usr/share/texmf/tex/latex/misc/chappg.sty
+/usr/share/texmf/tex/latex/misc/citesort.sty
+/usr/share/texmf/tex/latex/misc/comment.sty
+/usr/share/texmf/tex/latex/misc/concrete.sty
+/usr/share/texmf/tex/latex/misc/crop.sty
+/usr/share/texmf/tex/latex/misc/currvita.sty
+/usr/share/texmf/tex/latex/misc/doublespace.sty
+/usr/share/texmf/tex/latex/misc/draftcopy.sty
+/usr/share/texmf/tex/latex/misc/eclbip.sty
+/usr/share/texmf/tex/latex/misc/ecltree.sty
+/usr/share/texmf/tex/latex/misc/endnotes.sty
+/usr/share/texmf/tex/latex/misc/eso-pic.sty
+/usr/share/texmf/tex/latex/misc/euler.sty
+/usr/share/texmf/tex/latex/misc/eurosym.sty
+/usr/share/texmf/tex/latex/misc/example.sty
+/usr/share/texmf/tex/latex/misc/fancybox.sty
+/usr/share/texmf/tex/latex/misc/fguill.sty
+/usr/share/texmf/tex/latex/misc/float.sty
+/usr/share/texmf/tex/latex/misc/floatflt.sty
+/usr/share/texmf/tex/latex/misc/fnpara.sty
+/usr/share/texmf/tex/latex/misc/footmisc.sty
+/usr/share/texmf/tex/latex/misc/footnpag.sty
+/usr/share/texmf/tex/latex/misc/framed.sty
+/usr/share/texmf/tex/latex/misc/geometry.sty
+/usr/share/texmf/tex/latex/misc/gletter.sty
+/usr/share/texmf/tex/latex/misc/hangcaption.sty
+/usr/share/texmf/tex/latex/misc/helvetic.sty
+/usr/share/texmf/tex/latex/misc/here.sty
+/usr/share/texmf/tex/latex/misc/hyphenat.sty
+/usr/share/texmf/tex/latex/misc/index.sty
+/usr/share/texmf/tex/latex/misc/isolatin1.sty
+/usr/share/texmf/tex/latex/misc/landscape.sty
+/usr/share/texmf/tex/latex/misc/lastpage.sty
+/usr/share/texmf/tex/latex/misc/layouts.sty
+/usr/share/texmf/tex/latex/misc/leftidx.sty
+/usr/share/texmf/tex/latex/misc/lettrine.sty
+/usr/share/texmf/tex/latex/misc/marvosym.sty
+/usr/share/texmf/tex/latex/misc/mathcomp.sty
+/usr/share/texmf/tex/latex/misc/moreverb.sty
+/usr/share/texmf/tex/latex/misc/mt11p.sty
+/usr/share/texmf/tex/latex/misc/multibox.sty
+/usr/share/texmf/tex/latex/misc/multind.sty
+/usr/share/texmf/tex/latex/misc/ncntrsbk.sty
+/usr/share/texmf/tex/latex/misc/nomencl.sty
+/usr/share/texmf/tex/latex/misc/optional.sty
+/usr/share/texmf/tex/latex/misc/overpic.sty
+/usr/share/texmf/tex/latex/misc/paralist.sty
+/usr/share/texmf/tex/latex/misc/parskip.sty
+/usr/share/texmf/tex/latex/misc/pdfpages.sty
+/usr/share/texmf/tex/latex/misc/picinpar.sty
+/usr/share/texmf/tex/latex/misc/picins.sty
+/usr/share/texmf/tex/latex/misc/placeins.sty
+/usr/share/texmf/tex/latex/misc/portland.sty
+/usr/share/texmf/tex/latex/misc/program.sty
+/usr/share/texmf/tex/latex/misc/psboxit.sty
+/usr/share/texmf/tex/latex/misc/psfrag.sty
+/usr/share/texmf/tex/latex/misc/psgo.sty
+/usr/share/texmf/tex/latex/misc/pslatex.sty
+/usr/share/texmf/tex/latex/misc/relsize.sty
+/usr/share/texmf/tex/latex/misc/rotating.sty
+/usr/share/texmf/tex/latex/misc/rotfloat.sty
+/usr/share/texmf/tex/latex/misc/scale.sty
+/usr/share/texmf/tex/latex/misc/sectsty.sty
+/usr/share/texmf/tex/latex/misc/selectp.sty
+/usr/share/texmf/tex/latex/misc/setspace.sty
+/usr/share/texmf/tex/latex/misc/shadow.sty
+/usr/share/texmf/tex/latex/misc/shapepar.sty
+/usr/share/texmf/tex/latex/misc/showdim.sty
+/usr/share/texmf/tex/latex/misc/showlabels.sty
+/usr/share/texmf/tex/latex/misc/showtags.sty
+/usr/share/texmf/tex/latex/misc/sidecap.sty
+/usr/share/texmf/tex/latex/misc/slashbox.sty
+/usr/share/texmf/tex/latex/misc/soul.sty
+/usr/share/texmf/tex/latex/misc/stdclsdv.sty
+/usr/share/texmf/tex/latex/misc/stmaryrd.sty
+/usr/share/texmf/tex/latex/misc/subfigure.sty
+/usr/share/texmf/tex/latex/misc/supertabular.sty
+/usr/share/texmf/tex/latex/misc/sz.sty
+/usr/share/texmf/tex/latex/misc/tabls.sty
+/usr/share/texmf/tex/latex/misc/textfit.sty
+/usr/share/texmf/tex/latex/misc/threeparttable.sty
+/usr/share/texmf/tex/latex/misc/tocbibind.sty
+/usr/share/texmf/tex/latex/misc/tocloft.sty
+/usr/share/texmf/tex/latex/misc/trees.sty
+/usr/share/texmf/tex/latex/misc/type1cm.sty
+/usr/share/texmf/tex/latex/misc/ulem.sty
+/usr/share/texmf/tex/latex/misc/url.sty
+/usr/share/texmf/tex/latex/misc/version.sty
+/usr/share/texmf/tex/latex/misc/vmargin.sty
+/usr/share/texmf/tex/latex/misc/vpage.sty
+/usr/share/texmf/tex/latex/misc/wrapfig.sty
+/usr/share/texmf/tex/latex/misc/xtab.sty
+/usr/share/texmf/tex/latex/misc/yfonts.sty
+/usr/share/texmf/tex/latex/misc/zapfchan.sty
+/usr/share/texmf/tex/latex/mltex/mltex.sty
+/usr/share/texmf/tex/latex/ms/count1to.sty
+/usr/share/texmf/tex/latex/ms/everysel.sty
+/usr/share/texmf/tex/latex/ms/everyshi.sty
+/usr/share/texmf/tex/latex/ms/multitoc.sty
+/usr/share/texmf/tex/latex/ms/prelim2e.sty
+/usr/share/texmf/tex/latex/ms/ragged2e.sty
+/usr/share/texmf/tex/latex/multirow/bigdelim.sty
+/usr/share/texmf/tex/latex/multirow/bigstrut.sty
+/usr/share/texmf/tex/latex/multirow/multirow.sty
+/usr/share/texmf/tex/latex/natbib/bibentry.sty
+/usr/share/texmf/tex/latex/natbib/natbib.sty
+/usr/share/texmf/tex/latex/ntgclass/a4.sty
+/usr/share/texmf/tex/latex/oberdiek/alphalph.sty
+/usr/share/texmf/tex/latex/oberdiek/chemarr.sty
+/usr/share/texmf/tex/latex/oberdiek/dvipscol.sty
+/usr/share/texmf/tex/latex/oberdiek/engord.sty
+/usr/share/texmf/tex/latex/oberdiek/epstopdf.sty
+/usr/share/texmf/tex/latex/oberdiek/hypbmsec.sty
+/usr/share/texmf/tex/latex/oberdiek/hypcap.sty
+/usr/share/texmf/tex/latex/oberdiek/ifpdf.sty
+/usr/share/texmf/tex/latex/oberdiek/ifvtex.sty
+/usr/share/texmf/tex/latex/oberdiek/pagesel.sty
+/usr/share/texmf/tex/latex/oberdiek/pdfcolmk.sty
+/usr/share/texmf/tex/latex/oberdiek/pdfcrypt.sty
+/usr/share/texmf/tex/latex/oberdiek/pdflscape.sty
+/usr/share/texmf/tex/latex/oberdiek/refcount.sty
+/usr/share/texmf/tex/latex/oberdiek/settobox.sty
+/usr/share/texmf/tex/latex/oberdiek/twoopt.sty
+/usr/share/texmf/tex/latex/oberdiek/vpe.sty
+/usr/share/texmf/tex/latex/palatcm/palatcm.sty
+/usr/share/texmf/tex/latex/pb-diagram/lamsarrow.sty
+/usr/share/texmf/tex/latex/pb-diagram/pb-diagram.sty
+/usr/share/texmf/tex/latex/pb-diagram/pb-lams.sty
+/usr/share/texmf/tex/latex/pb-diagram/pb-xy.sty
+/usr/share/texmf/tex/latex/platex/ot1patch.sty
+/usr/share/texmf/tex/latex/platex/plprefix.sty
+/usr/share/texmf/tex/latex/platex/polski.sty
+/usr/share/texmf/tex/latex/preprint/authblk.sty
+/usr/share/texmf/tex/latex/preprint/balance.sty
+/usr/share/texmf/tex/latex/preprint/figcaps.sty
+/usr/share/texmf/tex/latex/preprint/fullpage.sty
+/usr/share/texmf/tex/latex/preprint/sublabel.sty
+/usr/share/texmf/tex/latex/psnfss/8r.sty
+/usr/share/texmf/tex/latex/psnfss/avant.sty
+/usr/share/texmf/tex/latex/psnfss/bookman.sty
+/usr/share/texmf/tex/latex/psnfss/chancery.sty
+/usr/share/texmf/tex/latex/psnfss/charter.sty
+/usr/share/texmf/tex/latex/psnfss/courier.sty
+/usr/share/texmf/tex/latex/psnfss/helvet.sty
+/usr/share/texmf/tex/latex/psnfss/mathpazo.sty
+/usr/share/texmf/tex/latex/psnfss/mathpple.sty
+/usr/share/texmf/tex/latex/psnfss/mathptm.sty
+/usr/share/texmf/tex/latex/psnfss/mathptmx.sty
+/usr/share/texmf/tex/latex/psnfss/newcent.sty
+/usr/share/texmf/tex/latex/psnfss/palatino.sty
+/usr/share/texmf/tex/latex/psnfss/pifont.sty
+/usr/share/texmf/tex/latex/psnfss/times.sty
+/usr/share/texmf/tex/latex/psnfssx/texnansi.sty
+/usr/share/texmf/tex/latex/pstricks/pst-3d.sty
+/usr/share/texmf/tex/latex/pstricks/pst-all.sty
+/usr/share/texmf/tex/latex/pstricks/pst-blur.sty
+/usr/share/texmf/tex/latex/pstricks/pst-char.sty
+/usr/share/texmf/tex/latex/pstricks/pst-coil.sty
+/usr/share/texmf/tex/latex/pstricks/pst-eps.sty
+/usr/share/texmf/tex/latex/pstricks/pst-fill.sty
+/usr/share/texmf/tex/latex/pstricks/pst-ghsb.sty
+/usr/share/texmf/tex/latex/pstricks/pst-gr3d.sty
+/usr/share/texmf/tex/latex/pstricks/pst-grad.sty
+/usr/share/texmf/tex/latex/pstricks/pst-key.sty
+/usr/share/texmf/tex/latex/pstricks/pst-lens.sty
+/usr/share/texmf/tex/latex/pstricks/pst-node.sty
+/usr/share/texmf/tex/latex/pstricks/pst-osci.sty
+/usr/share/texmf/tex/latex/pstricks/pst-plot.sty
+/usr/share/texmf/tex/latex/pstricks/pst-poly.sty
+/usr/share/texmf/tex/latex/pstricks/pst-slpe.sty
+/usr/share/texmf/tex/latex/pstricks/pst-text.sty
+/usr/share/texmf/tex/latex/pstricks/pst-tree.sty
+/usr/share/texmf/tex/latex/pstricks/pstricks.sty
+/usr/share/texmf/tex/latex/pxfonts/pxfonts.sty
+/usr/share/texmf/tex/latex/qfonts/qbookman.sty
+/usr/share/texmf/tex/latex/qfonts/qcourier.sty
+/usr/share/texmf/tex/latex/qfonts/qpalatin.sty
+/usr/share/texmf/tex/latex/qfonts/qswiss.sty
+/usr/share/texmf/tex/latex/qfonts/qtimes.sty
+/usr/share/texmf/tex/latex/qfonts/qzapfcha.sty
+/usr/share/texmf/tex/latex/revtex4/revsymb.sty
+/usr/share/texmf/tex/latex/seminar/2up.sty
+/usr/share/texmf/tex/latex/seminar/npsfont.sty
+/usr/share/texmf/tex/latex/seminar/sem-a4.sty
+/usr/share/texmf/tex/latex/seminar/sem-page.sty
+/usr/share/texmf/tex/latex/seminar/semcolor.sty
+/usr/share/texmf/tex/latex/seminar/semhelv.sty
+/usr/share/texmf/tex/latex/seminar/seminar.sty
+/usr/share/texmf/tex/latex/seminar/semlayer.sty
+/usr/share/texmf/tex/latex/seminar/semlcmss.sty
+/usr/share/texmf/tex/latex/seminar/semrot.sty
+/usr/share/texmf/tex/latex/seminar/slidesec.sty
+/usr/share/texmf/tex/latex/seminar/xcomment.sty
+/usr/share/texmf/tex/latex/t2/citehack.sty
+/usr/share/texmf/tex/latex/t2/mathtext.sty
+/usr/share/texmf/tex/latex/t2/misccorr.sty
+/usr/share/texmf/tex/latex/texmacs/TeXmacs.sty
+/usr/share/texmf/tex/latex/textmerg/textmerg.sty
+/usr/share/texmf/tex/latex/titlesec/titlesec.sty
+/usr/share/texmf/tex/latex/titlesec/titletoc.sty
+/usr/share/texmf/tex/latex/tools/afterpage.sty
+/usr/share/texmf/tex/latex/tools/array.sty
+/usr/share/texmf/tex/latex/tools/bm.sty
+/usr/share/texmf/tex/latex/tools/calc.sty
+/usr/share/texmf/tex/latex/tools/dcolumn.sty
+/usr/share/texmf/tex/latex/tools/delarray.sty
+/usr/share/texmf/tex/latex/tools/enumerate.sty
+/usr/share/texmf/tex/latex/tools/fontsmpl.sty
+/usr/share/texmf/tex/latex/tools/ftnright.sty
+/usr/share/texmf/tex/latex/tools/hhline.sty
+/usr/share/texmf/tex/latex/tools/indentfirst.sty
+/usr/share/texmf/tex/latex/tools/layout.sty
+/usr/share/texmf/tex/latex/tools/longtable.sty
+/usr/share/texmf/tex/latex/tools/multicol.sty
+/usr/share/texmf/tex/latex/tools/rawfonts.sty
+/usr/share/texmf/tex/latex/tools/showkeys.sty
+/usr/share/texmf/tex/latex/tools/somedefs.sty
+/usr/share/texmf/tex/latex/tools/tabularx.sty
+/usr/share/texmf/tex/latex/tools/thb.sty
+/usr/share/texmf/tex/latex/tools/thc.sty
+/usr/share/texmf/tex/latex/tools/thcb.sty
+/usr/share/texmf/tex/latex/tools/theorem.sty
+/usr/share/texmf/tex/latex/tools/thm.sty
+/usr/share/texmf/tex/latex/tools/thmb.sty
+/usr/share/texmf/tex/latex/tools/thp.sty
+/usr/share/texmf/tex/latex/tools/trace.sty
+/usr/share/texmf/tex/latex/tools/varioref.sty
+/usr/share/texmf/tex/latex/tools/verbatim.sty
+/usr/share/texmf/tex/latex/tools/xr.sty
+/usr/share/texmf/tex/latex/tools/xspace.sty
+/usr/share/texmf/tex/latex/txfonts/txfonts.sty
+/usr/share/texmf/tex/latex/umlaute/umlaut.sty
+/usr/share/texmf/tex/latex/umlaute/umlaute.sty
+/usr/share/texmf/tex/latex/units/nicefrac.sty
+/usr/share/texmf/tex/latex/units/units.sty
+/usr/share/texmf/tex/latex/was/fixmath.sty
+/usr/share/texmf/tex/latex/was/gensymb.sty
+/usr/share/texmf/tex/latex/was/icomma.sty
+/usr/share/texmf/tex/latex/was/upgreek.sty
+/usr/share/texmf/tex/latex/wasysym/wasysym.sty
+/usr/share/texmf/tex/latex/lyx/lyxchess.sty
+/usr/share/texmf/tex/latex/lyx/lyxskak.sty
+/usr/share/texmf/tex/latex/ucs/ucs.sty
+/usr/share/texmf/tex/latex/ucs/ucshyper.sty
+/usr/share/texmf/tex/latex/ucs/ucsutils.sty
+/usr/share/texmf/tex/latex/html/frames.sty
+/usr/share/texmf/tex/latex/html/heqn.sty
+/usr/share/texmf/tex/latex/html/hthtml.sty
+/usr/share/texmf/tex/latex/html/html.sty
+/usr/share/texmf/tex/latex/html/htmllist.sty
+/usr/share/texmf/tex/latex/html/justify.sty
+/usr/share/texmf/tex/latex/html/ldump.sty
+/usr/share/texmf/tex/latex/html/url.sty
+/usr/share/texmf/tex/latex/html/verbatimfiles.sty
diff --git a/doc/src/layouts/textclass.lst b/doc/src/layouts/textclass.lst
new file mode 100644
index 0000000..6d21e2d
--- /dev/null
+++ b/doc/src/layouts/textclass.lst
@@ -0,0 +1,73 @@
+## This file declares layouts and their associated definition files.
+## It has been automatically generated by configure
+## Use "Options/Reconfigure" if you need to update it after a
+## configuration change. Run ./configure manually to update the
+## system wide version of this file.
+"Tango_book" "Tango_book" "Tango_book" "true"
+"IEEEtran" "IEEEtran" "article (IEEEtran)" "false"
+"aa" "aa" "article (A&A)" "false"
+"aapaper" "aa" "article (A&A V4)" "false"
+"aastex" "aastex" "article (AASTeX)" "false"
+"agums" "aguplus" "article (AGU++) manuscript" "false"
+"amsart-plain" "amsart" "article (AMS, unnumbered)" "true"
+"amsart-seq" "amsart" "article (AMS, sequential numbering)" "true"
+"amsart" "amsart" "article (AMS)" "true"
+"amsbook" "amsbook" "book (AMS)" "true"
+"apa" "apa" "APA style" "false"
+"article" "article" "article" "true"
+"book" "book" "book" "true"
+"broadway" "broadway" "broadway" "true"
+"chess" "article" "article (Chess)" "true"
+"cl2emult" "cl2emult" "article (cl2emult)" "false"
+"cv" "cv" "curriculum vitae" "true"
+"dinbrief" "dinbrief" "letter (german)" "true"
+"docbook-book" "book" "DocBook book (SGML)" "false"
+"docbook-chapter" "chapter" "DocBook chapter (SGML)" "false"
+"docbook-section" "section" "DocBook section (SGML)" "false"
+"docbook" "article" "DocBook article (SGML)" "false"
+"dtk" "dtk" "article (dtk)" "false"
+"egs" "egs" "article (European Geophysical Society) egs" "false"
+"elsart" "elsart" "article (elsevier)" "false"
+"entcs" "entcs" "article (ENTCS)" "false"
+"extarticle" "extarticle" "extarticle" "true"
+"extbook" "extbook" "extbook" "true"
+"extletter" "extletter" "extletter" "true"
+"extreport" "extreport" "extreport" "true"
+"foils" "foils" "slides (FoilTeX)" "false"
+"g-brief-de" "g-brief" "letter (g-brief, german)" "true"
+"g-brief-en" "g-brief" "letter (g-brief)" "true"
+"g-brief2" "g-brief2" "letter (g-brief2)" "false"
+"heb-article" "article" "article (Hebrew)" "true"
+"heb-letter" "letter" "letter (Hebrew)" "true"
+"hollywood" "hollywood" "hollywood" "true"
+"ijmpd" "ws-ijmpd" "article (ijmpd)" "false"
+"jgrga" "aguplus" "article (AGU++) JGR" "false"
+"kluwer" "kluwer" "article (Kluwer)" "false"
+"latex8" "article" "article (Latex8)" "false"
+"letter" "letter" "letter" "true"
+"linuxdoc" "article" "SGML (LinuxDoc article)" "false"
+"literate-article" "article" "article (Noweb)" "false"
+"literate-book" "book" "book (Noweb)" "false"
+"literate-report" "report" "report (Noweb)" "false"
+"llncs" "llncs" "Springer - Lecture Notes in Comp. Sci." "false"
+"ltugboat" "ltugboat" "article (tugboat)" "false"
+"manpage" "manpage" "SGML (LinuxDoc manpage)" "false"
+"memoir" "memoir" "memoir" "false"
+"mwart" "mwart" "article (mwart)" "true"
+"mwbk" "mwbk" "book (mwbk)" "true"
+"mwrep" "mwrep" "report (mwrep)" "true"
+"paper" "paper" "article (paper)" "false"
+"report" "report" "report" "true"
+"revtex" "revtex" "article (REVTeX)" "true"
+"revtex4" "revtex4" "article (REVTeX 4)" "true"
+"scrartcl" "scrartcl" "article (koma-script)" "true"
+"scrbook" "scrbook" "book (koma-script)" "true"
+"scrlettr" "scrlettr" "letter (koma-script)" "true"
+"scrlttr2" "scrlttr2" "letter (koma-script v.2)" "true"
+"scrreprt" "scrreprt" "report (koma-script)" "true"
+"seminar" "seminar" "seminar" "true"
+"siamltex" "siamltex" "article (siamltex)" "false"
+"slides" "slides" "slides (default)" "true"
+"spie" "spie" "article (SPIE-Proceedings)" "false"
+"svjog" "svjour" "article (Springer - svjour/jog)" "false"
+"svprobth" "svjour" "article (Springer - svjour/PTRF)" "false"
diff --git a/doc/src/line.tex b/doc/src/line.tex
new file mode 100644
index 0000000..1ba963f
--- /dev/null
+++ b/doc/src/line.tex
@@ -0,0 +1,6 @@
+\begin{flushleft}
+\begin{picture}(0,0)
+\thicklines
+\put(0,0){\line(1,0){400}}
+\end{picture}
+\end{flushleft}
diff --git a/doc/src/started/line.tex b/doc/src/started/line.tex
new file mode 100644
index 0000000..1ba963f
--- /dev/null
+++ b/doc/src/started/line.tex
@@ -0,0 +1,6 @@
+\begin{flushleft}
+\begin{picture}(0,0)
+\thicklines
+\put(0,0){\line(1,0){400}}
+\end{picture}
+\end{flushleft}
diff --git a/doc/src/started/started.lyx b/doc/src/started/started.lyx
new file mode 100644
index 0000000..2842d7e
--- /dev/null
+++ b/doc/src/started/started.lyx
@@ -0,0 +1,2840 @@
+#LyX 1.6.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 345
+\begin_document
+\begin_header
+\textclass Tango_book
+\begin_preamble
+\usepackage{a4wide}
+\end_preamble
+\use_default_options false
+\language english
+\inputencoding latin1
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_amsmath 1
+\use_esint 0
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\secnumdepth 5
+\tocdepth 5
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\author "" 
+\author "" 
+\end_header
+
+\begin_body
+
+\begin_layout Chapter
+Getting Started
+\end_layout
+
+\begin_layout Section
+A Java TANGO client
+\end_layout
+
+\begin_layout Standard
+The quickest way of getting started is by studying this example:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+/**
+\end_layout
+
+\begin_layout LyX-Code
+ *   Example of a client using the TANGO Api
+\end_layout
+
+\begin_layout LyX-Code
+ */
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.Tango.*;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.TangoDs.*;
+\end_layout
+
+\begin_layout LyX-Code
+import fr.esrf.TangoApi.*;
+\end_layout
+
+\begin_layout LyX-Code
+   
+\end_layout
+
+\begin_layout LyX-Code
+public class TestDevice
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+  public static void main (String args[])
+\end_layout
+
+\begin_layout LyX-Code
+  {
+\end_layout
+
+\begin_layout LyX-Code
+    try
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+// Connect to the device.
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+          DeviceProxy       dev = new DeviceProxy("my/serial/device");
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// Send a write command to the device
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+          DeviceData argin = new DeviceData();
+\end_layout
+
+\begin_layout LyX-Code
+          argin.insert("Hello World !");
+\end_layout
+
+\begin_layout LyX-Code
+          dev.command_inout("DevWriteMessage", argin);
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// Send a read command to the device
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+          DeviceData argout = dev.command_inout("DevReadMessage");
+\end_layout
+
+\begin_layout LyX-Code
+          String  received = argout.extractString();
+\end_layout
+
+\begin_layout LyX-Code
+          System.out.println(received);
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// Read a device attribute (double data type)
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+          DeviceAttribute da = dev.read_attribute("TheAttr");
+\end_layout
+
+\begin_layout LyX-Code
+          System.out.println("
+\backslash
+nRead " + da.extractDouble() + " on " +   dev.getName());  
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+    catch (DevFailed e)
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+       Except.print_exception(e);
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+  }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Modify this example to fit your device server or client's needs, compile
+ it.
+\end_layout
+
+\begin_layout Standard
+Do not forget when you start it to set the parameter TANGO_HOST with <host_name>
+:<port_number>
+\end_layout
+
+\begin_layout Standard
+(i.e.
+ java -DTANGO_HOST=tango:20000 TestDevice).
+\end_layout
+
+\begin_layout Standard
+And forget about those painful early Tango days when you had to learn CORBA
+ and manipulate Any's.
+\end_layout
+
+\begin_layout Standard
+Life is going to easy and fun from now on.
+\end_layout
+
+\begin_layout Section
+A C++ TANGO client
+\end_layout
+
+\begin_layout Standard
+\noindent
+The quickest way of getting started is by studying this example :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+/* 
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+ * example of a client using the TANGO C++ api.
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+ */
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+#include <tango.h>
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+using namespace Tango;
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+int main(unsigned int argc, char **argv)
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+{
+\end_layout
+
+\begin_layout LyX-Code
+    try
+\end_layout
+
+\begin_layout LyX-Code
+    {
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+// create a connection to a TANGO device
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+        DeviceProxy *device = new DeviceProxy(
+\begin_inset Quotes eld
+\end_inset
+
+sys/database/2
+\begin_inset Quotes erd
+\end_inset
+
+);
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+// Ping the device
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+        device->ping();
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+// Execute a command on the device and extract the reply as a string
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+        string db_info; 
+\end_layout
+
+\begin_layout LyX-Code
+        DeviceData cmd_reply;
+\end_layout
+
+\begin_layout LyX-Code
+        cmd_reply = device->command_inout(
+\begin_inset Quotes eld
+\end_inset
+
+DbInfo
+\begin_inset Quotes erd
+\end_inset
+
+);
+\end_layout
+
+\begin_layout LyX-Code
+        cmd_reply >> db_info;
+\end_layout
+
+\begin_layout LyX-Code
+        cout << 
+\begin_inset Quotes eld
+\end_inset
+
+Command reply 
+\begin_inset Quotes eld
+\end_inset
+
+ << db_info << endl;
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+// Read a device attribute (string data type)
+\end_layout
+
+\begin_layout LyX-Code
+//
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+        string spr;
+\end_layout
+
+\begin_layout LyX-Code
+        DeviceAttribute att_reply;
+\end_layout
+
+\begin_layout LyX-Code
+        att_reply = device->read_attribute(
+\begin_inset Quotes eld
+\end_inset
+
+StoredProcedureRelease
+\begin_inset Quotes erd
+\end_inset
+
+);
+\end_layout
+
+\begin_layout LyX-Code
+        att_reply >> spr;
+\end_layout
+
+\begin_layout LyX-Code
+        cout << 
+\begin_inset Quotes eld
+\end_inset
+
+Database device stored procedure release: 
+\begin_inset Quotes eld
+\end_inset
+
+ << spr << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    }
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+    catch (DevFailed &e)
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+    {
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+        Except::print_exception(e);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+        exit(-1);
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+    } 
+\end_layout
+
+\begin_layout LyX-Code
+\noindent
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+Modify this example to fit your device server or client's needs, compile
+ it and link with the library -ltango.
+ Forget about those painful early TANGO days when you had to learn CORBA
+ and manipulate Any's.
+ Life's going to easy and fun from now on !
+\end_layout
+
+\begin_layout Section
+A TANGO device server
+\end_layout
+
+\begin_layout Standard
+The code given in this chapter as example has been generated using POGO.
+ Pogo
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Pogo
+\end_layout
+
+\end_inset
+
+ is a code generator for Tango device server.
+ See 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Pogo doc"
+
+\end_inset
+
+ for more information about POGO.
+ The following examples briefly describe how to write device class with
+ commands which receives and return different kind of Tango data types and
+ also how to write device attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+ The device class implements 5 commands and 3 attributes.
+ The commands are :
+\end_layout
+
+\begin_layout Itemize
+The command 
+\series bold
+DevSimple
+\series default
+ deals with simple Tango data type
+\end_layout
+
+\begin_layout Itemize
+The command 
+\series bold
+DevString
+\series default
+ deals with Tango strings
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+DevArray
+\series default
+ receive and return an array of simple Tango data type
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+DevStrArray
+\series default
+ which does not receive any data but which returns an array of strings
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+DevStruct
+\series default
+ which also does not receive data but which returns one of the two Tango
+ composed types (DevVarDoubleStringArray)
+\end_layout
+
+\begin_layout Standard
+For all these commands, the default behavior of the state machine (command
+ always allowed) is acceptable.
+ The attributes are :
+\end_layout
+
+\begin_layout Itemize
+A spectrum type attribute of the Tango string type called 
+\series bold
+StrAttr
+\end_layout
+
+\begin_layout Itemize
+A readable attribute of the Tango::DevLong type called 
+\series bold
+LongRdAttr
+\series default
+.
+ This attribute is linked with the following writable attribute
+\end_layout
+
+\begin_layout Itemize
+A writable attribute also of the Tango::DevLong type called 
+\series bold
+LongWrAttr
+\series default
+.
+\end_layout
+
+\begin_layout Subsection
+The commands and attributes code in C++
+\end_layout
+
+\begin_layout Standard
+For each command called DevXxxx, pogo generates in the device class a method
+ named dev_xxx which will be executed when the command is requested by a
+ client.
+ In this chapter, the name of the device class is 
+\emph on
+DocDs
+\end_layout
+
+\begin_layout Subsubsection
+The DevSimple command
+\end_layout
+
+\begin_layout Standard
+This method receives a Tango::DevFloat
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevFloat
+\end_layout
+
+\end_inset
+
+ type and also returns a data of the Tango::DevFloat type which is simply
+ the double of the input value.
+ The code for the method executed by this command is the following:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  Tango::DevFloat DocDs::dev_simple(Tango::DevFloat argin)
+\end_layout
+
+\begin_layout LyX-Code
+     2  {
+\end_layout
+
+\begin_layout LyX-Code
+     3          Tango::DevFloat argout ;
+\end_layout
+
+\begin_layout LyX-Code
+     4          DEBUG_STREAM << "DocDs::dev_simple(): entering...
+ !" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+     5  
+\end_layout
+
+\begin_layout LyX-Code
+     6          //      Add your own code to control device here
+\end_layout
+
+\begin_layout LyX-Code
+     7  
+\end_layout
+
+\begin_layout LyX-Code
+     8          argout = argin * 2;
+\end_layout
+
+\begin_layout LyX-Code
+     9          return argout;
+\end_layout
+
+\begin_layout LyX-Code
+    10  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This method is fairly simple.
+ The received data is passed to the method as its argument.
+ It is
+\end_layout
+
+\begin_layout Standard
+doubled at line 8 and the method simply returns the result.
+\end_layout
+
+\begin_layout Subsubsection
+The DevArray command
+\end_layout
+
+\begin_layout Standard
+This method receives a data of the Tango::DevVarLongArray
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevVarLongArray
+\end_layout
+
+\end_inset
+
+ type and also returns a data of the Tango::DevVarLongArray type.
+ Each element of the array is doubled.
+ The code for the method executed by the command is the following :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  Tango::DevVarLongArray *DocDs::dev_array(const Tango::DevVarLongArray
+ *argin)
+\end_layout
+
+\begin_layout LyX-Code
+     2  {
+\end_layout
+
+\begin_layout LyX-Code
+     3          //      POGO has generated a method core with argout allocation.
+\end_layout
+
+\begin_layout LyX-Code
+     4          //      If you would like to use a static reference without
+ copying,
+\end_layout
+
+\begin_layout LyX-Code
+     5          //      See "TANGO Device Server Programmer's Manual"
+\end_layout
+
+\begin_layout LyX-Code
+     6          //              (chapter x.x)
+\end_layout
+
+\begin_layout LyX-Code
+     7          //------------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+     8          Tango::DevVarLongArray  *argout  = new Tango::DevVarLongArray();
+\end_layout
+
+\begin_layout LyX-Code
+     9                  
+\end_layout
+
+\begin_layout LyX-Code
+    10          DEBUG_STREAM << "DocDs::dev_array(): entering...
+ !" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    11  
+\end_layout
+
+\begin_layout LyX-Code
+    12          //      Add your own code to control device here
+\end_layout
+
+\begin_layout LyX-Code
+    13  
+\end_layout
+
+\begin_layout LyX-Code
+    14          long argin_length = argin->length();    
+\end_layout
+
+\begin_layout LyX-Code
+    15          argout->length(argin_length);
+\end_layout
+
+\begin_layout LyX-Code
+    16          for (int i = 0;i < argin_length;i++)
+\end_layout
+
+\begin_layout LyX-Code
+    17                  (*argout)[i] = (*argin)[i] * 2;
+\end_layout
+
+\begin_layout LyX-Code
+    18  
+\end_layout
+
+\begin_layout LyX-Code
+    19          return argout;
+\end_layout
+
+\begin_layout LyX-Code
+    20  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The argout data array is created at line 8.
+ Its length is set at line 15 from the input argument length.
+ The array is populated at line 16,17 and returned.
+ This method allocates memory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+memory
+\end_layout
+
+\end_inset
+
+ for the argout array.
+ This memory is freed by the Tango core classes after the data have been
+ sent to the caller (no delete is needed).
+ It is also possible to return data from a statically allocated array without
+ copying.
+ Look at chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Data exchange"
+
+\end_inset
+
+ for all the details.
+\end_layout
+
+\begin_layout Subsubsection
+The DevString command
+\end_layout
+
+\begin_layout Standard
+This method receives a data of the Tango::DevString
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevString
+\end_layout
+
+\end_inset
+
+ type and also returns a data of the Tango::DevString type.
+ The command simply displays the content of the input string and returns
+ a hard-coded string.
+ The code for the method executed by the command is the following :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  Tango::DevString DocDs::dev_string(Tango::DevString argin)
+\end_layout
+
+\begin_layout LyX-Code
+     2  {
+\end_layout
+
+\begin_layout LyX-Code
+     3          //      POGO has generated a method core with argout allocation.
+\end_layout
+
+\begin_layout LyX-Code
+     4          //      If you would like to use a static reference without
+ copying,
+\end_layout
+
+\begin_layout LyX-Code
+     5          //      See "TANGO Device Server Programmer's Manual"
+\end_layout
+
+\begin_layout LyX-Code
+     6          //              (chapter x.x)
+\end_layout
+
+\begin_layout LyX-Code
+     7          //------------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+     8          Tango::DevString        argout;
+\end_layout
+
+\begin_layout LyX-Code
+     9          DEBUG_STREAM << "DocDs::dev_string(): entering...
+ !" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    10  
+\end_layout
+
+\begin_layout LyX-Code
+    11          //      Add your own code to control device here
+\end_layout
+
+\begin_layout LyX-Code
+    12  
+\end_layout
+
+\begin_layout LyX-Code
+    13          cout << "the received string is " << argin << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    14          
+\end_layout
+
+\begin_layout LyX-Code
+    15          string str("Am I a good Tango dancer ?");
+\end_layout
+
+\begin_layout LyX-Code
+    16          argout = new char[str.size() + 1];
+\end_layout
+
+\begin_layout LyX-Code
+    17          strcpy(argout,str.c_str());
+\end_layout
+
+\begin_layout LyX-Code
+    18          
+\end_layout
+
+\begin_layout LyX-Code
+    19          return argout;
+\end_layout
+
+\begin_layout LyX-Code
+    20  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The argout string is created at line 8.
+ Internally, this method is using a standard C++ string.
+ Memory for the returned data is allocated at line 16 and is initialized
+ at line 17.
+ This method allocates memory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+memory
+\end_layout
+
+\end_inset
+
+ for the argout string.
+ This memory is freed by the Tango core classes after the data have been
+ sent to the caller (no delete is needed).
+ It is also possible to return data from a statically allocated string without
+ copying.
+ Look at chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Data exchange"
+
+\end_inset
+
+ for all the details.
+\end_layout
+
+\begin_layout Subsubsection
+The DevStrArray command
+\end_layout
+
+\begin_layout Standard
+This method does not receive input data but returns an array of strings
+ (Tango::DevVarStringArray
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevVarStringArray
+\end_layout
+
+\end_inset
+
+ type).
+ The code for the method executed by this command is the following:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  Tango::DevVarStringArray *DocDs::dev_str_array()
+\end_layout
+
+\begin_layout LyX-Code
+     2  {
+\end_layout
+
+\begin_layout LyX-Code
+     3          //      POGO has generated a method core with argout allocation.
+\end_layout
+
+\begin_layout LyX-Code
+     4          //      If you would like to use a static reference without
+ copying,
+\end_layout
+
+\begin_layout LyX-Code
+     5          //      See "TANGO Device Server Programmer's Manual"
+\end_layout
+
+\begin_layout LyX-Code
+     6          //              (chapter x.x)
+\end_layout
+
+\begin_layout LyX-Code
+     7          //------------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+     8          Tango::DevVarStringArray        *argout  = new Tango::DevVarStri
+ngArray();
+\end_layout
+
+\begin_layout LyX-Code
+     9  
+\end_layout
+
+\begin_layout LyX-Code
+    10          DEBUG_STREAM << "DocDs::dev_str_array(): entering...
+ !" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    11  
+\end_layout
+
+\begin_layout LyX-Code
+    12          //      Add your own code to control device here
+\end_layout
+
+\begin_layout LyX-Code
+    13  
+\end_layout
+
+\begin_layout LyX-Code
+    14          argout->length(3);
+\end_layout
+
+\begin_layout LyX-Code
+    15          (*argout)[0] = CORBA::string_dup("Rumba");
+\end_layout
+
+\begin_layout LyX-Code
+    16          (*argout)[1] = CORBA::string_dup("Waltz");
+\end_layout
+
+\begin_layout LyX-Code
+    17          string str("Jerck");
+\end_layout
+
+\begin_layout LyX-Code
+    18          (*argout)[2] = CORBA::string_dup(str.c_str());
+\end_layout
+
+\begin_layout LyX-Code
+    19          return argout;
+\end_layout
+
+\begin_layout LyX-Code
+    20  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The argout data array is created at line 8.
+ Its length is set at line 14.
+ The array is populated at line 15,16 and 18.
+ The last array element is initialized from a standard C++ string created
+ at line 17.
+ Note the usage of the 
+\emph on
+string_dup
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+string-dup
+\end_layout
+
+\end_inset
+
+
+\emph default
+ function of the CORBA namespace.
+ This is necessary for strings array due to the CORBA memory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+memory
+\end_layout
+
+\end_inset
+
+ allocation schema.
+\end_layout
+
+\begin_layout Subsubsection
+The DevStruct command
+\end_layout
+
+\begin_layout Standard
+This method does not receive input data but returns a structure of the Tango::De
+vVarDoubleStringArray
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+Tango::DevVarDoubleStringArray
+\end_layout
+
+\end_inset
+
+ type.
+ This type is a composed type with an array of double and an array of strings.
+ The code for the method executed by this command is the following:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  Tango::DevVarDoubleStringArray *DocDs::dev_struct()
+\end_layout
+
+\begin_layout LyX-Code
+     2  {
+\end_layout
+
+\begin_layout LyX-Code
+     3          //      POGO has generated a method core with argout allocation.
+\end_layout
+
+\begin_layout LyX-Code
+     4          //      If you would like to use a static reference without
+ copying,
+\end_layout
+
+\begin_layout LyX-Code
+     5          //      See "TANGO Device Server Programmer's Manual"
+\end_layout
+
+\begin_layout LyX-Code
+     6          //              (chapter x.x)
+\end_layout
+
+\begin_layout LyX-Code
+     7          //------------------------------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+     8          Tango::DevVarDoubleStringArray  *argout  = new Tango::DevVarDoub
+leStringArray();
+\end_layout
+
+\begin_layout LyX-Code
+     9  
+\end_layout
+
+\begin_layout LyX-Code
+    10          DEBUG_STREAM << "DocDs::dev_struct(): entering...
+ !" << endl;
+\end_layout
+
+\begin_layout LyX-Code
+    11          
+\end_layout
+
+\begin_layout LyX-Code
+    12          //      Add your own code to control device here
+\end_layout
+
+\begin_layout LyX-Code
+    13  
+\end_layout
+
+\begin_layout LyX-Code
+    14          argout->dvalue.length(3);
+\end_layout
+
+\begin_layout LyX-Code
+    15          argout->dvalue[0] = 0.0;
+\end_layout
+
+\begin_layout LyX-Code
+    16          argout->dvalue[1] = 11.11;
+\end_layout
+
+\begin_layout LyX-Code
+    17          argout->dvalue[2] = 22.22;
+\end_layout
+
+\begin_layout LyX-Code
+    18          
+\end_layout
+
+\begin_layout LyX-Code
+    19          argout->svalue.length(2);
+\end_layout
+
+\begin_layout LyX-Code
+    20          argout->svalue[0] = CORBA::string_dup("Be Bop");
+\end_layout
+
+\begin_layout LyX-Code
+    21          string str("Smurf");
+\end_layout
+
+\begin_layout LyX-Code
+    22          argout->svalue[1] = CORBA::string_dup(str.c_str());
+\end_layout
+
+\begin_layout LyX-Code
+    23          
+\end_layout
+
+\begin_layout LyX-Code
+    24          return argout;
+\end_layout
+
+\begin_layout LyX-Code
+    25  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The argout data structure is created at line 8.
+ The length of the double array in the output structure is set at line 14.
+ The array is populated between lines 15 and 17.
+ The length of the string array in the output structure is set at line 19.
+ This string array is populated between lines 20 an 22 from a hard-coded
+ string and from a standard C++ string.
+ This method allocates memory
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+memory
+\end_layout
+
+\end_inset
+
+ for the argout data.
+ This memory is freed by the Tango core classes after the data have been
+ sent to the caller (no delete is needed).
+ Note the usage of the 
+\emph on
+string_dup
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+string-dup
+\end_layout
+
+\end_inset
+
+
+\emph default
+ function of the CORBA namespace.
+ This is necessary for strings array due to the CORBA memory allocation
+ schema.
+\end_layout
+
+\begin_layout Subsubsection
+The three attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Some data have been added to the definition of the device class in order
+ to store attributes value.
+ These data are (part of the class definition) :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  
+\end_layout
+
+\begin_layout LyX-Code
+     2  
+\end_layout
+
+\begin_layout LyX-Code
+     3  protected :     
+\end_layout
+
+\begin_layout LyX-Code
+     4          //      Add your own data members here
+\end_layout
+
+\begin_layout LyX-Code
+     5          //-----------------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+     6          Tango::DevString        attr_str_array[5];
+\end_layout
+
+\begin_layout LyX-Code
+     7          Tango::DevLong          attr_rd;
+\end_layout
+
+\begin_layout LyX-Code
+     8          Tango::DevLong          attr_wr;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+One data has been created for each attribute.
+ As the StrAttr attribute is of type spectrum with a maximum X dimension
+ of 5, an array of length 5 has been reserved.
+\end_layout
+
+\begin_layout Standard
+Several methods are necessary to implement these attributes.
+ One method to read the hardware which is common to all "readable" attributes
+ plus one "read" method for each readable attribute and one "write" method
+ for each writable attribute.
+ The code for these methods is the following :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+1 void DocDs::read_attr_hardware(vector<long> &attr_list)
+\end_layout
+
+\begin_layout LyX-Code
+2 {
+\end_layout
+
+\begin_layout LyX-Code
+3     DEBUG_STREAM << "DocDs::read_attr_hardware() entering...
+ "<< endl;
+\end_layout
+
+\begin_layout LyX-Code
+4     // Add your own code here
+\end_layout
+
+\begin_layout LyX-Code
+5 
+\end_layout
+
+\begin_layout LyX-Code
+6     string att_name;
+\end_layout
+
+\begin_layout LyX-Code
+7     for (long i = 0;i < attr_list.size();i++)
+\end_layout
+
+\begin_layout LyX-Code
+8     {
+\end_layout
+
+\begin_layout LyX-Code
+9         att_name = dev_attr->get_attr_by_ind(attr_list[i]).get_name();
+\end_layout
+
+\begin_layout LyX-Code
+10 
+\end_layout
+
+\begin_layout LyX-Code
+11        if (att_name == "LongRdAttr")
+\end_layout
+
+\begin_layout LyX-Code
+12        {
+\end_layout
+
+\begin_layout LyX-Code
+13           attr_rd = 5;
+\end_layout
+
+\begin_layout LyX-Code
+14        }
+\end_layout
+
+\begin_layout LyX-Code
+15    }
+\end_layout
+
+\begin_layout LyX-Code
+16 }
+\end_layout
+
+\begin_layout LyX-Code
+17 
+\end_layout
+
+\begin_layout LyX-Code
+18 void DocDs::read_LongRdAttr(Tango::Attribute &attr)
+\end_layout
+
+\begin_layout LyX-Code
+19 {
+\end_layout
+
+\begin_layout LyX-Code
+20      DEBUG_STREAM << "DocDs::read_LongRdAttr() entering...
+ "<< endl;
+\end_layout
+
+\begin_layout LyX-Code
+21 
+\end_layout
+
+\begin_layout LyX-Code
+22      attr.set_value(&attr_rd);
+\end_layout
+
+\begin_layout LyX-Code
+23 }
+\end_layout
+
+\begin_layout LyX-Code
+24 
+\end_layout
+
+\begin_layout LyX-Code
+25 void DocDs::read_LongWrAttr(Tango::Attribute &attr)
+\end_layout
+
+\begin_layout LyX-Code
+26 {
+\end_layout
+
+\begin_layout LyX-Code
+27      DEBUG_STREAM << "DocDs::read_LongWrAttr() entering...
+ "<< endl;
+\end_layout
+
+\begin_layout LyX-Code
+28 
+\end_layout
+
+\begin_layout LyX-Code
+29      attr.set_value(&attr_wr);
+\end_layout
+
+\begin_layout LyX-Code
+30 }
+\end_layout
+
+\begin_layout LyX-Code
+31 
+\end_layout
+
+\begin_layout LyX-Code
+32 void DocDs::write_LongWrAttr(Tango::WAttribute &attr)
+\end_layout
+
+\begin_layout LyX-Code
+33 {
+\end_layout
+
+\begin_layout LyX-Code
+34      DEBUG_STREAM << "DocDs::write_LongWrAttr() entering...
+ "<< endl;
+\end_layout
+
+\begin_layout LyX-Code
+35 
+\end_layout
+
+\begin_layout LyX-Code
+36      attr.get_write_value(attr_wr);
+\end_layout
+
+\begin_layout LyX-Code
+37      DEBUG_STREAM << "Value to be written = " << attr_wr << endl;
+\end_layout
+
+\begin_layout LyX-Code
+38 }
+\end_layout
+
+\begin_layout LyX-Code
+39 
+\end_layout
+
+\begin_layout LyX-Code
+40 void DocDs::read_StrAttr(Tango::Attribute &attr)
+\end_layout
+
+\begin_layout LyX-Code
+41 {
+\end_layout
+
+\begin_layout LyX-Code
+42      DEBUG_STREAM << "DocDs::read_StrAttr() entering...
+ "<< endl;
+\end_layout
+
+\begin_layout LyX-Code
+43 
+\end_layout
+
+\begin_layout LyX-Code
+44      attr_str_array[0] = CORBA::string_dup("Rock");
+\end_layout
+
+\begin_layout LyX-Code
+45      attr_str_array[1] = CORBA::string_dup("Samba");
+\end_layout
+
+\begin_layout LyX-Code
+46 
+\end_layout
+
+\begin_layout LyX-Code
+47      attr_set_value(attr_str_array, 2);
+\end_layout
+
+\begin_layout LyX-Code
+48 }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The 
+\emph on
+read_attr_hardware
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attr-hardware
+\end_layout
+
+\end_inset
+
+()
+\emph default
+ method is executed once when a client execute the read_attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attributes
+\end_layout
+
+\end_inset
+
+ CORBA request whatever the number of attribute to be read is.
+ The rule of this method is to read the hardware and to store the read values
+ somewhere in the device object.
+ In our example, only the LongRdAttr attribute internal value is set by
+ this method at line 13.
+ The method 
+\emph on
+read_LongRdAttr()
+\emph default
+ is executed by the read_attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attributes
+\end_layout
+
+\end_inset
+
+ CORBA call when the LongRdAttr attribute is read but after the read_attr_hardwa
+re() method has been executed.
+ Its rule is to set the attribute value in the TANGO core classes object
+ representing the attribute.
+ This is done at line 22.
+ The method 
+\emph on
+read_LongWrAttr()
+\emph default
+ will be executed when the LongWrAttr attribute is read (after the 
+\emph on
+read_attr_hardware()
+\emph default
+ method).
+ The attribute value is set at line 29.
+ In the same manner, the method called 
+\emph on
+read_StrAttr()
+\emph default
+ will be executed when the attribute StrAttr is read.
+ Its value is initialized in this method at line 44 and 45 with the 
+\emph on
+string_dup
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+string-dup
+\end_layout
+
+\end_inset
+
+
+\emph default
+ CORBA function.
+ The 
+\emph on
+write_LongWrAttr()
+\emph default
+ method is executed when the LongWrAttr attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+ value is set by a client.
+ The new attribute value coming from the client is stored in the object
+ data at line 36.
+\end_layout
+
+\begin_layout Standard
+Pogo also generates a file called "DocDsStateMachine.cpp" (for a Tango device
+ server class called DocDs).
+ This file is used to store methods coding the device state machine.
+ By default a allways allowed state machine is provided.
+ For more information about coding the state machine, refer to the chapter
+ "Writing a device server".
+\end_layout
+
+\begin_layout Subsection
+The commands and attributes code in java
+\end_layout
+
+\begin_layout Standard
+For each command called DevXxxx, pogo generates in the device class a method
+ named dev_xxx which will be executed when the command is requested by a
+ client.
+ In this chapter, the name of the device class is 
+\emph on
+DocDs
+\end_layout
+
+\begin_layout Subsubsection
+The DevSimple command
+\end_layout
+
+\begin_layout Standard
+This method receives a Tango DevFloat
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevFloat
+\end_layout
+
+\end_inset
+
+ type and also returns a data of the Tango DevFloat type which is simply
+ the double of the input value.
+ Using java, the Tango::DevFloat type is mapped to classical java float
+ type.
+ The code for the method executed by this command is the following:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  public float dev_simple(float argin) throws DevFailed
+\end_layout
+
+\begin_layout LyX-Code
+     2  {
+\end_layout
+
+\begin_layout LyX-Code
+     3          float   argout =  (float)0;
+\end_layout
+
+\begin_layout LyX-Code
+     4  
+\end_layout
+
+\begin_layout LyX-Code
+     5          Util.out2.println("Entering dev_simple()");
+\end_layout
+
+\begin_layout LyX-Code
+     6  
+\end_layout
+
+\begin_layout LyX-Code
+     7          // ---Add your Own code to control device here ---
+\end_layout
+
+\begin_layout LyX-Code
+     8  
+\end_layout
+
+\begin_layout LyX-Code
+     9          argout = argin * 2;
+\end_layout
+
+\begin_layout LyX-Code
+    10          return argout;
+\end_layout
+
+\begin_layout LyX-Code
+    11  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This method is fairly simple.
+ The received data is passed to the method as its argument.
+ It is
+\end_layout
+
+\begin_layout Standard
+doubled at line 9 and the method simply returns the result.
+\end_layout
+
+\begin_layout Subsubsection
+The DevArray command
+\end_layout
+
+\begin_layout Standard
+This method receives a data of the Tango::DevVarLongArray
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevVarLongArray
+\end_layout
+
+\end_inset
+
+ type and also returns a data of the Tango::DevVarLongArray type.
+ Each element of the array is doubled.
+ Using java, the Tango DevVarLongArray type is mapped to an array of java
+ long.
+ The code for the method executed by the command is the following :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  public int[] dev_array(int[] argin) throws DevFailed
+\end_layout
+
+\begin_layout LyX-Code
+     2  {
+\end_layout
+
+\begin_layout LyX-Code
+     3          int[]   argout = new int[argin.length];
+\end_layout
+
+\begin_layout LyX-Code
+     4  
+\end_layout
+
+\begin_layout LyX-Code
+     5          Util.out2.println("Entering dev_array()");
+\end_layout
+
+\begin_layout LyX-Code
+     6  
+\end_layout
+
+\begin_layout LyX-Code
+     7          // ---Add your Own code to control device here ---
+\end_layout
+
+\begin_layout LyX-Code
+     8  
+\end_layout
+
+\begin_layout LyX-Code
+     9          for (int i = 0;i < argin.length;i++)
+\end_layout
+
+\begin_layout LyX-Code
+    10                  argout[i] = argin[i] * 2;
+\end_layout
+
+\begin_layout LyX-Code
+    11          return argout;
+\end_layout
+
+\begin_layout LyX-Code
+    12  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The argout data array is created at line 3.
+ The array is populated at line 9,10 and returned.
+ 
+\end_layout
+
+\begin_layout Subsubsection
+The DevString command
+\end_layout
+
+\begin_layout Standard
+This method receives a data of the Tango DevString
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevString
+\end_layout
+
+\end_inset
+
+ type and also returns a data of the Tango DevString type.
+ The command simply displays the content of the input string and returns
+ a hard-coded string.
+ Using java, the Tango DevString type simply maps to java String.The code
+ for the method executed by the command is the following :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  public String dev_string(String argin) throws DevFailed
+\end_layout
+
+\begin_layout LyX-Code
+     2  {
+\end_layout
+
+\begin_layout LyX-Code
+     3          Util.out2.println("Entering dev_string()");
+\end_layout
+
+\begin_layout LyX-Code
+     4  
+\end_layout
+
+\begin_layout LyX-Code
+     5          // ---Add your Own code to control device here ---
+\end_layout
+
+\begin_layout LyX-Code
+     6  
+\end_layout
+
+\begin_layout LyX-Code
+     7          System.out.println("the received string is "+argin);
+\end_layout
+
+\begin_layout LyX-Code
+     8  
+\end_layout
+
+\begin_layout LyX-Code
+     9          String argout = new String("Am I a good Tango dancer ?");
+\end_layout
+
+\begin_layout LyX-Code
+    10          return argout;
+\end_layout
+
+\begin_layout LyX-Code
+    11  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The argout string is created at line 9.
+\end_layout
+
+\begin_layout Subsubsection
+The DevStrArray command
+\end_layout
+
+\begin_layout Standard
+This method does not receive input data but returns an array of strings
+ (Tango DevVarStringArray
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevVarStringArray
+\end_layout
+
+\end_inset
+
+ type).
+ Using java, the Tango DevVarStringArray type maps to an array of java String.
+ The code for the method executed by this command is the following:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  public String[] dev_str_array() throws DevFailed
+\end_layout
+
+\begin_layout LyX-Code
+     2  {
+\end_layout
+
+\begin_layout LyX-Code
+     3  
+\end_layout
+
+\begin_layout LyX-Code
+     4          Util.out2.println("Entering dev_str_array()");
+\end_layout
+
+\begin_layout LyX-Code
+     5  
+\end_layout
+
+\begin_layout LyX-Code
+     6          // ---Add your Own code to control device here ---
+\end_layout
+
+\begin_layout LyX-Code
+     7  
+\end_layout
+
+\begin_layout LyX-Code
+     8          String[] argout = new String[3];
+\end_layout
+
+\begin_layout LyX-Code
+     9          argout[0] = new String("Rumba");
+\end_layout
+
+\begin_layout LyX-Code
+    10          argout[1] = new String("Waltz");
+\end_layout
+
+\begin_layout LyX-Code
+    11          argout[2] = new String("Jerck");
+\end_layout
+
+\begin_layout LyX-Code
+    12          return argout;
+\end_layout
+
+\begin_layout LyX-Code
+    13  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The argout data array is created at line 8.
+ The array is populated at line 9,10 and 11.
+\end_layout
+
+\begin_layout Subsubsection
+The DevStruct command
+\end_layout
+
+\begin_layout Standard
+This method does not receive input data but returns a structure of the Tango
+ DevVarDoubleStringArray
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+DevVarDoubleStringArray
+\end_layout
+
+\end_inset
+
+ type.
+ This type is a composed type with an array of double and an array of strings.
+ This is mapped to a specific java class called DevVarDoubleStringArray.
+ The code for the method executed by this command is the following:
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  public DevVarDoubleStringArray dev_struct() throws DevFailed
+\end_layout
+
+\begin_layout LyX-Code
+     2  {
+\end_layout
+
+\begin_layout LyX-Code
+     3          DevVarDoubleStringArray argout = new DevVarDoubleStringArray();
+\end_layout
+
+\begin_layout LyX-Code
+     4  
+\end_layout
+
+\begin_layout LyX-Code
+     5          Util.out2.println("Entering dev_struct()");
+\end_layout
+
+\begin_layout LyX-Code
+     6  
+\end_layout
+
+\begin_layout LyX-Code
+     7          // ---Add your Own code to control device here ---
+\end_layout
+
+\begin_layout LyX-Code
+     8  
+\end_layout
+
+\begin_layout LyX-Code
+     9          argout.dvalue = new double[3];
+\end_layout
+
+\begin_layout LyX-Code
+    10          argout.dvalue[0] = 0.0;
+\end_layout
+
+\begin_layout LyX-Code
+    11          argout.dvalue[1] = 11.11;
+\end_layout
+
+\begin_layout LyX-Code
+    12          argout.dvalue[2] = 22.22;
+\end_layout
+
+\begin_layout LyX-Code
+    13  
+\end_layout
+
+\begin_layout LyX-Code
+    14          argout.svalue = new String[2];
+\end_layout
+
+\begin_layout LyX-Code
+    15          argout.svalue[0] = new String("Be Bop");
+\end_layout
+
+\begin_layout LyX-Code
+    16          argout.svalue[1] = new String("Smurf");
+\end_layout
+
+\begin_layout LyX-Code
+    17  
+\end_layout
+
+\begin_layout LyX-Code
+    18          return argout;
+\end_layout
+
+\begin_layout LyX-Code
+    19  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The argout data structure is created at line 3.
+ The double array in the output structure is created at line 9.
+ The array is populated between lines 10 and 12.
+ The string array in the output structure is created at line 14.
+ This string array is populated between lines 15 and 16 from hard-coded
+ strings.
+\end_layout
+
+\begin_layout Subsubsection
+The three attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Some data have been added to the definition of the device class in order
+ to store attributes value.
+ These data are (part of the class definition) :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  protected String[]      attr_str_array = new String[5];
+\end_layout
+
+\begin_layout LyX-Code
+     2  protected int           attr_rd;
+\end_layout
+
+\begin_layout LyX-Code
+     3  protected int           attr_wr;
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+One data has been created for each attribute.
+ As the StrAttr attribute is of type spectrum with a maximum X dimension
+ of 5, an array of length 5 has been reserved.
+\end_layout
+
+\begin_layout Standard
+Unfortunately, Java Tango device server are not at the same level of development
+ than C++ device servers.
+ This is why they are not written exactly the same way than C++ device servers.
+ Three methods are necessary to implement these attributes.
+ The code for these methods is the following :
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+     1  public void write_attr_hardware(Vector attr_list)
+\end_layout
+
+\begin_layout LyX-Code
+     2  {
+\end_layout
+
+\begin_layout LyX-Code
+     3          Util.out2.println("In write_attr_hardware for "+attr_list.size()+"
+ attribute(s)");
+\end_layout
+
+\begin_layout LyX-Code
+     4          
+\end_layout
+
+\begin_layout LyX-Code
+     5          for (int i=0 ; i<attr_list.size() ; i++)
+\end_layout
+
+\begin_layout LyX-Code
+     6          {
+\end_layout
+
+\begin_layout LyX-Code
+     7                  int ind = ((Integer)(attr_list.elementAt(i))).intValue();
+\end_layout
+
+\begin_layout LyX-Code
+     8                  WAttribute att = dev_attr.get_w_attr_by_ind(ind);
+\end_layout
+
+\begin_layout LyX-Code
+     9                  String attr_name = att.get_name();
+\end_layout
+
+\begin_layout LyX-Code
+    10  
+\end_layout
+
+\begin_layout LyX-Code
+    11                  //      Switch on attribute name
+\end_layout
+
+\begin_layout LyX-Code
+    12                  //---------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+    13                  if (attr_name.equals("LongWrAttr") == true)
+\end_layout
+
+\begin_layout LyX-Code
+    14                  {
+\end_layout
+
+\begin_layout LyX-Code
+    15                          //      Add your own code here
+\end_layout
+
+\begin_layout LyX-Code
+    16                          attr_wr = att.get_lg_write_value();
+\end_layout
+
+\begin_layout LyX-Code
+    17                          System.out.println("Value to be written =
+ "+attr_wr);
+\end_layout
+
+\begin_layout LyX-Code
+    18                  }
+\end_layout
+
+\begin_layout LyX-Code
+    19          }
+\end_layout
+
+\begin_layout LyX-Code
+    20  }
+\end_layout
+
+\begin_layout LyX-Code
+    21  
+\end_layout
+
+\begin_layout LyX-Code
+    22  
+\end_layout
+
+\begin_layout LyX-Code
+    23  public void read_attr_hardware(Vector attr_list)
+\end_layout
+
+\begin_layout LyX-Code
+    24  {
+\end_layout
+
+\begin_layout LyX-Code
+    25          Util.out2.println("In read_attr_hardware for "+attr_list.size()+"
+ attribute(s)");
+\end_layout
+
+\begin_layout LyX-Code
+    26  
+\end_layout
+
+\begin_layout LyX-Code
+    27          //      Add you own code here
+\end_layout
+
+\begin_layout LyX-Code
+    28          //---------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+    29                  
+\end_layout
+
+\begin_layout LyX-Code
+    30          for (int i=0; i<attr_list.size() ; i++)
+\end_layout
+
+\begin_layout LyX-Code
+    31          {
+\end_layout
+
+\begin_layout LyX-Code
+    32                  int ind = ((Integer)(attr_list.elementAt(i))).intValue();
+\end_layout
+
+\begin_layout LyX-Code
+    33                  Attribute att = dev_attr.get_attr_by_ind(ind);
+\end_layout
+
+\begin_layout LyX-Code
+    34                  String attr_name = attr_list.elementAt(i);
+\end_layout
+
+\begin_layout LyX-Code
+    35                          
+\end_layout
+
+\begin_layout LyX-Code
+    36                  if (attr_name.equals("LongRdAttr") == true)
+\end_layout
+
+\begin_layout LyX-Code
+    37                  {
+\end_layout
+
+\begin_layout LyX-Code
+    38                          attr_rd = 5;
+\end_layout
+
+\begin_layout LyX-Code
+    39                  }
+\end_layout
+
+\begin_layout LyX-Code
+    40                  else if (attr_name.equals("StrAttr") == true)
+\end_layout
+
+\begin_layout LyX-Code
+    41                  {
+\end_layout
+
+\begin_layout LyX-Code
+    42                          attr_str_array[0] = new String("Rock");
+\end_layout
+
+\begin_layout LyX-Code
+    43                          attr_str_array[1] = new String("Samba");
+\end_layout
+
+\begin_layout LyX-Code
+    44                  }
+\end_layout
+
+\begin_layout LyX-Code
+    45          }
+\end_layout
+
+\begin_layout LyX-Code
+    46  }
+\end_layout
+
+\begin_layout LyX-Code
+    47  
+\end_layout
+
+\begin_layout LyX-Code
+    48  
+\end_layout
+
+\begin_layout LyX-Code
+    49  public void read_attr(Attribute attr) throws DevFailed
+\end_layout
+
+\begin_layout LyX-Code
+    50  {
+\end_layout
+
+\begin_layout LyX-Code
+    51          String attr_name = attr.get_name();
+\end_layout
+
+\begin_layout LyX-Code
+    52          Util.out2.println("In read_attr for attribute "+attr_name);
+\end_layout
+
+\begin_layout LyX-Code
+    53  
+\end_layout
+
+\begin_layout LyX-Code
+    54          //      Switch on attribute name
+\end_layout
+
+\begin_layout LyX-Code
+    55          //---------------------------------
+\end_layout
+
+\begin_layout LyX-Code
+    56          if (attr_name.equals("LongWrAttr") == true)
+\end_layout
+
+\begin_layout LyX-Code
+    57          {
+\end_layout
+
+\begin_layout LyX-Code
+    58                  //      Add your own code here
+\end_layout
+
+\begin_layout LyX-Code
+    59                  attr.set_value(attr_wr);
+\end_layout
+
+\begin_layout LyX-Code
+    60          }
+\end_layout
+
+\begin_layout LyX-Code
+    61          if (attr_name.equals("LongRdAttr") == true)
+\end_layout
+
+\begin_layout LyX-Code
+    62          {
+\end_layout
+
+\begin_layout LyX-Code
+    63                  //      Add your own code here
+\end_layout
+
+\begin_layout LyX-Code
+    64                  attr.set_value(attr_rd);
+\end_layout
+
+\begin_layout LyX-Code
+    65          }
+\end_layout
+
+\begin_layout LyX-Code
+    66          if (attr_name.equals("StrAttr") == true)
+\end_layout
+
+\begin_layout LyX-Code
+    67          {
+\end_layout
+
+\begin_layout LyX-Code
+    68                  //      Add your own code here
+\end_layout
+
+\begin_layout LyX-Code
+    69                  attr.set_value(attr_str_array);
+\end_layout
+
+\begin_layout LyX-Code
+    70          }
+\end_layout
+
+\begin_layout LyX-Code
+    71  }
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "line.tex"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The 
+\emph on
+write_attr_hardware
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+write-attr-hardware
+\end_layout
+
+\end_inset
+
+()
+\emph default
+ method is executed when an attribute
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+attribute
+\end_layout
+
+\end_inset
+
+ value is set by a client.
+ In our example only one attribute is writable (the LongWrAttr attribute).
+ The new attribute value coming from the client is stored in the object
+ data at line 16.
+ The 
+\emph on
+read_attr_hardware
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attr-hardware
+\end_layout
+
+\end_inset
+
+()
+\emph default
+ method is executed once when a client execute the read_attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attributes
+\end_layout
+
+\end_inset
+
+ CORBA request.
+ The rule of this method is to read the hardware and to store the read values
+ somewhere in the device object.
+ In our example, the LongRdAttr attribute internal value is set by this
+ method at line 38 at the StrAttr attribute internal value is set at lines
+ 42 and 43.
+ The method 
+\emph on
+read_attr
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attr
+\end_layout
+
+\end_inset
+
+()
+\emph default
+ is executed for each attribute to be read by the read_attributes
+\begin_inset Index
+status collapsed
+
+\begin_layout Plain Layout
+read-attributes
+\end_layout
+
+\end_inset
+
+ CORBA call.
+ Its rule is to set the attribute value in the TANGO core classes object
+ representing the attribute.
+ This is done at line 64 for the LongRdAttr attribute, at line 59 for the
+ LongWrAttr attribute and at line 69 for the StrAttr attribute
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace 5cm
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset CommandInset label
+LatexCommand label
+name "APicture"
+
+\end_inset
+
+
+\begin_inset Graphics
+	filename ../dance/tg_argentine.jpg
+	groupId pictures
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/doc/src/tango.lyx b/doc/src/tango.lyx
new file mode 100644
index 0000000..4f47139
--- /dev/null
+++ b/doc/src/tango.lyx
@@ -0,0 +1,1158 @@
+#LyX 1.6.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 345
+\begin_document
+\begin_header
+\textclass Tango_book
+\begin_preamble
+\usepackage{a4wide}
+\usepackage{array}
+\usepackage{verbatim}
+\makeindex
+\usepackage{graphicx}
+\usepackage{mathptm,times}
+\usepackage[colorlinks=true,backref=true]{hyperref} 
+\end_preamble
+\use_default_options false
+\language english
+\inputencoding latin1
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\pdf_bookmarks true
+\pdf_bookmarksnumbered false
+\pdf_bookmarksopen false
+\pdf_bookmarksopenlevel 1
+\pdf_breaklinks false
+\pdf_pdfborder false
+\pdf_colorlinks true
+\pdf_backref false
+\pdf_pdfusetitle true
+\papersize default
+\use_geometry false
+\use_amsmath 1
+\use_esint 0
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\secnumdepth 5
+\tocdepth 4
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\author "" 
+\author "" 
+\end_header
+
+\begin_body
+
+\begin_layout Title
+\begin_inset Tabular
+<lyxtabular version="3" rows="7" columns="1">
+<features firstHeadEmpty="true">
+<column alignment="center" valignment="bottom" width="0pt">
+<row endhead="true">
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\size huge
+The TANGO Control System Manual
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\size huge
+\emph on
+Version 7.
+ 2
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Graphics
+	filename dance/18-8-size.jpg
+	width 7cm
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Author
+The TANGO Team
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset toc
+LatexCommand tableofcontents
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{3cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset CommandInset label
+LatexCommand label
+name "FirstPicture"
+
+\end_inset
+
+
+\begin_inset Graphics
+	filename dance/tango-08-27.jpg
+	lyxscale 70
+	scale 70
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.3cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Graphics
+	filename dance/Ready.eps
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.3cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Comment
+status open
+
+\begin_layout Plain Layout
+Introduction 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "intro/intro.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Comment
+status open
+
+\begin_layout Plain Layout
+Getting started 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "started/started.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Comment
+status open
+
+\begin_layout Plain Layout
+The TANGO device server model 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "ds_model/ds_model.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Comment
+status open
+
+\begin_layout Plain Layout
+The Tango API generalities 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "gen_api/genapi.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Comment
+status open
+
+\begin_layout Plain Layout
+The TANGO Java API 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "java_api/TangoApi.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Comment
+status open
+
+\begin_layout Plain Layout
+The TANGO C++ API 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "cpp_api/cppapi.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Comment
+status open
+
+\begin_layout Plain Layout
+The Tango ATK 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "atk/programmersguid.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Comment
+status open
+
+\begin_layout Plain Layout
+Writing a TANGO device server 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "ds_writing/ds_writing.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Comment
+status open
+
+\begin_layout Plain Layout
+Advanced features (polling) 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "advanced/advanced.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Comment
+status open
+
+\begin_layout Plain Layout
+The appendix 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "appendix/appendix.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Comment
+status open
+
+\begin_layout Plain Layout
+The IDL file 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "appendix/idl.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Comment
+status open
+
+\begin_layout Plain Layout
+Device naming 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "appendix/naming.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Comment
+status open
+
+\begin_layout Plain Layout
+Starting Tango control system
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "appendix/starting_tango.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Comment
+status open
+
+\begin_layout Plain Layout
+notifd2db command
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "appendix/notifd2db.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Comment
+status open
+
+\begin_layout Plain Layout
+property file
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "appendix/prop_file.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Chapter*
+List of pictures
+\end_layout
+
+\begin_layout Itemize
+Cover page: From http://www.juliaetandres.com
+\end_layout
+
+\begin_layout Itemize
+\begin_inset CommandInset ref
+LatexCommand vpageref
+reference "FirstPicture"
+
+\end_inset
+
+: By O.
+ Chevre from http://www.forteresses.free.fr
+\end_layout
+
+\begin_layout Itemize
+\begin_inset CommandInset ref
+LatexCommand vpageref
+reference "APicture"
+
+\end_inset
+
+: From http://www.photo-evasion.com licence "Creative Commons"
+\end_layout
+
+\begin_layout Itemize
+\begin_inset CommandInset ref
+LatexCommand vpageref
+reference "OneRicardo"
+
+\end_inset
+
+: By R.
+ STEINMANN © ECK2000
+\end_layout
+
+\begin_layout Itemize
+\begin_inset CommandInset ref
+LatexCommand vpageref
+reference "ThreeRicardo"
+
+\end_inset
+
+: By R.
+ STEINMANN © ECK2000
+\end_layout
+
+\begin_layout Itemize
+\begin_inset CommandInset ref
+LatexCommand vpageref
+reference "TwoRicardo"
+
+\end_inset
+
+: By R.
+ STEINMANN © ECK2000
+\end_layout
+
+\begin_layout Itemize
+\begin_inset CommandInset ref
+LatexCommand vpageref
+reference "BlackPicture"
+
+\end_inset
+
+: By O.
+ Chevre from http://www.forteresses.free.fr
+\end_layout
+
+\begin_layout Itemize
+\begin_inset CommandInset ref
+LatexCommand vpageref
+reference "FourRicardo"
+
+\end_inset
+
+: By R.
+ STEINMANN © ECK2000
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "1"
+key "OMG-page"
+
+\end_inset
+
+ 
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+href{http://www.omg.org}{OMG home page}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "2"
+key "Henning"
+
+\end_inset
+
+
+\begin_inset Quotes eld
+\end_inset
+
+Advanced CORBA programming with C++
+\begin_inset Quotes erd
+\end_inset
+
+ by M.Henning and S.Vinosky (Addison-Wesley 1999) 
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "3"
+key "Tango web"
+
+\end_inset
+
+ 
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+href{http://www.tango-controls.org}{TANGO home page}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "4"
+key "Alba_WEB"
+
+\end_inset
+
+ 
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+href{http://www.cells.es}{ALBA home page}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "5"
+key "Soleil_home_page"
+
+\end_inset
+
+ 
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+href{http://www.synchrotron-soleil.fr}{Soleil home page}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "6"
+key "mysql"
+
+\end_inset
+
+ 
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+href{http://www.mysql.com}{MySQL home page}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "7"
+key "MySQL book"
+
+\end_inset
+
+
+\begin_inset Quotes eld
+\end_inset
+
+MySQL and mSQL
+\begin_inset Quotes erd
+\end_inset
+
+ by Randy Jay Yarger, George Reese and Tim King (O'Reilly 1999) 
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "8"
+key "TANGO_ref_man"
+
+\end_inset
+
+ 
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+href{http://www.tango-controls.org/device-servers}{Tango classes on-line documenta
+tion}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "9"
+key "Stroustrup"
+
+\end_inset
+
+
+\begin_inset Quotes eld
+\end_inset
+
+C++ programming language
+\begin_inset Quotes erd
+\end_inset
+
+ third edition by Stroustrup (Addison-Wesley) 
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "10"
+key "Patterns"
+
+\end_inset
+
+
+\begin_inset Quotes eld
+\end_inset
+
+Design Patterns
+\begin_inset Quotes erd
+\end_inset
+
+ by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides (Addison-Wesley
+ 1995) 
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "11"
+key "OOC page"
+
+\end_inset
+
+ 
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+href{http://omniorb.sourceforge.net}{omniORB home page}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "12"
+key "CORBA_norm"
+
+\end_inset
+
+The Common Object Request Broker: Architecture and Specification Revision
+ 2.3 available from OMG home page
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "13"
+key "Java memory leak"
+
+\end_inset
+
+Java Pro - June 1999 : Plugging memory leak by Tony Leung 
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "14"
+key "CVS"
+
+\end_inset
+
+CVS WEB page - http://www.cyclic.com 
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "15"
+key "Pogo doc"
+
+\end_inset
+
+ 
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+href{http://www.esrf.eu/computing/cs/tango/tango_doc/tools_doc/pogo_doc/index.html}
+{POGO home page}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "16"
+key "JacORB"
+
+\end_inset
+
+ 
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+href{http://www.jacorb.org}{JacORB home page}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "17"
+key "ATK-doc"
+
+\end_inset
+
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+href{http://www.esrf.eu/computing/cs/tango/tango_doc/atk_doc/index.html}{Tango
+ ATK reference on-line documentation}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "18"
+key "Notif_doc"
+
+\end_inset
+
+The Notification Service specification available from OMG home page - http://www.
+omg.org
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "19"
+key "Astor_doc"
+
+\end_inset
+
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+href{http://www.esrf.eu/computing/cs/tango/tango_doc/tools_doc/astor_doc/index.html
+}{ASTOR home page}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "20"
+key "Elettra_home_page"
+
+\end_inset
+
+ 
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+href{http://www.elettra.trieste.it}{Elettra home page}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "21"
+key "Jive doc"
+
+\end_inset
+
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+href{http://www.esrf.eu/computing/cs/tango/tango_doc/tools_doc/jive_doc/index.html}
+{JIVE home page}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "22"
+key "ATK-Tutorial"
+
+\end_inset
+
+ 
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+href{http://www.esrf.eu/computing/cs/tango/tango_doc/atk_tutorial/Tutorials.pdf}{Ta
+ngo ATK Tutorials}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset index_print
+LatexCommand printindex
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/lib/Makefile.am b/lib/Makefile.am
index a2299eb..68487bc 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -16,5 +16,17 @@ if TANGO_JAVA_ENABLED
 
 install-data-local:
 	cp -r $(top_srcdir)/lib/java $(DESTDIR)$(pkgdatadir)/
-
+	cd $(DESTDIR)$(pkgdatadir)/java; \
+	ln -s Astor* Astor.jar; \
+	ln -s ATKC* ATKCore.jar; \
+	ln -s atkpanel* atkpanel.jar; \
+	ln -s AtkTuning* AtkTuning.jar; \
+	ln -s ATKWidget* ATKWidget.jar; \
+	ln -s DeviceTree* DeviceTree.jar; \
+	ln -s Jive* Jive.jar; \
+	ln -s log4j* log4j.jar; \
+	ln -s LogViewer* LogViewer.jar; \
+	ln -s org.tango.pogo* org.tago.pogo.jar; \
+	ln -s TangORB* TangORB.jar; \
+	ln -s tool_panels* tool_panels.jar
 endif
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 59529f4..e754d78 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -572,6 +572,19 @@ dist-hook:
 
 @TANGO_JAVA_ENABLED_TRUE at install-data-local:
 @TANGO_JAVA_ENABLED_TRUE@	cp -r $(top_srcdir)/lib/java $(DESTDIR)$(pkgdatadir)/
+ at TANGO_JAVA_ENABLED_TRUE@	cd $(DESTDIR)$(pkgdatadir)/java; \
+ at TANGO_JAVA_ENABLED_TRUE@	ln -s Astor* Astor.jar; \
+ at TANGO_JAVA_ENABLED_TRUE@	ln -s ATKC* ATKCore.jar; \
+ at TANGO_JAVA_ENABLED_TRUE@	ln -s atkpanel* atkpanel.jar; \
+ at TANGO_JAVA_ENABLED_TRUE@	ln -s AtkTuning* AtkTuning.jar; \
+ at TANGO_JAVA_ENABLED_TRUE@	ln -s ATKWidget* ATKWidget.jar; \
+ at TANGO_JAVA_ENABLED_TRUE@	ln -s DeviceTree* DeviceTree.jar; \
+ at TANGO_JAVA_ENABLED_TRUE@	ln -s Jive* Jive.jar; \
+ at TANGO_JAVA_ENABLED_TRUE@	ln -s log4j* log4j.jar; \
+ at TANGO_JAVA_ENABLED_TRUE@	ln -s LogViewer* LogViewer.jar; \
+ at TANGO_JAVA_ENABLED_TRUE@	ln -s org.tango.pogo* org.tago.pogo.jar; \
+ at TANGO_JAVA_ENABLED_TRUE@	ln -s TangORB* TangORB.jar; \
+ at TANGO_JAVA_ENABLED_TRUE@	ln -s tool_panels* tool_panels.jar
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/lib/cpp/client/api_util.cpp b/lib/cpp/client/api_util.cpp
index 801d6d1..4da4112 100644
--- a/lib/cpp/client/api_util.cpp
+++ b/lib/cpp/client/api_util.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: api_util.cpp,v 3.34 2010/09/12 12:18:23 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: api_util.cpp,v 3.34 2010/09/12 12:18:23 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //
 // cpp 	- C++ source code file for TANGO api class ApiUtil
diff --git a/lib/cpp/client/apiexcept.cpp b/lib/cpp/client/apiexcept.cpp
index 99cf0a7..a31fbe0 100644
--- a/lib/cpp/client/apiexcept.cpp
+++ b/lib/cpp/client/apiexcept.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: apiexcept.cpp,v 3.7 2010/09/09 13:43:38 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: apiexcept.cpp,v 3.7 2010/09/09 13:43:38 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/client/asynreq.cpp b/lib/cpp/client/asynreq.cpp
index 9609c3a..04619a5 100644
--- a/lib/cpp/client/asynreq.cpp
+++ b/lib/cpp/client/asynreq.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: asynreq.cpp,v 3.10 2010/09/09 13:43:38 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: asynreq.cpp,v 3.10 2010/09/09 13:43:38 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //
 // cpp 	- C++ source code file for TANGO AsynReq class
diff --git a/lib/cpp/client/attr_proxy.cpp b/lib/cpp/client/attr_proxy.cpp
index 373c555..9f4f92e 100644
--- a/lib/cpp/client/attr_proxy.cpp
+++ b/lib/cpp/client/attr_proxy.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: attr_proxy.cpp,v 1.15 2010/09/09 13:43:38 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: attr_proxy.cpp,v 1.15 2010/09/09 13:43:38 taurel Exp $\n$Name: Release_7_2_0 $";
 //
 // attr_proxy.cpp 	- C++ source code file for TANGO attribute proxy api 
 //
diff --git a/lib/cpp/client/cbthread.cpp b/lib/cpp/client/cbthread.cpp
index c9d6807..e3f9ab5 100644
--- a/lib/cpp/client/cbthread.cpp
+++ b/lib/cpp/client/cbthread.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: cbthread.cpp,v 3.7 2010/09/09 13:43:38 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: cbthread.cpp,v 3.7 2010/09/09 13:43:38 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/client/dbapi_attribute.cpp b/lib/cpp/client/dbapi_attribute.cpp
index ae646b9..14b9150 100644
--- a/lib/cpp/client/dbapi_attribute.cpp
+++ b/lib/cpp/client/dbapi_attribute.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: dbapi_attribute.cpp,v 1.6 2010/09/09 13:43:38 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: dbapi_attribute.cpp,v 1.6 2010/09/09 13:43:38 taurel Exp $\n$Name: Release_7_2_0 $";
 //
 // dbdevice.cpp - C++ source code file for TANGO dbapi class DbAttribute
 //
diff --git a/lib/cpp/client/dbapi_base.cpp b/lib/cpp/client/dbapi_base.cpp
index ee2cb0c..c65ead6 100644
--- a/lib/cpp/client/dbapi_base.cpp
+++ b/lib/cpp/client/dbapi_base.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: dbapi_base.cpp,v 3.55 2010/10/04 12:16:04 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: dbapi_base.cpp,v 3.55 2010/10/04 12:16:04 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //
 // cpp 	- C++ source code file for TANGO dbapi class Database
diff --git a/lib/cpp/client/dbapi_class.cpp b/lib/cpp/client/dbapi_class.cpp
index 712526a..3b05aa0 100644
--- a/lib/cpp/client/dbapi_class.cpp
+++ b/lib/cpp/client/dbapi_class.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: dbapi_class.cpp,v 3.9 2010/09/09 13:43:38 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: dbapi_class.cpp,v 3.9 2010/09/09 13:43:38 taurel Exp $\n$Name: Release_7_2_0 $";
 //
 // dbapi_class.cpp - C++ source code file for TANGO dbapi class DbClass
 //
diff --git a/lib/cpp/client/dbapi_datum.cpp b/lib/cpp/client/dbapi_datum.cpp
index 2befc55..a72a638 100644
--- a/lib/cpp/client/dbapi_datum.cpp
+++ b/lib/cpp/client/dbapi_datum.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: dbapi_datum.cpp,v 3.14 2010/09/09 13:43:38 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: dbapi_datum.cpp,v 3.14 2010/09/09 13:43:38 taurel Exp $\n$Name: Release_7_2_0 $";
 //
 // dbdatum.cpp 	- C++ source code file for TANGO dbapi class DbDatum
 //
diff --git a/lib/cpp/client/dbapi_device.cpp b/lib/cpp/client/dbapi_device.cpp
index df2c2b9..c423519 100644
--- a/lib/cpp/client/dbapi_device.cpp
+++ b/lib/cpp/client/dbapi_device.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: dbapi_device.cpp,v 3.11 2010/09/09 13:43:38 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: dbapi_device.cpp,v 3.11 2010/09/09 13:43:38 taurel Exp $\n$Name: Release_7_2_0 $";
 //
 // dbdevice.cpp - C++ source code file for TANGO dbapi class DbDevice
 //
diff --git a/lib/cpp/client/dbapi_history.cpp b/lib/cpp/client/dbapi_history.cpp
index d26adc9..1942c7b 100644
--- a/lib/cpp/client/dbapi_history.cpp
+++ b/lib/cpp/client/dbapi_history.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: dbapi_history.cpp,v 3.6 2010/09/09 13:43:38 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: dbapi_history.cpp,v 3.6 2010/09/09 13:43:38 taurel Exp $\n$Name: Release_7_2_0 $";
 //
 // dbapi_history.cpp - C++ source code file for TANGO dbapi class DbHistory
 //
diff --git a/lib/cpp/client/dbapi_server.cpp b/lib/cpp/client/dbapi_server.cpp
index 068cc0d..ef4ce5b 100644
--- a/lib/cpp/client/dbapi_server.cpp
+++ b/lib/cpp/client/dbapi_server.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: dbapi_server.cpp,v 3.5 2010/09/09 13:43:38 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: dbapi_server.cpp,v 3.5 2010/09/09 13:43:38 taurel Exp $\n$Name: Release_7_2_0 $";
 //
 // dbdevice.cpp - C++ source code file for TANGO dbapi class DbServer
 //
diff --git a/lib/cpp/client/devapi_attr.cpp b/lib/cpp/client/devapi_attr.cpp
index 76f32f8..51417e7 100644
--- a/lib/cpp/client/devapi_attr.cpp
+++ b/lib/cpp/client/devapi_attr.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: devapi_attr.cpp,v 3.27 2010/09/29 12:03:49 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: devapi_attr.cpp,v 3.27 2010/09/29 12:03:49 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //
 // devapi_attrib.cpp 	- C++ source code file for TANGO devapi class DeviceAttribute
diff --git a/lib/cpp/client/devapi_base.cpp b/lib/cpp/client/devapi_base.cpp
index b5fd1e4..b27ce1a 100644
--- a/lib/cpp/client/devapi_base.cpp
+++ b/lib/cpp/client/devapi_base.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: devapi_base.cpp,v 3.91 2010/09/12 12:18:23 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: devapi_base.cpp,v 3.91 2010/09/12 12:18:23 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //
 // devapi_base.cpp 	- C++ source code file for TANGO device api 
diff --git a/lib/cpp/client/devapi_data.cpp b/lib/cpp/client/devapi_data.cpp
index 2c0e6a3..11c60a5 100644
--- a/lib/cpp/client/devapi_data.cpp
+++ b/lib/cpp/client/devapi_data.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: devapi_data.cpp,v 3.16 2010/09/09 13:44:06 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: devapi_data.cpp,v 3.16 2010/09/09 13:44:06 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //
 // devapi_data.cpp 	- C++ source code file for TANGO devapi class DeviceData
diff --git a/lib/cpp/client/devapi_datahist.cpp b/lib/cpp/client/devapi_datahist.cpp
index 462b917..71eb154 100644
--- a/lib/cpp/client/devapi_datahist.cpp
+++ b/lib/cpp/client/devapi_datahist.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: devapi_datahist.cpp,v 3.18 2010/09/09 13:44:06 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: devapi_datahist.cpp,v 3.18 2010/09/09 13:44:06 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //
 // devapi_datahist.cpp 	- C++ source code file for TANGO devapi class 
diff --git a/lib/cpp/client/proxy_asyn.cpp b/lib/cpp/client/proxy_asyn.cpp
index e494ef9..b0b56cd 100644
--- a/lib/cpp/client/proxy_asyn.cpp
+++ b/lib/cpp/client/proxy_asyn.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: proxy_asyn.cpp,v 3.30 2010/09/09 13:44:06 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: proxy_asyn.cpp,v 3.30 2010/09/09 13:44:06 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //
 // cpp 	- C++ source code file for TANGO api Connection and DeviceProxy
diff --git a/lib/cpp/client/proxy_asyn_cb.cpp b/lib/cpp/client/proxy_asyn_cb.cpp
index 6389978..2e3aae7 100644
--- a/lib/cpp/client/proxy_asyn_cb.cpp
+++ b/lib/cpp/client/proxy_asyn_cb.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: proxy_asyn_cb.cpp,v 3.22 2010/09/12 12:18:23 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: proxy_asyn_cb.cpp,v 3.22 2010/09/12 12:18:23 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //
 // cpp 	- C++ source code file for TANGO api class and asynchronous callback
diff --git a/lib/cpp/log4tango/Makefile.am b/lib/cpp/log4tango/Makefile.am
index 8d2a461..e0231d5 100644
--- a/lib/cpp/log4tango/Makefile.am
+++ b/lib/cpp/log4tango/Makefile.am
@@ -11,7 +11,7 @@ DIST_SUBDIRS += doc
 endif
 
 EXTRA_DIST = log4tango.pc.in \
-		log4tango.spec.in log4tango.spec log4tango.m4 \
+		log4tango.m4 \
 		m4/AC_CREATE_PREFIX_CONFIG_H.m4 \
 		m4/BB_ENABLE_DOXYGEN.m4 \
 		m4/AC_CXX_HAVE_SSTREAM.m4 \
diff --git a/lib/cpp/log4tango/Makefile.in b/lib/cpp/log4tango/Makefile.in
index a52cf92..766005d 100644
--- a/lib/cpp/log4tango/Makefile.in
+++ b/lib/cpp/log4tango/Makefile.in
@@ -37,8 +37,8 @@ host_triplet = @host@
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in $(srcdir)/log4tango.pc.in \
-	$(srcdir)/log4tango.spec.in $(top_srcdir)/configure AUTHORS \
-	COPYING ChangeLog INSTALL NEWS THANKS
+	$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+	THANKS
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/AC_CREATE_PREFIX_CONFIG_H.m4 \
 	$(top_srcdir)/m4/AC_CXX_HAVE_SSTREAM.m4 \
@@ -59,7 +59,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/include/config.h
-CONFIG_CLEAN_FILES = log4tango.spec log4tango.pc
+CONFIG_CLEAN_FILES = log4tango.pc
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -219,7 +219,7 @@ top_srcdir = @top_srcdir@
 SUBDIRS = config src include tests $(am__append_1)
 DIST_SUBDIRS = config src include tests $(am__append_2)
 EXTRA_DIST = log4tango.pc.in \
-		log4tango.spec.in log4tango.spec log4tango.m4 \
+		log4tango.m4 \
 		m4/AC_CREATE_PREFIX_CONFIG_H.m4 \
 		m4/BB_ENABLE_DOXYGEN.m4 \
 		m4/AC_CXX_HAVE_SSTREAM.m4 \
@@ -267,8 +267,6 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
 	cd $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-log4tango.spec: $(top_builddir)/config.status $(srcdir)/log4tango.spec.in
-	cd $(top_builddir) && $(SHELL) ./config.status $@
 log4tango.pc: $(top_builddir)/config.status $(srcdir)/log4tango.pc.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 
diff --git a/lib/cpp/log4tango/configure b/lib/cpp/log4tango/configure
index 0210acd..1bf3432 100755
--- a/lib/cpp/log4tango/configure
+++ b/lib/cpp/log4tango/configure
@@ -17398,7 +17398,7 @@ GENERIC_CONFIG="$F"
 
 
 
-ac_config_files="$ac_config_files Makefile log4tango.spec log4tango.pc config/Makefile src/Makefile include/Makefile include/log4tango/Makefile include/log4tango/threading/Makefile tests/Makefile"
+ac_config_files="$ac_config_files Makefile log4tango.pc config/Makefile src/Makefile include/Makefile include/log4tango/Makefile include/log4tango/threading/Makefile tests/Makefile"
 
 
 if test "x$enable_doc" = xyes; then
@@ -18415,7 +18415,6 @@ do
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "log4tango.spec") CONFIG_FILES="$CONFIG_FILES log4tango.spec" ;;
     "log4tango.pc") CONFIG_FILES="$CONFIG_FILES log4tango.pc" ;;
     "config/Makefile") CONFIG_FILES="$CONFIG_FILES config/Makefile" ;;
     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
diff --git a/lib/cpp/log4tango/configure.in b/lib/cpp/log4tango/configure.in
index e33487b..6514249 100644
--- a/lib/cpp/log4tango/configure.in
+++ b/lib/cpp/log4tango/configure.in
@@ -90,7 +90,6 @@ AC_CREATE_GENERIC_CONFIG
 
 AC_CONFIG_FILES([
 Makefile
-log4tango.spec
 log4tango.pc
 config/Makefile
 src/Makefile
diff --git a/lib/cpp/log4tango/log4tango.spec b/lib/cpp/log4tango/log4tango.spec
deleted file mode 100644
index c2baf78..0000000
--- a/lib/cpp/log4tango/log4tango.spec
+++ /dev/null
@@ -1,90 +0,0 @@
-%define  RELEASE 3
-%define  rel     %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
-
-%define lib_name log4tango
-
-Name: log4tango
-Version: 4.0.3
-Release: %rel
-
-Summary: Log for C++
-Copyright: LGPL
-Group: Development/Libraries
-Vendor:  Bastiaan Bakker <bastiaan.bakker at lifeline.nl>
-Packager: Cedric Le Goater <cedric at legoater.com>
-Url: http://log4tango.sourceforge.net/
-
-Source: ftp://download.sourceforge.net/pub/sourceforge/log4tango/%name-%version.tar.gz
-
-Prefix: %_prefix
-BuildRoot: %_tmppath/%name-%version-root
-
-%description
-Log for C++ is a library of classes for flexible logging to files, syslog,
-and other destinations. It is modeled after the Log for Java library and
-stays as close to its API as is reasonable.
-
-%package devel
-Summary: development tools for Log for C++
-Group: Development/Libraries
-Requires: %name = %version
-
-%description devel
-The %name-devel package contains the static libraries and header files
-needed for development with %name.
-
-%package doc
-Summary: HTML formatted API documention for Log for C++
-Group: Development/Libraries
-#can't set doc package to noarch without setting the others as well.
-#BuildArch: noarch
-
-%description doc
-The %name-doc package contains HTML formatted API documention generated by
-the popular doxygen documentation generation tool.
-
-%prep
-rm -rf $RPM_BUILD_ROOT
-
-%setup
-CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --enable-doxygen 
-
-%build
-make
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-make prefix=$RPM_BUILD_ROOT%{prefix} install
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%post
-/sbin/ldconfig
-
-%post devel
-if test "x$RPM_INSTALL_PREFIX0" != "x" ; then
-    perl -pi -e "s|^libdir='[^\']*'|libdir='$RPM_INSTALL_PREFIX0/lib'|" $RPM_INSTALL_PREFIX0/lib/liblog4tango.la
-    perl -pi -e "s|^prefix=\"[^\"]*\"|prefix=\"$RPM_INSTALL_PREFIX0\"|" $RPM_INSTALL_PREFIX0/bin/log4tango-config
-fi
- 
-%postun
-/sbin/ldconfig
-
-%files
-%defattr(-,root,root,755)
-%attr(755,root,root) %prefix/lib/lib*.so.*
-%doc AUTHORS COPYING INSTALL NEWS README THANKS ChangeLog
-
-%files devel
-%defattr(-,root,root,755)
-%prefix/include/*
-%prefix/man/*
-%attr(755,root,root) %prefix/bin/log4tango-config
-%attr(755,root,root) %prefix/lib/lib*.so
-%attr(644,root,root) %prefix/lib/*.*a
-
-%files doc
-%doc %prefix/doc/*
-
diff --git a/lib/cpp/log4tango/log4tango.spec.in b/lib/cpp/log4tango/log4tango.spec.in
deleted file mode 100644
index d25a635..0000000
--- a/lib/cpp/log4tango/log4tango.spec.in
+++ /dev/null
@@ -1,90 +0,0 @@
-%define  RELEASE 3
-%define  rel     %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
-
-%define lib_name log4tango
-
-Name: @PACKAGE_TARNAME@
-Version: @PACKAGE_VERSION@
-Release: %rel
-
-Summary: Log for C++
-Copyright: LGPL
-Group: Development/Libraries
-Vendor:  Bastiaan Bakker <bastiaan.bakker at lifeline.nl>
-Packager: Cedric Le Goater <cedric at legoater.com>
-Url: http://log4tango.sourceforge.net/
-
-Source: ftp://download.sourceforge.net/pub/sourceforge/log4tango/%name-%version.tar.gz
-
-Prefix: %_prefix
-BuildRoot: %_tmppath/%name-%version-root
-
-%description
-Log for C++ is a library of classes for flexible logging to files, syslog,
-and other destinations. It is modeled after the Log for Java library and
-stays as close to its API as is reasonable.
-
-%package devel
-Summary: development tools for Log for C++
-Group: Development/Libraries
-Requires: %name = %version
-
-%description devel
-The %name-devel package contains the static libraries and header files
-needed for development with %name.
-
-%package doc
-Summary: HTML formatted API documention for Log for C++
-Group: Development/Libraries
-#can't set doc package to noarch without setting the others as well.
-#BuildArch: noarch
-
-%description doc
-The %name-doc package contains HTML formatted API documention generated by
-the popular doxygen documentation generation tool.
-
-%prep
-rm -rf $RPM_BUILD_ROOT
-
-%setup
-CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --enable-doxygen 
-
-%build
-make
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-make prefix=$RPM_BUILD_ROOT%{prefix} install
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%post
-/sbin/ldconfig
-
-%post devel
-if test "x$RPM_INSTALL_PREFIX0" != "x" ; then
-    perl -pi -e "s|^libdir='[^\']*'|libdir='$RPM_INSTALL_PREFIX0/lib'|" $RPM_INSTALL_PREFIX0/lib/liblog4tango.la
-    perl -pi -e "s|^prefix=\"[^\"]*\"|prefix=\"$RPM_INSTALL_PREFIX0\"|" $RPM_INSTALL_PREFIX0/bin/log4tango-config
-fi
- 
-%postun
-/sbin/ldconfig
-
-%files
-%defattr(-,root,root,755)
-%attr(755,root,root) %prefix/lib/lib*.so.*
-%doc AUTHORS COPYING INSTALL NEWS README THANKS ChangeLog
-
-%files devel
-%defattr(-,root,root,755)
-%prefix/include/*
-%prefix/man/*
-%attr(755,root,root) %prefix/bin/log4tango-config
-%attr(755,root,root) %prefix/lib/lib*.so
-%attr(644,root,root) %prefix/lib/*.*a
-
-%files doc
-%doc %prefix/doc/*
-
diff --git a/lib/cpp/server/attrdesc.cpp b/lib/cpp/server/attrdesc.cpp
index f06da06..6a1a95d 100644
--- a/lib/cpp/server/attrdesc.cpp
+++ b/lib/cpp/server/attrdesc.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: attrdesc.cpp,v 3.17 2010/09/09 13:44:46 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: attrdesc.cpp,v 3.17 2010/09/09 13:44:46 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/server/attribute.cpp b/lib/cpp/server/attribute.cpp
index c1f4d4b..4d2061e 100644
--- a/lib/cpp/server/attribute.cpp
+++ b/lib/cpp/server/attribute.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: attribute.cpp,v 3.84 2010/09/17 08:22:05 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: attribute.cpp,v 3.84 2010/09/17 08:22:05 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/server/attrmanip.cpp b/lib/cpp/server/attrmanip.cpp
index 996c3d2..9f32997 100644
--- a/lib/cpp/server/attrmanip.cpp
+++ b/lib/cpp/server/attrmanip.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: attrmanip.cpp,v 3.6 2010/09/09 13:44:46 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: attrmanip.cpp,v 3.6 2010/09/09 13:44:46 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/server/basiccommand.cpp b/lib/cpp/server/basiccommand.cpp
index a09683a..e4f0459 100644
--- a/lib/cpp/server/basiccommand.cpp
+++ b/lib/cpp/server/basiccommand.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: basiccommand.cpp,v 3.16 2010/09/09 13:44:46 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: basiccommand.cpp,v 3.16 2010/09/09 13:44:46 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/server/blackbox.cpp b/lib/cpp/server/blackbox.cpp
index a2d0ec7..2e022a4 100644
--- a/lib/cpp/server/blackbox.cpp
+++ b/lib/cpp/server/blackbox.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: blackbox.cpp,v 3.26 2010/09/09 13:44:46 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: blackbox.cpp,v 3.26 2010/09/09 13:44:46 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/server/class_factory.cpp b/lib/cpp/server/class_factory.cpp
index 46d94ff..80e0181 100644
--- a/lib/cpp/server/class_factory.cpp
+++ b/lib/cpp/server/class_factory.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: class_factory.cpp,v 3.10 2010/09/09 13:44:46 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: class_factory.cpp,v 3.10 2010/09/09 13:44:46 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+===========================================================================
 //
diff --git a/lib/cpp/server/classattribute.cpp b/lib/cpp/server/classattribute.cpp
index b3a6b9d..8f8eb32 100644
--- a/lib/cpp/server/classattribute.cpp
+++ b/lib/cpp/server/classattribute.cpp
@@ -1,5 +1,5 @@
 
-static const char *RcsId = "$Id: classattribute.cpp,v 3.12 2010/09/09 13:44:46 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: classattribute.cpp,v 3.12 2010/09/09 13:44:46 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/server/command.cpp b/lib/cpp/server/command.cpp
index a6a70e1..1b59b2a 100644
--- a/lib/cpp/server/command.cpp
+++ b/lib/cpp/server/command.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: command.cpp,v 3.12 2010/09/09 13:44:46 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: command.cpp,v 3.12 2010/09/09 13:44:46 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/server/coutappender.cpp b/lib/cpp/server/coutappender.cpp
index 324ec19..c13d46b 100644
--- a/lib/cpp/server/coutappender.cpp
+++ b/lib/cpp/server/coutappender.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: coutappender.cpp,v 3.6 2010/09/09 13:44:46 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: coutappender.cpp,v 3.6 2010/09/09 13:44:46 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+=============================================================================
 //
diff --git a/lib/cpp/server/dev_event.cpp b/lib/cpp/server/dev_event.cpp
index 50ee1e0..fbccb26 100644
--- a/lib/cpp/server/dev_event.cpp
+++ b/lib/cpp/server/dev_event.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: dev_event.cpp,v 3.11 2010/09/09 13:44:46 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: dev_event.cpp,v 3.11 2010/09/09 13:44:46 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/server/device.cpp b/lib/cpp/server/device.cpp
index 2777cc5..8dbcf45 100644
--- a/lib/cpp/server/device.cpp
+++ b/lib/cpp/server/device.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: device.cpp,v 3.65 2010/09/09 13:45:22 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: device.cpp,v 3.65 2010/09/09 13:45:22 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/server/device_2.cpp b/lib/cpp/server/device_2.cpp
index e9c64bc..d7afab3 100644
--- a/lib/cpp/server/device_2.cpp
+++ b/lib/cpp/server/device_2.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: device_2.cpp,v 3.27 2010/09/09 13:45:22 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: device_2.cpp,v 3.27 2010/09/09 13:45:22 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/server/device_3.cpp b/lib/cpp/server/device_3.cpp
index 5503627..a3e3fa8 100644
--- a/lib/cpp/server/device_3.cpp
+++ b/lib/cpp/server/device_3.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: device_3.cpp,v 3.55 2010/09/30 14:16:52 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: device_3.cpp,v 3.55 2010/09/30 14:16:52 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/server/deviceclass.cpp b/lib/cpp/server/deviceclass.cpp
index 6a42743..33b0647 100644
--- a/lib/cpp/server/deviceclass.cpp
+++ b/lib/cpp/server/deviceclass.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: deviceclass.cpp,v 1.37 2010/09/24 14:06:15 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: deviceclass.cpp,v 1.37 2010/09/24 14:06:15 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/server/dserver.cpp b/lib/cpp/server/dserver.cpp
index 4a27320..6d64fca 100644
--- a/lib/cpp/server/dserver.cpp
+++ b/lib/cpp/server/dserver.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: dserver.cpp,v 3.58 2010/09/30 08:12:59 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: dserver.cpp,v 3.58 2010/09/30 08:12:59 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+=============================================================================
 //
diff --git a/lib/cpp/server/dserverclass.cpp b/lib/cpp/server/dserverclass.cpp
index ec7abec..5a14434 100644
--- a/lib/cpp/server/dserverclass.cpp
+++ b/lib/cpp/server/dserverclass.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: dserverclass.cpp,v 3.23 2010/09/09 13:45:22 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: dserverclass.cpp,v 3.23 2010/09/09 13:45:22 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+=============================================================================
 //
diff --git a/lib/cpp/server/dserverlock.cpp b/lib/cpp/server/dserverlock.cpp
index 9c0246d..288385c 100644
--- a/lib/cpp/server/dserverlock.cpp
+++ b/lib/cpp/server/dserverlock.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: dserverlock.cpp,v 3.8 2010/09/09 13:45:22 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: dserverlock.cpp,v 3.8 2010/09/09 13:45:22 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+=============================================================================
 //
diff --git a/lib/cpp/server/dserverlog.cpp b/lib/cpp/server/dserverlog.cpp
index 6401686..44e94b4 100644
--- a/lib/cpp/server/dserverlog.cpp
+++ b/lib/cpp/server/dserverlog.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: dserverlog.cpp,v 3.7 2010/09/09 13:45:22 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: dserverlog.cpp,v 3.7 2010/09/09 13:45:22 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+=============================================================================
 //
diff --git a/lib/cpp/server/dserverpoll.cpp b/lib/cpp/server/dserverpoll.cpp
index 9c94c8b..6d56e38 100644
--- a/lib/cpp/server/dserverpoll.cpp
+++ b/lib/cpp/server/dserverpoll.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: dserverpoll.cpp,v 3.36 2010/09/09 13:45:22 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: dserverpoll.cpp,v 3.36 2010/09/09 13:45:22 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+=============================================================================
 //
diff --git a/lib/cpp/server/dserversignal.cpp b/lib/cpp/server/dserversignal.cpp
index fcd30fb..226984d 100644
--- a/lib/cpp/server/dserversignal.cpp
+++ b/lib/cpp/server/dserversignal.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: dserversignal.cpp,v 3.16 2010/09/09 13:45:22 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: dserversignal.cpp,v 3.16 2010/09/09 13:45:22 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+=============================================================================
 //
diff --git a/lib/cpp/server/eventkeepalive.cpp b/lib/cpp/server/eventkeepalive.cpp
index 285e871..27ba537 100644
--- a/lib/cpp/server/eventkeepalive.cpp
+++ b/lib/cpp/server/eventkeepalive.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: eventkeepalive.cpp,v 1.11 2010/09/29 12:04:35 taurel Exp $";
+static const char *RcsId = "$Id: eventkeepalive.cpp,v 1.12 2010/10/06 12:31:15 taurel Exp $";
 
 ////////////////////////////////////////////////////////////////////////////////
 ///
@@ -35,9 +35,13 @@ static const char *RcsId = "$Id: eventkeepalive.cpp,v 1.11 2010/09/29 12:04:35 t
 // along with Tango.  If not, see <http://www.gnu.org/licenses/>.
 //
 ///
-///		$Revision: 1.11 $
+///		$Revision: 1.12 $
 ///
 ///		$Log: eventkeepalive.cpp,v $
+///		Revision 1.12  2010/10/06 12:31:15  taurel
+///		- Fix bug in re-connection synchronous call for attribute configuration
+///		change event
+///		
 ///		Revision 1.11  2010/09/29 12:04:35  taurel
 ///		- It's now possible to register several callbacks for the same event
 ///		
@@ -1022,14 +1026,32 @@ void *EventConsumerKeepAliveThread::run_undetached(void *arg)
 												}
 												epos->second.device->set_transparency_reconnection(old_transp);
 
+												unsigned int cb_nb = epos->second.callback_list.size();
+												unsigned int cb_ctr = 0;
+												AttributeInfoEx *aie_copy = NULL;
 
 												for (esspos = epos->second.callback_list.begin(); esspos != epos->second.callback_list.end(); ++esspos)
 												{
-													AttrConfEventData *event_data = new AttrConfEventData(epos->second.device,
+													cb_ctr++;
+													AttrConfEventData *event_data;
+													if (cb_ctr != cb_nb)
+													{
+														aie_copy = new AttributeInfoEx;
+														*aie_copy = *aie;
+														event_data = new AttrConfEventData(epos->second.device,
+													      				domain_name,
+													      				epos->second.event_name,
+													      				aie_copy,
+													      				err);
+													}
+													else
+													{
+														event_data = new AttrConfEventData(epos->second.device,
 													      				domain_name,
 													      				epos->second.event_name,
 													      				aie,
 													      				err);
+													}
 
 													CallBack   *callback = esspos->callback;
 													EventQueue *ev_queue = esspos->ev_queue;
@@ -1045,8 +1067,7 @@ void *EventConsumerKeepAliveThread::run_undetached(void *arg)
 														{
 															cerr << "EventConsumerKeepAliveThread::run_undetached() exception in callback method of " << epos->first << endl;
 														}
-												
-														//event_data->attr_conf = NULL;
+
 														delete event_data;
 													}
 												
diff --git a/lib/cpp/server/eventqueue.cpp b/lib/cpp/server/eventqueue.cpp
index 9a3e660..86c7dc9 100644
--- a/lib/cpp/server/eventqueue.cpp
+++ b/lib/cpp/server/eventqueue.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: eventqueue.cpp,v 1.11 2010/09/09 13:46:00 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: eventqueue.cpp,v 1.11 2010/09/09 13:46:00 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //============================================================================
 //
diff --git a/lib/cpp/server/except.cpp b/lib/cpp/server/except.cpp
index 648f573..d40142a 100644
--- a/lib/cpp/server/except.cpp
+++ b/lib/cpp/server/except.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: except.cpp,v 3.14 2010/09/09 13:46:00 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: except.cpp,v 3.14 2010/09/09 13:46:00 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+=============================================================================
 //
diff --git a/lib/cpp/server/logcmds.cpp b/lib/cpp/server/logcmds.cpp
index 123c105..86610ac 100644
--- a/lib/cpp/server/logcmds.cpp
+++ b/lib/cpp/server/logcmds.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: logcmds.cpp,v 3.5 2010/09/09 13:46:00 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: logcmds.cpp,v 3.5 2010/09/09 13:46:00 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+=============================================================================
 //
diff --git a/lib/cpp/server/logging.cpp b/lib/cpp/server/logging.cpp
index c104340..37e6000 100644
--- a/lib/cpp/server/logging.cpp
+++ b/lib/cpp/server/logging.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: logging.cpp,v 3.16 2010/09/09 13:46:00 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: logging.cpp,v 3.16 2010/09/09 13:46:00 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+=============================================================================
 //
diff --git a/lib/cpp/server/multiattribute.cpp b/lib/cpp/server/multiattribute.cpp
index 9f977a1..8dbef7a 100644
--- a/lib/cpp/server/multiattribute.cpp
+++ b/lib/cpp/server/multiattribute.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: multiattribute.cpp,v 3.28 2010/09/17 08:21:12 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: multiattribute.cpp,v 3.28 2010/09/17 08:21:12 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/server/pollcmds.cpp b/lib/cpp/server/pollcmds.cpp
index 755a669..29b5f5b 100644
--- a/lib/cpp/server/pollcmds.cpp
+++ b/lib/cpp/server/pollcmds.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: pollcmds.cpp,v 3.5 2010/09/09 13:46:00 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: pollcmds.cpp,v 3.5 2010/09/09 13:46:00 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+=============================================================================
 //
diff --git a/lib/cpp/server/pollobj.cpp b/lib/cpp/server/pollobj.cpp
index a1e6917..0a9efa9 100644
--- a/lib/cpp/server/pollobj.cpp
+++ b/lib/cpp/server/pollobj.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: pollobj.cpp,v 3.17 2010/09/09 13:46:00 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: pollobj.cpp,v 3.17 2010/09/09 13:46:00 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/server/pollring.cpp b/lib/cpp/server/pollring.cpp
index 6867a57..2ada634 100644
--- a/lib/cpp/server/pollring.cpp
+++ b/lib/cpp/server/pollring.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: pollring.cpp,v 3.26 2010/09/09 13:46:01 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: pollring.cpp,v 3.26 2010/09/09 13:46:01 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/server/pollthread.cpp b/lib/cpp/server/pollthread.cpp
index ae74159..dbe1fdc 100644
--- a/lib/cpp/server/pollthread.cpp
+++ b/lib/cpp/server/pollthread.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: pollthread.cpp,v 3.30 2010/09/09 13:46:45 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: pollthread.cpp,v 3.30 2010/09/09 13:46:45 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/cpp/server/subdev_diag.cpp b/lib/cpp/server/subdev_diag.cpp
index 5ebab2f..361eee2 100644
--- a/lib/cpp/server/subdev_diag.cpp
+++ b/lib/cpp/server/subdev_diag.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: subdev_diag.cpp,v 1.9 2010/09/09 13:46:45 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: subdev_diag.cpp,v 1.9 2010/09/09 13:46:45 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+=============================================================================
 //
diff --git a/lib/cpp/server/tangoappender.cpp b/lib/cpp/server/tangoappender.cpp
index dd77b65..15991a9 100644
--- a/lib/cpp/server/tangoappender.cpp
+++ b/lib/cpp/server/tangoappender.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: tangoappender.cpp,v 3.10 2010/09/09 13:46:45 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: tangoappender.cpp,v 3.10 2010/09/09 13:46:45 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+=============================================================================
 //
diff --git a/lib/cpp/server/tangorollingfileappender.cpp b/lib/cpp/server/tangorollingfileappender.cpp
index b874495..dbeca0b 100644
--- a/lib/cpp/server/tangorollingfileappender.cpp
+++ b/lib/cpp/server/tangorollingfileappender.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: tangorollingfileappender.cpp,v 3.5 2010/09/09 13:46:45 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: tangorollingfileappender.cpp,v 3.5 2010/09/09 13:46:45 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+=============================================================================
 //
diff --git a/lib/cpp/server/thsig.cpp b/lib/cpp/server/thsig.cpp
index 235d021..7b6a749 100644
--- a/lib/cpp/server/thsig.cpp
+++ b/lib/cpp/server/thsig.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: thsig.cpp,v 3.21 2010/09/09 13:46:45 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: thsig.cpp,v 3.21 2010/09/09 13:46:45 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+=============================================================================
 //
diff --git a/lib/cpp/server/utils.cpp b/lib/cpp/server/utils.cpp
index 35a66bb..17058cf 100644
--- a/lib/cpp/server/utils.cpp
+++ b/lib/cpp/server/utils.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: utils.cpp,v 3.68 2010/09/09 13:46:45 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: utils.cpp,v 3.68 2010/09/09 13:46:45 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+=============================================================================
 //
diff --git a/lib/cpp/server/w_attribute.cpp b/lib/cpp/server/w_attribute.cpp
index 369de51..951ba62 100644
--- a/lib/cpp/server/w_attribute.cpp
+++ b/lib/cpp/server/w_attribute.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: w_attribute.cpp,v 1.36 2010/10/05 08:19:24 taurel Exp $\n$Name:  $";
+static const char *RcsId = "$Id: w_attribute.cpp,v 1.36 2010/10/05 08:19:24 taurel Exp $\n$Name: Release_7_2_0 $";
 
 //+============================================================================
 //
diff --git a/lib/java/ATKCore.jar b/lib/java/ATKCore.jar
deleted file mode 100644
index 35a4959..0000000
Binary files a/lib/java/ATKCore.jar and /dev/null differ
diff --git a/lib/java/ATKWidget.jar b/lib/java/ATKWidget.jar
deleted file mode 100644
index 6925747..0000000
Binary files a/lib/java/ATKWidget.jar and /dev/null differ
diff --git a/lib/java/Astor-5.2.9.jar b/lib/java/Astor-5.2.10.jar
similarity index 62%
rename from lib/java/Astor-5.2.9.jar
rename to lib/java/Astor-5.2.10.jar
index f4f2f34..8b41cd3 100644
Binary files a/lib/java/Astor-5.2.9.jar and b/lib/java/Astor-5.2.10.jar differ
diff --git a/lib/java/Astor.jar b/lib/java/Astor.jar
deleted file mode 100644
index f4f2f34..0000000
Binary files a/lib/java/Astor.jar and /dev/null differ
diff --git a/lib/java/AtkTuning.jar b/lib/java/AtkTuning.jar
deleted file mode 100644
index 2b88252..0000000
Binary files a/lib/java/AtkTuning.jar and /dev/null differ
diff --git a/lib/java/DeviceTree.jar b/lib/java/DeviceTree.jar
deleted file mode 100644
index 6b16e7a..0000000
Binary files a/lib/java/DeviceTree.jar and /dev/null differ
diff --git a/lib/java/Jive-4.10.jar b/lib/java/Jive-4.10.jar
deleted file mode 100644
index f95f1f0..0000000
Binary files a/lib/java/Jive-4.10.jar and /dev/null differ
diff --git a/lib/java/Jive.jar b/lib/java/Jive-4.11.jar
similarity index 88%
rename from lib/java/Jive.jar
rename to lib/java/Jive-4.11.jar
index f95f1f0..441967e 100644
Binary files a/lib/java/Jive.jar and b/lib/java/Jive-4.11.jar differ
diff --git a/lib/java/LogViewer.jar b/lib/java/LogViewer.jar
deleted file mode 100644
index e29c2cf..0000000
Binary files a/lib/java/LogViewer.jar and /dev/null differ
diff --git a/lib/java/Pogo-6.2.0.jar b/lib/java/Pogo-6.2.0.jar
deleted file mode 100644
index db9bef7..0000000
Binary files a/lib/java/Pogo-6.2.0.jar and /dev/null differ
diff --git a/lib/java/Pogo-6.2.2.jar b/lib/java/Pogo-6.2.2.jar
deleted file mode 100644
index be74c32..0000000
Binary files a/lib/java/Pogo-6.2.2.jar and /dev/null differ
diff --git a/lib/java/Pogo.jar b/lib/java/Pogo.jar
deleted file mode 100644
index be74c32..0000000
Binary files a/lib/java/Pogo.jar and /dev/null differ
diff --git a/lib/java/TangORB.jar b/lib/java/TangORB.jar
deleted file mode 100644
index bfe4c66..0000000
Binary files a/lib/java/TangORB.jar and /dev/null differ
diff --git a/lib/java/atkpanel-4.2.jar b/lib/java/atkpanel-4.2.jar
deleted file mode 100644
index 0416b72..0000000
Binary files a/lib/java/atkpanel-4.2.jar and /dev/null differ
diff --git a/lib/java/atkpanel-4.3.jar b/lib/java/atkpanel-4.3.jar
new file mode 100644
index 0000000..6d3e1fa
Binary files /dev/null and b/lib/java/atkpanel-4.3.jar differ
diff --git a/lib/java/atkpanel.jar b/lib/java/atkpanel.jar
deleted file mode 100644
index 0416b72..0000000
Binary files a/lib/java/atkpanel.jar and /dev/null differ
diff --git a/lib/java/log4j.jar b/lib/java/log4j.jar
deleted file mode 100644
index c930a6a..0000000
Binary files a/lib/java/log4j.jar and /dev/null differ
diff --git a/lib/java/org.tango.pogo-7.0.0.jar b/lib/java/org.tango.pogo-7.0.0.jar
new file mode 100644
index 0000000..ea70332
Binary files /dev/null and b/lib/java/org.tango.pogo-7.0.0.jar differ
diff --git a/lib/java/tool_panels.jar b/lib/java/tool_panels.jar
deleted file mode 100644
index 5e70f70..0000000
Binary files a/lib/java/tool_panels.jar and /dev/null differ
diff --git a/pogo/Makefile.am b/pogo/Makefile.am
new file mode 100644
index 0000000..a2f97a3
--- /dev/null
+++ b/pogo/Makefile.am
@@ -0,0 +1,13 @@
+
+SUBDIRS = templates
+
+install-data-local:
+	mkdir -p $(DESTDIR)/$(prefix)/pogo/preferences
+	cp $(top_srcdir)/pogo/preferences/common_target.opt $(DESTDIR)/$(prefix)/pogo/preferences
+	cp $(top_builddir)/pogo/preferences/tango.opt $(DESTDIR)/$(prefix)/pogo/preferences
+	cp $(top_builddir)/pogo/preferences/Pogo.site_properties $(DESTDIR)/$(prefix)/pogo/preferences
+
+
+dist-hook:
+	cp -R $(top_srcdir)/pogo/preferences $(distdir); \
+	rm -rf `find $(distdir) -name CVS`
diff --git a/doc/Makefile.in b/pogo/Makefile.in
similarity index 96%
copy from doc/Makefile.in
copy to pogo/Makefile.in
index b522ac1..d488d88 100644
--- a/doc/Makefile.in
+++ b/pogo/Makefile.in
@@ -31,7 +31,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-subdir = doc
+subdir = pogo
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/RSSH_CHECK_OMNIORB.m4 \
@@ -239,8 +239,7 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-DOCS = tango.pdf
-SUBDIRS = man
+SUBDIRS = templates
 all: all-recursive
 
 .SUFFIXES:
@@ -253,9 +252,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  doc/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  pogo/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  doc/Makefile
+	  $(AUTOMAKE) --gnu  pogo/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -558,15 +557,14 @@ uninstall-am:
 
 
 install-data-local:
-	mkdir -p $(DESTDIR)/$(docdir)
-	for file in $(DOCS); do \
-	    cp -f $(srcdir)/$$file $(DESTDIR)/$(docdir)/$$file; \
-        done;                                        
+	mkdir -p $(DESTDIR)/$(prefix)/pogo/preferences
+	cp $(top_srcdir)/pogo/preferences/common_target.opt $(DESTDIR)/$(prefix)/pogo/preferences
+	cp $(top_builddir)/pogo/preferences/tango.opt $(DESTDIR)/$(prefix)/pogo/preferences
+	cp $(top_builddir)/pogo/preferences/Pogo.site_properties $(DESTDIR)/$(prefix)/pogo/preferences
 
 dist-hook:
-	for file in $(DOCS); do        \
-	   cp $(top_srcdir)/doc/$$file $(distdir)/$$file;       \
-	done
+	cp -R $(top_srcdir)/pogo/preferences $(distdir); \
+	rm -rf `find $(distdir) -name CVS`
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/pogo/preferences/Pogo.site_properties.in b/pogo/preferences/Pogo.site_properties.in
new file mode 100644
index 0000000..082fe0f
--- /dev/null
+++ b/pogo/preferences/Pogo.site_properties.in
@@ -0,0 +1,42 @@
+#
+#	This is the Pogo  site specific properties file.
+#
+
+#
+#	Site or Institute name
+#
+org.tango.pogo.site.name:  
+
+
+#
+#	Site specific class families.
+#
+org.tango.pogo.site.class_families:  Miscellaneous
+                                     AbstractClasses
+                                     Acquisition
+                                     Application
+                                     BeamDiag
+                                     Beamlines
+                                     Calculation
+                                     Communication
+                                     Controllers
+                                     InputOutput
+                                     Instrumentation
+                                     Interlock
+                                     Linac
+                                     Motion
+                                     Power Supply
+                                     Radio Frequency
+                                     Radio Protection
+                                     Sequencer
+                                     Simulators
+                                     Vacuum
+#
+#	Directory for html documentation code generation
+#
+org.tango.pogo.doc_home:	./doc_html
+
+#
+#	Directory for generic makefiles (common_target.opt  and  tango.opt)
+#
+org.tango.pogo.makefile_home:	@prefix@/pogo/preferences
diff --git a/pogo/preferences/common_target.opt b/pogo/preferences/common_target.opt
new file mode 100644
index 0000000..e29cff6
--- /dev/null
+++ b/pogo/preferences/common_target.opt
@@ -0,0 +1,184 @@
+INSTALL_DIR=$(TANGO_HOME)/bin
+
+#------------------------------------------------------------------------------
+#--  rule: ./*.cpp 
+#------------------------------------------------------------------------------
+$(OBJ_DIR)/%.o: %.cpp $(SVC_INCL)
+	@echo "Compiling $< ..."
+	$(CXX) $(CXXFLAGS) -c $< -o $@
+	
+#------------------------------------------------------------------------------
+#--  rule: ./*.cpp 
+#------------------------------------------------------------------------------
+$(OBJ_DIR)/%.so.o: %.cpp $(SVC_INCL)
+	@echo "Compiling $< ..."
+	$(CXX) $(CXXFLAGS) -c $< -o $@
+		
+#------------------------------------------------------------------------------
+#--  rule: ./*.cpp 
+#------------------------------------------------------------------------------
+$(OBJ_DIR)/%.a.o: %.cpp $(SVC_INCL)
+	@echo "Compiling $< ..."
+	$(CXX) $(CXXFLAGS) -c $< -o $@
+	
+#------------------------------------------------------------------------------
+#--  rule: $(CPPDIRUSER)/*.cpp 
+#------------------------------------------------------------------------------
+$(OBJ_DIR)/%.o: $(CPPDIRUSER)/%.cpp $(SVC_INCL)
+	@echo "Compiling $< ..."
+	$(CXX) $(CXXFLAGS) -c $< -o $@
+	
+#------------------------------------------------------------------------------
+#--  rule: ./*.cxx 
+#------------------------------------------------------------------------------
+$(OBJ_DIR)/%.o: %.cxx
+	@echo "Compiling $< ..."
+	$(CXX) $(CXXFLAGS) -c $< -o $@
+	
+#------------------------------------------------------------------------------ 
+#--  rule: $(CPPDIRUSER)/*.cxx 
+#------------------------------------------------------------------------------
+$(OBJ_DIR)/%.o: $(CPPDIRUSER)/%.cxx
+	@echo "Compiling $< ..."
+	$(CXX) $(CXXFLAGS) -c $< -o $@
+
+#------------------------------------------------------------------------------
+#--  rule: ./*.cc 
+#------------------------------------------------------------------------------
+$(OBJ_DIR)/%.o: %.cc
+	@echo "Compiling $< ..."
+	$(CXX) $(CXXFLAGS) -c $< -o $@
+	
+#------------------------------------------------------------------------------ 
+#--  rule: $(CPPDIRUSER)/*.cc 
+#------------------------------------------------------------------------------
+$(OBJ_DIR)/%.o: $(CPPDIRUSER)/%.cxx
+	@echo "Compiling $< ..."
+	$(CXX) $(CXXFLAGS) -c $< -o $@
+		
+#------------------------------------------------------------------------------
+#--  rule: ./*.c
+#------------------------------------------------------------------------------
+$(OBJ_DIR)/%.o: %.c $(SVC_INCL)
+	@echo "Compiling $< ..."
+	$(CC) $(CFLAGS) -c $< -o $@
+	
+#------------------------------------------------------------------------------ 
+#--  rule: $(CPPDIRUSER)/*.c
+#------------------------------------------------------------------------------
+$(OBJ_DIR)/%.o: $(CPPDIRUSER)/%.c
+	@echo "Compiling $< ..."
+	$(CXX) $(CXXFLAGS) -c $< -o $@
+
+
+
+#------------------------------------------------------------------------------
+#-- all:
+#------------------------------------------------------------------------------
+all: $(SPECIFIC_ALL_TARGET) $(PROJECT_NAME)  
+
+#------------------------------------------------------------------------------
+#-- $(PROJECT_NAME) for DEVICE:
+#------------------------------------------------------------------------------
+ifeq ($(PROJECT_TYPE),DEVICE)
+$(PROJECT_NAME): diretories $(SVC_OBJS)
+		@echo "Linking TANGO device server $(OUTPUT_DIR)/$(PROJECT_NAME) ..."
+		$(CXX) $(SVC_OBJS) $(LDFLAGS) -o $(OUTPUT_DIR)/$(PROJECT_NAME)
+		$(POST_PROCESSING)
+endif
+
+#------------------------------------------------------------------------------
+#-- $(PROJECT_NAME) for SIMPLE_EXE:
+#------------------------------------------------------------------------------
+ifeq ($(PROJECT_TYPE),SIMPLE_EXE)
+$(PROJECT_NAME): diretories $(SVC_OBJS)
+		@echo "Linking executable $(OUTPUT_DIR)/$(PROJECT_NAME) ..."
+		$(CXX) $(SVC_OBJS) $(LDFLAGS) -o $(OUTPUT_DIR)/$(PROJECT_NAME)
+		$(POST_PROCESSING)
+endif
+
+#------------------------------------------------------------------------------
+#-- $(PROJECT_NAME) for STATIC_LIB:
+#------------------------------------------------------------------------------
+ifeq ($(PROJECT_TYPE),STATIC_LIB)
+$(PROJECT_NAME):    diretories	$(SVC_OBJS)
+		@echo "Creating static library "$(OUTPUT_DIR)/lib$(PROJECT_NAME).a
+ifdef EXTERNAL_LIBS
+		mkdir -p $(OBJ_DIR)/external_libs
+		cd $(OBJ_DIR)/external_libs && \
+		for EXTERNAL_LIB in $(EXTERNAL_LIBS); do ar x $$EXTERNAL_LIB; done && \
+		cd -
+		ar rcs $(OUTPUT_DIR)/lib$(PROJECT_NAME).a $(SVC_OBJS) $(OBJ_DIR)/external_libs/*.o
+		rm -f $(OBJ_DIR)/external_libs/*
+else
+		ar rcs $(OUTPUT_DIR)/lib$(PROJECT_NAME).a $(SVC_OBJS)
+endif
+endif
+
+#------------------------------------------------------------------------------
+#-- $(PROJECT_NAME) for SHARED_LIB:
+#------------------------------------------------------------------------------
+ifeq ($(PROJECT_TYPE),SHARED_LIB)
+$(PROJECT_NAME):    diretories	$(SVC_OBJS)
+		@echo "Linking shared library "$(OUTPUT_DIR)/lib$(PROJECT_NAME).so
+		$(CXX) $(SVC_OBJS) $(LDFLAGS) -o $(OUTPUT_DIR)/lib$(PROJECT_NAME).so
+		@echo "Link successfull"
+endif
+
+#------------------------------------------------------------------------------
+#-- diretories:
+#------------------------------------------------------------------------------
+diretories:
+	@echo "Creating directories "$(OUTPUT_DIR)
+	@mkdir -p $(OUTPUT_DIR)
+	@for FILE in $(SVC_OBJS); do mkdir -p `dirname $$FILE`; done
+
+#------------------------------------------------------------------------------
+#-- clean:
+#------------------------------------------------------------------------------
+clean: $(SPECIFIC_CLEAN_TARGET)
+	@echo "Cleaning "$(PROJECT_NAME)
+ifdef OBJ_DIR
+ifneq ($(OBJ_DIR),/tmp)
+	rm -rf $(OBJ_DIR)
+endif
+endif
+ifeq ($(PROJECT_TYPE),SIMPLE_EXE)
+	rm -f $(OUTPUT_DIR)/$(PROJECT_NAME)
+endif
+ifeq ($(PROJECT_TYPE),DEVICE)
+	rm -f $(OUTPUT_DIR)/$(PROJECT_NAME) $(OUTPUT_DIR)/core
+endif
+ifeq ($(PROJECT_TYPE),STATIC_LIB)
+	rm -f $(OUTPUT_DIR)/lib$(PROJECT_NAME).a
+endif
+ifeq ($(PROJECT_TYPE),SHARED_LIB)
+	rm -f $(OUTPUT_DIR)/lib$(PROJECT_NAME).so
+endif
+  
+#------------------------------------------------------------------------------
+#-- install:
+#------------------------------------------------------------------------------
+install:
+	@echo "Installing $(OUTPUT_DIR)/$(PROJECT_NAME)  to  $(INSTALL_DIR)"
+ifeq ($(PROJECT_TYPE),DEVICE)
+	mv $(OUTPUT_DIR)/$(PROJECT_NAME) $(INSTALL_DIR)
+	ls -l $(INSTALL_DIR)/$(PROJECT_NAME)
+endif
+
+
+#------------------------------------------------------
+#	Tag the CVS/SVN module corresponding to this class
+#------------------------------------------------------
+svn_tag:
+	svn copy ../trunk ../tags/$(RELEASE)       
+	svn commit ../tags/$(RELEASE) \
+	-m "Tagging the $(RELEASE) of the $(PACKAGE_NAME) project."
+
+cvs_tag:
+	@cvstag "$(PACKAGE_NAME)-$(RELEASE)"
+	@make   $(PACKAGE_NAME)
+	@make show_cvs_tag
+
+show_cvs_tag:
+	@cvstag -d
diff --git a/pogo/preferences/tango.opt.in b/pogo/preferences/tango.opt.in
new file mode 100644
index 0000000..608dc6c
--- /dev/null
+++ b/pogo/preferences/tango.opt.in
@@ -0,0 +1,192 @@
+#------------------------------------------------------------------------------
+#-- TANGO_HOME
+#------------------------------------------------------------------------------
+ifndef TANGO_HOME
+	TANGO_HOME = @prefix@
+endif
+
+#------------------------------------------------------------------------------
+#-- OMNI_HOME
+#------------------------------------------------------------------------------
+ifndef OMNI_HOME
+	OMNI_HOME = $(TANGO_HOME)
+endif
+
+#------------------------------------------------------------------------------
+#--  CXX
+#------------------------------------------------------------------------------
+ifndef CXX
+	CXX = gcc
+endif
+
+#------------------------------------------------------------------------------
+#--  CC
+#------------------------------------------------------------------------------
+ifndef CC
+	CC = gcc
+endif
+
+#------------------------------------------------------------------------------
+#-- AR
+#------------------------------------------------------------------------------
+ifndef AR
+	AR = ar rv
+endif
+
+#------------------------------------------------------------------------------
+#-- OUTPUT_TYPE (BACKWARD COMPATIBILITY)
+#------------------------------------------------------------------------------
+ifdef OUTPUT_TYPE
+	PROJECT_TYPE = $(OUTPUT_TYPE)
+endif 
+
+#------------------------------------------------------------------------------
+#-- LDFLAGS_USER (BACKWARD COMPATIBILITY)
+#------------------------------------------------------------------------------
+ifdef LFLAGS_USR
+	LDFLAGS_USER = $(LFLAGS_USR)
+endif 
+
+#------------------------------------------------------------------------------
+#-- PROJECT_TYPE (BACKWARD COMPATIBILITY)
+#------------------------------------------------------------------------------
+ifeq ($(PROJECT_TYPE),DYNAMIC_LIB)
+	PROJECT_TYPE = $(SHARED_LIB)
+endif 
+
+#------------------------------------------------------------------------------
+#-- PACKAGE_NAME (BACKWARD COMPATIBILITY)
+#------------------------------------------------------------------------------
+ifdef PACKAGE_NAME
+	PROJECT_NAME = $(PACKAGE_NAME)
+endif 
+
+#------------------------------------------------------------------------------
+#-- TANGO_REQUIRED
+#------------------------------------------------------------------------------
+ifndef TANGO_REQUIRED
+ifeq ($(PROJECT_TYPE),DEVICE)
+	TANGO_REQUIRED = TRUE
+else
+	TANGO_REQUIRED = FALSE
+endif
+endif
+
+#------------------------------------------------------------------------------
+#-- INCLUDE_DIRS 
+#------------------------------------------------------------------------------
+INCLUDE_DIRS =	-I../include -I.
+
+ifeq ($(TANGO_REQUIRED),TRUE)
+	INCLUDE_DIRS +=	-I$(TANGO_HOME)/include -I$(OMNI_HOME)/include
+endif
+
+INCLUDE_DIRS += $(INC_DIR_USER)
+
+#------------------------------------------------------------------------------
+#-- LIB_DIRS 
+#------------------------------------------------------------------------------
+LIB_DIRS = -L ../lib 
+
+ifeq ($(TANGO_REQUIRED),TRUE)
+	LIB_DIRS += -L $(TANGO_HOME)/lib -L $(OMNI_HOME)/lib
+endif
+
+LIB_DIRS += $(LIB_DIR_USER)
+
+#------------------------------------------------------------------------------
+#-- OBJ_DIR
+#------------------------------------------------------------------------------
+ifndef OBJ_DIR
+	OBJ_DIR = ./obj
+endif
+
+OBJDIR = $(OBJ_DIR)
+
+#------------------------------------------------------------------------------
+#-- OUTPUT_DIR
+#------------------------------------------------------------------------------
+ifndef OUTPUT_DIR
+ifeq ($(PROJECT_TYPE),DEVICE)
+	OUTPUT_DIR= $(HOME)/DeviceServers
+else
+ifeq ($(PROJECT_TYPE),STATIC_LIB)
+	OUTPUT_DIR= ../lib
+else
+ifeq ($(PROJECT_TYPE),SHARED_LIB)
+	OUTPUT_DIR= ../lib
+else
+	OUTPUT_DIR= ../bin
+endif
+endif
+endif
+endif
+
+#------------------------------------------------------------------------------
+#-- RELEASE_TYPE
+#------------------------------------------------------------------------------
+ifndef RELEASE_TYPE
+	RELEASE_TYPE = OPTIMIZED
+endif
+
+#------------------------------------------------------------------------------
+#-- CXXFLAGS
+#------------------------------------------------------------------------------
+CXXFLAGS =
+
+ifeq ($(RELEASE_TYPE),DEBUG)
+	CXXFLAGS +=	-g -D_DEBUG
+else
+	CXXFLAGS +=	-O2
+endif
+
+ifeq ($(PROJECT_TYPE),SHARED_LIB)
+	CXXFLAGS +=	-fPIC
+endif
+
+ifdef CXXFLAGS_USR
+	CXXFLAGS_USER = $(CXXFLAGS_USR)
+endif
+
+CXXFLAGS += -D_REENTRANT -W $(INCLUDE_DIRS) $(CXXFLAGS_USER)
+
+#------------------------------------------------------------------------------
+#-- CFLAGS
+#------------------------------------------------------------------------------
+CFLAGS =
+
+ifeq ($(RELEASE_TYPE),DEBUG)
+	CFLAGS +=	-g -D_DEBUG
+else
+	CFLAGS +=	-O2
+endif
+
+ifeq ($(PROJECT_TYPE),SHARED_LIB)
+	CFLAGS +=	-fPIC
+endif
+
+ifdef CFLAGS_USR
+	CFLAGS_USER = $(CFLAGS_USR)
+endif
+
+CFLAGS +=	-D_REENTRANT -W -pipe $(INCLUDE_DIRS) $(CFLAGS_USER)
+
+#------------------------------------------------------------------------------
+#-- LDFLAGS
+#------------------------------------------------------------------------------
+LDFLAGS =
+
+ifeq ($(PROJECT_TYPE),SHARED_LIB)
+	LDFLAGS +=	-shared -O -Wl,-soname,lib$(PROJECT_NAME).so
+endif
+
+ifeq ($(TANGO_REQUIRED),TRUE)
+	LDFLAGS +=	-L$(TANGO_HOME)/lib -ltango -llog4tango
+	LDFLAGS +=	-L$(OMNI_HOME)/lib -lCOS4 -lomniORB4 -lomniDynamic4 -lomnithread
+endif
+
+ifdef LDFLAGS_USR
+	LDFLAGS_USER = $(LDFLAGS_USR)
+endif
+
+LDFLAGS +=	$(LDFLAGS_USER) $(LIB_DIR_USER) -ldl -lpthread -lstdc++
diff --git a/pogo/templates/Makefile.am b/pogo/templates/Makefile.am
new file mode 100644
index 0000000..1f18f26
--- /dev/null
+++ b/pogo/templates/Makefile.am
@@ -0,0 +1,9 @@
+
+install-data-local:
+	mkdir -p $(DESTDIR)/$(prefix)/pogo/templates
+	cd $(top_srcdir)/pogo;cp -R templates $(DESTDIR)/$(prefix)/pogo
+	cp $(top_builddir)/pogo/templates/cpp/Makefile $(DESTDIR)/$(prefix)/pogo/templates/cpp
+
+
+dist-hook:
+	cp -R $(top_srcdir)/pogo/templates $(distdir)/..
diff --git a/templates/Makefile.in b/pogo/templates/Makefile.in
similarity index 96%
rename from templates/Makefile.in
rename to pogo/templates/Makefile.in
index ae349fb..14d0aab 100644
--- a/templates/Makefile.in
+++ b/pogo/templates/Makefile.in
@@ -31,7 +31,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-subdir = templates
+subdir = pogo/templates
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/RSSH_CHECK_OMNIORB.m4 \
@@ -239,9 +239,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  templates/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  pogo/templates/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  templates/Makefile
+	  $(AUTOMAKE) --gnu  pogo/templates/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -399,12 +399,12 @@ uninstall-am:
 
 
 install-data-local:
-	mkdir -p $(DESTDIR)/$(prefix)/templates
-	cd $(top_srcdir)/templates;cp -R pogo $(DESTDIR)/$(prefix)/templates
-	cp $(top_builddir)/templates/pogo/cpp/Makefile $(DESTDIR)/$(prefix)/templates/pogo/cpp
+	mkdir -p $(DESTDIR)/$(prefix)/pogo/templates
+	cd $(top_srcdir)/pogo;cp -R templates $(DESTDIR)/$(prefix)/pogo
+	cp $(top_builddir)/pogo/templates/cpp/Makefile $(DESTDIR)/$(prefix)/pogo/templates/cpp
 
 dist-hook:
-	cp -R $(top_srcdir)/templates/pogo $(distdir) 
+	cp -R $(top_srcdir)/pogo/templates $(distdir)/..
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/templates/pogo/cpp/Allowed.cpp b/pogo/templates/cpp/Allowed.cpp
similarity index 100%
rename from templates/pogo/cpp/Allowed.cpp
rename to pogo/templates/cpp/Allowed.cpp
diff --git a/templates/pogo/cpp/ClassFactory.cpp b/pogo/templates/cpp/ClassFactory.cpp
similarity index 100%
rename from templates/pogo/cpp/ClassFactory.cpp
rename to pogo/templates/cpp/ClassFactory.cpp
diff --git a/templates/pogo/cpp/DevServ.cpp b/pogo/templates/cpp/DevServ.cpp
similarity index 100%
rename from templates/pogo/cpp/DevServ.cpp
rename to pogo/templates/cpp/DevServ.cpp
diff --git a/templates/pogo/cpp/DevServ.dsp b/pogo/templates/cpp/DevServ.dsp
similarity index 100%
rename from templates/pogo/cpp/DevServ.dsp
rename to pogo/templates/cpp/DevServ.dsp
diff --git a/templates/pogo/cpp/DevServ.h b/pogo/templates/cpp/DevServ.h
similarity index 100%
rename from templates/pogo/cpp/DevServ.h
rename to pogo/templates/cpp/DevServ.h
diff --git a/templates/pogo/cpp/DevServClass.cpp b/pogo/templates/cpp/DevServClass.cpp
similarity index 100%
rename from templates/pogo/cpp/DevServClass.cpp
rename to pogo/templates/cpp/DevServClass.cpp
diff --git a/templates/pogo/cpp/DevServClass.h b/pogo/templates/cpp/DevServClass.h
similarity index 100%
rename from templates/pogo/cpp/DevServClass.h
rename to pogo/templates/cpp/DevServClass.h
diff --git a/templates/pogo/cpp/MachineState.cpp b/pogo/templates/cpp/MachineState.cpp
similarity index 100%
rename from templates/pogo/cpp/MachineState.cpp
rename to pogo/templates/cpp/MachineState.cpp
diff --git a/templates/pogo/cpp/Makefile.in b/pogo/templates/cpp/Makefile.in
similarity index 100%
rename from templates/pogo/cpp/Makefile.in
rename to pogo/templates/cpp/Makefile.in
diff --git a/templates/pogo/cpp/README b/pogo/templates/cpp/README
similarity index 100%
rename from templates/pogo/cpp/README
rename to pogo/templates/cpp/README
diff --git a/templates/pogo/cpp/ReadHardwareAttr.cpp b/pogo/templates/cpp/ReadHardwareAttr.cpp
similarity index 100%
rename from templates/pogo/cpp/ReadHardwareAttr.cpp
rename to pogo/templates/cpp/ReadHardwareAttr.cpp
diff --git a/templates/pogo/cpp/ReadWriteAttr.cpp b/pogo/templates/cpp/ReadWriteAttr.cpp
similarity index 100%
rename from templates/pogo/cpp/ReadWriteAttr.cpp
rename to pogo/templates/cpp/ReadWriteAttr.cpp
diff --git a/templates/pogo/cpp/main.cpp b/pogo/templates/cpp/main.cpp
similarity index 100%
rename from templates/pogo/cpp/main.cpp
rename to pogo/templates/cpp/main.cpp
diff --git a/templates/pogo/cpp/readPropMethodName.cpp b/pogo/templates/cpp/readPropMethodName.cpp
similarity index 100%
rename from templates/pogo/cpp/readPropMethodName.cpp
rename to pogo/templates/cpp/readPropMethodName.cpp
diff --git a/templates/pogo/cpp/set_default_property.cpp b/pogo/templates/cpp/set_default_property.cpp
similarity index 100%
rename from templates/pogo/cpp/set_default_property.cpp
rename to pogo/templates/cpp/set_default_property.cpp
diff --git a/templates/pogo/cpp/state.cpp b/pogo/templates/cpp/state.cpp
similarity index 100%
rename from templates/pogo/cpp/state.cpp
rename to pogo/templates/cpp/state.cpp
diff --git a/templates/pogo/cpp/vc8_project/Class_dll.vcproj b/pogo/templates/cpp/vc8_project/Class_dll.vcproj
similarity index 100%
rename from templates/pogo/cpp/vc8_project/Class_dll.vcproj
rename to pogo/templates/cpp/vc8_project/Class_dll.vcproj
diff --git a/templates/pogo/cpp/vc8_project/Class_lib.vcproj b/pogo/templates/cpp/vc8_project/Class_lib.vcproj
similarity index 100%
rename from templates/pogo/cpp/vc8_project/Class_lib.vcproj
rename to pogo/templates/cpp/vc8_project/Class_lib.vcproj
diff --git a/templates/pogo/cpp/vc8_project/DevServ.sln b/pogo/templates/cpp/vc8_project/DevServ.sln
similarity index 100%
rename from templates/pogo/cpp/vc8_project/DevServ.sln
rename to pogo/templates/cpp/vc8_project/DevServ.sln
diff --git a/templates/pogo/cpp/vc8_project/Server_shared.vcproj b/pogo/templates/cpp/vc8_project/Server_shared.vcproj
similarity index 100%
rename from templates/pogo/cpp/vc8_project/Server_shared.vcproj
rename to pogo/templates/cpp/vc8_project/Server_shared.vcproj
diff --git a/templates/pogo/cpp/vc8_project/Server_static.vcproj b/pogo/templates/cpp/vc8_project/Server_static.vcproj
similarity index 100%
rename from templates/pogo/cpp/vc8_project/Server_static.vcproj
rename to pogo/templates/cpp/vc8_project/Server_static.vcproj
diff --git a/templates/pogo/cpp/write_property.cpp b/pogo/templates/cpp/write_property.cpp
similarity index 100%
rename from templates/pogo/cpp/write_property.cpp
rename to pogo/templates/cpp/write_property.cpp
diff --git a/templates/pogo/html/Doxyfile b/pogo/templates/html/Doxyfile
similarity index 100%
rename from templates/pogo/html/Doxyfile
rename to pogo/templates/html/Doxyfile
diff --git a/templates/pogo/html/HowIsGenerated.html b/pogo/templates/html/HowIsGenerated.html
similarity index 100%
rename from templates/pogo/html/HowIsGenerated.html
rename to pogo/templates/html/HowIsGenerated.html
diff --git a/templates/pogo/html/Inheritance.html b/pogo/templates/html/Inheritance.html
similarity index 100%
rename from templates/pogo/html/Inheritance.html
rename to pogo/templates/html/Inheritance.html
diff --git a/templates/pogo/html/SearchItem.html b/pogo/templates/html/SearchItem.html
similarity index 100%
rename from templates/pogo/html/SearchItem.html
rename to pogo/templates/html/SearchItem.html
diff --git a/templates/pogo/html/ServersList.html b/pogo/templates/html/ServersList.html
similarity index 100%
rename from templates/pogo/html/ServersList.html
rename to pogo/templates/html/ServersList.html
diff --git a/templates/pogo/html/TPG_CvsModule.html b/pogo/templates/html/TPG_CvsModule.html
similarity index 100%
rename from templates/pogo/html/TPG_CvsModule.html
rename to pogo/templates/html/TPG_CvsModule.html
diff --git a/templates/pogo/html/TPG_CvsTags.html b/pogo/templates/html/TPG_CvsTags.html
similarity index 100%
rename from templates/pogo/html/TPG_CvsTags.html
rename to pogo/templates/html/TPG_CvsTags.html
diff --git a/templates/pogo/html/TPG_NamingConventions.html b/pogo/templates/html/TPG_NamingConventions.html
similarity index 100%
rename from templates/pogo/html/TPG_NamingConventions.html
rename to pogo/templates/html/TPG_NamingConventions.html
diff --git a/templates/pogo/html/TangoProgrammerGuide.html b/pogo/templates/html/TangoProgrammerGuide.html
similarity index 100%
rename from templates/pogo/html/TangoProgrammerGuide.html
rename to pogo/templates/html/TangoProgrammerGuide.html
diff --git a/templates/pogo/html/footer.html b/pogo/templates/html/footer.html
similarity index 100%
rename from templates/pogo/html/footer.html
rename to pogo/templates/html/footer.html
diff --git a/templates/pogo/html/frame.html b/pogo/templates/html/frame.html
similarity index 100%
rename from templates/pogo/html/frame.html
rename to pogo/templates/html/frame.html
diff --git a/templates/pogo/html/header.html b/pogo/templates/html/header.html
similarity index 100%
rename from templates/pogo/html/header.html
rename to pogo/templates/html/header.html
diff --git a/templates/pogo/html/index.html b/pogo/templates/html/index.html
similarity index 100%
rename from templates/pogo/html/index.html
rename to pogo/templates/html/index.html
diff --git a/templates/pogo/html/page.html b/pogo/templates/html/page.html
similarity index 100%
rename from templates/pogo/html/page.html
rename to pogo/templates/html/page.html
diff --git a/templates/pogo/java/DevServ.java b/pogo/templates/java/DevServ.java
similarity index 100%
rename from templates/pogo/java/DevServ.java
rename to pogo/templates/java/DevServ.java
diff --git a/templates/pogo/java/DevServClass.java b/pogo/templates/java/DevServClass.java
similarity index 100%
rename from templates/pogo/java/DevServClass.java
rename to pogo/templates/java/DevServClass.java
diff --git a/templates/pogo/java/DevServCmd.java b/pogo/templates/java/DevServCmd.java
similarity index 100%
rename from templates/pogo/java/DevServCmd.java
rename to pogo/templates/java/DevServCmd.java
diff --git a/templates/pogo/java/Makefile b/pogo/templates/java/Makefile
similarity index 100%
rename from templates/pogo/java/Makefile
rename to pogo/templates/java/Makefile
diff --git a/templates/pogo/java/README b/pogo/templates/java/README
similarity index 100%
rename from templates/pogo/java/README
rename to pogo/templates/java/README
diff --git a/templates/pogo/java/ReadWriteAttr.java b/pogo/templates/java/ReadWriteAttr.java
similarity index 100%
rename from templates/pogo/java/ReadWriteAttr.java
rename to pogo/templates/java/ReadWriteAttr.java
diff --git a/templates/pogo/java/TangoclassProxy.java b/pogo/templates/java/TangoclassProxy.java
similarity index 100%
rename from templates/pogo/java/TangoclassProxy.java
rename to pogo/templates/java/TangoclassProxy.java
diff --git a/templates/pogo/java/readPropMethodName.java b/pogo/templates/java/readPropMethodName.java
similarity index 100%
rename from templates/pogo/java/readPropMethodName.java
rename to pogo/templates/java/readPropMethodName.java
diff --git a/templates/pogo/java/states.java b/pogo/templates/java/states.java
similarity index 100%
rename from templates/pogo/java/states.java
rename to pogo/templates/java/states.java
diff --git a/templates/pogo/java/write_property.java b/pogo/templates/java/write_property.java
similarity index 100%
rename from templates/pogo/java/write_property.java
rename to pogo/templates/java/write_property.java
diff --git a/templates/pogo/python/Attribute.py b/pogo/templates/python/Attribute.py
similarity index 100%
rename from templates/pogo/python/Attribute.py
rename to pogo/templates/python/Attribute.py
diff --git a/templates/pogo/python/Command.py b/pogo/templates/python/Command.py
similarity index 100%
rename from templates/pogo/python/Command.py
rename to pogo/templates/python/Command.py
diff --git a/templates/pogo/python/DevServ.py b/pogo/templates/python/DevServ.py
similarity index 100%
rename from templates/pogo/python/DevServ.py
rename to pogo/templates/python/DevServ.py
diff --git a/templates/pogo/txt/Shortcuts.txt b/pogo/templates/txt/Shortcuts.txt
similarity index 100%
rename from templates/pogo/txt/Shortcuts.txt
rename to pogo/templates/txt/Shortcuts.txt
diff --git a/templates/pogo/txt/WhatIsNew.txt b/pogo/templates/txt/WhatIsNew.txt
similarity index 100%
rename from templates/pogo/txt/WhatIsNew.txt
rename to pogo/templates/txt/WhatIsNew.txt
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index a2bc9bf..3c0b0c9 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -8,13 +8,13 @@ bin_SCRIPTS += tango_wca
 endif 
 
 if TANGO_JAVA_ENABLED
-bin_SCRIPTS += astor jive pogo devicetree TangoVers tg_devtest \
+bin_SCRIPTS += astor jive pogo pogo-6 devicetree TangoVers tg_devtest \
             atkpanel logviewer atktuning jdraw synopticappli \
 				atkmoni cvstag
 endif
 
 # Make sure that all these go into the dist.
-EXTRA_DIST = tango.in tango_wca.in astor.in jive.in pogo.in devicetree.in TangoVers.in \
+EXTRA_DIST = tango.in tango_wca.in astor.in jive.in pogo.in pogo-6.in devicetree.in TangoVers.in \
            tg_devtest.in atkpanel.in logviewer.in atktuning.in jdraw.in \
 			  synopticappli.in atkmoni.in cvstag.in notify_daemon.in
 
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index d8da186..ff35877 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -35,7 +35,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 @TANGO_DB_SERVER_ENABLED_TRUE at am__append_1 = tango tango_wca
- at TANGO_JAVA_ENABLED_TRUE@am__append_2 = astor jive pogo devicetree TangoVers tg_devtest \
+ at TANGO_JAVA_ENABLED_TRUE@am__append_2 = astor jive pogo pogo-6 devicetree TangoVers tg_devtest \
 @TANGO_JAVA_ENABLED_TRUE@            atkpanel logviewer atktuning jdraw synopticappli \
 @TANGO_JAVA_ENABLED_TRUE@				atkmoni cvstag
 
@@ -45,9 +45,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
 	$(srcdir)/atkpanel.in $(srcdir)/atktuning.in \
 	$(srcdir)/cvstag.in $(srcdir)/devicetree.in $(srcdir)/jdraw.in \
 	$(srcdir)/jive.in $(srcdir)/logviewer.in \
-	$(srcdir)/notify_daemon.in $(srcdir)/pogo.in \
-	$(srcdir)/synopticappli.in $(srcdir)/tango.in \
-	$(srcdir)/tango_wca.in $(srcdir)/tg_devtest.in
+	$(srcdir)/notify_daemon.in $(srcdir)/pogo-6.in \
+	$(srcdir)/pogo.in $(srcdir)/synopticappli.in \
+	$(srcdir)/tango.in $(srcdir)/tango_wca.in \
+	$(srcdir)/tg_devtest.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/RSSH_CHECK_OMNIORB.m4 \
 	$(top_srcdir)/m4/RSSH_CHECK_PTHREADS.m4 \
@@ -68,7 +69,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/ac_config.h.tmp
 CONFIG_CLEAN_FILES = jive logviewer TangoVers astor atkpanel atktuning \
-	pogo cvstag tg_devtest tango tango_wca devicetree jdraw \
+	pogo-6 pogo cvstag tg_devtest tango tango_wca devicetree jdraw \
 	synopticappli atkmoni notify_daemon
 am__installdirs = "$(DESTDIR)$(bindir)"
 binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
@@ -250,7 +251,7 @@ top_srcdir = @top_srcdir@
 bin_SCRIPTS = notify_daemon $(am__append_1) $(am__append_2)
 
 # Make sure that all these go into the dist.
-EXTRA_DIST = tango.in tango_wca.in astor.in jive.in pogo.in devicetree.in TangoVers.in \
+EXTRA_DIST = tango.in tango_wca.in astor.in jive.in pogo.in pogo-6.in devicetree.in TangoVers.in \
            tg_devtest.in atkpanel.in logviewer.in atktuning.in jdraw.in \
 			  synopticappli.in atkmoni.in cvstag.in notify_daemon.in
 
@@ -298,6 +299,8 @@ atkpanel: $(top_builddir)/config.status $(srcdir)/atkpanel.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 atktuning: $(top_builddir)/config.status $(srcdir)/atktuning.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+pogo-6: $(top_builddir)/config.status $(srcdir)/pogo-6.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 pogo: $(top_builddir)/config.status $(srcdir)/pogo.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 cvstag: $(top_builddir)/config.status $(srcdir)/cvstag.in
diff --git a/scripts/pogo.in b/scripts/pogo-6.in
similarity index 95%
copy from scripts/pogo.in
copy to scripts/pogo-6.in
index 71fa2aa..a081d0d 100755
--- a/scripts/pogo.in
+++ b/scripts/pogo-6.in
@@ -40,7 +40,7 @@ CPP_DOC=@DOXYGEN@
 #---------------------------------------------------------
 #	Set the template path
 #---------------------------------------------------------
-TEMPLATES=$TANGO_HOME/templates/pogo
+TEMPLATES=$TANGO_HOME/pogo/templates
 export TEMPLATES
 
 #---------------------------------------------------------
@@ -55,7 +55,7 @@ export SRC_PATH
 APP_DIR=$TANGO_HOME/share/tango/java;	export APP_DIR
 
 TANGO_CLASS=$APP_DIR/TangORB.jar;	export TANGO_CLASS
-POGO_CLASS=$APP_DIR/Pogo.jar;		export POGO_CLASS
+POGO_CLASS=$APP_DIR/org.tango.pogo.jar;		export POGO_CLASS
 
 CLASSPATH=$POGO_CLASS:$TANGO_CLASS;    export CLASSPATH
 
diff --git a/scripts/pogo.in b/scripts/pogo.in
index 71fa2aa..cb849f6 100755
--- a/scripts/pogo.in
+++ b/scripts/pogo.in
@@ -40,7 +40,7 @@ CPP_DOC=@DOXYGEN@
 #---------------------------------------------------------
 #	Set the template path
 #---------------------------------------------------------
-TEMPLATES=$TANGO_HOME/templates/pogo
+TEMPLATES=$TANGO_HOME/pogo/templates
 export TEMPLATES
 
 #---------------------------------------------------------
@@ -53,11 +53,11 @@ export SRC_PATH
 #	Set the Class Path for Tango and pogo usage
 #---------------------------------------------------------
 APP_DIR=$TANGO_HOME/share/tango/java;	export APP_DIR
+PREF_DIR=$TANGO_HOME/pogo/preferences;   export PREF_DIR
 
-TANGO_CLASS=$APP_DIR/TangORB.jar;	export TANGO_CLASS
-POGO_CLASS=$APP_DIR/Pogo.jar;		export POGO_CLASS
+POGO_CLASS=$APP_DIR/org.tango.pogo.jar;		export POGO_CLASS
 
-CLASSPATH=$POGO_CLASS:$TANGO_CLASS;    export CLASSPATH
+CLASSPATH=$PREF_DIR:$POGO_CLASS;    export CLASSPATH
 
 #---------------------------------------------------------
 #	Start the Pogo process
@@ -68,5 +68,6 @@ echo "Starting Pogo Appli under $MY_OS.  "
 @JAVA@ -DTEMPL_HOME=$TEMPLATES		\
 		-DCPP_DOC_PATH=$CPP_DOC		\
 		-DIN_LANG=$POGO_LANG		\
-		-DEDITOR=$POGO_EDITOR	\
-		pogo.appli.PogoAppli $*
+		-DEDITOR=$POGO_EDITOR 		\
+		-Dfile.encoding=ISO-8859-1 	\
+		org.tango.pogo.pogo_gui.Pogo $*
diff --git a/templates/Makefile.am b/templates/Makefile.am
deleted file mode 100644
index 90921e6..0000000
--- a/templates/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-
-install-data-local:
-	mkdir -p $(DESTDIR)/$(prefix)/templates
-	cd $(top_srcdir)/templates;cp -R pogo $(DESTDIR)/$(prefix)/templates
-	cp $(top_builddir)/templates/pogo/cpp/Makefile $(DESTDIR)/$(prefix)/templates/pogo/cpp
-
-
-dist-hook:
-	cp -R $(top_srcdir)/templates/pogo $(distdir) 
diff --git a/utils/tango_admin/tango_admin.cpp b/utils/tango_admin/tango_admin.cpp
index 95aa50d..55e6467 100644
--- a/utils/tango_admin/tango_admin.cpp
+++ b/utils/tango_admin/tango_admin.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: tango_admin.cpp,v 1.1.1.1 2010/03/12 12:34:36 taurel Exp $";
+static const char *RcsId = "$Id: tango_admin.cpp,v 1.2 2010/10/08 11:08:36 taurel Exp $";
 
 //+============================================================================
 //
@@ -41,7 +41,7 @@ static const char *RcsId = "$Id: tango_admin.cpp,v 1.1.1.1 2010/03/12 12:34:36 t
 // You should have received a copy of the GNU Lesser General Public License
 // along with Tango.  If not, see <http://www.gnu.org/licenses/>.
 //
-// $Revision: 1.1.1.1 $
+// $Revision: 1.2 $
 //
 //-============================================================================
 
@@ -442,8 +442,15 @@ int add_server(char *d_name,char *c_name,char *d_list)
 	string::size_type pos;
 
 	pos = ds_name.find('/');
+#ifdef  __SUNPRO_CC
+	int n1 = 0;
+	count(ds_name.begin(),ds_name.end(),'/',n1);
+	if ((n1 != 1) || pos == 0 || pos == (ds_name.size() - 1))
+	{
+#else
 	if ((count(ds_name.begin(),ds_name.end(),'/') != 1) || pos == 0 || pos == (ds_name.size() - 1))
 	{
+#endif
 		cout << "Wrong syntax for ds name" << endl;
 		ret = -1;
 		return ret;
@@ -454,8 +461,14 @@ int add_server(char *d_name,char *c_name,char *d_list)
 //
 
 	string class_name(c_name);
+#ifdef  __SUNPRO_CC
+	count(class_name.begin(),class_name.end(),'/',n1);
+	if (n1 != 0)
+	{
+#else	
 	if (count(class_name.begin(),class_name.end(),'/') != 0)
 	{
+#endif
 		cout << "Wrong syntax for class name" << endl;
 		ret = -1;
 		return ret;
@@ -472,8 +485,14 @@ int add_server(char *d_name,char *c_name,char *d_list)
 
 	for (unsigned int loop = 0;loop < dev_names.size();++loop)
 	{
+#ifdef  __SUNPRO_CC
+		count(dev_names[loop].begin(),dev_names[loop].end(),'/',n1);
+		if (n1 != 2)
+		{
+#else	
 		if (count(dev_names[loop].begin(),dev_names[loop].end(),'/') != 2)
 		{
+#endif
 			cout << "Wrong syntax for device " << dev_names[loop] << endl;
 			ret = -1;
 			return ret;
@@ -576,10 +595,17 @@ int delete_server(char *d_name,bool with_res)
 
 	string::size_type pos;
 	pos = ds_name.find('/');
-
+	
+#ifdef  __SUNPRO_CC
+	int n1 = 0;
+	count(ds_name.begin(),ds_name.end(),'/',n1);
+	if (pos == 0 || pos == ds_name.size() - 1 || n1 != 1)
+	{
+#else
 	if (pos == 0 || pos == ds_name.size() - 1 ||
 		count(ds_name.begin(),ds_name.end(),'/') != 1)
 	{
+#endif
 		ret = -1;
 		return ret;
 	}
@@ -680,10 +706,17 @@ int add_property(char *d_name,char *p_name,char *p_val)
 
 	pos1 = dev_name.find('/');
 	pos2 = dev_name.rfind('/');
-
+	
+#ifdef  __SUNPRO_CC
+	int n1 = 0;
+	count(dev_name.begin(),dev_name.end(),'/',n1);
+	if ((n1 != 2) || pos1 == 0 || pos2 == (dev_name.size() - 1) || pos2 == pos1 + 1)
+	{
+#else
 	if ((count(dev_name.begin(),dev_name.end(),'/') != 2) || 
 		pos1 == 0 || pos2 == (dev_name.size() - 1) || pos2 == pos1 + 1)
 	{
+#endif
 		cout << "Wrong syntax for device name" << endl;
 		ret = -1;
 		return ret;
@@ -755,10 +788,17 @@ int delete_property(char *d_name,char *p_name)
 
 	pos1 = dev_name.find('/');
 	pos2 = dev_name.rfind('/');
-
+	
+#ifdef  __SUNPRO_CC
+	int n1 = 0;
+	count(dev_name.begin(),dev_name.end(),'/',n1);
+	if ((n1 != 2) || pos2 == (dev_name.size() - 1) || pos2 == pos1 + 1)
+	{
+#else
 	if ((count(dev_name.begin(),dev_name.end(),'/') != 2) || 
 		pos1 == 0 || pos2 == (dev_name.size() - 1) || pos2 == pos1 + 1)
 	{
+#endif
 		cout << "Wrong syntax for device name" << endl;
 		ret = -1;
 		return ret;

-- 
TANGO distributed control system.



More information about the debian-science-commits mailing list