Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cs
ds
sfe
Commits
580cf8a3
Commit
580cf8a3
authored
Oct 23, 2019
by
Graziano Scalamera
Browse files
Change PMTvoltage from DevDouble to DevLong
parent
2cb75ffc
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/SFE.cpp
View file @
580cf8a3
...
...
@@ -60,7 +60,7 @@
//================================================================
// Attributes managed are:
//================================================================
// PMTvoltage | Tango::Dev
Double
Scalar
// PMTvoltage | Tango::Dev
Long
Scalar
// Temperature | Tango::DevDouble Scalar
//================================================================
...
...
@@ -144,7 +144,7 @@ void SFE::init_device()
// Get the device properties from database
get_device_property
();
attr_PMTvoltage_read
=
new
Tango
::
Dev
Double
[
1
];
attr_PMTvoltage_read
=
new
Tango
::
Dev
Long
[
1
];
attr_Temperature_read
=
new
Tango
::
DevDouble
[
1
];
/*----- PROTECTED REGION ID(SFE::init_device) ENABLED START -----*/
...
...
@@ -319,7 +319,7 @@ void SFE::write_attr_hardware(TANGO_UNUSED(vector<long> &attr_list))
* Read attribute PMTvoltage related method
* Description:
*
* Data type: Tango::Dev
Double
* Data type: Tango::Dev
Long
* Attr type: Scalar
*/
//--------------------------------------------------------
...
...
@@ -328,7 +328,7 @@ void SFE::read_PMTvoltage(Tango::Attribute &attr)
DEBUG_STREAM
<<
"SFE::read_PMTvoltage(Tango::Attribute &attr) entering... "
<<
endl
;
/*----- PROTECTED REGION ID(SFE::read_PMTvoltage) ENABLED START -----*/
string
cmd
(
"RV?"
);
SendReceive
(
cmd
,
(
double
*
)
attr_PMTvoltage_read
);
SendReceive
(
cmd
,
attr_PMTvoltage_read
);
// Set the attribute value
attr
.
set_value
(
attr_PMTvoltage_read
);
...
...
@@ -339,7 +339,7 @@ void SFE::read_PMTvoltage(Tango::Attribute &attr)
* Write attribute PMTvoltage related method
* Description:
*
* Data type: Tango::Dev
Double
* Data type: Tango::Dev
Long
* Attr type: Scalar
*/
//--------------------------------------------------------
...
...
@@ -347,7 +347,7 @@ void SFE::write_PMTvoltage(Tango::WAttribute &attr)
{
DEBUG_STREAM
<<
"SFE::write_PMTvoltage(Tango::WAttribute &attr) entering... "
<<
endl
;
// Retrieve write value
Tango
::
Dev
Double
w_val
;
Tango
::
Dev
Long
w_val
;
attr
.
get_write_value
(
w_val
);
/*----- PROTECTED REGION ID(SFE::write_PMTvoltage) ENABLED START -----*/
stringstream
cmd
;
...
...
src/SFE.h
View file @
580cf8a3
...
...
@@ -72,7 +72,7 @@ public:
// Attribute data members
public:
Tango
::
Dev
Double
*
attr_PMTvoltage_read
;
Tango
::
Dev
Long
*
attr_PMTvoltage_read
;
Tango
::
DevDouble
*
attr_Temperature_read
;
// Constructors and destructors
...
...
@@ -146,7 +146,7 @@ public:
* Attribute PMTvoltage related methods
* Description:
*
* Data type: Tango::Dev
Double
* Data type: Tango::Dev
Long
* Attr type: Scalar
*/
virtual
void
read_PMTvoltage
(
Tango
::
Attribute
&
attr
);
...
...
src/SFE.xmi
View file @
580cf8a3
...
...
@@ -28,12 +28,12 @@
<status
abstract=
"true"
inherited=
"true"
concrete=
"true"
/>
</commands>
<attributes
name=
"PMTvoltage"
attType=
"Scalar"
rwType=
"READ_WRITE"
displayLevel=
"OPERATOR"
polledPeriod=
"0"
maxX=
""
maxY=
""
memorized=
"true"
memorizedAtInit=
"true"
allocReadMember=
"true"
isDynamic=
"false"
>
<dataType
xsi:type=
"pogoDsl:
Double
Type"
/>
<dataType
xsi:type=
"pogoDsl:
Int
Type"
/>
<changeEvent
fire=
"false"
libCheckCriteria=
"false"
/>
<archiveEvent
fire=
"false"
libCheckCriteria=
"false"
/>
<dataReadyEvent
fire=
"false"
libCheckCriteria=
"true"
/>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
<properties
description=
""
label=
""
unit=
""
standardUnit=
""
displayUnit=
""
format=
""
maxValue=
""
minValue=
""
maxAlarm=
""
minAlarm=
""
maxWarning=
""
minWarning=
""
deltaTime=
""
deltaValue=
""
/>
<properties
description=
""
label=
""
unit=
"
mV
"
standardUnit=
"
1
"
displayUnit=
"
mV
"
format=
"
%4d
"
maxValue=
"
1000
"
minValue=
"
0
"
maxAlarm=
""
minAlarm=
""
maxWarning=
""
minWarning=
""
deltaTime=
""
deltaValue=
""
/>
</attributes>
<attributes
name=
"Temperature"
attType=
"Scalar"
rwType=
"READ"
displayLevel=
"OPERATOR"
polledPeriod=
"0"
maxX=
""
maxY=
""
allocReadMember=
"true"
isDynamic=
"false"
>
<dataType
xsi:type=
"pogoDsl:DoubleType"
/>
...
...
@@ -41,7 +41,7 @@
<archiveEvent
fire=
"false"
libCheckCriteria=
"false"
/>
<dataReadyEvent
fire=
"false"
libCheckCriteria=
"true"
/>
<status
abstract=
"false"
inherited=
"false"
concrete=
"true"
concreteHere=
"true"
/>
<properties
description=
""
label=
""
unit=
""
standardUnit=
""
displayUnit=
""
format=
""
maxValue=
""
minValue=
""
maxAlarm=
""
minAlarm=
""
maxWarning=
""
minWarning=
""
deltaTime=
""
deltaValue=
""
/>
<properties
description=
""
label=
""
unit=
"
C
"
standardUnit=
"
1
"
displayUnit=
"
C
"
format=
"
%3.1f
"
maxValue=
""
minValue=
""
maxAlarm=
""
minAlarm=
""
maxWarning=
""
minWarning=
""
deltaTime=
""
deltaValue=
""
/>
</attributes>
<preferences
docHome=
"./doc_html"
makefileHome=
"/usr/local/tango-9.3.3/share/pogo/preferences"
/>
</classes>
...
...
src/SFEClass.cpp
View file @
580cf8a3
...
...
@@ -344,12 +344,12 @@ void SFEClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango
::
UserDefaultAttrProp
pmtvoltage_prop
;
// description not set for PMTvoltage
// label not set for PMTvoltage
// unit not set for PMTvoltage
// standard_unit not set for PMTvoltage
// display_unit not set for PMTvoltage
// format not
set
for
PMTvoltage
// max_value not set for PMTvoltage
// min_value not set for PMTvoltage
pmtvoltage_prop
.
set_unit
(
"mV"
);
pmtvoltage_prop
.
set_standard_unit
(
"1"
);
pmtvoltage_prop
.
set_display_unit
(
"mV"
);
pmtvoltage_prop
.
set
_
for
mat
(
"%4d"
);
pmtvoltage_prop
.
set_max_value
(
"1000"
);
pmtvoltage_prop
.
set_min_value
(
"0"
);
// max_alarm not set for PMTvoltage
// min_alarm not set for PMTvoltage
// max_warning not set for PMTvoltage
...
...
@@ -369,10 +369,10 @@ void SFEClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango
::
UserDefaultAttrProp
temperature_prop
;
// description not set for Temperature
// label not set for Temperature
// unit not set for Temperature
// standard_unit not set for Temperature
// display_unit not set for Temperature
// format not
set
for
Temperature
temperature_prop
.
set_unit
(
"C"
);
temperature_prop
.
set_standard_unit
(
"1"
);
temperature_prop
.
set_display_unit
(
"C"
);
temperature_prop
.
set
_
for
mat
(
"%3.1f"
);
// max_value not set for Temperature
// min_value not set for Temperature
// max_alarm not set for Temperature
...
...
src/SFEClass.h
View file @
580cf8a3
...
...
@@ -62,7 +62,7 @@ class PMTvoltageAttrib: public Tango::Attr
{
public:
PMTvoltageAttrib
()
:
Attr
(
"PMTvoltage"
,
Tango
::
DEV_
DOUBLE
,
Tango
::
READ_WRITE
)
{};
Tango
::
DEV_
LONG
,
Tango
::
READ_WRITE
)
{};
~
PMTvoltageAttrib
()
{};
virtual
void
read
(
Tango
::
DeviceImpl
*
dev
,
Tango
::
Attribute
&
att
)
{(
static_cast
<
SFE
*>
(
dev
))
->
read_PMTvoltage
(
att
);}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment