Commit 580cf8a3 authored by Graziano Scalamera's avatar Graziano Scalamera
Browse files

Change PMTvoltage from DevDouble to DevLong

parent 2cb75ffc
......@@ -60,7 +60,7 @@
//================================================================
// Attributes managed are:
//================================================================
// PMTvoltage | Tango::DevDouble Scalar
// PMTvoltage | Tango::DevLong 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::DevDouble[1];
attr_PMTvoltage_read = new Tango::DevLong[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::DevDouble
* Data type: Tango::DevLong
* 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::DevDouble
* Data type: Tango::DevLong
* 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::DevDouble w_val;
Tango::DevLong w_val;
attr.get_write_value(w_val);
/*----- PROTECTED REGION ID(SFE::write_PMTvoltage) ENABLED START -----*/
stringstream cmd;
......
......@@ -72,7 +72,7 @@ public:
// Attribute data members
public:
Tango::DevDouble *attr_PMTvoltage_read;
Tango::DevLong *attr_PMTvoltage_read;
Tango::DevDouble *attr_Temperature_read;
// Constructors and destructors
......@@ -146,7 +146,7 @@ public:
* Attribute PMTvoltage related methods
* Description:
*
* Data type: Tango::DevDouble
* Data type: Tango::DevLong
* Attr type: Scalar
*/
virtual void read_PMTvoltage(Tango::Attribute &attr);
......
......@@ -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:DoubleType"/>
<dataType xsi:type="pogoDsl:IntType"/>
<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>
......
......@@ -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_format("%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_format("%3.1f");
// max_value not set for Temperature
// min_value not set for Temperature
// max_alarm not set for Temperature
......
......@@ -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);}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment