From 6183b98d26cf015c0fd4498cb24c4e3437df5f3a Mon Sep 17 00:00:00 2001 From: Giuseppe Carboni <giuseppecarboni89@live.com> Date: Wed, 15 Jan 2025 10:43:24 +0000 Subject: [PATCH] Added LUT filename to SRT AS Boss and GUI --- SRT/CDB/alma/AS/Boss/Boss.xml | 3 +- .../include/SRTActiveSurfaceCore.h | 1 + .../include/SRTActiveSurfaceGUIui.h | 1 + .../src/SRTActiveSurfaceCore.cpp | 17 +- .../src/SRTActiveSurfaceGUI.ui | 177 ++++++++++-------- .../src/SRTActiveSurfaceGUIui.cpp | 9 + SRT/Configuration/CDB/alma/AS/Boss/Boss.xml | 1 + .../CDB/schemas/SRTActiveSurfaceBoss.xsd | 1 + .../idl/SRTActiveSurfaceBoss.midl | 5 + .../SRTActiveSurfaceBoss/include/DevIOLUT.h | 56 ++++++ .../include/SRTActiveSurfaceBossCore.h | 2 + .../include/SRTActiveSurfaceBossImpl.h | 7 + .../src/SRTActiveSurfaceBossCore.cpp | 4 +- .../src/SRTActiveSurfaceBossImpl.cpp | 4 + 14 files changed, 196 insertions(+), 92 deletions(-) create mode 100644 SRT/Servers/SRTActiveSurfaceBoss/include/DevIOLUT.h diff --git a/SRT/CDB/alma/AS/Boss/Boss.xml b/SRT/CDB/alma/AS/Boss/Boss.xml index d2fdada51..0439cefcd 100644 --- a/SRT/CDB/alma/AS/Boss/Boss.xml +++ b/SRT/CDB/alma/AS/Boss/Boss.xml @@ -9,4 +9,5 @@ <enabled /> <pprofile /> <tracking /> -</SRTActiveSurfaceBoss> \ No newline at end of file + <LUT_filename /> +</SRTActiveSurfaceBoss> diff --git a/SRT/Clients/SRTActiveSurfaceGUIClient/include/SRTActiveSurfaceCore.h b/SRT/Clients/SRTActiveSurfaceGUIClient/include/SRTActiveSurfaceCore.h index fb9586a1d..47fd52762 100644 --- a/SRT/Clients/SRTActiveSurfaceGUIClient/include/SRTActiveSurfaceCore.h +++ b/SRT/Clients/SRTActiveSurfaceGUIClient/include/SRTActiveSurfaceCore.h @@ -82,6 +82,7 @@ class SRTActiveSurfaceCore : public QThread int setGUIActuatorStatusLabels(); int setGUIasStatusCode(int); int setGUIasProfileCode(int); + int setGUIasLUTFileName(QString); private: ActiveSurface::SRTActiveSurfaceBoss_var tASBoss; diff --git a/SRT/Clients/SRTActiveSurfaceGUIClient/include/SRTActiveSurfaceGUIui.h b/SRT/Clients/SRTActiveSurfaceGUIClient/include/SRTActiveSurfaceGUIui.h index 1a6f57b2c..66c398444 100644 --- a/SRT/Clients/SRTActiveSurfaceGUIClient/include/SRTActiveSurfaceGUIui.h +++ b/SRT/Clients/SRTActiveSurfaceGUIClient/include/SRTActiveSurfaceGUIui.h @@ -54,6 +54,7 @@ class SRTActiveSurfaceGUI : public QWidget, public Ui_SRTActiveSurfaceGUI void changeGUIActuatorStatusLabels(); void changeGUIasStatusCode(int); void changeGUIasProfileCode(int); + void changeGUIasLUTFileName(QString); private: SRTActiveSurfaceCore mySRTActiveSurfaceCore; diff --git a/SRT/Clients/SRTActiveSurfaceGUIClient/src/SRTActiveSurfaceCore.cpp b/SRT/Clients/SRTActiveSurfaceGUIClient/src/SRTActiveSurfaceCore.cpp index fcc38d7a4..f3a3b578b 100644 --- a/SRT/Clients/SRTActiveSurfaceGUIClient/src/SRTActiveSurfaceCore.cpp +++ b/SRT/Clients/SRTActiveSurfaceGUIClient/src/SRTActiveSurfaceCore.cpp @@ -59,6 +59,7 @@ void SRTActiveSurfaceCore::run(void) Management::ROTSystemStatus_var bossStatus_var; ActiveSurface::ROTASProfile_var asProfile_var; + ACS::ROstring_var asLUTFileName_var; while (monitor == true) { @@ -72,6 +73,9 @@ void SRTActiveSurfaceCore::run(void) asProfile_var = tASBoss->pprofile(); emit setGUIasProfileCode((int)asProfile_var->get_sync(completion.out())); + asLUTFileName_var = tASBoss->LUT_filename(); + emit setGUIasLUTFileName(QString(asLUTFileName_var->get_sync(completion.out()))); + ACS::longSeq_var asStatus; tASBoss->asStatus4GUIClient(asStatus); @@ -218,7 +222,8 @@ void SRTActiveSurfaceCore::setactuator(int circle, int actuator) impl.log(); } - if (active == true) { + if (active == true) + { //if ((status & ENBL) == 0) { /*qApp->lock(); tGUI->ActuatorStatusEnblLabel->clear(); @@ -293,7 +298,8 @@ void SRTActiveSurfaceCore::setactuator(int circle, int actuator) //tGUI->ActuatorStatusRunLabel->clear(); //tGUI->ActuatorStatusRunLabel->setText("RUNNING"); } - if ((status & ENBL) == 0) { + ActuatorStatusEnblLabelCode = 1; + /*if ((status & ENBL) == 0) { ActuatorStatusEnblLabelCode = -1; //tGUI->ActuatorStatusEnblLabel->clear(); //tGUI->ActuatorStatusEnblLabel->setText("UNABLED"); @@ -302,7 +308,7 @@ void SRTActiveSurfaceCore::setactuator(int circle, int actuator) ActuatorStatusEnblLabelCode = 1; //tGUI->ActuatorStatusEnblLabel->clear(); //tGUI->ActuatorStatusEnblLabel->setText("ENABLED"); - } + }*/ if ((status & CAMM) == 0) { ActuatorStatusCammLabelCode = -1; //tGUI->ActuatorStatusCammLabel->clear(); @@ -323,7 +329,8 @@ void SRTActiveSurfaceCore::setactuator(int circle, int actuator) //tGUI->ActuatorStatusLoopLabel->clear(); //tGUI->ActuatorStatusLoopLabel->setText("LOOP"); } - if ((status & CAL) == 0) { + if ((status & CAL) == 0) + { ActuatorStatusCalLabelCode = -1; statusColor = true; //tGUI->ActuatorStatusCalLabel->clear(); @@ -361,7 +368,7 @@ void SRTActiveSurfaceCore::setactuator(int circle, int actuator) else { active = false; statusColor = true; - ActuatorStatusRunLabelCode = -1; + ActuatorStatusRunLabelCode = 0; ActuatorStatusEnblLabelCode = -1; ActuatorStatusCammLabelCode = 0; ActuatorStatusLoopLabelCode = 0; diff --git a/SRT/Clients/SRTActiveSurfaceGUIClient/src/SRTActiveSurfaceGUI.ui b/SRT/Clients/SRTActiveSurfaceGUIClient/src/SRTActiveSurfaceGUI.ui index 561b9138c..6e7eb895f 100644 --- a/SRT/Clients/SRTActiveSurfaceGUIClient/src/SRTActiveSurfaceGUI.ui +++ b/SRT/Clients/SRTActiveSurfaceGUIClient/src/SRTActiveSurfaceGUI.ui @@ -29,7 +29,7 @@ <property name="geometry"> <rect> <x>970</x> - <y>15</y> + <y>50</y> <width>130</width> <height>30</height> </rect> @@ -48,7 +48,7 @@ <property name="geometry"> <rect> <x>970</x> - <y>152</y> + <y>187</y> <width>130</width> <height>20</height> </rect> @@ -67,7 +67,7 @@ <property name="geometry"> <rect> <x>970</x> - <y>225</y> + <y>260</y> <width>130</width> <height>20</height> </rect> @@ -89,7 +89,7 @@ <property name="geometry"> <rect> <x>970</x> - <y>305</y> + <y>340</y> <width>90</width> <height>35</height> </rect> @@ -114,7 +114,7 @@ <property name="geometry"> <rect> <x>1065</x> - <y>305</y> + <y>340</y> <width>95</width> <height>35</height> </rect> @@ -139,7 +139,7 @@ <property name="geometry"> <rect> <x>1115</x> - <y>265</y> + <y>300</y> <width>140</width> <height>35</height> </rect> @@ -164,7 +164,7 @@ <property name="geometry"> <rect> <x>970</x> - <y>265</y> + <y>300</y> <width>140</width> <height>35</height> </rect> @@ -189,7 +189,7 @@ <property name="geometry"> <rect> <x>1165</x> - <y>305</y> + <y>340</y> <width>90</width> <height>35</height> </rect> @@ -211,7 +211,7 @@ <property name="geometry"> <rect> <x>970</x> - <y>105</y> + <y>140</y> <width>130</width> <height>42</height> </rect> @@ -230,7 +230,7 @@ <property name="geometry"> <rect> <x>970</x> - <y>60</y> + <y>95</y> <width>130</width> <height>42</height> </rect> @@ -249,7 +249,7 @@ <property name="geometry"> <rect> <x>970</x> - <y>176</y> + <y>211</y> <width>130</width> <height>20</height> </rect> @@ -268,7 +268,7 @@ <property name="geometry"> <rect> <x>970</x> - <y>200</y> + <y>235</y> <width>130</width> <height>20</height> </rect> @@ -287,7 +287,7 @@ <property name="geometry"> <rect> <x>1120</x> - <y>15</y> + <y>50</y> <width>135</width> <height>30</height> </rect> @@ -312,7 +312,7 @@ <property name="geometry"> <rect> <x>1120</x> - <y>60</y> + <y>95</y> <width>30</width> <height>20</height> </rect> @@ -331,7 +331,7 @@ <property name="geometry"> <rect> <x>1120</x> - <y>82</y> + <y>117</y> <width>30</width> <height>20</height> </rect> @@ -350,7 +350,7 @@ <property name="geometry"> <rect> <x>1120</x> - <y>106</y> + <y>141</y> <width>30</width> <height>20</height> </rect> @@ -369,7 +369,7 @@ <property name="geometry"> <rect> <x>1120</x> - <y>127</y> + <y>162</y> <width>30</width> <height>20</height> </rect> @@ -388,7 +388,7 @@ <property name="geometry"> <rect> <x>1153</x> - <y>60</y> + <y>95</y> <width>100</width> <height>20</height> </rect> @@ -407,7 +407,7 @@ <property name="geometry"> <rect> <x>1153</x> - <y>82</y> + <y>117</y> <width>100</width> <height>20</height> </rect> @@ -426,7 +426,7 @@ <property name="geometry"> <rect> <x>1154</x> - <y>106</y> + <y>141</y> <width>100</width> <height>20</height> </rect> @@ -445,7 +445,7 @@ <property name="geometry"> <rect> <x>1154</x> - <y>127</y> + <y>162</y> <width>100</width> <height>20</height> </rect> @@ -464,7 +464,7 @@ <property name="geometry"> <rect> <x>1120</x> - <y>152</y> + <y>187</y> <width>135</width> <height>20</height> </rect> @@ -483,7 +483,7 @@ <property name="geometry"> <rect> <x>1120</x> - <y>176</y> + <y>211</y> <width>135</width> <height>20</height> </rect> @@ -502,7 +502,7 @@ <property name="geometry"> <rect> <x>1120</x> - <y>200</y> + <y>235</y> <width>135</width> <height>20</height> </rect> @@ -521,7 +521,7 @@ <property name="geometry"> <rect> <x>1120</x> - <y>225</y> + <y>260</y> <width>135</width> <height>20</height> </rect> @@ -543,7 +543,7 @@ <property name="geometry"> <rect> <x>970</x> - <y>760</y> + <y>755</y> <width>287</width> <height>32</height> </rect> @@ -568883,9 +568883,6 @@ <property name="text"> <string>Calibration</string> </property> - <attribute name="buttonGroup"> - <string/> - </attribute> </widget> <widget class="QPushButton" name="StopButton"> <property name="geometry"> @@ -569347,9 +569344,6 @@ <property name="text"> <string>Stop</string> </property> - <attribute name="buttonGroup"> - <string/> - </attribute> </widget> <widget class="QPushButton" name="ResetButton"> <property name="geometry"> @@ -569811,9 +569805,6 @@ <property name="text"> <string>Reset</string> </property> - <attribute name="buttonGroup"> - <string/> - </attribute> </widget> <widget class="QPushButton" name="RefPosButton"> <property name="geometry"> @@ -570275,9 +570266,6 @@ <property name="text"> <string>RefPos</string> </property> - <attribute name="buttonGroup"> - <string/> - </attribute> </widget> <widget class="QPushButton" name="TopButton"> <property name="geometry"> @@ -570739,9 +570727,6 @@ <property name="text"> <string>Top</string> </property> - <attribute name="buttonGroup"> - <string/> - </attribute> </widget> <widget class="QPushButton" name="StowButton"> <property name="geometry"> @@ -571203,9 +571188,6 @@ <property name="text"> <string>Stow</string> </property> - <attribute name="buttonGroup"> - <string/> - </attribute> </widget> <widget class="QPushButton" name="BottomButton"> <property name="geometry"> @@ -571667,9 +571649,6 @@ <property name="text"> <string>Bottom</string> </property> - <attribute name="buttonGroup"> - <string/> - </attribute> </widget> <widget class="QPushButton" name="SetupButton"> <property name="geometry"> @@ -572131,9 +572110,6 @@ <property name="text"> <string>Setup</string> </property> - <attribute name="buttonGroup"> - <string/> - </attribute> </widget> <widget class="QPushButton" name="DownButton"> <property name="geometry"> @@ -572595,9 +572571,6 @@ <property name="text"> <string>Down</string> </property> - <attribute name="buttonGroup"> - <string/> - </attribute> </widget> <widget class="QPushButton" name="UpButton"> <property name="geometry"> @@ -573059,9 +573032,6 @@ <property name="text"> <string>Up</string> </property> - <attribute name="buttonGroup"> - <string/> - </attribute> </widget> <widget class="QPushButton" name="MoveButton"> <property name="geometry"> @@ -573523,9 +573493,6 @@ <property name="text"> <string>Move</string> </property> - <attribute name="buttonGroup"> - <string/> - </attribute> </widget> <widget class="QLineEdit" name="ActuatorMovelineEdit"> <property name="geometry"> @@ -574008,9 +573975,6 @@ <property name="text"> <string>Correction</string> </property> - <attribute name="buttonGroup"> - <string/> - </attribute> </widget> <widget class="QLineEdit" name="ActuatorCorrectionlineEdit"> <property name="geometry"> @@ -574493,9 +574457,6 @@ <property name="text"> <string>Update</string> </property> - <attribute name="buttonGroup"> - <string/> - </attribute> </widget> <widget class="QLineEdit" name="ActuatorUpdatelineEdit"> <property name="geometry"> @@ -574523,7 +574484,7 @@ <property name="geometry"> <rect> <x>970</x> - <y>830</y> + <y>825</y> <width>90</width> <height>30</height> </rect> @@ -574983,8 +574944,8 @@ <widget class="QPushButton" name="stowASbutton"> <property name="geometry"> <rect> - <x>1164</x> - <y>830</y> + <x>1170</x> + <y>825</y> <width>90</width> <height>30</height> </rect> @@ -575444,8 +575405,8 @@ <widget class="QPushButton" name="stopASbutton"> <property name="geometry"> <rect> - <x>1067</x> - <y>830</y> + <x>1070</x> + <y>825</y> <width>90</width> <height>30</height> </rect> @@ -575905,9 +575866,9 @@ <widget class="QLineEdit" name="StatuslineEdit_2"> <property name="geometry"> <rect> - <x>990</x> + <x>970</x> <y>890</y> - <width>120</width> + <width>140</width> <height>30</height> </rect> </property> @@ -575930,10 +575891,10 @@ <widget class="QLineEdit" name="StatuslineEdit"> <property name="geometry"> <rect> - <x>990</x> - <y>870</y> - <width>120</width> - <height>20</height> + <x>970</x> + <y>860</y> + <width>140</width> + <height>30</height> </rect> </property> <property name="autoFillBackground"> @@ -575955,8 +575916,8 @@ <widget class="QComboBox" name="SetProfilecomboBox"> <property name="geometry"> <rect> - <x>1104</x> - <y>792</y> + <x>1110</x> + <y>790</y> <width>151</width> <height>30</height> </rect> @@ -575992,7 +575953,7 @@ <property name="geometry"> <rect> <x>970</x> - <y>792</y> + <y>790</y> <width>131</width> <height>30</height> </rect> @@ -576453,9 +576414,9 @@ <property name="geometry"> <rect> <x>1120</x> - <y>870</y> - <width>120</width> - <height>20</height> + <y>860</y> + <width>140</width> + <height>30</height> </rect> </property> <property name="autoFillBackground"> @@ -576479,7 +576440,7 @@ <rect> <x>1120</x> <y>890</y> - <width>120</width> + <width>140</width> <height>30</height> </rect> </property> @@ -576499,6 +576460,56 @@ <bool>true</bool> </property> </widget> + <widget class="QLabel" name="LUTLabel"> + <property name="geometry"> + <rect> + <x>970</x> + <y>10</y> + <width>131</width> + <height>30</height> + </rect> + </property> + <property name="text"> + <string>LUT File</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + <widget class="QLineEdit" name="LUTLabelFileName"> + <property name="geometry"> + <rect> + <x>1074</x> + <y>10</y> + <width>181</width> + <height>30</height> + </rect> + </property> + <property name="font"> + <font> + <family>Cantarell</family> + <pointsize>12</pointsize> + </font> + </property> + <property name="text"> + <string/> + </property> + <property name="maxLength"> + <number>32767</number> + </property> + <property name="frame"> + <bool>true</bool> + </property> + <property name="alignment"> + <set>Qt::AlignHCenter</set> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> </widget> <layoutdefault spacing="0" margin="1"/> <customwidgets> diff --git a/SRT/Clients/SRTActiveSurfaceGUIClient/src/SRTActiveSurfaceGUIui.cpp b/SRT/Clients/SRTActiveSurfaceGUIClient/src/SRTActiveSurfaceGUIui.cpp index 42e1e878f..2f3b92a9b 100644 --- a/SRT/Clients/SRTActiveSurfaceGUIClient/src/SRTActiveSurfaceGUIui.cpp +++ b/SRT/Clients/SRTActiveSurfaceGUIClient/src/SRTActiveSurfaceGUIui.cpp @@ -21,6 +21,7 @@ SRTActiveSurfaceGUI::SRTActiveSurfaceGUI(QWidget *parent) : QWidget(parent) QObject::connect(&mySRTActiveSurfaceCore, SIGNAL(setGUIActuatorStatusLabels()), this, SLOT(changeGUIActuatorStatusLabels())); QObject::connect(&mySRTActiveSurfaceCore, SIGNAL(setGUIasStatusCode(int)), this, SLOT(changeGUIasStatusCode(int))); QObject::connect(&mySRTActiveSurfaceCore, SIGNAL(setGUIasProfileCode(int)), this, SLOT(changeGUIasProfileCode(int))); + QObject::connect(&mySRTActiveSurfaceCore, SIGNAL(setGUIasLUTFileName(QString)), this, SLOT(changeGUIasLUTFileName(QString))); #ifdef MANAGEMENT buttonGroup1->setEnabled(true); @@ -716,10 +717,18 @@ void SRTActiveSurfaceGUI::changeGUIasProfileCode(int asProfileCode) ProfilelineEdit_2->setText(QApplication::translate("SRTActiveSurfaceGUI", asProfileString.c_str(), 0, QApplication::UnicodeUTF8)); } +void SRTActiveSurfaceGUI::changeGUIasLUTFileName(QString filename) +{ + LUTLabelFileName->setText(filename); +} + void SRTActiveSurfaceGUI::changeGUIActuatorStatusLabels() { ActuatorStatusRunLabel->clear(); switch (mySRTActiveSurfaceCore.ActuatorStatusRunLabelCode) { + case (0): + ActuatorStatusRunLabel->setText(""); + break; case (-1): ActuatorStatusRunLabel->setText("STOPPED"); break; diff --git a/SRT/Configuration/CDB/alma/AS/Boss/Boss.xml b/SRT/Configuration/CDB/alma/AS/Boss/Boss.xml index 3482c5193..770a0535e 100644 --- a/SRT/Configuration/CDB/alma/AS/Boss/Boss.xml +++ b/SRT/Configuration/CDB/alma/AS/Boss/Boss.xml @@ -4,4 +4,5 @@ <enabled /> <pprofile /> <tracking /> + <LUT_filename /> </SRTActiveSurfaceBoss> diff --git a/SRT/Interfaces/SRTActiveSurfaceInterface/config/CDB/schemas/SRTActiveSurfaceBoss.xsd b/SRT/Interfaces/SRTActiveSurfaceInterface/config/CDB/schemas/SRTActiveSurfaceBoss.xsd index 3907fddd4..ee4bb987e 100644 --- a/SRT/Interfaces/SRTActiveSurfaceInterface/config/CDB/schemas/SRTActiveSurfaceBoss.xsd +++ b/SRT/Interfaces/SRTActiveSurfaceInterface/config/CDB/schemas/SRTActiveSurfaceBoss.xsd @@ -30,6 +30,7 @@ <xs:element name="enabled" type="mng:BooleanType" /> <xs:element name="pprofile" type="as:ActiveSurfaceProfileType" /> <xs:element name="tracking" type="mng:BooleanType" /> + <xs:element name="LUT_filename" type="baci:ROstring" /> </xs:sequence> <!-- sleep time of the watching thread (microseconds), this is the thread that keeps data up to date --> <xs:attribute name="WatchingThreadTime" type="xs:unsignedLong" use="required" /> diff --git a/SRT/Interfaces/SRTActiveSurfaceInterface/idl/SRTActiveSurfaceBoss.midl b/SRT/Interfaces/SRTActiveSurfaceInterface/idl/SRTActiveSurfaceBoss.midl index 634d21e76..fd92b43e9 100644 --- a/SRT/Interfaces/SRTActiveSurfaceInterface/idl/SRTActiveSurfaceBoss.midl +++ b/SRT/Interfaces/SRTActiveSurfaceInterface/idl/SRTActiveSurfaceBoss.midl @@ -66,6 +66,11 @@ module ActiveSurface { */ readonly attribute Management::ROTBoolean tracking; + /* + * This attribute shows the filename of the currently loaded lookup table + */ + readonly attribute ACS::ROstring LUT_filename; + /** * This method can be called in order to disable the component. That * means that the activesurface subsystem cannot be commanded any more via the diff --git a/SRT/Servers/SRTActiveSurfaceBoss/include/DevIOLUT.h b/SRT/Servers/SRTActiveSurfaceBoss/include/DevIOLUT.h new file mode 100644 index 000000000..8c83a47e8 --- /dev/null +++ b/SRT/Servers/SRTActiveSurfaceBoss/include/DevIOLUT.h @@ -0,0 +1,56 @@ +#ifndef _SRTACTIVESURFACEBOSSIMPLDEVIOLUT_H_ +#define _SRTACTIVESURFACEBOSSIMPLDEVIOLUT_H_ + +/****************************************************************************************/ +/* OAC Osservatorio Astronomico di Cagliari */ +/* $Id: DevIOLUT.h,v 1.0 2025-01-13 15:42:32 G. Carboni Exp $ */ +/* */ +/* This code is under GNU General Public Licence (GPL). */ +/* */ +/* Who when What */ +/* Giuseppe Carboni (giuseppe.carboni@inaf.it) 13/01/2025 Creation */ + +#include <baciDevIO.h> +#include <IRA> + +using namespace baci; + +/** + * This class is derived from the template DevIO. + * @author <a href=mailto:giuseppe.carboni@inaf.it>Giuseppe Carboni</a>, + * Osservatorio Astronomico di Cagliari, Italia<br> + */ +class SRTActiveSurfaceBossImplDevIOLUT: public virtual DevIO<ACE_CString> +{ +public: + + SRTActiveSurfaceBossImplDevIOLUT(IRA::CSecureArea<CSRTActiveSurfaceBossCore>* core): m_core(core) { + AUTO_TRACE("SRTActiveSurfaceBossImplDevIOLUT::SRTActiveSurfaceBossImplDevIOLUT()"); + } + + ~SRTActiveSurfaceBossImplDevIOLUT() { + AUTO_TRACE("SRTActiveSurfaceBossImplDevIOLUT::~SRTActiveSurfaceBossImplDevIOLUT()"); + } + + bool initializeValue() + { + return false; + } + + ACE_CString read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) + { + CSecAreaResourceWrapper<CSRTActiveSurfaceBossCore> resource=m_core->Get(); + AUTO_TRACE("SRTActiveSurfaceBossImplDevIOLUT::read()"); + timestamp=getTimeStamp(); + return resource->getLUTfilename().c_str(); + } + + void write(const CORBA::Long& value, ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { + AUTO_TRACE("SRTActiveSurfaceBossImplDevIOLUT::write()"); + } + +private: + IRA::CSecureArea<CSRTActiveSurfaceBossCore> *m_core; +}; + +#endif /*DEVIOLUT_H_*/ diff --git a/SRT/Servers/SRTActiveSurfaceBoss/include/SRTActiveSurfaceBossCore.h b/SRT/Servers/SRTActiveSurfaceBoss/include/SRTActiveSurfaceBossCore.h index 1531f90bb..1b3ceb2b9 100644 --- a/SRT/Servers/SRTActiveSurfaceBoss/include/SRTActiveSurfaceBossCore.h +++ b/SRT/Servers/SRTActiveSurfaceBoss/include/SRTActiveSurfaceBossCore.h @@ -147,6 +147,8 @@ public: inline bool getTracking() const { return m_tracking; } + inline std::string getLUTfilename() const { return m_lut.substr(m_lut.find_last_of('/') + 1); } + /** * Sets the <i>AutoUpdate</i> flag to false, i.e. the component will not update automatically the surface. */ diff --git a/SRT/Servers/SRTActiveSurfaceBoss/include/SRTActiveSurfaceBossImpl.h b/SRT/Servers/SRTActiveSurfaceBoss/include/SRTActiveSurfaceBossImpl.h index b57b172ea..a7832376d 100644 --- a/SRT/Servers/SRTActiveSurfaceBoss/include/SRTActiveSurfaceBossImpl.h +++ b/SRT/Servers/SRTActiveSurfaceBoss/include/SRTActiveSurfaceBossImpl.h @@ -128,6 +128,12 @@ class SRTActiveSurfaceBossImpl: public virtual CharacteristicComponentImpl, publ */ virtual Management::ROTBoolean_ptr tracking() throw (CORBA::SystemException); + /** + * Returns a reference to the tracking property implementation of IDL interface. + * @return pointer to read-only ACS::ROString property enabled + */ + virtual ACS::ROstring_ptr LUT_filename() throw (CORBA::SystemException); + /** * This method can be called in order to disable the automatic update of the surface. * @throw CORBA::SystemException @@ -221,6 +227,7 @@ class SRTActiveSurfaceBossImpl: public virtual CharacteristicComponentImpl, publ SmartPropertyPointer< ROEnumImpl<ACS_ENUM_T(Management::TBoolean), POA_Management::ROTBoolean> > m_penabled; SmartPropertyPointer< ROEnumImpl<ACS_ENUM_T(ActiveSurface::TASProfile), POA_ActiveSurface::ROTASProfile> > m_pprofile; SmartPropertyPointer< ROEnumImpl<ACS_ENUM_T(Management::TBoolean), POA_Management::ROTBoolean> > m_ptracking; + SmartPropertyPointer<ROstring> m_pLUT_filename; IRA::CSecureArea<CSRTActiveSurfaceBossCore> *m_core; /* * diff --git a/SRT/Servers/SRTActiveSurfaceBoss/src/SRTActiveSurfaceBossCore.cpp b/SRT/Servers/SRTActiveSurfaceBoss/src/SRTActiveSurfaceBossCore.cpp index 78db1dae9..a958afa13 100644 --- a/SRT/Servers/SRTActiveSurfaceBoss/src/SRTActiveSurfaceBossCore.cpp +++ b/SRT/Servers/SRTActiveSurfaceBoss/src/SRTActiveSurfaceBossCore.cpp @@ -45,6 +45,7 @@ void CSRTActiveSurfaceBossCore::initialize() m_enable = false; m_tracking = false; m_status = Management::MNG_WARNING; + m_lut = USDTABLECORRECTIONS; AutoUpdate = false; actuatorcounter = circlecounter = totacts = 1; for(int i = 0; i < SECTORS; i++) @@ -1364,9 +1365,6 @@ void CSRTActiveSurfaceBossCore::asSetLUT(const char *newlut) void CSRTActiveSurfaceBossCore::setProfile(const ActiveSurface::TASProfile& newProfile) throw (ComponentErrors::ComponentErrorsExImpl) { - if (m_newlut == false) - m_lut = USDTABLECORRECTIONS; - if(m_initialized) // USD tables has not been loaded yet { ifstream usdCorrections(m_lut); diff --git a/SRT/Servers/SRTActiveSurfaceBoss/src/SRTActiveSurfaceBossImpl.cpp b/SRT/Servers/SRTActiveSurfaceBoss/src/SRTActiveSurfaceBossImpl.cpp index 117fec854..0be0e130b 100644 --- a/SRT/Servers/SRTActiveSurfaceBoss/src/SRTActiveSurfaceBossImpl.cpp +++ b/SRT/Servers/SRTActiveSurfaceBoss/src/SRTActiveSurfaceBossImpl.cpp @@ -6,6 +6,7 @@ #include "DevIOEnable.h" #include "DevIOProfile.h" #include "DevIOTracking.h" +#include "DevIOLUT.h" static char const *rcsId="@(#) $Id: SRTActiveSurfaceBossImpl.cpp,v 1.2 2010-07-26 12:37:07 c.migoni Exp $"; static void *use_rcsId = ((void)&use_rcsId,(void *) &rcsId); @@ -58,6 +59,7 @@ SRTActiveSurfaceBossImpl::SRTActiveSurfaceBossImpl(const ACE_CString &CompName, m_penabled(this), m_pprofile(this), m_ptracking(this), + m_pLUT_filename(this), m_core(NULL) { AUTO_TRACE("SRTActiveSurfaceBossImpl::SRTActiveSurfaceBossImpl()"); @@ -86,6 +88,7 @@ void SRTActiveSurfaceBossImpl::initialize() throw (ACSErr::ACSbaseExImpl) (getContainerServices()->getName()+":pprofile",getComponent(),new SRTActiveSurfaceBossImplDevIOProfile(m_core),true); m_ptracking=new ROEnumImpl<ACS_ENUM_T(Management::TBoolean),POA_Management::ROTBoolean> (getContainerServices()->getName()+":tracking",getComponent(),new SRTActiveSurfaceBossImplDevIOTracking(m_core),true); + m_pLUT_filename=new ROstring(getContainerServices()->getName()+":LUT_filename",getComponent(),new SRTActiveSurfaceBossImplDevIOLUT(m_core),true); // create the parser for command line execution m_parser = new SimpleParser::CParser<CSRTActiveSurfaceBossCore>(boss,10); @@ -604,6 +607,7 @@ _PROPERTY_REFERENCE_CPP(SRTActiveSurfaceBossImpl,Management::ROTSystemStatus,m_p _PROPERTY_REFERENCE_CPP(SRTActiveSurfaceBossImpl,Management::ROTBoolean,m_penabled,enabled); _PROPERTY_REFERENCE_CPP(SRTActiveSurfaceBossImpl,ActiveSurface::ROTASProfile,m_pprofile,pprofile); _PROPERTY_REFERENCE_CPP(SRTActiveSurfaceBossImpl,Management::ROTBoolean,m_ptracking,tracking); +_PROPERTY_REFERENCE_CPP(SRTActiveSurfaceBossImpl,ACS::ROstring,m_pLUT_filename,LUT_filename); /* --------------- [ MACI DLL support functions ] -----------------*/ #include <maciACSComponentDefines.h> MACI_DLL_SUPPORT_FUNCTIONS(SRTActiveSurfaceBossImpl) -- GitLab