Skip to content

Commit

Permalink
Merge branch '22-add-lima_version-attr' into 'master'
Browse files Browse the repository at this point in the history
Resolve "add lima_version attr"

Closes esrf-bliss#22

See merge request limagroup/Lima-tango-python!45
  • Loading branch information
claustre committed Feb 11, 2020
2 parents 8e2ceee + 627896a commit 814ff87
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
20 changes: 15 additions & 5 deletions LimaCCDs.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ def init_device(self) :

# Setup a user-defined detector name if it exists
if self.UserInstrumentName:
if SystemHasFeature('Core.HwDetInfoCtrlObj.setUserInstrumentName'):
if SystemHasFeature('Core.HwDetInfoCtrlObj.setInstrumentName'):
self.__detinfo.setUserInstrumentName(self.UserInstrumentName)
else:
deb.Warning('UserInstrumentName not supported in this version')
Expand Down Expand Up @@ -701,6 +701,12 @@ def apply_config(self) :

## @brief Read the Lima Type
#
@RequiresSystemFeature('Core.CtControl.getVersion')
@Core.DEB_MEMBER_FUNCT
def read_lima_version(self,attr) :
value = self.__control.getVersion()
attr.set_value(value)

@Core.DEB_MEMBER_FUNCT
def read_lima_type(self,attr) :
value = self.LimaCameraType
Expand Down Expand Up @@ -738,19 +744,19 @@ def write_user_detector_name(self,attr) :

## @brief Read the user instrument name
#
@RequiresSystemFeature('Core.HwDetInfoCtrlObj.getUserInstrumentName')
@RequiresSystemFeature('Core.HwDetInfoCtrlObj.getInstrumentName')
@Core.DEB_MEMBER_FUNCT
def read_user_instrument_name(self,attr) :
value = self.__detinfo.getUserInstrumentName()
value = self.__detinfo.getInstrumentName()
attr.set_value(value)

## @brief Write the user instrument name
#
@RequiresSystemFeature('Core.HwDetInfoCtrlObj.setUserInstrumentName')
@RequiresSystemFeature('Core.HwDetInfoCtrlObj.setInstrumentName')
@Core.DEB_MEMBER_FUNCT
def write_user_instrument_name(self,attr) :
data = attr.get_write_value()
self.__detinfo.setUserInstrumentName(data)
self.__detinfo.setInstrumentName(data)

## @brief Read the Camera pixelsize
#
Expand Down Expand Up @@ -2153,6 +2159,10 @@ class LimaCCDsClass(PyTango.DeviceClass) :

# Attribute definitions
attr_list = {
'lima_version':
[[PyTango.DevString,
PyTango.SCALAR,
PyTango.READ]],
'lima_type':
[[PyTango.DevString,
PyTango.SCALAR,
Expand Down
2 changes: 2 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ few of them.
Attribute name RW Type Description
=========================== ======= ======================= =======================================================================================
\ \ **GENERAL INFORMATION** \
lima_version ro DevString The lima core library version number
lima_type ro DevString LImA camera type:
Maxipix,Pilatus,Frelon,Pco, Basler ...
camera_type ro DevString Like lima_type but in upper-case !!
Expand Down Expand Up @@ -270,6 +271,7 @@ image_flip rw DevBoolean[2] Flip on the image, [0] = flip over X ax
image_rotation rw DevString Rotate the image: "0", "90", "180" or "270"
\ \ \ \
\ \ **SHUTTER** \
shutter_ctrl_is_available ro DevBoolean Return true if the camera has a shutter control
shutter_mode rw DevString Synchronization for shutter, modes are available:
- **Manual**
- **Auto_frame**, the output signal is activated for each individual frame of a sequence
Expand Down

0 comments on commit 814ff87

Please sign in to comment.