From 06cb4ebf1893df3dacd620a0086e7cadfd90949b Mon Sep 17 00:00:00 2001 From: Lorenzo Pivetta <lorenzo.pivetta@elettra.eu> Date: Tue, 19 May 2020 16:36:45 +0200 Subject: [PATCH] Porting to Tango 9.3.3 --- Makefile | 2 +- src/ClassFactory.cpp | 16 ---- src/Mks651d.cpp | 22 +----- src/Mks651d.h | 17 +---- src/Mks651dClass.cpp | 147 ------------------------------------ src/Mks651dClass.h | 16 ---- src/Mks651dStateMachine.cpp | 16 ---- src/ThreadGuard.h | 3 - src/main.cpp | 16 ---- 9 files changed, 5 insertions(+), 250 deletions(-) diff --git a/Makefile b/Makefile index c909cc8..1360650 100644 --- a/Makefile +++ b/Makefile @@ -3,4 +3,4 @@ NAME_SRV = 651d-srv CXXFLAGS = LDFLAGS = -include ../makefiles/Make-8.1.2.c.in +include ../makefiles/Make-9.3.3.in diff --git a/src/ClassFactory.cpp b/src/ClassFactory.cpp index 202abdb..d7f615f 100644 --- a/src/ClassFactory.cpp +++ b/src/ClassFactory.cpp @@ -1,5 +1,4 @@ /*----- PROTECTED REGION ID(Mks651d::ClassFactory.cpp) ENABLED START -----*/ -static const char *RcsId = "$Id: ClassFactory.cpp,v 1.2 2012-03-08 09:50:01 mdm Exp $"; //============================================================================= // // file : ClassFactory.cpp @@ -11,21 +10,6 @@ static const char *RcsId = "$Id: ClassFactory.cpp,v 1.2 2012-03-08 09:50:01 mdm // // project : Mks651d. // -// $Author: mdm $ -// -// $Revision: 1.2 $ -// $Date: 2012-03-08 09:50:01 $ -// -// SVN only: -// $HeadURL: $ -// -// CVS only: -// $Source: /home/cvsadm/cvsroot/fermi/servers/651d/src/ClassFactory.cpp,v $ -// $Log: ClassFactory.cpp,v $ -// Revision 1.2 2012-03-08 09:50:01 mdm -// New version of server -// -// //============================================================================= // This file is generated by POGO // (Program Obviously used to Generate tango Object) diff --git a/src/Mks651d.cpp b/src/Mks651d.cpp index 45269fd..ea6869a 100644 --- a/src/Mks651d.cpp +++ b/src/Mks651d.cpp @@ -1,5 +1,4 @@ /*----- PROTECTED REGION ID(Mks651d.cpp) ENABLED START -----*/ -static const char *RcsId = "$Id: Mks651d.cpp,v 1.2 2012-03-08 09:50:01 mdm Exp $"; //============================================================================= // // file : Mks651d.cpp @@ -12,21 +11,6 @@ static const char *RcsId = "$Id: Mks651d.cpp,v 1.2 2012-03-08 09:50:01 mdm Exp $ // // project : Mks651d. // -// $Author: mdm $ -// -// $Revision: 1.2 $ -// $Date: 2012-03-08 09:50:01 $ -// -// SVN only: -// $HeadURL: $ -// -// CVS only: -// $Source: /home/cvsadm/cvsroot/fermi/servers/651d/src/Mks651d.cpp,v $ -// $Log: Mks651d.cpp,v $ -// Revision 1.2 2012-03-08 09:50:01 mdm -// New version of server -// -// //============================================================================= // This file is generated by POGO // (Program Obviously used to Generate tango Object) @@ -99,7 +83,7 @@ namespace Mks651d_ns */ //-------------------------------------------------------- Mks651d::Mks651d(Tango::DeviceClass *cl, string &s) - : Tango::Device_4Impl(cl, s.c_str()) + : TANGO_BASE_CLASS(cl, s.c_str()) { /*----- PROTECTED REGION ID(Mks651d::constructor_1) ENABLED START -----*/ @@ -109,7 +93,7 @@ Mks651d::Mks651d(Tango::DeviceClass *cl, string &s) } //-------------------------------------------------------- Mks651d::Mks651d(Tango::DeviceClass *cl, const char *s) - : Tango::Device_4Impl(cl, s) + : TANGO_BASE_CLASS(cl, s) { /*----- PROTECTED REGION ID(Mks651d::constructor_2) ENABLED START -----*/ @@ -119,7 +103,7 @@ Mks651d::Mks651d(Tango::DeviceClass *cl, const char *s) } //-------------------------------------------------------- Mks651d::Mks651d(Tango::DeviceClass *cl, const char *s, const char *d) - : Tango::Device_4Impl(cl, s, d) + : TANGO_BASE_CLASS(cl, s, d) { /*----- PROTECTED REGION ID(Mks651d::constructor_3) ENABLED START -----*/ diff --git a/src/Mks651d.h b/src/Mks651d.h index b8d842a..9adb24d 100644 --- a/src/Mks651d.h +++ b/src/Mks651d.h @@ -7,21 +7,6 @@ // // project : Mks651d. // -// $Author: mdm $ -// -// $Revision: 1.2 $ -// $Date: 2012-03-08 09:50:01 $ -// -// SVN only: -// $HeadURL: $ -// -// CVS only: -// $Source: /home/cvsadm/cvsroot/fermi/servers/651d/src/Mks651d.h,v $ -// $Log: Mks651d.h,v $ -// Revision 1.2 2012-03-08 09:50:01 mdm -// New version of server -// -// //============================================================================= // This file is generated by POGO // (Program Obviously used to Generate tango Object) @@ -51,7 +36,7 @@ namespace Mks651d_ns /*----- PROTECTED REGION END -----*/ // Mks651d::Additional Class Declarations -class Mks651d : public Tango::Device_4Impl +class Mks651d : public TANGO_BASE_CLASS { diff --git a/src/Mks651dClass.cpp b/src/Mks651dClass.cpp index f4a4a82..0e1091e 100644 --- a/src/Mks651dClass.cpp +++ b/src/Mks651dClass.cpp @@ -1,9 +1,4 @@ /*----- PROTECTED REGION ID(Mks651dClass.cpp) ENABLED START -----*/ -static const char *RcsId = "$Id: Mks651dClass.cpp,v 1.2 2012-03-08 09:50:01 mdm Exp $"; -static const char *TagName = "$Name: $"; -static const char *CvsPath = "$Source: /home/cvsadm/cvsroot/fermi/servers/651d/src/Mks651dClass.cpp,v $"; -static const char *SvnPath = "$HeadURL: $"; -static const char *HttpServer = "http://www.esrf.eu/computing/cs/tango/tango_doc/ds_doc/"; //============================================================================= // // file : Mks651dClass.cpp @@ -15,21 +10,6 @@ static const char *HttpServer = "http://www.esrf.eu/computing/cs/tango/tango_doc // // project : Mks651d. // -// $Author: mdm $ -// -// $Revision: 1.2 $ -// $Date: 2012-03-08 09:50:01 $ -// -// SVN only: -// $HeadURL: $ -// -// CVS only: -// $Source: /home/cvsadm/cvsroot/fermi/servers/651d/src/Mks651dClass.cpp,v $ -// $Log: Mks651dClass.cpp,v $ -// Revision 1.2 2012-03-08 09:50:01 mdm -// New version of server -// -// //============================================================================= // This file is generated by POGO // (Program Obviously used to Generate tango Object) @@ -799,134 +779,7 @@ void Mks651dClass::set_default_property() //-------------------------------------------------------- void Mks651dClass::write_class_property() { - // First time, check if database used - if (Tango::Util::_UseDb == false) - return; - - Tango::DbData data; - string classname = get_name(); - string header; - string::size_type start, end; - - // Put title - Tango::DbDatum title("ProjectTitle"); - string str_title("Mks651d"); - title << str_title; - data.push_back(title); - - // Put Description - Tango::DbDatum description("Description"); - vector<string> str_desc; - str_desc.push_back(""); - description << str_desc; - data.push_back(description); - - // put cvs or svn location - string filename("Mks651d"); - filename += "Class.cpp"; - - // check for cvs information - string src_path(CvsPath); - start = src_path.find("/"); - if (start!=string::npos) - { - end = src_path.find(filename); - if (end>start) - { - string strloc = src_path.substr(start, end-start); - // Check if specific repository - start = strloc.find("/cvsroot/"); - if (start!=string::npos && start>0) - { - string repository = strloc.substr(0, start); - if (repository.find("/segfs/")!=string::npos) - strloc = "ESRF:" + strloc.substr(start, strloc.length()-start); - } - Tango::DbDatum cvs_loc("cvs_location"); - cvs_loc << strloc; - data.push_back(cvs_loc); - } - } - // check for svn information - else - { - string src_path(SvnPath); - start = src_path.find("://"); - if (start!=string::npos) - { - end = src_path.find(filename); - if (end>start) - { - header = "$HeadURL: "; - start = header.length(); - string strloc = src_path.substr(start, (end-start)); - - Tango::DbDatum svn_loc("svn_location"); - svn_loc << strloc; - data.push_back(svn_loc); - } - } - } - - // Get CVS or SVN revision tag - - // CVS tag - string tagname(TagName); - header = "$Name: "; - start = header.length(); - string endstr(" $"); - - end = tagname.find(endstr); - if (end!=string::npos && end>start) - { - string strtag = tagname.substr(start, end-start); - Tango::DbDatum cvs_tag("cvs_tag"); - cvs_tag << strtag; - data.push_back(cvs_tag); - } - - // SVN tag - string svnpath(SvnPath); - header = "$HeadURL: "; - start = header.length(); - - end = svnpath.find(endstr); - if (end!=string::npos && end>start) - { - string strloc = svnpath.substr(start, end-start); - - string tagstr ("/tags/"); - start = strloc.find(tagstr); - if ( start!=string::npos ) - { - start = start + tagstr.length(); - end = strloc.find(filename); - string strtag = strloc.substr(start, end-start-1); - - Tango::DbDatum svn_tag("svn_tag"); - svn_tag << strtag; - data.push_back(svn_tag); - } - } - - // Get URL location - string httpServ(HttpServer); - if (httpServ.length()>0) - { - Tango::DbDatum db_doc_url("doc_url"); - db_doc_url << httpServ; - data.push_back(db_doc_url); - } - - // Put inheritance - Tango::DbDatum inher_datum("InheritedFrom"); - vector<string> inheritance; - inheritance.push_back("Device_Impl"); - inher_datum << inheritance; - data.push_back(inher_datum); - // Call database and and values - get_db_class()->put_property(data); } diff --git a/src/Mks651dClass.h b/src/Mks651dClass.h index 35805c8..a4f89a1 100644 --- a/src/Mks651dClass.h +++ b/src/Mks651dClass.h @@ -9,22 +9,6 @@ // It contains all properties and methods which the . // Mks651d requires only once e.g. the commands. // -// project : Mks651d. -// -// $Author: mdm $ -// -// $Revision: 1.2 $ -// $Date: 2012-03-08 09:50:01 $ -// -// SVN only: -// $HeadURL: $ -// -// CVS only: -// $Source: /home/cvsadm/cvsroot/fermi/servers/651d/src/Mks651dClass.h,v $ -// $Log: Mks651dClass.h,v $ -// Revision 1.2 2012-03-08 09:50:01 mdm -// New version of server -// // //============================================================================= // This file is generated by POGO diff --git a/src/Mks651dStateMachine.cpp b/src/Mks651dStateMachine.cpp index dabe5f5..751d281 100644 --- a/src/Mks651dStateMachine.cpp +++ b/src/Mks651dStateMachine.cpp @@ -1,5 +1,4 @@ /*----- PROTECTED REGION ID(Mks651dStateMachine.cpp) ENABLED START -----*/ -static const char *RcsId = "$Id: Mks651dStateMachine.cpp,v 1.2 2012-03-08 09:50:01 mdm Exp $"; //============================================================================= // // file : Mks651dStateMachine.cpp @@ -9,21 +8,6 @@ static const char *RcsId = "$Id: Mks651dStateMachine.cpp,v 1.2 2012-03-08 09:50: // // project : Mks651d. // -// $Author: mdm $ -// -// $Revision: 1.2 $ -// $Date: 2012-03-08 09:50:01 $ -// -// SVN only: -// $HeadURL: $ -// -// CVS only: -// $Source: /home/cvsadm/cvsroot/fermi/servers/651d/src/Mks651dStateMachine.cpp,v $ -// $Log: Mks651dStateMachine.cpp,v $ -// Revision 1.2 2012-03-08 09:50:01 mdm -// New version of server -// -// //============================================================================= // This file is generated by POGO // (Program Obviously used to Generate tango Object) diff --git a/src/ThreadGuard.h b/src/ThreadGuard.h index 1d3d2ca..6335d2c 100644 --- a/src/ThreadGuard.h +++ b/src/ThreadGuard.h @@ -1,8 +1,5 @@ /* * ThreadGuard.h - * - * Created on: Nov 30, 2011 - * Author: mdm */ #ifndef THREADGUARD_H_ diff --git a/src/main.cpp b/src/main.cpp index a2f7820..eee9e39 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,4 @@ /*PROTECTED REGION ID(Mks651d::main.cpp) ENABLED START*/ -static const char *RcsId = "$Id: main.cpp,v 1.2 2012-03-08 09:50:01 mdm Exp $"; //============================================================================= // // file : Mks651d.cpp @@ -11,21 +10,6 @@ static const char *RcsId = "$Id: main.cpp,v 1.2 2012-03-08 09:50:01 mdm Exp $"; // // project : Mks651d. // -// $Author: mdm $ -// -// $Revision: 1.2 $ -// $Date: 2012-03-08 09:50:01 $ -// -// SVN only: -// $HeadURL: $ -// -// CVS only: -// $Source: /home/cvsadm/cvsroot/fermi/servers/651d/src/main.cpp,v $ -// $Log: main.cpp,v $ -// Revision 1.2 2012-03-08 09:50:01 mdm -// New version of server -// -// //============================================================================= // This file is generated by POGO // (Program Obviously used to Generate tango Object) -- GitLab