Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LimaGroup
Lima2
Commits
ae981b7d
Commit
ae981b7d
authored
May 22, 2019
by
Samuel Debionne
Committed by
operator for beamline
Jun 20, 2019
Browse files
Use POGO to generate scaffolding
parent
6337e759
Pipeline
#25269
failed with stages
in 13 minutes and 14 seconds
Changes
17
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
ae981b7d
...
...
@@ -106,6 +106,12 @@ if(LIMA_ENABLE_PYTHON)
find_package
(
pybind11 REQUIRED
)
endif
()
if
(
LIMA_ENABLE_TANGO
)
find_package
(
Tango REQUIRED
)
find_package
(
OmniORB REQUIRED
)
find_package
(
ZeroMQ REQUIRED
)
endif
()
if
(
LIMA_ENABLE_TIFF
)
find_package
(
TIFF REQUIRED
)
endif
()
...
...
cmake/FindOmniORB.cmake
0 → 100644
View file @
ae981b7d
#
# Find the omniORB libraries and include dir
#
# The following variables are set:
# OMNIORB4_FOUND - When false, don't try to use omniORB
# OMNIORB4_INCLUDE_DIR - Directories to include to use omniORB
# OMNIORB4_LIBRARIES_sh - Files to link against to use omniORB (shared libraries)
# OMNIORB4_LIBRARIES_st - Files to link against to use omniORB (static libraries)
# OMNIORB4_IDL_COMPILER - The idl compiler command (when found)
# OMNIORB4_VERSION - A string of the form X.Y.Z representing the version
# OMNIORB4_OMNINAMES_COMMAND - the omniNames ORB server command (when found)
# OMNIORB4_DIR - (optional) Suggested installation directory to search
#
#
# OMNIORB4_DIR can be used to make it simpler to find the various include
# directories and compiled libraries when omniORB was not installed in the
# usual/well-known directories (e.g. because you made an in tree-source
# compilation or because you installed it in an "unusual" directory).
# Just set OMNIORB4_DIR to point to your specific installation directory.
#
# $ENV{OMNIORB4_DIR} i.e. the environment variable (as opposed to OMNIORB4_DIR
# which is the cmake variable with the same name) is also used to search for
# an omniORB installation.
#
# WARNING: The order of precedence is the following
# 1/ when set OMNIORB4_DIR (the cmake variable)
# 2/ when set $ENV{OMNIORB4_DIR} (the environment variable)
# 3/ the default system pathes !
# This precedence order goes against the usual pratice and default behavior
# of cmake's FIND_* macros. For more on this debate see e.g.
# http://www.mail-archive.com/kde-buildsystem@kde.org/msg00589.html
#
#
#### The list of required libraries for omniORB is not so clear. See
# http://www.omniorb-support.com/pipermail/omniorb-list/2005-May/026666.html
# The answer should basically be in
# - omniORB-4.0.X/README.*
# - omniORB-4.0.X/readmes/*
# but doesn't seem that obvious to newbies.
# The logic we took is here to impose the detection of omniORB4, omnithread,
# and omniDynamic4 libraries. Optionaly we search for libraries COS4 and
# COSDynamic4 and when present we add them to list of required libraries.
# [the logic is here: the installer of omniORB knows better...]
#
#### The minimum recommanded version of omniORB is 4.1.2 as 4.0.6 has known bugs
# in marshalling/unmarshalling floats and doubles using CORBA::Any.
SET
(
OMNIORB4_MINIMUM_VERSION
"4.1.2"
)
FIND_PATH
(
OMNIORB4_INCLUDE_DIR
omniORB4/CORBA.h
PATHS
${
OMNIORB4_DIR
}
/include $ENV{OMNIORB4_DIR}/include
NO_DEFAULT_PATH
)
FIND_PATH
(
OMNIORB4_INCLUDE_DIR omniORB4/CORBA.h
)
### Search for static libraries ###
FIND_LIBRARY
(
OMNIORB4_LIBRARY_omniORB4_st
NAMES
${
CMAKE_STATIC_LIBRARY_PREFIX
}
omniORB4
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
PATHS
${
OMNIORB4_DIR
}
/lib $ENV{OMNIORB4_DIR}/lib
NO_DEFAULT_PATH
)
FIND_LIBRARY
(
OMNIORB4_LIBRARY_omniORB4_st NAMES
${
CMAKE_STATIC_LIBRARY_PREFIX
}
omniORB4
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
)
FIND_LIBRARY
(
OMNIORB4_LIBRARY_omnithread_st
NAMES
${
CMAKE_STATIC_LIBRARY_PREFIX
}
omnithread
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
PATHS
${
OMNIORB4_DIR
}
/lib $ENV{OMNIORB4_DIR}/lib
NO_DEFAULT_PATH
)
FIND_LIBRARY
(
OMNIORB4_LIBRARY_omnithread_st
NAMES
${
CMAKE_STATIC_LIBRARY_PREFIX
}
omnithread
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
)
FIND_LIBRARY
(
OMNIORB4_LIBRARY_omniDynamic4_st
NAMES
${
CMAKE_STATIC_LIBRARY_PREFIX
}
omniDynamic4
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
PATHS
${
OMNIORB4_DIR
}
/lib $ENV{OMNIORB4_DIR}/lib
NO_DEFAULT_PATH
)
FIND_LIBRARY
(
OMNIORB4_LIBRARY_omniDynamic4_st
NAMES
${
CMAKE_STATIC_LIBRARY_PREFIX
}
omniDynamic4
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
)
### Optional library
FIND_LIBRARY
(
OMNIORB4_LIBRARY_COS4_st
NAMES
${
CMAKE_STATIC_LIBRARY_PREFIX
}
COS4
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
PATHS
${
OMNIORB4_DIR
}
/lib $ENV{OMNIORB4_DIR}/lib
NO_DEFAULT_PATH
)
FIND_LIBRARY
(
OMNIORB4_LIBRARY_COS4_st
NAMES
${
CMAKE_STATIC_LIBRARY_PREFIX
}
COS4
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
)
### Additional optional library
FIND_LIBRARY
(
OMNIORB4_LIBRARY_COSDynamic4_st
NAMES
${
CMAKE_STATIC_LIBRARY_PREFIX
}
COSDynamic4
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
PATHS
${
OMNIORB4_DIR
}
/lib $ENV{OMNIORB4_DIR}/lib
NO_DEFAULT_PATH
)
FIND_LIBRARY
(
OMNIORB4_LIBRARY_COSDynamic4_st
NAMES
${
CMAKE_STATIC_LIBRARY_PREFIX
}
COSDynamic4
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
)
### Search for shared libraries ###
FIND_LIBRARY
(
OMNIORB4_LIBRARY_omniORB4_sh
NAMES
${
CMAKE_SHARED_LIBRARY_PREFIX
}
omniORB4
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
PATHS
${
OMNIORB4_DIR
}
/lib $ENV{OMNIORB4_DIR}/lib
NO_DEFAULT_PATH
)
FIND_LIBRARY
(
OMNIORB4_LIBRARY_omniORB4_sh NAMES
${
CMAKE_SHARED_LIBRARY_PREFIX
}
omniORB4
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
FIND_LIBRARY
(
OMNIORB4_LIBRARY_omnithread_sh
NAMES
${
CMAKE_SHARED_LIBRARY_PREFIX
}
omnithread
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
PATHS
${
OMNIORB4_DIR
}
/lib $ENV{OMNIORB4_DIR}/lib
NO_DEFAULT_PATH
)
FIND_LIBRARY
(
OMNIORB4_LIBRARY_omnithread_sh
NAMES
${
CMAKE_SHARED_LIBRARY_PREFIX
}
omnithread
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
FIND_LIBRARY
(
OMNIORB4_LIBRARY_omniDynamic4_sh
NAMES
${
CMAKE_SHARED_LIBRARY_PREFIX
}
omniDynamic4
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
PATHS
${
OMNIORB4_DIR
}
/lib $ENV{OMNIORB4_DIR}/lib
NO_DEFAULT_PATH
)
FIND_LIBRARY
(
OMNIORB4_LIBRARY_omniDynamic4_sh
NAMES
${
CMAKE_SHARED_LIBRARY_PREFIX
}
omniDynamic4
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
### Optional library
FIND_LIBRARY
(
OMNIORB4_LIBRARY_COS4_sh
NAMES
${
CMAKE_SHARED_LIBRARY_PREFIX
}
COS4
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
PATHS
${
OMNIORB4_DIR
}
/lib $ENV{OMNIORB4_DIR}/lib
NO_DEFAULT_PATH
)
FIND_LIBRARY
(
OMNIORB4_LIBRARY_COS4_sh
NAMES
${
CMAKE_SHARED_LIBRARY_PREFIX
}
COS4
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
### Additional optional library
FIND_LIBRARY
(
OMNIORB4_LIBRARY_COSDynamic4_sh
NAMES
${
CMAKE_SHARED_LIBRARY_PREFIX
}
COSDynamic4
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
PATHS
${
OMNIORB4_DIR
}
/lib $ENV{OMNIORB4_DIR}/lib
NO_DEFAULT_PATH
)
FIND_LIBRARY
(
OMNIORB4_LIBRARY_COSDynamic4_sh
NAMES
${
CMAKE_SHARED_LIBRARY_PREFIX
}
COSDynamic4
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
### Search for omniORB applications ###
FIND_PROGRAM
(
OMNIORB4_IDL_COMPILER
NAMES omniidl
PATHS
${
OMNIORB4_DIR
}
/bin $ENV{OMNIORB4_DIR}/bin
DOC
"What is the path where omniidl (the idl compiler) can be found"
NO_DEFAULT_PATH
)
FIND_PROGRAM
(
OMNIORB4_IDL_COMPILER
NAMES omniidl
DOC
"What is the path where omniidl (the idl compiler) can be found"
)
FIND_PROGRAM
(
OMNIORB4_OMNINAMES_COMMAND
NAMES omniNames
PATHS
${
OMNIORB4_DIR
}
/bin $ENV{OMNIORB4_DIR}/bin
DOC
"What is the path where omniNames (the ORB server) can be found"
NO_DEFAULT_PATH
)
FIND_PROGRAM
(
OMNIORB4_OMNINAMES_COMMAND
NAMES omniNames
DOC
"What is the path where omniNames (the ORB server) can be found"
)
SET
(
OMNIORB4_FOUND
"NO"
)
IF
(
OMNIORB4_INCLUDE_DIR
)
IF
(
OMNIORB4_LIBRARY_omniORB4_sh
)
IF
(
OMNIORB4_LIBRARY_omnithread_sh
)
IF
(
OMNIORB4_LIBRARY_omniDynamic4_sh
)
IF
(
OMNIORB4_IDL_COMPILER
)
SET
(
OMNIORB4_FOUND
"YES"
)
MARK_AS_ADVANCED
(
OMNIORB4_DIR
)
MARK_AS_ADVANCED
(
OMNIORB4_INCLUDE_DIR
)
MARK_AS_ADVANCED
(
OMNIORB4_LIBRARY_omniORB4_st
)
MARK_AS_ADVANCED
(
OMNIORB4_LIBRARY_omnithread_st
)
MARK_AS_ADVANCED
(
OMNIORB4_LIBRARY_omniDynamic4_st
)
MARK_AS_ADVANCED
(
OMNIORB4_LIBRARY_omniORB4_sh
)
MARK_AS_ADVANCED
(
OMNIORB4_LIBRARY_omnithread_sh
)
MARK_AS_ADVANCED
(
OMNIORB4_LIBRARY_omniDynamic4_sh
)
MARK_AS_ADVANCED
(
OMNIORB4_IDL_COMPILER
)
MARK_AS_ADVANCED
(
OMNIORB4_OMNINAMES_COMMAND
)
# Note: when linking in static with g++ it looks like omniDynamic4 needs
# to appear prior to omniORB4 in order to avoid some undefined references
# to e.g. CORBA::Fixed::Fixed(int).
SET
(
OMNIORB4_LIBRARIES_sh
${
OMNIORB4_LIBRARY_omniDynamic4_sh
}
${
OMNIORB4_LIBRARY_omniORB4_sh
}
${
OMNIORB4_LIBRARY_omnithread_sh
}
)
SET
(
OMNIORB4_LIBRARIES_st
${
OMNIORB4_LIBRARY_omniDynamic4_st
}
${
OMNIORB4_LIBRARY_omniORB4_st
}
${
OMNIORB4_LIBRARY_omnithread_st
}
)
# We do not require the existence of the libraries COS4 and COSDynamic4
# since they exist in some distribution packages (e.g. Fedora Core) and
# not in others (e.g. Debian). When present we add them to the list of
# libraries we link against. When absent we hide away (in the advanced
# parameters) the NOT-FOUND associated variable in order not to deconcert
# the newbie:
IF
(
OMNIORB4_LIBRARY_COS4_sh
)
SET
(
OMNIORB4_LIBRARIES_sh
${
OMNIORB4_LIBRARIES_sh
}
${
OMNIORB4_LIBRARY_COS4_sh
}
)
ENDIF
(
OMNIORB4_LIBRARY_COS4_sh
)
IF
(
OMNIORB4_LIBRARY_COS4_st
)
SET
(
OMNIORB4_LIBRARIES_st
${
OMNIORB4_LIBRARIES_st
}
${
OMNIORB4_LIBRARY_COS4_st
}
)
ENDIF
(
OMNIORB4_LIBRARY_COS4_st
)
MARK_AS_ADVANCED
(
OMNIORB4_LIBRARY_COS4_sh
)
MARK_AS_ADVANCED
(
OMNIORB4_LIBRARY_COS4_st
)
IF
(
OMNIORB4_LIBRARY_COSDynamic4_sh
)
SET
(
OMNIORB4_LIBRARIES_sh
${
OMNIORB4_LIBRARIES_sh
}
${
OMNIORB4_LIBRARY_COSDynamic4_sh
}
)
ENDIF
(
OMNIORB4_LIBRARY_COSDynamic4_sh
)
IF
(
OMNIORB4_LIBRARY_COSDynamic4_st
)
SET
(
OMNIORB4_LIBRARIES_st
${
OMNIORB4_LIBRARIES_st
}
${
OMNIORB4_LIBRARY_COSDynamic4_st
}
)
ENDIF
(
OMNIORB4_LIBRARY_COSDynamic4_st
)
MARK_AS_ADVANCED
(
OMNIORB4_LIBRARY_COSDynamic4_sh
)
MARK_AS_ADVANCED
(
OMNIORB4_LIBRARY_COSDynamic4_st
)
# Optionaly, extract the the version number from the acconfig.h file:
IF
(
EXISTS
${
OMNIORB4_INCLUDE_DIR
}
/omniORB4/acconfig.h
)
FILE
(
READ
${
OMNIORB4_INCLUDE_DIR
}
/omniORB4/acconfig.h OMNIORB_ACCONFIG_H
)
STRING
(
REGEX MATCH
"#define[
\t
]+PACKAGE_VERSION[
\t
]+
\"
([0-9]+.[0-9]+.[0-9]+)
\"
"
OMNIORB_ACCONFIG_H
"
${
OMNIORB_ACCONFIG_H
}
"
)
STRING
(
REGEX REPLACE
".*
\"
([0-9]+.[0-9]+.[0-9]+)
\"
.*"
"
\\
1"
OMNIORB4_VERSION
"
${
OMNIORB_ACCONFIG_H
}
"
)
IF
(
${
OMNIORB4_VERSION
}
VERSION_LESS
${
OMNIORB4_MINIMUM_VERSION
}
)
MESSAGE
(
"WARNING: your version of omniORB is older than the minimum required one (
${
OMNIORB4_MINIMUM_VERSION
}
), using DIET with this version may result in undetermined behaviors."
)
ENDIF
(
${
OMNIORB4_VERSION
}
VERSION_LESS
${
OMNIORB4_MINIMUM_VERSION
}
)
ELSE
(
EXISTS
${
OMNIORB4_INCLUDE_DIR
}
/omniORB4/acconfig.h
)
SET
(
OMNIORB4_VERSION
"NOT-FOUND"
)
ENDIF
(
EXISTS
${
OMNIORB4_INCLUDE_DIR
}
/omniORB4/acconfig.h
)
SET
(
OMNIORB4_VERSION
${
OMNIORB4_VERSION
}
CACHE STRING
"OmniORB version number."
)
MARK_AS_ADVANCED
(
OMNIORB4_VERSION
)
ENDIF
(
OMNIORB4_IDL_COMPILER
)
ENDIF
(
OMNIORB4_LIBRARY_omniDynamic4_sh
)
ENDIF
(
OMNIORB4_LIBRARY_omnithread_sh
)
ENDIF
(
OMNIORB4_LIBRARY_omniORB4_sh
)
ENDIF
(
OMNIORB4_INCLUDE_DIR
)
# Set required compilation variables
if
(
CYGWIN
)
add_definitions
(
-D__cygwin__
)
elseif
(
AIX
)
add_definitions
(
-D__aix__
)
elseif
(
APPLE
)
add_definitions
(
-D__darwin__
)
elseif
(
LINUX
)
add_definitions
(
-D__linux__
)
elseif
(
SUNOS
)
add_definitions
(
-D__sunos__
)
elseif
(
FREEBSD
)
add_definitions
(
-D__freebsd__
)
endif
(
CYGWIN
)
cmake/FindTango.cmake
0 → 100644
View file @
ae981b7d
find_path
(
TANGO_INCLUDE_DIRS tango.h PATH_SUFFIXES tango
)
find_library
(
TANGO_LIBRARY tango
)
find_library
(
LOG4TANGO_LIBRARY log4tango
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
Tango
DEFAULT_MSG
TANGO_LIBRARY
LOG4TANGO_LIBRARY
TANGO_INCLUDE_DIRS
)
set
(
TANGO_LIBRARIES
${
TANGO_LIBRARY
}
${
LOG4TANGO_LIBRARY
}
)
\ No newline at end of file
conda/meta.yaml
View file @
ae981b7d
...
...
@@ -27,6 +27,7 @@ requirements:
-
sml
-
stlab
-
sls_detector_lib
# [linux]
-
tango
# [linux]
build
:
-
git
-
cmake
...
...
src/tango/CMakeLists.txt
View file @
ae981b7d
...
...
@@ -7,9 +7,26 @@
file
(
GLOB_RECURSE header_files
"*.hpp"
)
# Tango DS
add_executable
(
lima_tango
device.cpp
device_class.cpp
device_server.cpp
add_executable
(
LimaDetectors
ClassFactory.cpp
LimaDetector.cpp
LimaDetectorClass.cpp
LimaDetectorStateMachine.cpp
main.cpp
${
header_files
}
)
message
(
"TANGO_INCLUDE_DIRS:
${
TANGO_INCLUDE_DIRS
}
"
)
target_include_directories
(
LimaDetectors
PUBLIC
${
TANGO_INCLUDE_DIRS
}
PRIVATE
${
CMAKE_CURRENT_SOURCE_DIR
}
)
target_link_libraries
(
LimaDetectors PUBLIC libzmq
${
CMAKE_THREAD_LIBS_INIT
}
${
TANGO_LIBRARIES
}
${
OMNIORB4_LIBRARIES_sh
}
)
#set_property(TARGET LimaDetectors PROPERTY INTERPROCEDURAL_OPTIMIZATION False)
install
(
TARGETS LimaDetectors
RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
)
\ No newline at end of file
src/tango/ClassFactory.cpp
0 → 100644
View file @
ae981b7d
/*----- PROTECTED REGION ID(LimaDetector::ClassFactory.cpp) ENABLED START -----*/
//=============================================================================
//
// file : ClassFactory.cpp
//
// description : C++ source for the class_factory method of the DServer
// device class. This method is responsible for the creation of
// all class singleton for a device server. It is called
// at device server startup.
//
// project : lima
//
//
// Copyright (C): 2019
// European Synchrotron Radiation Facility
// BP 220, Grenoble 38043
// France
//
//=============================================================================
// This file is generated by POGO
// (Program Obviously used to Generate tango Object)
//=============================================================================
#include
<tango.h>
#include
<LimaDetectorClass.h>
// Add class header files if needed
/**
* Create LimaDetector Class singleton and store it in DServer object.
*/
void
Tango
::
DServer
::
class_factory
()
{
// Add method class init if needed
add_class
(
LimaDetector_ns
::
LimaDetectorClass
::
init
(
"LimaDetector"
));
}
/*----- PROTECTED REGION END -----*/
// LimaDetector::ClassFactory.cpp
src/tango/LimaDetector.cpp
0 → 100644
View file @
ae981b7d
/*----- PROTECTED REGION ID(LimaDetector.cpp) ENABLED START -----*/
//=============================================================================
//
// file : LimaDetector.cpp
//
// description : C++ source for the LimaDetector class and its commands.
// The class is derived from Device. It represents the
// CORBA servant object which will be accessed from the
// network. All commands which can be executed on the
// LimaDetector are implemented in this file.
//
// project : lima
//
//
// Copyright (C): 2019
// European Synchrotron Radiation Facility
// BP 220, Grenoble 38043
// France
//
//=============================================================================
// This file is generated by POGO
// (Program Obviously used to Generate tango Object)
//=============================================================================
#include
<LimaDetector.h>
#include
<LimaDetectorClass.h>
/*----- PROTECTED REGION END -----*/
// LimaDetector.cpp
/**
* LimaDetector class description:
*
*/
//================================================================
// The following table gives the correspondence
// between command and method names.
//
// Command name | Method name
//================================================================
// State | Inherited (no method)
// Status | Inherited (no method)
// Prepare | prepare
// Start | start
// Stop | stop
//================================================================
//================================================================
// Attributes managed are:
//================================================================
// AcqState | Tango::DevEnum Scalar
// FrameCounter | Tango::DevLong Scalar
//================================================================
namespace
LimaDetector_ns
{
/*----- PROTECTED REGION ID(LimaDetector::namespace_starting) ENABLED START -----*/
// static initializations
/*----- PROTECTED REGION END -----*/
// LimaDetector::namespace_starting
//--------------------------------------------------------
/**
* Method : LimaDetector::LimaDetector()
* Description : Constructors for a Tango device
* implementing the classLimaDetector
*/
//--------------------------------------------------------
LimaDetector
::
LimaDetector
(
Tango
::
DeviceClass
*
cl
,
string
&
s
)
:
TANGO_BASE_CLASS
(
cl
,
s
.
c_str
())
{
/*----- PROTECTED REGION ID(LimaDetector::constructor_1) ENABLED START -----*/
init_device
();
/*----- PROTECTED REGION END -----*/
// LimaDetector::constructor_1
}
//--------------------------------------------------------
LimaDetector
::
LimaDetector
(
Tango
::
DeviceClass
*
cl
,
const
char
*
s
)
:
TANGO_BASE_CLASS
(
cl
,
s
)
{
/*----- PROTECTED REGION ID(LimaDetector::constructor_2) ENABLED START -----*/
init_device
();
/*----- PROTECTED REGION END -----*/
// LimaDetector::constructor_2
}
//--------------------------------------------------------
LimaDetector
::
LimaDetector
(
Tango
::
DeviceClass
*
cl
,
const
char
*
s
,
const
char
*
d
)
:
TANGO_BASE_CLASS
(
cl
,
s
,
d
)
{
/*----- PROTECTED REGION ID(LimaDetector::constructor_3) ENABLED START -----*/
init_device
();
/*----- PROTECTED REGION END -----*/
// LimaDetector::constructor_3
}
//--------------------------------------------------------
/**
* Method : LimaDetector::delete_device()
* Description : will be called at device destruction or at init command
*/
//--------------------------------------------------------
void
LimaDetector
::
delete_device
()
{
DEBUG_STREAM
<<
"LimaDetector::delete_device() "
<<
device_name
<<
endl
;
/*----- PROTECTED REGION ID(LimaDetector::delete_device) ENABLED START -----*/
// Delete device allocated objects
/*----- PROTECTED REGION END -----*/
// LimaDetector::delete_device
delete
[]
attr_AcqState_read
;
delete
[]
attr_FrameCounter_read
;
}
//--------------------------------------------------------
/**
* Method : LimaDetector::init_device()
* Description : will be called at device initialization.
*/
//--------------------------------------------------------
void
LimaDetector
::
init_device
()
{
DEBUG_STREAM
<<
"LimaDetector::init_device() create device "
<<
device_name
<<
endl
;
/*----- PROTECTED REGION ID(LimaDetector::init_device_before) ENABLED START -----*/
// Initialization before get_device_property() call
/*----- PROTECTED REGION END -----*/
// LimaDetector::init_device_before
// No device property to be read from database
attr_AcqState_read
=
new
AcqStateEnum
[
1
];
attr_FrameCounter_read
=
new
Tango
::
DevLong
[
1
];
/*----- PROTECTED REGION ID(LimaDetector::init_device) ENABLED START -----*/
// Initialize device
*
attr_AcqState_read
=
_IDLE
;
*
attr_FrameCounter_read
=
0
;
/*----- PROTECTED REGION END -----*/
// LimaDetector::init_device
}
//--------------------------------------------------------
/**
* Method : LimaDetector::always_executed_hook()
* Description : method always executed before any command is executed
*/
//--------------------------------------------------------
void
LimaDetector
::
always_executed_hook
()
{
DEBUG_STREAM
<<
"LimaDetector::always_executed_hook() "
<<
device_name
<<
endl
;
/*----- PROTECTED REGION ID(LimaDetector::always_executed_hook) ENABLED START -----*/
// code always executed before all requests
/*----- PROTECTED REGION END -----*/
// LimaDetector::always_executed_hook
}
//--------------------------------------------------------
/**
* Method : LimaDetector::read_attr_hardware()
* Description : Hardware acquisition for attributes
*/
//--------------------------------------------------------
void
LimaDetector
::
read_attr_hardware
(
TANGO_UNUSED
(
vector
<
long
>
&
attr_list
))
{
DEBUG_STREAM
<<
"LimaDetector::read_attr_hardware(vector<long> &attr_list) entering... "
<<
endl
;
/*----- PROTECTED REGION ID(LimaDetector::read_attr_hardware) ENABLED START -----*/
// Add your own code
/*----- PROTECTED REGION END -----*/
// LimaDetector::read_attr_hardware
}
//--------------------------------------------------------
/**
* Read attribute AcqState related method
* Description:
*
* Data type: Tango::DevEnum (AcqStateEnum)
* Attr type: Scalar
*/
//--------------------------------------------------------
void
LimaDetector
::
read_AcqState
(
Tango
::
Attribute
&
attr
)
{
DEBUG_STREAM
<<
"LimaDetector::read_AcqState(Tango::Attribute &attr) entering... "
<<
endl
;
/*----- PROTECTED REGION ID(LimaDetector::read_AcqState) ENABLED START -----*/
// Set the attribute value
attr
.
set_value
(
attr_AcqState_read
);
/*----- PROTECTED REGION END -----*/
// LimaDetector::read_AcqState
}
//--------------------------------------------------------
/**
* Read attribute FrameCounter related method
* Description:
*
* Data type: Tango::DevLong
* Attr type: Scalar
*/
//--------------------------------------------------------
void
LimaDetector
::
read_FrameCounter
(
Tango
::
Attribute
&
attr
)
{
DEBUG_STREAM
<<
"LimaDetector::read_FrameCounter