Commit 0c2eab09 authored by Yuelong Yu's avatar Yuelong Yu
Browse files

calculation routine of ltcc temperature has been changed. The previous one was wrong

parent edd4d2f5
......@@ -209,7 +209,7 @@ void AGIPDMC::init_device()
/*----- PROTECTED REGION ID(AGIPDMC::init_device) ENABLED START -----*/
// Initialize device
Tango::DevString strDefaultTemperature = "-9999;-9999;-9999";
Tango::DevString strDefaultTemperature = "X;X;X;X";
*attr_Temperature1_read = strDefaultTemperature;
*attr_Temperature2_read = strDefaultTemperature;
......
......@@ -77,6 +77,7 @@ class AGIPDMC : public TANGO_BASE_CLASS
/*----- PROTECTED REGION END -----*/ // AGIPDMC::Data Members
// Device property data members
public:
// TTTGWDeviceName:
string tTTGWDeviceName;
// NumberOfModules:
......
......@@ -37,7 +37,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="Temperature1" unit="Kelvin" standardUnit="Kelvin" displayUnit="Kelvin" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="" label="Temperature1" unit="Celsius" standardUnit="Celsius" displayUnit="Celsius" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Temperature2" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:StringType"/>
......@@ -45,7 +45,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="Temperature2" unit="Kelvin" standardUnit="Kelvin" displayUnit="Kelvin" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="" label="Temperature2" unit="Celsius" standardUnit="Celsius" displayUnit="Celsius" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Temperature3" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:StringType"/>
......@@ -53,7 +53,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="Temperature3" unit="Kelvin" standardUnit="Kelvin" displayUnit="Kelvin" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="" label="Temperature3" unit="Celsius" standardUnit="Celsius" displayUnit="Celsius" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Temperature4" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:StringType"/>
......@@ -61,7 +61,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="Temperature4" unit="Kelvin" standardUnit="Kelvin" displayUnit="Kelvin" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="" label="Temperature4" unit="Celsius" standardUnit="Celsius" displayUnit="Celsius" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Temperature5" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:StringType"/>
......@@ -69,7 +69,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="Temperature5" unit="Kelvin" standardUnit="Kelvin" displayUnit="Kelvin" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="" label="Temperature5" unit="Celsius" standardUnit="Celsius" displayUnit="Celsius" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Temperature6" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:StringType"/>
......@@ -77,7 +77,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="Temperature6" unit="Kelvin" standardUnit="Kelvin" displayUnit="Kelvin" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="" label="Temperature6" unit="Celsius" standardUnit="Celsius" displayUnit="Celsius" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Temperature7" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:StringType"/>
......@@ -85,7 +85,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="Temperature7" unit="Kelvin" standardUnit="Kelvin" displayUnit="Kelvin" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="" label="Temperature7" unit="Celsius" standardUnit="Celsius" displayUnit="Celsius" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Temperature8" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:StringType"/>
......@@ -93,7 +93,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="Temperature8" unit="Kelvin" standardUnit="Kelvin" displayUnit="Kelvin" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="" label="Temperature8" unit="Celsius" standardUnit="Celsius" displayUnit="Celsius" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Temperature9" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:StringType"/>
......@@ -101,7 +101,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="Temperature9" unit="Kelvin" standardUnit="Kelvin" displayUnit="Kelvin" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="" label="Temperature9" unit="Celsius" standardUnit="Celsius" displayUnit="Celsius" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Temperature10" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:StringType"/>
......@@ -109,7 +109,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="Temperature10" unit="Kelvin" standardUnit="Kelvin" displayUnit="Kelvin" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="" label="Temperature10" unit="Celsius" standardUnit="Celsius" displayUnit="Celsius" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Temperature11" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:StringType"/>
......@@ -117,7 +117,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="Temperature11" unit="Kelvin" standardUnit="Kelvin" displayUnit="Kelvin" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="" label="Temperature11" unit="Celsius" standardUnit="Celsius" displayUnit="Celsius" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Temperature12" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:StringType"/>
......@@ -125,7 +125,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="Temperature12" unit="Kelvin" standardUnit="Kelvin" displayUnit="Kelvin" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="" label="Temperature12" unit="Celsius" standardUnit="Celsius" displayUnit="Celsius" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Temperature13" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:StringType"/>
......@@ -133,7 +133,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="Temperature13" unit="Kelvin" standardUnit="Kelvin" displayUnit="Kelvin" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="" label="Temperature13" unit="Celsius" standardUnit="Celsius" displayUnit="Celsius" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Temperature14" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:StringType"/>
......@@ -141,7 +141,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="Temperature14" unit="Kelvin" standardUnit="Kelvin" displayUnit="Kelvin" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="" label="Temperature14" unit="Celsius" standardUnit="Celsius" displayUnit="Celsius" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Temperature15" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:StringType"/>
......@@ -149,7 +149,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="Temperature15" unit="Kelvin" standardUnit="Kelvin" displayUnit="Kelvin" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="" label="Temperature15" unit="Celsius" standardUnit="Celsius" displayUnit="Celsius" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Temperature16" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:StringType"/>
......@@ -157,7 +157,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="Temperature16" unit="Kelvin" standardUnit="Kelvin" displayUnit="Kelvin" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="" label="Temperature16" unit="Celsius" standardUnit="Celsius" displayUnit="Celsius" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="RawMatrix" attType="Spectrum" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="6000" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:ShortType"/>
......
......@@ -465,9 +465,9 @@ void AGIPDMCClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango::UserDefaultAttrProp temperature1_prop;
// description not set for Temperature1
temperature1_prop.set_label("Temperature1");
temperature1_prop.set_unit("Kelvin");
temperature1_prop.set_standard_unit("Kelvin");
temperature1_prop.set_display_unit("Kelvin");
temperature1_prop.set_unit("Celsius");
temperature1_prop.set_standard_unit("Celsius");
temperature1_prop.set_display_unit("Celsius");
// format not set for Temperature1
// max_value not set for Temperature1
// min_value not set for Temperature1
......@@ -489,9 +489,9 @@ void AGIPDMCClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango::UserDefaultAttrProp temperature2_prop;
// description not set for Temperature2
temperature2_prop.set_label("Temperature2");
temperature2_prop.set_unit("Kelvin");
temperature2_prop.set_standard_unit("Kelvin");
temperature2_prop.set_display_unit("Kelvin");
temperature2_prop.set_unit("Celsius");
temperature2_prop.set_standard_unit("Celsius");
temperature2_prop.set_display_unit("Celsius");
// format not set for Temperature2
// max_value not set for Temperature2
// min_value not set for Temperature2
......@@ -513,9 +513,9 @@ void AGIPDMCClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango::UserDefaultAttrProp temperature3_prop;
// description not set for Temperature3
temperature3_prop.set_label("Temperature3");
temperature3_prop.set_unit("Kelvin");
temperature3_prop.set_standard_unit("Kelvin");
temperature3_prop.set_display_unit("Kelvin");
temperature3_prop.set_unit("Celsius");
temperature3_prop.set_standard_unit("Celsius");
temperature3_prop.set_display_unit("Celsius");
// format not set for Temperature3
// max_value not set for Temperature3
// min_value not set for Temperature3
......@@ -537,9 +537,9 @@ void AGIPDMCClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango::UserDefaultAttrProp temperature4_prop;
// description not set for Temperature4
temperature4_prop.set_label("Temperature4");
temperature4_prop.set_unit("Kelvin");
temperature4_prop.set_standard_unit("Kelvin");
temperature4_prop.set_display_unit("Kelvin");
temperature4_prop.set_unit("Celsius");
temperature4_prop.set_standard_unit("Celsius");
temperature4_prop.set_display_unit("Celsius");
// format not set for Temperature4
// max_value not set for Temperature4
// min_value not set for Temperature4
......@@ -561,9 +561,9 @@ void AGIPDMCClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango::UserDefaultAttrProp temperature5_prop;
// description not set for Temperature5
temperature5_prop.set_label("Temperature5");
temperature5_prop.set_unit("Kelvin");
temperature5_prop.set_standard_unit("Kelvin");
temperature5_prop.set_display_unit("Kelvin");
temperature5_prop.set_unit("Celsius");
temperature5_prop.set_standard_unit("Celsius");
temperature5_prop.set_display_unit("Celsius");
// format not set for Temperature5
// max_value not set for Temperature5
// min_value not set for Temperature5
......@@ -585,9 +585,9 @@ void AGIPDMCClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango::UserDefaultAttrProp temperature6_prop;
// description not set for Temperature6
temperature6_prop.set_label("Temperature6");
temperature6_prop.set_unit("Kelvin");
temperature6_prop.set_standard_unit("Kelvin");
temperature6_prop.set_display_unit("Kelvin");
temperature6_prop.set_unit("Celsius");
temperature6_prop.set_standard_unit("Celsius");
temperature6_prop.set_display_unit("Celsius");
// format not set for Temperature6
// max_value not set for Temperature6
// min_value not set for Temperature6
......@@ -609,9 +609,9 @@ void AGIPDMCClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango::UserDefaultAttrProp temperature7_prop;
// description not set for Temperature7
temperature7_prop.set_label("Temperature7");
temperature7_prop.set_unit("Kelvin");
temperature7_prop.set_standard_unit("Kelvin");
temperature7_prop.set_display_unit("Kelvin");
temperature7_prop.set_unit("Celsius");
temperature7_prop.set_standard_unit("Celsius");
temperature7_prop.set_display_unit("Celsius");
// format not set for Temperature7
// max_value not set for Temperature7
// min_value not set for Temperature7
......@@ -633,9 +633,9 @@ void AGIPDMCClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango::UserDefaultAttrProp temperature8_prop;
// description not set for Temperature8
temperature8_prop.set_label("Temperature8");
temperature8_prop.set_unit("Kelvin");
temperature8_prop.set_standard_unit("Kelvin");
temperature8_prop.set_display_unit("Kelvin");
temperature8_prop.set_unit("Celsius");
temperature8_prop.set_standard_unit("Celsius");
temperature8_prop.set_display_unit("Celsius");
// format not set for Temperature8
// max_value not set for Temperature8
// min_value not set for Temperature8
......@@ -657,9 +657,9 @@ void AGIPDMCClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango::UserDefaultAttrProp temperature9_prop;
// description not set for Temperature9
temperature9_prop.set_label("Temperature9");
temperature9_prop.set_unit("Kelvin");
temperature9_prop.set_standard_unit("Kelvin");
temperature9_prop.set_display_unit("Kelvin");
temperature9_prop.set_unit("Celsius");
temperature9_prop.set_standard_unit("Celsius");
temperature9_prop.set_display_unit("Celsius");
// format not set for Temperature9
// max_value not set for Temperature9
// min_value not set for Temperature9
......@@ -681,9 +681,9 @@ void AGIPDMCClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango::UserDefaultAttrProp temperature10_prop;
// description not set for Temperature10
temperature10_prop.set_label("Temperature10");
temperature10_prop.set_unit("Kelvin");
temperature10_prop.set_standard_unit("Kelvin");
temperature10_prop.set_display_unit("Kelvin");
temperature10_prop.set_unit("Celsius");
temperature10_prop.set_standard_unit("Celsius");
temperature10_prop.set_display_unit("Celsius");
// format not set for Temperature10
// max_value not set for Temperature10
// min_value not set for Temperature10
......@@ -705,9 +705,9 @@ void AGIPDMCClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango::UserDefaultAttrProp temperature11_prop;
// description not set for Temperature11
temperature11_prop.set_label("Temperature11");
temperature11_prop.set_unit("Kelvin");
temperature11_prop.set_standard_unit("Kelvin");
temperature11_prop.set_display_unit("Kelvin");
temperature11_prop.set_unit("Celsius");
temperature11_prop.set_standard_unit("Celsius");
temperature11_prop.set_display_unit("Celsius");
// format not set for Temperature11
// max_value not set for Temperature11
// min_value not set for Temperature11
......@@ -729,9 +729,9 @@ void AGIPDMCClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango::UserDefaultAttrProp temperature12_prop;
// description not set for Temperature12
temperature12_prop.set_label("Temperature12");
temperature12_prop.set_unit("Kelvin");
temperature12_prop.set_standard_unit("Kelvin");
temperature12_prop.set_display_unit("Kelvin");
temperature12_prop.set_unit("Celsius");
temperature12_prop.set_standard_unit("Celsius");
temperature12_prop.set_display_unit("Celsius");
// format not set for Temperature12
// max_value not set for Temperature12
// min_value not set for Temperature12
......@@ -753,9 +753,9 @@ void AGIPDMCClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango::UserDefaultAttrProp temperature13_prop;
// description not set for Temperature13
temperature13_prop.set_label("Temperature13");
temperature13_prop.set_unit("Kelvin");
temperature13_prop.set_standard_unit("Kelvin");
temperature13_prop.set_display_unit("Kelvin");
temperature13_prop.set_unit("Celsius");
temperature13_prop.set_standard_unit("Celsius");
temperature13_prop.set_display_unit("Celsius");
// format not set for Temperature13
// max_value not set for Temperature13
// min_value not set for Temperature13
......@@ -777,9 +777,9 @@ void AGIPDMCClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango::UserDefaultAttrProp temperature14_prop;
// description not set for Temperature14
temperature14_prop.set_label("Temperature14");
temperature14_prop.set_unit("Kelvin");
temperature14_prop.set_standard_unit("Kelvin");
temperature14_prop.set_display_unit("Kelvin");
temperature14_prop.set_unit("Celsius");
temperature14_prop.set_standard_unit("Celsius");
temperature14_prop.set_display_unit("Celsius");
// format not set for Temperature14
// max_value not set for Temperature14
// min_value not set for Temperature14
......@@ -801,9 +801,9 @@ void AGIPDMCClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango::UserDefaultAttrProp temperature15_prop;
// description not set for Temperature15
temperature15_prop.set_label("Temperature15");
temperature15_prop.set_unit("Kelvin");
temperature15_prop.set_standard_unit("Kelvin");
temperature15_prop.set_display_unit("Kelvin");
temperature15_prop.set_unit("Celsius");
temperature15_prop.set_standard_unit("Celsius");
temperature15_prop.set_display_unit("Celsius");
// format not set for Temperature15
// max_value not set for Temperature15
// min_value not set for Temperature15
......@@ -825,9 +825,9 @@ void AGIPDMCClass::attribute_factory(vector<Tango::Attr *> &att_list)
Tango::UserDefaultAttrProp temperature16_prop;
// description not set for Temperature16
temperature16_prop.set_label("Temperature16");
temperature16_prop.set_unit("Kelvin");
temperature16_prop.set_standard_unit("Kelvin");
temperature16_prop.set_display_unit("Kelvin");
temperature16_prop.set_unit("Celsius");
temperature16_prop.set_standard_unit("Celsius");
temperature16_prop.set_display_unit("Celsius");
// format not set for Temperature16
// max_value not set for Temperature16
// min_value not set for Temperature16
......
......@@ -39,7 +39,7 @@ namespace AGIPDMC_ns
for(auto nIdx : LTCC_INDEX_TABLE)
{
short shADCValue = m_vshMatrix[nIdx/2];
shADCValue = (((shADCValue & 0xff00) >> 8)| ((shADCValue & 0xff) << 8)) & 0xfff;
//shADCValue = (((shADCValue & 0xff00) >> 8)| ((shADCValue & 0xff) << 8)) & 0xfff;
double dTemp = CalculateLTCCTemperature(shADCValue);
m_vstTemperatures[i].dLTCCTemperature = dTemp;
i++;
......@@ -81,11 +81,14 @@ namespace AGIPDMC_ns
{
try
{
return GetPt100Temperature(dADU);
if(dADU != 0)
return GetPt100Temperature(dADU);
else
return UNKNOWN_VALUE;
}
catch(exception& e)
{
cout<<"CalculateTemperatures:"<<e.what()<<endl;
cout<<"CalculateLTCCTemperature:"<<e.what()<<endl;
return nan("");
}
}
......@@ -111,15 +114,16 @@ namespace AGIPDMC_ns
//temperature sensor(near voltage regulator ADC "U_plus_I")
short shEntry2 =m_vshMatrix[ nIdxBegin + nOffSet+(i+1) ];
shEntry2 = (((shEntry2 & 0xff00) & 0xf) | ((shEntry2 & 0xff) << 8)) & 0xfff;
dResult = CalculateTemperatures(NormalizeResistor(shEntry1,shEntry2));
if(isnan(dResult))
dResult = UNKNOWN_VALUE;
else
dResult -=273.15; //to celsius
}
else//vector out of range
dResult = UNKNOWN_VALUE;
vdTmp.push_back(dResult);
}
......@@ -133,20 +137,20 @@ namespace AGIPDMC_ns
long ADC_Value = 0;
double const A = 3.9083E-3;
double const B = -5.775E-7;
double const R0 = 1000;
double const R0 = 100;
double const ADC_Res=4096.0;
double const ADC_Ref=1.25;
double const ADC_Const_Current=0.0005185; //0.0005175
double const ADC_Ref=2048;
double const ADC_Const_Current=1.075;
double T = 0; // Temperatur bei 0°C
double voltage;
double r = 100;
double r = 0;
/* Read ADC-Values */
ADC_Value = dADU;
/* Calculate Voltage according to ADC-Value */
voltage = ADC_Ref * ADC_Value/ADC_Res;
voltage = ADC_Ref * ADC_Value/ADC_Res-2;
/* Calculate pt1000 resistance*/
r = voltage/ADC_Const_Current;
......
......@@ -93,7 +93,7 @@ namespace AGIPDMC_ns
/**
* @brief calcuate temperature
* @param normalized resistor value
* @return temperature in Kelvin or nan if exception is caught
* @return temperature in Celsius or nan if exception is caught
*/
double CalculateTemperatures(double dRnorm);
......
......@@ -76,7 +76,7 @@ namespace AGIPDMC_ns
}
char* UpdateDataThread::TemperatureToString(int nIdx)
Tango::DevString UpdateDataThread::TemperatureToString(int nIdx)
{
if(nIdx < m_vstTemperature.size())
......@@ -102,13 +102,12 @@ namespace AGIPDMC_ns
strMsg += "X;";
else
strMsg += to_string(m_vstTemperature[nIdx].dLTCCTemperature) + string(";");
return const_cast<char*>(strMsg.c_str());
return CORBA::string_dup(strMsg.c_str());
}
else
{
return const_cast<char*>(string("X;X;X;X").c_str());
{
return CORBA::string_dup(string("X;X;X;X").c_str());
}
}
void UpdateDataThread::UpdateTemperatures(vector<short>& vshData)
......
......@@ -22,7 +22,7 @@ namespace AGIPDMC_ns
private:
void ReadOutSpectrum(string);
void UpdateTemperatures(vector<short>& vshData);
char* TemperatureToString(int nIdx);
Tango::DevString TemperatureToString(int nIdx);
/// member variables
......
......@@ -66,15 +66,15 @@
</tr>
<tr>
<td> unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>
<td> standard unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>
<td> display unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>
<td> format </td>
......
......@@ -66,15 +66,15 @@
</tr>
<tr>
<td> unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>
<td> standard unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>
<td> display unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>
<td> format </td>
......
......@@ -66,15 +66,15 @@
</tr>
<tr>
<td> unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>
<td> standard unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>
<td> display unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>
<td> format </td>
......
......@@ -66,15 +66,15 @@
</tr>
<tr>
<td> unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>
<td> standard unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>
<td> display unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>
<td> format </td>
......
......@@ -66,15 +66,15 @@
</tr>
<tr>
<td> unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>
<td> standard unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>
<td> display unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>
<td> format </td>
......
......@@ -66,15 +66,15 @@
</tr>
<tr>
<td> unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>
<td> standard unit </td>
<td> Kelvin </td>
<td> Celsius </td>
</tr>
<tr>