diff --git a/CHANGELOG.md b/CHANGELOG.md index 0edd33ba8ed9dd1ef34fef2cce9d80279800d562..605a0e3633967e07c3a9246f1b157b603ee9d95d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,32 @@ and this project adheres to [Semantic Versioning](http://semver.org/ issue #452 - The Total Power component erroneously assigned a timestamp to the samples in case more samples were needed to reach total integration time issue #473 - The SRT AS USDs now retry 5 times to communicate with the hardware before setting their state to unavailable +## [discos1.0.4] 03-02-2020 +### Added + issue #505 - CALMUX integrated and tested into the SRT production line (it has been successfully tested with DBBC and DFB backends) +### Changed + issue #477 - removed the SecureArea from some AntennaBoss methods + issue #476 - replaced all occurrencies of DPI/2 with the defined variable DPIBY2, this should improve precision + issue #489 - new focus curve for SRT X band receiver + issue #506 - each SRT local oscillator now has its dedicated container + issue #510 - fixed SRT TotalPower CDB configuration in order to use the correct IP address +### Fixed + issue #433 - limited refraction correction values to a meaningful range in order to avoid flooding the jlog with warning messages whenever the elevation is close to 90 degrees + issue #502 - removed last service daemon reference from Manager.xml io SRT production line + +## [discos1.0.5] - +## Added + issue #504 - added credits clause (regarding INAF data ownership) to fits files headers + issue #518 - KBand receivers cryo temperature read wrongly with connection problems. More information: + https://github.com/discos/discos/issues/518#issuecomment-590838480 + issue #530 - New Fitszilla versione 1.21 online. The subscan offsets related keywords added to the primary header. + +## Fixed + issue #518 - In case of communication error we set a dummy value (100000) for the temperature properties, and the related timestamp keeps the value of the last communication timestamp. + issue #525 - When in LOCAL mode the receivers can turn on/off the noise mark and LNAs. There is no more MNG_FAILURE logging in case of LOCAL mode: only the LOCAL/REMOTE status (during component activation) and the change of status (LOCAL to REMOTE and viceversa) are written to the logfile. +## Changed + issue #545 - Oscillation checks enabled for Mc and Nt telescopes, this setting is now under control of a CDB argument + ## [Next Major] - ### Added ### Changed @@ -79,4 +105,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/ and sources is one to one. Reviewed the scan handshake mechanism by subsystems and performed by the scheduler. ### Fixed - issue #328 - Fixed the handling of sign of the paralactic angle that led to misbeaviours in dewar positioning \ No newline at end of file + issue #328 - Fixed the handling of sign of the paralactic angle that led to misbeaviours in dewar positioning diff --git a/Common/Clients/CaltoolClient/src/Makefile b/Common/Clients/CaltoolClient/src/Makefile index a5b7b72093576b0b7778f2e6645d41aa7004bff0..8ee218bceb87e64d876f8e4bbad53aa366870487 100644 --- a/Common/Clients/CaltoolClient/src/Makefile +++ b/Common/Clients/CaltoolClient/src/Makefile @@ -66,7 +66,7 @@ lllll_OBJECTS = # # Scripts (public and local) # ---------------------------- -SCRIPTS = +SCRIPTS = calibrationtoolclient SCRIPTS_L = # @@ -78,7 +78,7 @@ TCL_SCRIPTS_L = # # Python stuff (public and local) # ---------------------------- -PY_SCRIPTS = calibrationtoolclient +PY_SCRIPTS = _ctc PY_SCRIPTS_L = PY_MODULES = customwidgets calibrationtool_ui diff --git a/Common/Clients/CaltoolClient/src/calibrationtoolclient.py b/Common/Clients/CaltoolClient/src/_ctc.py similarity index 52% rename from Common/Clients/CaltoolClient/src/calibrationtoolclient.py rename to Common/Clients/CaltoolClient/src/_ctc.py index 8633038ff95501d3b35387e231f55b089607f537..667bfdb4a0d0f4a9fca3c4158be271f60431bd79 100644 --- a/Common/Clients/CaltoolClient/src/calibrationtoolclient.py +++ b/Common/Clients/CaltoolClient/src/_ctc.py @@ -10,11 +10,12 @@ import ACSLog import ACS, ACS__POA # Import the Python CORBA stubs for BACI from PyQt4 import Qt -from PyQt4.QtCore import pyqtSlot,QThread,QMutex,QTimer +from PyQt4.QtCore import pyqtSlot,QThread,QMutex,QTimer import PyQt4.Qwt5 as Qwt -import sys,getopt +import sys,getopt,os from time import sleep import math +from IRAPy import logger,userLogger @@ -28,6 +29,7 @@ __version__ = '$Id' @version $Id$ ''' +DEFAULT_COMPONENT="MANAGEMENT/CalibrationTool" class MyWorker(QThread): def __init__(self,component,parent=None): @@ -165,172 +167,199 @@ class MyWorker(QThread): QThread.msleep(200) pass - - - class Application(Qt.QDialog,calibrationtool_ui.Ui_CalibrationToolDialog): def __init__(self,compname,parent=None): - Qt.QDialog.__init__(self) - - self.simpleClient = PySimpleClient() + + self.scheduler=None + self.antennaBoss=None + self.component=None + self.componentName=DEFAULT_COMPONENT + self.managerConnected=False + self.thread=None + try: - scheduler= self.simpleClient.getDefaultComponent("IDL:alma/Management/Scheduler:1.0") - antennaBoss =self.simpleClient.getDefaultComponent("IDL:alma/Antenna/AntennaBoss:1.0") - - #choose default recorder - if compname=='default': - - recorder=scheduler._get_currentRecorder() - (recordername,compl)=recorder.get_sync() - self.componentname=recordername - print recordername - else: - self.componentname=compname - print self.componentname - component= self.simpleClient.getComponent(self.componentname) - self.thread=MyWorker([component,scheduler,antennaBoss,self.simpleClient]) - self.setupUi(self) -# self.qwtPlot_datax.setAxisScale(Qwt.QwtPlot.xBottom, 0,1000) - self.qwtPlot_datax.setAxisAutoScale(Qwt.QwtPlot. yLeft) - self.setWindowTitle(self.componentname) - self.qwtPlot_datax.setAxisTitle(Qwt.QwtPlot.yLeft, "Ta(K)") - self.qwtPlot_datay.setAxisTitle(Qwt.QwtPlot.yLeft, "Ta(K)") - - - - + self.simpleClient = PySimpleClient() + self.managerConnected=True + except Exception,ex: + newEx = ClientErrorsImpl.CouldntLogManagerExImpl(exception=ex, create=1) + logger.logException(newEx) + print "Please check the system is up and running......" + sys.exit(-1) + + try: + self.scheduler= self.simpleClient.getDefaultComponent("IDL:alma/Management/Scheduler:1.0") + except Exception,ex: + newEx = ClientErrorsImpl.CouldntAccessComponentExImpl(exception=ex, create=1) + newEx.setComponentName("IDL:alma/Management/Scheduler:1.0") + logger.logException(newEx) + print "Please check the system is up and running and scheduler component is alive!" + sys.exit(-1) - self.connect(self.thread,Qt.SIGNAL("arrayDataX"),self.qwtPlot_datay.setX) - self.connect(self.thread,Qt.SIGNAL("arrayDataY"),self.qwtPlot_datay.setVal) + try: + self.antennaBoss =self.simpleClient.getDefaultComponent("IDL:alma/Antenna/AntennaBoss:1.0") + except Exception,ex: + newEx = ClientErrorsImpl.CouldntAccessComponentExImpl(exception=ex, create=1) + newEx.setComponentName("IDL:alma/Antenna/AntennaBoss:1.0") + logger.logException(newEx) + print "Please check the system is up and running and antenna boss is alive!" + sys.exit(-1) + + #choose default recorder + if compname=='default': + try: + recorder=self.scheduler._get_currentRecorder() + (recordername,compl)=recorder.get_sync() + except Exception,ex: + newEx = ClientErrorsImpl.CouldntAccessPropertyExImpl(exception=ex, create=1) + logger.logException(newEx) + print "Please check scheduler component is alive and responsive|" + sys.exit(-1) + + print "Starting with default component: " + DEFAULT_COMPONENT + if recordername!=DEFAULT_COMPONENT: + print "Be aware that the in-use recorder is currently " + recordername + + self.componentName=DEFAULT_COMPONENT + + else: + self.componentName=compname + print "Starting with component: " + self.componentName + + try: + self.component= self.simpleClient.getComponent(self.componentName) + except Exception,ex: + newEx = ClientErrorsImpl.CouldntAccessComponentExImpl(exception=ex, create=1) + newEx.setComponentName(self.componentName) + logger.logException(newEx) + print "Please check the system is up and running and " + self.componentName + " is alive!" + sys.exit(-1) + + self.thread=MyWorker([self.component,self.scheduler,self.antennaBoss,self.simpleClient]) + Qt.QDialog.__init__(self) + self.setupUi(self) +# self.qwtPlot_datax.setAxisScale(Qwt.QwtPlot.xBottom, 0,1000) + self.qwtPlot_datax.setAxisAutoScale(Qwt.QwtPlot. yLeft) + self.setWindowTitle(self.componentName) + self.qwtPlot_datax.setAxisTitle(Qwt.QwtPlot.yLeft, "Ta(K)") + self.qwtPlot_datay.setAxisTitle(Qwt.QwtPlot.yLeft, "Ta(K)") + + self.connect(self.thread,Qt.SIGNAL("arrayDataX"),self.qwtPlot_datay.setX) + self.connect(self.thread,Qt.SIGNAL("arrayDataY"),self.qwtPlot_datay.setVal) - self.connect(self.thread,Qt.SIGNAL("DataX"),self.qwtPlot_datax.setX) - self.connect(self.thread,Qt.SIGNAL("DataY"),self.qwtPlot_datax.setVal) + self.connect(self.thread,Qt.SIGNAL("DataX"),self.qwtPlot_datax.setX) + self.connect(self.thread,Qt.SIGNAL("DataY"),self.qwtPlot_datax.setVal) - self.connect(self.thread,Qt.SIGNAL("projectname"),self.plainTextEdit_project.setPlainText) - self.connect(self.thread,Qt.SIGNAL("observer"),self.plainTextEdit_observer.setPlainText) - self.connect(self.thread,Qt.SIGNAL("filename"),self.plainTextEdit_filename.setPlainText) - self.connect(self.thread,Qt.SIGNAL("subscan"),self.subscanIdLineEdit.setText) - self.connect(self.thread,Qt.SIGNAL("scan"),self.scanIdLineEdit.setText) - self.connect(self.thread,Qt.SIGNAL("hpbw"),self.hpbwLineEdit.setText) - self.connect(self.thread,Qt.SIGNAL("amplitude"),self.amplitudeLineEdit.setText) - self.connect(self.thread,Qt.SIGNAL("peakOffset"),self.peakoffsetLineEdit.setText) - self.connect(self.thread,Qt.SIGNAL("slope"),self.slopeLineEdit.setText) - self.connect(self.thread,Qt.SIGNAL("offset"),self.offsetLineEdit.setText) - self.connect(self.thread,Qt.SIGNAL("target"),self.nameLineEdit.setText) - self.connect(self.thread,Qt.SIGNAL("device"),self.deviceIdLineEdit.setText) - self.connect(self.thread,Qt.SIGNAL("isRecording"),self.isRecording) - self.connect(self.thread,Qt.SIGNAL("scanAxis"),self.scanAxis) + self.connect(self.thread,Qt.SIGNAL("projectname"),self.plainTextEdit_project.setPlainText) + self.connect(self.thread,Qt.SIGNAL("observer"),self.plainTextEdit_observer.setPlainText) + self.connect(self.thread,Qt.SIGNAL("filename"),self.plainTextEdit_filename.setPlainText) + self.connect(self.thread,Qt.SIGNAL("subscan"),self.subscanIdLineEdit.setText) + self.connect(self.thread,Qt.SIGNAL("scan"),self.scanIdLineEdit.setText) + self.connect(self.thread,Qt.SIGNAL("hpbw"),self.hpbwLineEdit.setText) + self.connect(self.thread,Qt.SIGNAL("amplitude"),self.amplitudeLineEdit.setText) + self.connect(self.thread,Qt.SIGNAL("peakOffset"),self.peakoffsetLineEdit.setText) + self.connect(self.thread,Qt.SIGNAL("slope"),self.slopeLineEdit.setText) + self.connect(self.thread,Qt.SIGNAL("offset"),self.offsetLineEdit.setText) + self.connect(self.thread,Qt.SIGNAL("target"),self.nameLineEdit.setText) + self.connect(self.thread,Qt.SIGNAL("device"),self.deviceIdLineEdit.setText) + self.connect(self.thread,Qt.SIGNAL("isRecording"),self.isRecording) + self.connect(self.thread,Qt.SIGNAL("scanAxis"),self.scanAxis) - - - except Exception,ex: - newEx = ClientErrorsImpl.CouldntAccessComponentExImpl(exception=ex, create=1) -# newEx.setComponentName(self.componentname) - #ACS_LOG_ERROR - newEx.log(self.simpleClient.getLogger(),ACSLog.ACS_LOG_ERROR) - self.simpleClient.disconnect() - sys.exit(-1) - - @pyqtSlot(Qt.QObject,name="isRecording") - def isRecording(self,rec): - if rec==False: - self.recording.setText("OFF") - palette = self.recording.palette() - role = self.recording.backgroundRole() - palette.setColor(role, Qt.QColor('gray')) - self.recording.setPalette(palette) - self.BScanaxis.setEnabled(False) - - - - if rec==True: - self.recording.setText("ON") - palette = self.recording.palette() - role = self.recording.backgroundRole() - palette.setColor(role, Qt.QColor('green')) - self.recording.setPalette(palette) - self.BScanaxis.setEnabled(True) + @pyqtSlot(Qt.QObject,name="isRecording") + def isRecording(self,rec): + if rec==False: + self.recording.setText("OFF") + palette = self.recording.palette() + role = self.recording.backgroundRole() + palette.setColor(role, Qt.QColor('gray')) + self.recording.setPalette(palette) + self.BScanaxis.setEnabled(False) + if rec==True: + self.recording.setText("ON") + palette = self.recording.palette() + role = self.recording.backgroundRole() + palette.setColor(role, Qt.QColor('green')) + self.recording.setPalette(palette) + self.BScanaxis.setEnabled(True) - @pyqtSlot(Qt.QObject,name="scanAxis") # decorator for the slot - def scanAxis(self,scanaxis): - self.BScanaxis.setText(str(scanaxis)) - - if 'SUBR' not in str(scanaxis): - self.scanAxisLabel.setText('ScanAxis - Pointing') - xaxis_text="Direction (Deg)" - hpbw_label_text='HPBW(arcmim)' - peakOffsetLabel_text='PeakOffset(deg)' - else: - self.scanAxisLabel.setText('ScanAxis - Focus') - xaxis_text="Distance (mm)" - hpbw_label_text='HPBW(mm)' - - peakOffsetLabel_text='PeakOffset(mm)' - - self.qwtPlot_datax.setAxisTitle(Qwt.QwtPlot.xBottom, xaxis_text) - self.qwtPlot_datay.setAxisTitle(Qwt.QwtPlot.xBottom, xaxis_text) - self.hpbw_label.setText(hpbw_label_text) - self.peakOffsetLabel.setText(peakOffsetLabel_text) - - - - @pyqtSlot(Qt.QObject,name="scalePlots") # decorator for the slot - def scalePlots(self,val): - self.qwtPlot_datay.setAxisScale(QwtPlot.xBottom, min(val), max(val)) + @pyqtSlot(Qt.QObject,name="scanAxis") # decorator for the slot + def scanAxis(self,scanaxis): + self.BScanaxis.setText(str(scanaxis)) + if 'SUBR' not in str(scanaxis): + self.scanAxisLabel.setText('ScanAxis - Pointing') + xaxis_text="Direction (Deg)" + hpbw_label_text='HPBW(arcmim)' + peakOffsetLabel_text='PeakOffset(deg)' + else: + self.scanAxisLabel.setText('ScanAxis - Focus') + xaxis_text="Distance (mm)" + hpbw_label_text='HPBW(mm)' + peakOffsetLabel_text='PeakOffset(mm)' + self.qwtPlot_datax.setAxisTitle(Qwt.QwtPlot.xBottom, xaxis_text) + self.qwtPlot_datay.setAxisTitle(Qwt.QwtPlot.xBottom, xaxis_text) + self.hpbw_label.setText(hpbw_label_text) + self.peakOffsetLabel.setText(peakOffsetLabel_text) + + @pyqtSlot(Qt.QObject,name="scalePlots") # decorator for the slot + def scalePlots(self,val): + self.qwtPlot_datay.setAxisScale(QwtPlot.xBottom, min(val), max(val)) + def run(self): self.thread.start() def __del__(self): - self.thread.run=False - try: - self.simpleClient.releaseComponent(self.componentname) - self.simpleClient.releaseComponent(self.scheduler._get_name()) - self.simpleClient.releaseComponent(self.boss._get_name()) - - - - self.simpleClient.disconnect() - except Exception,ex: - print "exception" - - print "end app" + #__del__ apparently is called twice, I have no clue and it should be investigated + if self.thread: + if self.thread.isRunning: + self.thread.quit() + + if self.managerConnected: + try: + if self.component: + self.simpleClient.releaseComponent(self.component._get_name()) + if self.scheduler: + self.simpleClient.releaseComponent(self.scheduler._get_name()) + if self.antennaBoss: + self.simpleClient.releaseComponent(self.antennaBoss._get_name()) + except Exception,ex: + print "Error in application cleanup" - -def usage(nameapp): - print nameapp+" [component name]" - - - - - + +def usage(): + print "calibrationtoolclient [component name]" + print + print "If no component name is provided, the default "+DEFAULT_COMPONENT+" will be used" def main(args): + sys.tracebacklimit=0 + try: - opts, args = getopt.getopt(sys.argv[1:],"h",["help"]) - except getopt.GetoptError, err: - print str(err) - usage() - sys.exit(1) - - for o,a in opts: - if o in ("-h", "--help"): - usage() - sys.exit() - - if len(args)==0: - componentname='default' - else: - componentname=args[0] - - print componentname - app = Qt.QApplication(args) + opts, args = getopt.getopt(sys.argv[1:],"h",["help"]) + except getopt.GetoptError, err: + print str(err) + usage() + sys.exit(1) + + for o,a in opts: + if o in ("-h", "--help"): + usage() + sys.exit() + + if len(args)==0: + componentname='default' + else: + componentname=args[0] + + app = Qt.QApplication(args) a=Application(componentname) #passa il nome del component al costruttore + sleep(1) a.run() - p=a.show() - - sys.exit(app.exec_()) + p=a.show() + sys.exit(app.exec_()) sleep(2) + print "Application closed!" + + if __name__=='__main__': main(sys.argv) diff --git a/Common/Clients/CaltoolClient/src/calibrationtoolclient b/Common/Clients/CaltoolClient/src/calibrationtoolclient new file mode 100644 index 0000000000000000000000000000000000000000..864fd525070cda6032f37e5c1a241898452fcac6 --- /dev/null +++ b/Common/Clients/CaltoolClient/src/calibrationtoolclient @@ -0,0 +1,9 @@ +#! /bin/bash +# *********************************************************************** +# Who when What +# Andrea Orlati(andrea.orlati@inaf.it) 22/05/2020 Creation +#************************************************************************ + + +export ACS_LOG_STDOUT=11 +_ctc $1 diff --git a/Common/Clients/SystemTerminal/src/_tui_SysTerm.py b/Common/Clients/SystemTerminal/src/_tui_SysTerm.py index dfbc8a579771648f7eb29a7d428ab6fc32165fa3..436552f0386dff4df1ee1e71c712a2c8bcbe03d8 100644 --- a/Common/Clients/SystemTerminal/src/_tui_SysTerm.py +++ b/Common/Clients/SystemTerminal/src/_tui_SysTerm.py @@ -133,7 +133,6 @@ def main(): cmd=raw_input("<%d> "%cmdCounter) except IOError: cmd='exit' - pass else: cmd="version" cmdCounter=cmdCounter+1 @@ -157,15 +156,24 @@ def main(): idx = res.find('\\') cmd_name, response = res[:idx+1], res[idx+1:].rstrip('\\') if success and response: - groups = response.split(',') - for group in groups: - values = group.split(';') - if len(values) > 1: - print cmd_name - for i, value in enumerate(values): - print '%02d) %s' %(i, value) - elif res: - print res + if response.startswith('STR '): + # We got a formatted string in return, print it + # without any modification + response = response[4:] + lines = response.split('\n') + print cmd_name + for line in lines: + print line + else: + groups = response.split(',') + for group in groups: + values = group.split(';') + if len(values) > 1: + print cmd_name + for i, value in enumerate(values): + print '%02d) %s' %(i, value) + elif res: + print res elif res: print res except Exception, ex: @@ -173,8 +181,13 @@ def main(): newEx.setAction("command()") newEx.setReason(ex.message) newEx.log(simpleClient.getLogger(),ACSLog.ACS_LOG_ERROR) - except KeyboardInterrupt: + except EOFError: + # CTRL + D event: Equivalent to the exit command, we stop the loop stopAll=True + except KeyboardInterrupt: + # CTRL + C event: Ignore whatever string was written on the + # terminal and show a new prompt line + print '^C' readline.write_history_file(historyFile) simpleClient.releaseComponent(compName) diff --git a/Common/Interfaces/AntennaInterface/config/CDB/schemas/Station.xsd b/Common/Interfaces/AntennaInterface/config/CDB/schemas/Station.xsd index 97741a9e787ca346010e1fadc5a7ecc5a1878707..8959f9c44ccbe0b3fd87299850638de9df1b44dc 100644 --- a/Common/Interfaces/AntennaInterface/config/CDB/schemas/Station.xsd +++ b/Common/Interfaces/AntennaInterface/config/CDB/schemas/Station.xsd @@ -33,9 +33,11 @@ + + - \ No newline at end of file + diff --git a/Common/Interfaces/AntennaInterface/idl/AntennaBoss.midl b/Common/Interfaces/AntennaInterface/idl/AntennaBoss.midl index 5d93871183b3c0242fe70a4a7e21385c528fb035..8788c9af8c81ba3ec21032a1ee7aef996c99ac01 100644 --- a/Common/Interfaces/AntennaInterface/idl/AntennaBoss.midl +++ b/Common/Interfaces/AntennaInterface/idl/AntennaBoss.midl @@ -647,7 +647,7 @@ module Antenna { void getObservedHorizontal(in ACS::Time timestamp,in ACS::TimeInterval duration,out double az,out double el); /** - * This method should only be used internally to know the user offsets currently commanded + * This method should only be used internally to know the offsets currently commanded. i.e. the sum of all offset types * @throw CORBA::SystemExcpetion * @param azOff user offset for the azimuth (radians) * @param elOff user offset for the elevation (radians) @@ -657,6 +657,16 @@ module Antenna { * @param latOff user offset for the latitude (radians) */ void getAllOffsets(out double azOff,out double elOff,out double raOff,out double decOff,out double lonOff,out double latOff); + + /** + * This method should only be used internally to know the scan offsets currently commanded + * @throw CORBA::SystemException + * @param lonOff user offset for the longitude (radians) + * @param latOff user offset for the latitude (radians) + * @param offFrame reference frame of the offsets + */ + void getScanOffsets(out double lonOff, out double latOff,out TCoordinateFrame offFrame); + /** * This method is used internally to know the scan axis/direction os the presently commanded scan diff --git a/Common/Interfaces/CommonInterface/include/AntennaModule.h b/Common/Interfaces/CommonInterface/include/AntennaModule.h index 606128b4e626374522c3e81c3e14e1b7f77fb6d6..d9952755dda3cef3492ba74c29ef187abd73ffff 100644 --- a/Common/Interfaces/CommonInterface/include/AntennaModule.h +++ b/Common/Interfaces/CommonInterface/include/AntennaModule.h @@ -19,6 +19,34 @@ namespace Antenna { */ class Definitions { public: + static bool map(const char *str,TCoordinateFrame& frame) { + if (strcasecmp(str,"EQ")==0) { + frame=Antenna::ANT_EQUATORIAL; + return true; + } + else if (strcasecmp(str,"HOR")==0) { + frame=Antenna::ANT_HORIZONTAL; + return true; + } + else if (strcasecmp(str,"GAL")==0) { + frame=Antenna::ANT_GALACTIC; + return true; + } + else { + return false; + } + } + static const char *map(const TCoordinateFrame& frame) { + if (frame==Antenna::ANT_EQUATORIAL) { + return "EQ"; + } + if (frame==Antenna::ANT_HORIZONTAL) { + return "HOR"; + } + else { // Antenna::ANT_GALACTIC + return "GAL"; + } + } static bool map(const char *str,TsubScanGeometry& geometry) { if (strcasecmp(str,"LAT")==0) { geometry=Antenna::SUBSCAN_CONSTLAT; diff --git a/Common/Interfaces/CommonInterface/src/AntennaModule.cpp b/Common/Interfaces/CommonInterface/src/AntennaModule.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2d80112490c7bab7a2078f32c549f7fd768d2879 --- /dev/null +++ b/Common/Interfaces/CommonInterface/src/AntennaModule.cpp @@ -0,0 +1,27 @@ + +#include "AntennaModule.h" + + +#define FRAME_TEST1 "HOR" +#define FRAME_TEST2 "DUMMY" + +int main(int argc, char *argv[]) +{ + Antenna::TCoordinateFrame frame; + printf("galactic frame: %s\n",(const char *)Antenna::Definitions::map(Antenna::ANT_GALACTIC)); + printf("equatorial frame: %s\n",(const char *)Antenna::Definitions::map(Antenna::ANT_EQUATORIAL)); + printf("horizontal frame: %s\n",(const char *)Antenna::Definitions::map(Antenna::ANT_HORIZONTAL)); + if (Antenna::Definitions::map(FRAME_TEST1,frame)) { + printf("%s maps to %s\n",FRAME_TEST1,(const char *)Antenna::Definitions::map(frame)); + } + else { + printf("Conversion Error: %s\n",(const char *)FRAME_TEST1); + } + if (Antenna::Definitions::map(FRAME_TEST2,frame)) { + printf("%s maps to %s\n",FRAME_TEST2,(const char *)Antenna::Definitions::map(frame)); + } + else { + printf("Conversion Error: %s\n",(const char *)FRAME_TEST2); + } + return 0; +} diff --git a/Common/Interfaces/CommonInterface/src/Makefile b/Common/Interfaces/CommonInterface/src/Makefile index c80275755184eab119b70d976aa3aa12345d5109..8cd217de26a9fac73711201d2f0128423e1bf73b 100644 --- a/Common/Interfaces/CommonInterface/src/Makefile +++ b/Common/Interfaces/CommonInterface/src/Makefile @@ -37,7 +37,7 @@ MAKE_PDF = ON # C programs (public and local) # ----------------------------- EXECUTABLES = -EXECUTABLES_L = TestReceivers TestManagement #TestAntenna +EXECUTABLES_L = TestReceivers TestManagement TestAntenna TestReceivers_OBJECTS = ReceiversModule TestReceivers_LIBS= baci maci @@ -45,6 +45,9 @@ TestReceivers_LIBS= baci maci TestManagement_OBJECTS = ManagementModule TestManagement_LIBS= ManagementErrors baci maci +TestAntenna_OBJECTS = AntennaModule +TestAntenna_LIBS= baci maci + # # xxxxx_OBJECTS = diff --git a/Common/Interfaces/ManagmentInterface/idl/Scheduler.idl b/Common/Interfaces/ManagmentInterface/idl/Scheduler.idl index 675fc059e5197b7262a797b85969c0f7662998d7..d1aad1d639d58e3456dc35e4eeb15f4d13547683 100644 --- a/Common/Interfaces/ManagmentInterface/idl/Scheduler.idl +++ b/Common/Interfaces/ManagmentInterface/idl/Scheduler.idl @@ -204,11 +204,12 @@ module Management { /** * This method sets the current project code. If the project does not exists an error is thrown. - * @param code code of the project, if blank the selected code will be default one + * @param code code of the project, if blank the selected code will be default one + * @param message this will returns a wellcome message from the control software * @throw ManagementErrors::ManagementErrorsEx * @throw CORBA::SystemExcpetion */ - void setProjectCode(in string code) raises (ManagementErrors::ManagementErrorsEx); + void setProjectCode(in string code, out string message) raises (ManagementErrors::ManagementErrorsEx); /** * It allows to immediately start a scan that involves a primary focus axis or a subreflector axis. The scan is performed of the currently diff --git a/Common/Libraries/DiscosVersion/include/DiscosVersion.h b/Common/Libraries/DiscosVersion/include/DiscosVersion.h index e9937eb0d142afb167a31e9e51b96bb0d65717a8..caf4b4e13e38ec525987fda5b9601279168bfaf1 100644 --- a/Common/Libraries/DiscosVersion/include/DiscosVersion.h +++ b/Common/Libraries/DiscosVersion/include/DiscosVersion.h @@ -30,6 +30,7 @@ #define _CURRENT_VERSION_MAJOR 1 #define _CURRENT_VERSION_MINOR 0 +#define _CURRENT_VERSION_REVISION 6 #define _CURRENT_PRODUCT "DISCOS" @@ -39,6 +40,7 @@ class CurrentVersion { public: static WORD major; static WORD minor; + static WORD revision; static IRA::CString station; static IRA::CString product; static IRA::CString getVersion(); diff --git a/Common/Libraries/DiscosVersion/src/DiscosVersion.cpp b/Common/Libraries/DiscosVersion/src/DiscosVersion.cpp index 1a6aa90771798955f888f7498a4b4e49c4db459b..68f296c00c4f4de342ec2e2654ca6e28ed6d7479 100644 --- a/Common/Libraries/DiscosVersion/src/DiscosVersion.cpp +++ b/Common/Libraries/DiscosVersion/src/DiscosVersion.cpp @@ -6,7 +6,8 @@ using namespace DiscosVersion; IRA::CString CurrentVersion::getVersion() { IRA::CString value; - value.Format("%s-%d.%d.%s",(const char *)CurrentVersion::product,CurrentVersion::major,CurrentVersion::minor,(const char *)CurrentVersion::station); + value.Format("%s-%d.%d.%d.%s",(const char *)CurrentVersion::product,CurrentVersion::major, + CurrentVersion::minor,CurrentVersion::revision,(const char *)CurrentVersion::station); return value; } @@ -14,6 +15,7 @@ IRA::CString CurrentVersion::product = IRA::CString(_CURRENT_PRODUCT); IRA::CString CurrentVersion::station = IRA::CString(_STATION); WORD CurrentVersion::minor = _CURRENT_VERSION_MINOR; WORD CurrentVersion::major = _CURRENT_VERSION_MAJOR; +WORD CurrentVersion::revision = _CURRENT_VERSION_REVISION; diff --git a/Common/Libraries/IRALibrary/src/IRATools.cpp b/Common/Libraries/IRALibrary/src/IRATools.cpp index f73c99b39b051d51e990dbbfc1ff0dbea7d1ae26..e4f11d8972bdb9eca1d1f5875a98bcbc1c3ed82d 100644 --- a/Common/Libraries/IRALibrary/src/IRATools.cpp +++ b/Common/Libraries/IRALibrary/src/IRATools.cpp @@ -841,7 +841,7 @@ bool CIRATools::latitudeToRad(const IRA::CString& lat,double& rad,bool complete, res=sexagesimalAngleToRad(lat,rad,complete,delimiter); } if (complete) { - if ((rad<-(DPI/2)) || (rad>(DPI/2))) return false; + if (rad<-DPIBY2 || rad>DPIBY2) return false; else return res; } else return res; @@ -915,7 +915,7 @@ bool CIRATools::elevationToRad(const IRA::CString& el,double& rad,bool complete) { bool res=angleToRad(el,rad); if (complete) { - if ((rad<0) || (rad>DPI/2)) return false; + if (rad<0 || rad>DPIBY2) return false; else return res; } else return res; diff --git a/Common/Libraries/IRALibrary/tests/CString_test.i b/Common/Libraries/IRALibrary/tests/CString_test.i index d761e4facdaa31322310eec1db89bf13d186c7c3..e469bdbe11a504e1d340df8365aad1a0a6bd91ea 100644 --- a/Common/Libraries/IRALibrary/tests/CString_test.i +++ b/Common/Libraries/IRALibrary/tests/CString_test.i @@ -23,7 +23,7 @@ public: } ::testing::AssertionResult string_checkSplit() { - RecordProperty("description","check the how CString handle string splitting"); + RecordProperty("description","check how CString handle string splitting"); IRA::CString base("That is a test string that must be split"); IRA::CString token("is"); IRA::CString split1,split2; @@ -42,7 +42,28 @@ public: << (const char *)split2 << "' instead of ' a test string that must be split'"; } return ::testing::AssertionSuccess(); - } + } + + ::testing::AssertionResult string_Find() { + RecordProperty("description","check the bug emerged"); + IRA::CString search("KKC QQC CCC MMC"); + IRA::CString failToken("XXP"); + IRA::CString successToken("QQC"); + IRA::CString bugToken("KKC"); + int pos=search.Find(failToken); + if (pos>0) { + return ::testing::AssertionFailure() << "result should be negative as the string is not present"; + } + pos=search.Find(successToken); + if (pos<=0) { + return ::testing::AssertionFailure() << "result should be positive as the string is present"; + } + pos=search.Find(bugToken); + if (pos!=0) { + return ::testing::AssertionFailure() << "result should be zero as the string start with first char"; + } + return ::testing::AssertionSuccess(); + } protected: virtual void SetUp() { diff --git a/Common/Libraries/IRALibrary/tests/unittest.cpp b/Common/Libraries/IRALibrary/tests/unittest.cpp index 846f79260cdfb678daeb17a4a5c7cc5252a609a8..54ac4431a2623b1f4ca8a1cffdbe0f286c22070d 100644 --- a/Common/Libraries/IRALibrary/tests/unittest.cpp +++ b/Common/Libraries/IRALibrary/tests/unittest.cpp @@ -86,6 +86,10 @@ TEST_F(IRALibrary_String,string_checkSplit) { EXPECT_TRUE(string_checkSplit()); } +TEST_F(IRALibrary_String,string_Find) { + EXPECT_TRUE(string_Find()); +} + TEST_F(IRALibrary_BaseConverter,decToBin_checkConversion) { EXPECT_TRUE(decToBin_checkConversion()); } diff --git a/Common/Libraries/ParserLibrary/include/SP_typeConversion.h b/Common/Libraries/ParserLibrary/include/SP_typeConversion.h index ed2f9da4482052e38b5fe1cd1fd0fa77e063f51f..822347d116d70aee12242ab70bdc1623e820edd3 100644 --- a/Common/Libraries/ParserLibrary/include/SP_typeConversion.h +++ b/Common/Libraries/ParserLibrary/include/SP_typeConversion.h @@ -107,6 +107,19 @@ public: } }; +class longString_converter +{ +public: + IRA::CString strToVal(const char * str) throw (ParserErrors::BadTypeFormatExImpl) { + return IRA::CString(str); + } + char *valToStr(const IRA::CString& val) { + char *c=new char[val.GetLength()+1]; + strcpy(c,(const char*)val); + return c; + } +}; + template <_sp_symbols OUT> class angle_converter { public: diff --git a/Common/Libraries/ParserLibrary/include/SP_types.h b/Common/Libraries/ParserLibrary/include/SP_types.h index 6ec8c6d17580309f23f2eb1b1321eaf25dc55ff8..af1269ccc7c38ade908bbda54391ba4ff98ddd25 100644 --- a/Common/Libraries/ParserLibrary/include/SP_types.h +++ b/Common/Libraries/ParserLibrary/include/SP_types.h @@ -163,6 +163,7 @@ typedef basic_type time_type; typedef basic_type interval_type; typedef basic_type longSeq_type; typedef basic_type doubleSeq_type; +typedef basic_type longString_type; class string_type: public virtual basic_type diff --git a/Common/Libraries/ParserLibrary/src/TestParser.cpp b/Common/Libraries/ParserLibrary/src/TestParser.cpp index 6c8e6a1b7f483a788c49eeeaec58e6d00f582e0e..d621ddddd0c89e4da0bb6557aced06a1a4bc60c4 100644 --- a/Common/Libraries/ParserLibrary/src/TestParser.cpp +++ b/Common/Libraries/ParserLibrary/src/TestParser.cpp @@ -47,6 +47,16 @@ void positivo(const long& var,TBools& res) { void stampa(const char *str) { printf("%s\n",str); } + +void answer(const char *str,IRA::CString& answer) const +{ + if (str!=NULL) { + answer.Format("Wellcome %s",str); + } + else { + answer="Wellcome"; + } +} int somma(const int&i,const int&j) { return i+j; } @@ -175,6 +185,9 @@ int main(int argc, char *argv[]) parser.add("sumSeq",new function1 >(&test,&CTest::sumSeq),1); parser.add("sequence",new function2,I >(&test,&CTest::sequence),1); parser.add("wait",new function1 >(&test,&CTest::wait),1); + + parser.add("answer",new function2, O >(&test,&CTest::answer),1); + parser.add("naviga","firefox",1); diff --git a/Common/Misc/Scripts/src/discos b/Common/Misc/Scripts/src/discos index 86920a6eb59bf138b99d7e1e154cda58d8227350..fe5786d4773212082f2b6f20d5bf7b29a76fcc1d 100644 --- a/Common/Misc/Scripts/src/discos +++ b/Common/Misc/Scripts/src/discos @@ -1,42 +1,24 @@ #! /bin/bash -# ********************************************************************************************* -# IRA Istituto di Radioastronomia +# *********************************************************************** +# IRA Istituto di Radioastronomia # # -# This code is under GNU General Public Licence (GPL). -# -# Who when What -# Andrea Orlati(andrea.orlati@inaf.it) 28/06/2018 Creation -#************************************************************************ -# NAME -# -# SYNOPSIS -# -# DESCRIPTION -# -# FILES -# -# ENVIRONMENT -# -# RETURN VALUES -# -# CAUTIONS -# -# EXAMPLES -# -# SEE ALSO -# -# BUGS +# This code is under GNU General Public Licence (GPL). # +# Who when What +# Andrea Orlati(andrea.orlati@inaf.it) 28/06/2018 Creation +# Giuseppe Carboni(giuseppe.carboni@inaf.it) 25/02/2020 Update +#************************************************************************ LONGOPTS=start,view,help SHORTOPTS=svh CL_START= CL_VIEW= CL_HELP= +GEOMETRY=1920x1080x0x0 function printUsage { - echo "Gets the ESCS system started, management priviledges are needed" + echo "Starts the DISCOS constrol system" echo "" echo "Usage: `basename $0` [OPTIONS] " echo "Options: " @@ -88,12 +70,12 @@ if [ "$CL_HELP" ] ; then fi if [ "$CL_START" ] ; then - acscommandcenter -r $INTROOT/app-defaults/discosStartup.xml & + acscommandcenter -g $GEOMETRY -r $INTROOT/app-defaults/discosStartup.xml & exit fi if [ "$CL_VIEW" ] ; then - acscommandcenter -r $INTROOT/app-defaults/discosStartup.xml $MANAGER & + acscommandcenter -g $GEOMETRY -r $INTROOT/app-defaults/discosStartup.xml $MANAGER & fi diff --git a/Common/Misc/UserTools/src/SourceTrack.cpp b/Common/Misc/UserTools/src/SourceTrack.cpp index 7323c2642ab4351cbc52286a992bac999f4ebd4d..3c0c98a634f99358447af2adae7430c6cbcd9307 100644 --- a/Common/Misc/UserTools/src/SourceTrack.cpp +++ b/Common/Misc/UserTools/src/SourceTrack.cpp @@ -202,7 +202,7 @@ int main(int argc, char *argv[]) _CP_ printf("Horizontal coordinates:\tazimuth %.8lf°, elevation %.8lf°\n",az*DR2D,el*DR2D); - double obsZenithDistance=(DPI/2.0)-el; + double obsZenithDistance=DPIBY2-el; double corZenithDistance; double tdk = 13 + 273.0; // temperature double wl = 36000.0; diff --git a/Common/Servers/AntennaBoss/include/AntennaBossImpl.h b/Common/Servers/AntennaBoss/include/AntennaBossImpl.h index c7f561bce51603bd9e5847f392dffdd3dbb3a8b0..50d1347ecd1f21c472ae28b7d6ebd25f82214cf6 100644 --- a/Common/Servers/AntennaBoss/include/AntennaBossImpl.h +++ b/Common/Servers/AntennaBoss/include/AntennaBossImpl.h @@ -632,6 +632,19 @@ public: */ void getAllOffsets(CORBA::Double_out azOff,CORBA::Double_out elOff,CORBA::Double_out raOff,CORBA::Double_out decOff,CORBA::Double_out lonOff,CORBA::Double_out latOff) throw (CORBA::SystemException); + /** + * This method should only be used internally to know the scan offsets currently commanded + * @throw CORBA::SystemException + * @param azOff user offset for the azimuth (radians) + * @param elOff user offset for the elevation (radians) + * @param raOff user offset for the right ascension (radians) + * @param decOff user offset for the declination (radians) + * @param lonOff user offset for the longitude (radians) + * @param latOff user offset for the latitude (radians) + */ + void getScanOffsets(CORBA::Double_out lonOff,CORBA::Double_out latOff, + Antenna::TCoordinateFrame_out frameOff) throw (CORBA::SystemException); + /** * It can be called to know which is the axis the antenna is currently performing the scan * @param axis returned identfier of the axis @@ -673,6 +686,7 @@ private: SmartPropertyPointer m_pdeclinationOffset; SmartPropertyPointer m_plongitudeOffset; SmartPropertyPointer m_platitudeOffset; + CBossCore *m_boss; IRA::CSecureArea *m_core; CWorkingThread *m_workingThread; CWatchingThread *m_watchingThread; diff --git a/Common/Servers/AntennaBoss/include/BossCore.h b/Common/Servers/AntennaBoss/include/BossCore.h index c789f9f8f270b129290f0d53d7842e2bae464790..8e6f11c81d0803df280d86a921fd41de110ee811 100644 --- a/Common/Servers/AntennaBoss/include/BossCore.h +++ b/Common/Servers/AntennaBoss/include/BossCore.h @@ -322,6 +322,11 @@ public: */ void getAllOffsets(double& azOff,double& elOff,double& raOff,double& decOff,double& lonOff,double& latOff) const; + /** + * Get the scan offsets configured for the current scan + */ + void getScanOffsets(double& lonOff,double& latOff,Antenna::TCoordinateFrame& frame); + /** * @return the J2000 right ascension of the target */ diff --git a/Common/Servers/AntennaBoss/src/AntennaBossImpl.cpp b/Common/Servers/AntennaBoss/src/AntennaBossImpl.cpp index f40a15fd01f67e128c66721ed19c9b0a60bf7f2b..47335abb3b65a76a0192d232ab3fb89953929fe1 100644 --- a/Common/Servers/AntennaBoss/src/AntennaBossImpl.cpp +++ b/Common/Servers/AntennaBoss/src/AntennaBossImpl.cpp @@ -56,6 +56,7 @@ AntennaBossImpl::AntennaBossImpl(const ACE_CString &CompName,maci::ContainerServ m_pdeclinationOffset(this), m_plongitudeOffset(this), m_platitudeOffset(this), + m_boss(NULL), m_core(NULL) { AUTO_TRACE("AntennaBossImpl::AntennaBossImpl()"); @@ -71,7 +72,6 @@ AntennaBossImpl::~AntennaBossImpl() void AntennaBossImpl::initialize() throw (ACSErr::ACSbaseExImpl) { AUTO_TRACE("AntennaBossImpl::initialize()"); - CBossCore *boss; ACS_LOG(LM_FULL_INFO,"AntennaBossImpl::initialize()",(LM_INFO,"AntennaBoss::COMPSTATE_INITIALIZING")); try { m_config.init(getContainerServices()); //throw CDBAcessExImpl; @@ -81,8 +81,8 @@ void AntennaBossImpl::initialize() throw (ACSErr::ACSbaseExImpl) throw _dummy; } try { - boss=(CBossCore *)new CBossCore(getContainerServices(),&m_config,this); - m_core=new IRA::CSecureArea(boss); + m_boss=(CBossCore *)new CBossCore(getContainerServices(),&m_config,this); + m_core=new IRA::CSecureArea(m_boss); m_ptarget=new ROstring(getContainerServices()->getName()+":target",getComponent(),new DevIOTargetName(m_core),true); m_prawAzimuth=new ROdouble(getContainerServices()->getName()+":rawAzimuth",getComponent(), new DevIORawHorizontal(m_core,DevIORawHorizontal::AZIMUTH),true); @@ -143,16 +143,16 @@ void AntennaBossImpl::initialize() throw (ACSErr::ACSbaseExImpl) new DevIOOffsets(m_core,DevIOOffsets::LATITUDEOFF),true); // create the parser for command line execution - m_parser = new SimpleParser::CParser(boss,10); + m_parser = new SimpleParser::CParser(m_boss,10); } catch (std::bad_alloc& ex) { _EXCPT(ComponentErrors::MemoryAllocationExImpl,dummy,"AntennaBossImpl::initialize()"); throw dummy; } - boss->initialize(); //could throw (ComponentErrors::UnexpectedExImpl) + m_boss->initialize(); //could throw (ComponentErrors::UnexpectedExImpl) try { m_watchingThread=getContainerServices()->getThreadManager()->create - ("BOSSWATCHER",boss); + ("BOSSWATCHER",m_boss); m_workingThread=getContainerServices()->getThreadManager()->create *> ("BOSSWORKER",m_core); } @@ -164,30 +164,30 @@ void AntennaBossImpl::initialize() throw (ACSErr::ACSbaseExImpl) _THROW_EXCPT(ComponentErrors::UnexpectedExImpl,"AntennaBossImpl::initialize()"); } // inform the boss core of the thread in charge of trajectory update - boss->setWorkingThread(m_workingThread); + m_boss->setWorkingThread(m_workingThread); // configure the parser..... - m_parser->add("antennaDisable",new function0(boss,&CBossCore::disable),0); - m_parser->add("antennaEnable",new function0(boss,&CBossCore::enable),0); - m_parser->add("antennaCorrectionOn",new function0(boss,&CBossCore::enableCorrection),0); - m_parser->add("antennaCorrectionOff",new function0(boss,&CBossCore::disableCorrection),0); - m_parser->add("antennaPark",new function0(boss,&CBossCore::stow),0); - m_parser->add("antennaStop",new function0(boss,&CBossCore::stop),0); - m_parser->add("antennaAzEl",new function0(boss,&CBossCore::setPreset),0); - m_parser->add("antennaTrack",new function0(boss,&CBossCore::setProgramTrack),0); - m_parser->add("antennaUnstow",new function0(boss,&CBossCore::unstow),0); - m_parser->add("antennaSetup",new function1 >(boss,&CBossCore::setup),1); - m_parser->add("preset",new function2 >,I > >(boss,&CBossCore::preset),2); - //m_parser->add("vlsr",new function1 >(boss,&CBossCore::setVlsr),1); - m_parser->add("fwhm",new function2 >, I >(boss,&CBossCore::setFWHM),2); - m_parser->add("azelOffsets",new function2 >,I > >(boss,&CBossCore::setHorizontalOffsets),2); - m_parser->add("radecOffsets",new function2 >,I > >(boss,&CBossCore::setEquatorialOffsets),2); - m_parser->add("lonlatOffsets",new function2 >,I > >(boss,&CBossCore::setGalacticOffsets),2); - //m_parser->add("skydipOTF",new function3 >,I >,I >(boss,&CBossCore::skydip),3); - m_parser->add("antennaReset",new function0(boss,&CBossCore::resetFailures),0); - //m_parser->add("goOff",new function2 >,I >(boss,&CBossCore::goOff),2); + m_parser->add("antennaDisable",new function0(m_boss,&CBossCore::disable),0); + m_parser->add("antennaEnable",new function0(m_boss,&CBossCore::enable),0); + m_parser->add("antennaCorrectionOn",new function0(m_boss,&CBossCore::enableCorrection),0); + m_parser->add("antennaCorrectionOff",new function0(m_boss,&CBossCore::disableCorrection),0); + m_parser->add("antennaPark",new function0(m_boss,&CBossCore::stow),0); + m_parser->add("antennaStop",new function0(m_boss,&CBossCore::stop),0); + m_parser->add("antennaAzEl",new function0(m_boss,&CBossCore::setPreset),0); + m_parser->add("antennaTrack",new function0(m_boss,&CBossCore::setProgramTrack),0); + m_parser->add("antennaUnstow",new function0(m_boss,&CBossCore::unstow),0); + m_parser->add("antennaSetup",new function1 >(m_boss,&CBossCore::setup),1); + m_parser->add("preset",new function2 >,I > >(m_boss,&CBossCore::preset),2); + //m_parser->add("vlsr",new function1 >(m_boss,&CBossCore::setVlsr),1); + m_parser->add("fwhm",new function2 >, I >(m_boss,&CBossCore::setFWHM),2); + m_parser->add("azelOffsets",new function2 >,I > >(m_boss,&CBossCore::setHorizontalOffsets),2); + m_parser->add("radecOffsets",new function2 >,I > >(m_boss,&CBossCore::setEquatorialOffsets),2); + m_parser->add("lonlatOffsets",new function2 >,I > >(m_boss,&CBossCore::setGalacticOffsets),2); + //m_parser->add("skydipOTF",new function3 >,I >,I >(m_boss,&CBossCore::skydip),3); + m_parser->add("antennaReset",new function0(m_boss,&CBossCore::resetFailures),0); + //m_parser->add("goOff",new function2 >,I >(m_boss,&CBossCore::goOff),2); m_parser->add("radialVelocity",new function3 >, I >, - I > >(boss,&CBossCore::radialVelocity),3); + I > >(m_boss,&CBossCore::radialVelocity),3); ACS_LOG(LM_FULL_INFO,"AntennaBossImpl::initialize()",(LM_INFO,"COMPSTATE_INITIALIZED")); } @@ -543,9 +543,12 @@ void AntennaBossImpl::getRawCoordinates(ACS::Time time,CORBA::Double_out az,CORB { double Az=0.0; double El=0.0; + //workaround for strange behavior: this method seems so be called at startup before initialize() completes + //this result in a segmentation fault because m_boss is not initialized yet. Has it something to do with the + //CoordinateGrabber? it strangely uses the methods that are affected by this problem. + if (!m_boss) return; TIMEVALUE requestTime(time); - CSecAreaResourceWrapper resource=m_core->Get("IMPL:getRawcoordinate"); - resource->getRawHorizontal(requestTime,Az,El); + m_boss->getRawHorizontal(requestTime,Az,El); az=(CORBA::Double)Az; el=(CORBA::Double)El; } @@ -562,14 +565,10 @@ void AntennaBossImpl::getObservedEquatorial(ACS::Time time,ACS::TimeInterval dur { double Ra=0.0; double Dec=0.0; - //workaround for strange behavior: this method seems so be called at startup before initialize() completes - //this result in a segmentation fault because m_core is not created yet. Has it something to do with the - //CoordinateGrabber? it strangely uses the methods that are affected by this problem. - if (!m_core) return; + if (!m_boss) return; TIMEVALUE requestTime(time); TIMEDIFFERENCE requestedDuration(duration); - CSecAreaResourceWrapper resource=m_core->Get("IMPL:getObservedEquatorial"); - resource->getObservedEquatorial(requestTime,requestedDuration,Ra,Dec); + m_boss->getObservedEquatorial(requestTime,requestedDuration,Ra,Dec); ra=(CORBA::Double)Ra; dec=(CORBA::Double)Dec; } @@ -579,11 +578,10 @@ void AntennaBossImpl::getObservedGalactic(ACS::Time time,ACS::TimeInterval durat { double Long=0.0; double Lat=0.0; - if (!m_core) return; + if (!m_boss) return; TIMEVALUE requestTime(time); TIMEDIFFERENCE requestedDuration(duration); - CSecAreaResourceWrapper resource=m_core->Get("IMPL:getObservedgalactic"); - resource->getObservedGalactic(requestTime,requestedDuration,Long,Lat); + m_boss->getObservedGalactic(requestTime,requestedDuration,Long,Lat); longitude=(CORBA::Double)Long; latitude=(CORBA::Double)Lat; } @@ -593,12 +591,10 @@ void AntennaBossImpl::getObservedHorizontal(ACS::Time time,ACS::TimeInterval dur { double Az=0.0; double El=0.0; - // see GetObservedEquatorial for a comment - if (!m_core) return; + if (!m_boss) return; TIMEVALUE requestTime(time); TIMEDIFFERENCE requestedDuration(duration); - CSecAreaResourceWrapper resource=m_core->Get("IMPL:getObservedHorizontal"); - resource->getObservedHorizontal(requestTime,requestedDuration,Az,El); + m_boss->getObservedHorizontal(requestTime,requestedDuration,Az,El); az=(CORBA::Double)Az; el=(CORBA::Double)El; } @@ -616,6 +612,21 @@ void AntennaBossImpl::getAllOffsets(CORBA::Double_out azOff,CORBA::Double_out el azOff=(CORBA::Double)az; elOff=(CORBA::Double)el; raOff=(CORBA::Double)ra; decOff=(CORBA::Double)dec; lonOff=(CORBA::Double)lon; latOff=(CORBA::Double)lat; } +void AntennaBossImpl::getScanOffsets(CORBA::Double_out lonOff,CORBA::Double_out latOff, + Antenna::TCoordinateFrame_out frameOff) throw (CORBA::SystemException) +{ + double lon,lat; + Antenna::TCoordinateFrame frame; + if (!m_core) { + lonOff=latOff=0.0; + frameOff=Antenna::ANT_HORIZONTAL; + return; + } + CSecAreaResourceWrapper resource=m_core->Get("IMPL:getScanOffsets"); + resource->getScanOffsets(lon,lat,frame); + lonOff=(CORBA::Double)lon; latOff=(CORBA::Double)lat; frameOff=frame; +} + void AntennaBossImpl::getScanAxis (Management::TScanAxis_out axis) throw (CORBA::SystemException) { if (!m_core) { diff --git a/Common/Servers/AntennaBoss/src/BossCore.cpp b/Common/Servers/AntennaBoss/src/BossCore.cpp index 476b0484dcadd9c560a5d096b41502e97f648d9a..f5694844af5c8315c22d82e8084949dabca1da9c 100644 --- a/Common/Servers/AntennaBoss/src/BossCore.cpp +++ b/Common/Servers/AntennaBoss/src/BossCore.cpp @@ -659,6 +659,13 @@ void CBossCore::setOffsets(const double& lonOff,const double& latOff,const Anten addOffsets(m_longitudeOffset,m_latitudeOffset,m_offsetFrame,m_userOffset,m_scanOffset); } +void CBossCore::getScanOffsets(double& lonOff,double& latOff,Antenna::TCoordinateFrame& frame) +{ + lonOff=m_scanOffset.lon; + latOff=m_scanOffset.lat; + frame=m_scanOffset.frame; +} + void CBossCore::getAllOffsets(double& azOff,double& elOff,double& raOff,double& decOff,double& lonOff,double& latOff) const { if (m_offsetFrame==Antenna::ANT_HORIZONTAL) { @@ -1023,7 +1030,7 @@ bool CBossCore::updateAttributes() throw (ComponentErrors::CORBAProblemExImpl,Co loadPointingModel(m_pointingModel); // throw ComponentErrors::CouldntGetComponentExImpl // get Offset from refraction; try { - m_refraction->getCorrection(DPI/2.0-el,m_waveLength,m_refractionOffset); + m_refraction->getCorrection(DPIBY2-el,m_waveLength,m_refractionOffset); } catch (AntennaErrors::AntennaErrorsEx& ex) { _ADD_BACKTRACE(ComponentErrors::CouldntCallOperationExImpl,impl,ex,"CBossCore::updateAttributes()"); @@ -1249,7 +1256,7 @@ void CBossCore::loadTrackingPoint(const TIMEVALUE& time,bool restart) throw (Com refOff=0.0; try { if (el>0.0) { - m_refraction->getCorrection(DPI/2.0-el,m_waveLength,refOff); + m_refraction->getCorrection(DPIBY2-el,m_waveLength,refOff); } } catch (AntennaErrors::AntennaErrorsEx& ex) { diff --git a/Common/Servers/CustomLogger/src/CustomLoggerImpl.cpp b/Common/Servers/CustomLogger/src/CustomLoggerImpl.cpp index 9aef735f4b874580c0bf8ba64f77b070c4e6d3b5..d983f289c43f396a365884c7641936021417c295 100644 --- a/Common/Servers/CustomLogger/src/CustomLoggerImpl.cpp +++ b/Common/Servers/CustomLogger/src/CustomLoggerImpl.cpp @@ -455,8 +455,8 @@ CustomLoggerImpl::filter(LogRecord& log_record) { if(log_record.process_name == CUSTOM_PYTHON_LOGGING_PROCESS){ //if the log record has been produced by IRAPy logger filtered = true; - }else if(!log_record.kwargs.empty()) - { + } + else if(!log_record.kwargs.empty()) { result = log_record.get_data(std::string(CUSTOM_LOGGING_DATA_NAME)); if(result == CUSTOM_LOGGING_DATA_VALUE) //if the log record has been produced by C++ IRA Log MACROS filtered = true; @@ -501,8 +501,8 @@ CustomLoggerImpl::handle(LogRecord_sp log_record) //Write the log record to syslog file _full_log << log_record->xml_text << '\n'; _full_log.flush(); - if(filter(*log_record)) - { + + if(filter(*log_record)) { //publish the log record to the notification channel Management::TCustomLoggingData loggingData={log_record->timestamp, log_record->log_level, @@ -664,24 +664,29 @@ void CustomStructuredPushConsumer::push_structured_event (const CosNotification: Logging::XmlLogRecordSeq *reclist; notification.remainder_of_body >>= reclist; LogRecord_sp lr; - try{ - if(xmlLog) - { + try { + if(xmlLog) { //parse the xml to a LogRecord lr = get_log_record(logger_->log_parser, xmlLog); //handle the log record and the xml logger_->handle(lr); } - else if (reclist) + else if (reclist) { for(unsigned int i = 0; i < reclist->length(); i++) { xmlLog = (*reclist)[i].xml; lr = get_log_record(logger_->log_parser, xmlLog); logger_->handle(lr); } - }catch(const MalformedXMLError& mxe){ + } + } + catch(const MalformedXMLError& mxe){ logger_->handle_xml_error(); } + catch (...) { + ACS_LOG(LM_FULL_INFO,"CustomStructuredPushConsumer::push_structured_event",(LM_ERROR, + "Error in event logging and handling routine")); + } }; /* diff --git a/Common/Servers/CustomLogger/src/expat_log_parsing.cpp b/Common/Servers/CustomLogger/src/expat_log_parsing.cpp index 63811cb0b6518c3d773d3d4a9a3dd1799d75383d..5fea644181a13326a372dc42ba27aed244f5f260 100644 --- a/Common/Servers/CustomLogger/src/expat_log_parsing.cpp +++ b/Common/Servers/CustomLogger/src/expat_log_parsing.cpp @@ -21,12 +21,12 @@ LogRecord::add_data(std::string k, std::string v) std::string LogRecord::get_data(std::string key) { - KVMap::iterator finder; - finder = kwargs.find(key); - if(finder != kwargs.end()) - return finder->second; - else - return NULL; + KVMap::iterator finder; + finder = kwargs.find(key); + if(finder != kwargs.end()) + return finder->second; + else + return ""; }; std::string diff --git a/Common/Servers/FitsWriter/include/MetaData.h b/Common/Servers/FitsWriter/include/MetaData.h index e3666a40f183792e4b822d4dc8479f21a9f2decc..790990d2d0e1a86c79dc385abbff517a12457526 100644 --- a/Common/Servers/FitsWriter/include/MetaData.h +++ b/Common/Servers/FitsWriter/include/MetaData.h @@ -167,6 +167,13 @@ public: m_azOff=azOff; m_elOff=elOff; m_raOff=raOff; m_decOff=decOff; m_lonOff=lonOff; m_latOff=latOff; } + /** + * It allows to set the antenna scan offsets as directly returned by the Antenna subsystem + */ + void setAntennaScanOffsets(const double& lon,const double& lat, const Antenna::TCoordinateFrame& frame) { + m_lonScanOff=lon;m_latScanOff=lat;m_frameScanOff=frame; + } + /** * @return the antenna position offsets */ @@ -174,6 +181,13 @@ public: azOff=m_azOff; elOff=m_elOff; raOff=m_raOff; decOff=m_decOff; lonOff=m_lonOff; latOff=m_latOff; } + /** + * @return the antenna scan offsets + */ + void getAntennaScanOffsets(double& lon,double& lat,Antenna::TCoordinateFrame& frame) { + lon=m_lonScanOff;lat=m_latScanOff;frame=m_frameScanOff; + } + /** * Stores the list of values corresponding to the estimated source flux of the source, * @param fl list of fluxes, one value is given corresponding to each input, but just one for each section is taken @@ -300,6 +314,8 @@ private: * antenna position offsets */ double m_azOff,m_elOff,m_raOff,m_decOff,m_lonOff,m_latOff; + double m_lonScanOff,m_latScanOff; + Antenna::TCoordinateFrame m_frameScanOff; /** * stores the estimated source fluxes, one for each section. */ diff --git a/Common/Servers/FitsWriter/include/Version.h b/Common/Servers/FitsWriter/include/Version.h index 6e02498ddf37191490406c086c8a9df8e759621a..fd296ae84eeb528f512708abbcbdc29f61df96e6 100644 --- a/Common/Servers/FitsWriter/include/Version.h +++ b/Common/Servers/FitsWriter/include/Version.h @@ -21,8 +21,11 @@ #define FITS_VERSION9 "V.1.11" #define FITS_VERSION10 "V.1.12" #define FITS_VERSION11 "V.1.2" +#define FITS_VERSION12 "V.1.21" -#define CURRENT_VERSION FITS_VERSION10 + + +#define CURRENT_VERSION FITS_VERSION12 #define DEFAULT_COMMENT CURRENT_VERSION" Created by S. Righini, M. Bartolini & A. Orlati" @@ -37,5 +40,27 @@ #define HISTORY9 FITS_VERSION9" Added the keyword SIGNAL in main header of each sub scan fits" #define HISTORY10 FITS_VERSION10" Summary.fits has now a number of meaningful keywords" #define HISTORY11 FITS_VERSION11" Frequency and bandwidth columns added to Section table reporting backend sampled band" +#define HISTORY12 FITS_VERSION12" SubScan offsets added to the primary header" + +#define CREDITS1 " " +#define CREDITS2 "These data are property of:" +#define CREDITS3 " " +#define CREDITS4 "Istituto Nazionale di Astrofisica-INAF" +#define CREDITS5 "National Institute for Astrophysics-INAF" +#define CREDITS6 "via del Parco Mellini 84" +#define CREDITS7 "00136 Roma (ITALY)" +#define CREDITS8 " " +#define CREDITS9 "Permission is granted for publication and reproduction of this" +#define CREDITS10 "material for scholarly, educational, and private non-commercial" +#define CREDITS11 "use. Inquiries for potential commercial uses should be sent to" +#define CREDITS12 "the address above." +#define CREDITS13 " " +#define CREDITS14 "--------------------------------------------------------------" +#define CREDITS15 " " +#define CREDITS16 "These data can be retrieved from the site" +#define CREDITS17 "http://............" +#define CREDITS18 "under the usage rules reported at that site." + + #endif /* VERSION_H_ */ diff --git a/Common/Servers/FitsWriter/src/EngineThread.cpp b/Common/Servers/FitsWriter/src/EngineThread.cpp index a8cc028034af40712887661cae2a3da97fcf9fe6..ee72e4fea8bedfac53b24cdf37d741b1f6193616 100644 --- a/Common/Servers/FitsWriter/src/EngineThread.cpp +++ b/Common/Servers/FitsWriter/src/EngineThread.cpp @@ -566,6 +566,8 @@ void CEngineThread::runLoop() IRA::CString sourceName; double sourceRa,sourceDec,sourceVlsr; double azOff,elOff,raOff,decOff,lonOff,latOff; + double lonScanOff,latScanOff; + Antenna::TCoordinateFrame frameScanOff; double dut1; long scanTag; long scanID,subScanID; @@ -596,6 +598,7 @@ void CEngineThread::runLoop() m_info.getReceiverPolarization(polarizations); m_info.getSource(sourceName,sourceRa,sourceDec,sourceVlsr); m_info.getAntennaOffsets(azOff,elOff,raOff,decOff,lonOff,latOff); + m_info.getAntennaScanOffsets(lonScanOff,latScanOff,frameScanOff); scanTag=m_data->getScanTag(); scanID=m_data->getScanID(); subScanID=m_data->getSubScanID(); @@ -748,6 +751,27 @@ void CEngineThread::runLoop() impl.log(LM_ERROR); // not filtered, because the user need to know about the problem immediately m_data->setStatus(Management::MNG_FAILURE); } + else if(!m_file->setPrimaryHeaderKey("SubScan LatOffset",latScanOff,"SubScan Latitude Offset")) { + _EXCPT(ManagementErrors::FitsCreationErrorExImpl,impl,"CEngineThread::runLoop()"); + impl.setFileName((const char *)m_data->getFileName()); + impl.setError(m_file->getLastError()); + impl.log(LM_ERROR); // not filtered, because the user need to know about the problem immediately + m_data->setStatus(Management::MNG_FAILURE); + } + else if(!m_file->setPrimaryHeaderKey("SubScan LonOffset",lonScanOff,"SubScan Longitude Offset")) { + _EXCPT(ManagementErrors::FitsCreationErrorExImpl,impl,"CEngineThread::runLoop()"); + impl.setFileName((const char *)m_data->getFileName()); + impl.setError(m_file->getLastError()); + impl.log(LM_ERROR); // not filtered, because the user need to know about the problem immediately + m_data->setStatus(Management::MNG_FAILURE); + } + else if(!m_file->setPrimaryHeaderKey("SubScan OffsetFrame",Antenna::Definitions::map(frameScanOff),"SubScan Offset frame")) { + _EXCPT(ManagementErrors::FitsCreationErrorExImpl,impl,"CEngineThread::runLoop()"); + impl.setFileName((const char *)m_data->getFileName()); + impl.setError(m_file->getLastError()); + impl.log(LM_ERROR); // not filtered, because the user need to know about the problem immediately + m_data->setStatus(Management::MNG_FAILURE); + } else if(!m_file->setPrimaryHeaderKey("ScanID",scanID,"Scan Identifier")) { _EXCPT(ManagementErrors::FitsCreationErrorExImpl,impl,"CEngineThread::runLoop()"); impl.setFileName((const char *)m_data->getFileName()); @@ -978,9 +1002,24 @@ void CEngineThread::collectAntennaData(FitsWriter_private::CFile* summaryFile) ACSErr::Completion_var comp; CORBA::Double ra=0.0,dec=0.0,vrad=0.0; CORBA::Double raOff=0.0,decOff=0.0,azOff=0.0,elOff=0.0,lonOff=0.0,latOff=0.0; + CORBA::Double scanLonOff=0.0,scanLatOff=0.0; IRA::CString sourceName=""; Antenna::TReferenceFrame VFrame=Antenna::ANT_UNDEF_FRAME; Antenna::TVradDefinition VDefinition=Antenna::ANT_UNDEF_DEF; + Antenna::TCoordinateFrame scanFrameOff=Antenna::ANT_HORIZONTAL; + + try { + m_antennaBoss->getScanOffsets(scanLonOff,scanLatOff,scanFrameOff); + } + catch (CORBA::SystemException& ex) { + _EXCPT(ComponentErrors::CORBAProblemExImpl,impl,"CEngineThread::collectAntennaData()"); + impl.setName(ex._name()); + impl.setMinor(ex.minor()); + impl.log(LM_ERROR); + m_data->setStatus(Management::MNG_WARNING); + antennaBossError=true; + } + m_info.setAntennaScanOffsets(scanLonOff,scanLatOff,scanFrameOff); try { //get the target name and parameters ACS::ROstring_var targetRef; diff --git a/Common/Servers/FitsWriter/src/FitsWriter.cpp b/Common/Servers/FitsWriter/src/FitsWriter.cpp index cd80c5a2f97db848c73576cb06d3538ce7814dd8..0623ce4802dc3a8f8acb8ff791710e50649506fc 100644 --- a/Common/Servers/FitsWriter/src/FitsWriter.cpp +++ b/Common/Servers/FitsWriter/src/FitsWriter.cpp @@ -232,7 +232,27 @@ bool CFitsWriter::create() if (!CFitsTools::primaryHeaderHistory(pFits,HISTORY8,m_lastError)) return false; if (!CFitsTools::primaryHeaderHistory(pFits,HISTORY9,m_lastError)) return false; if (!CFitsTools::primaryHeaderHistory(pFits,HISTORY10,m_lastError)) return false; - if (!CFitsTools::primaryHeaderHistory(pFits,HISTORY11,m_lastError)) return false; + if (!CFitsTools::primaryHeaderHistory(pFits,HISTORY11,m_lastError)) return false; + if (!CFitsTools::primaryHeaderHistory(pFits,HISTORY12,m_lastError)) return false; + + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS1,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS2,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS3,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS4,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS5,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS6,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS7,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS8,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS9,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS10,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS11,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS12,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS13,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS14,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS15,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS16,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS17,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(pFits,CREDITS18,m_lastError)) return false; return true; }; diff --git a/Common/Servers/FitsWriter/src/MetaData.cpp b/Common/Servers/FitsWriter/src/MetaData.cpp index 189edd856cb7118fae3a7118a17ac90a3015fd62..f1e879ab21d79a4e5779e2f3256f133c3fff2555 100644 --- a/Common/Servers/FitsWriter/src/MetaData.cpp +++ b/Common/Servers/FitsWriter/src/MetaData.cpp @@ -26,6 +26,8 @@ CMetaData::CMetaData() m_servoAxisNames.length(0); m_restFreq.length(0); m_azOff=m_elOff=m_raOff=m_decOff=m_lonOff=m_latOff=0.0; + m_lonScanOff=m_latScanOff=0.0; + m_frameScanOff=Antenna::ANT_HORIZONTAL; m_subScanConf.signal=Management::MNG_SIGNAL_NONE; m_calDiode=false; } diff --git a/Common/Servers/FitsWriter/src/SummaryWriter.cpp b/Common/Servers/FitsWriter/src/SummaryWriter.cpp index 6dd525b44a3f69795f61a2155167fb33443c2ec1..40cdaf190cc6c8adbb998d31c0f06c97861c0bce 100644 --- a/Common/Servers/FitsWriter/src/SummaryWriter.cpp +++ b/Common/Servers/FitsWriter/src/SummaryWriter.cpp @@ -60,6 +60,28 @@ bool CSummaryWriter::create() if (!CFitsTools::primaryHeaderHistory(m_pFits,HISTORY8,m_lastError)) return false; if (!CFitsTools::primaryHeaderHistory(m_pFits,HISTORY9,m_lastError)) return false; if (!CFitsTools::primaryHeaderHistory(m_pFits,HISTORY10,m_lastError)) return false; + if (!CFitsTools::primaryHeaderHistory(m_pFits,HISTORY11,m_lastError)) return false; + + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS1,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS2,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS3,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS4,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS5,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS6,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS7,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS8,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS9,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS10,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS11,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS12,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS13,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS14,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS15,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS16,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS17,m_lastError)) return false; + if (!CFitsTools::primaryHeaderComment(m_pFits,CREDITS18,m_lastError)) return false; + + m_fitsWritten=false; return true; }; diff --git a/Common/Servers/MFKBandBaseReceiver/include/MFKBandBaseConf.h b/Common/Servers/MFKBandBaseReceiver/include/MFKBandBaseConf.h index 90763060a202937fd0688248d9e88091adf7b565..06a2bb210cd9ccabaecfb7c593e42181216b227b 100644 --- a/Common/Servers/MFKBandBaseReceiver/include/MFKBandBaseConf.h +++ b/Common/Servers/MFKBandBaseReceiver/include/MFKBandBaseConf.h @@ -22,6 +22,10 @@ #include #include "MFKBandBaseUtils.h" +// Temperature dummy value to use in case of Connection Error +#define CEDUMMY 100000 + + /** * This class implements the component configuration. The data inside this class are initialized at the startup from the * configuration database and then are used (read) inside the component. @@ -55,6 +59,12 @@ public: double relativePower; } TFeedValue; + typedef struct { + double temperature; + ACS::Time timestamp; + } BoardValue; + + /** * Default constructor */ diff --git a/Common/Servers/MFKBandBaseReceiver/include/MFKBandBaseCore.h b/Common/Servers/MFKBandBaseReceiver/include/MFKBandBaseCore.h index 3da354384d8298240ec40b5d6604fc54bab96fca..c60049b25c2cb686b3cf1077987026275068f86c 100644 --- a/Common/Servers/MFKBandBaseReceiver/include/MFKBandBaseCore.h +++ b/Common/Servers/MFKBandBaseReceiver/include/MFKBandBaseCore.h @@ -329,35 +329,35 @@ public: * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at cool head in °K */ - double getCryoCoolHead() const { return m_cryoCoolHead; } + CConfiguration::BoardValue getCryoCoolHead() const { return m_cryoCoolHead; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at cool head window in °K */ - double getCryoCoolHeadWin() const { return m_cryoCoolHeadWin; } + CConfiguration::BoardValue getCryoCoolHeadWin() const { return m_cryoCoolHeadWin; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at LNA in °K */ - double getCryoLNA() const { return m_cryoLNA; } + CConfiguration::BoardValue getCryoLNA() const { return m_cryoLNA; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at LNA window in °K */ - double getCryoLNAWin() const { return m_cryoLNAWin; } + CConfiguration::BoardValue getCryoLNAWin() const { return m_cryoLNAWin; } /** * This is getter method. No need to make it thread safe...... * @return the current vertex temperature in °K */ - double getVertexTemperature() const { return m_envTemperature; } + CConfiguration::BoardValue getVertexTemperature() const { return m_envTemperature; } /** @@ -547,12 +547,12 @@ protected: ACS::doubleSeq m_startFreq; ACS::doubleSeq m_bandwidth; IRA::CString m_setupMode; - double m_envTemperature; double m_vacuum; - double m_cryoCoolHead; - double m_cryoCoolHeadWin; - double m_cryoLNA; - double m_cryoLNAWin; + CConfiguration::BoardValue m_envTemperature; + CConfiguration::BoardValue m_cryoCoolHead; + CConfiguration::BoardValue m_cryoCoolHeadWin; + CConfiguration::BoardValue m_cryoLNA; + CConfiguration::BoardValue m_cryoLNAWin; double m_vacuumDefault; bool m_calDiode; diff --git a/Common/Servers/MFKBandBaseReceiver/src/MFKBandBaseCore.cpp b/Common/Servers/MFKBandBaseReceiver/src/MFKBandBaseCore.cpp index 365be3eb5aa967d81e16f9bffa3b3ac2a7a6beaf..e6ce2e58fd30f9954bb0ae37a6643f9ea3c5be83 100644 --- a/Common/Servers/MFKBandBaseReceiver/src/MFKBandBaseCore.cpp +++ b/Common/Servers/MFKBandBaseReceiver/src/MFKBandBaseCore.cpp @@ -22,8 +22,12 @@ void CComponentCore::initialize(maci::ContainerServices* services) m_control=NULL; m_localOscillatorDevice=Receivers::LocalOscillator::_nil(); m_localOscillatorFault=false; - m_cryoCoolHead=m_cryoCoolHeadWin= m_cryoLNA=m_cryoLNAWin=m_vacuum=0.0; - m_envTemperature=20.0; + m_cryoCoolHeadWin.temperature = 0.0; + m_cryoLNA.temperature = 0.0; + m_cryoLNAWin.temperature = 0.0; + m_cryoCoolHead.temperature = 0.0; + m_envTemperature.temperature = 20.0; + m_vacuum=0.0; m_fetValues.VDL=m_fetValues.IDL=m_fetValues.VGL=m_fetValues.VDR=m_fetValues.IDR=m_fetValues.VGR=0.0; m_statusWord=0; m_ioMarkError = false; @@ -166,9 +170,27 @@ void CComponentCore::activate() throw ( m_calDiode=false; guard.release(); - lnaOn(); // Throw (ReceiversErrors::NoRemoteControlErrorExImpl,ReceiversErrors::ReceiverControlBoardErrorExImpl) + lnaOn(); // Throw (ReceiversErrors::NoRemoteControlErrorExImpl,ReceiversErrors::ReceiverControlBoardErrorExImpl) externalCalOff(); - + + bool answer; + try { + answer=m_control->isRemoteOn(); + } + catch (IRA::ReceiverControlEx& ex) { + _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::activate()"); + impl.setDetails(ex.what().c_str()); + setStatusBit(CONNECTIONERROR); + throw impl; + } + if (answer) { + _IRA_LOGFILTER_LOG(LM_NOTICE, "CComponentCore::activate()", "RECEIVER_COMMUNICATION_MODE_REMOTE"); + clearStatusBit(LOCAL); + } + else { + _IRA_LOGFILTER_LOG(LM_NOTICE, "CComponentCore::activate()", "RECEIVER_COMMUNICATION_MODE_LOCAL"); + setStatusBit(LOCAL); + } } @@ -184,10 +206,10 @@ void CComponentCore::externalCalOn() throw ( throw impl; } guard.release(); - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::externalCalOn()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::externalCalOn()"); + // throw impl; + // } try { m_control->setExtCalibrationOn(); } @@ -223,10 +245,10 @@ void CComponentCore::externalCalOff() throw ( throw impl; } guard.release(); - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::externalCalOff()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::externalCalOff()"); + // throw impl; + // } try { m_control->setExtCalibrationOff(); } @@ -273,10 +295,10 @@ void CComponentCore::calOn() throw ( throw impl; } // guard.release(); - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::calOn()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::calOn()"); + // throw impl; + // } try { m_control->setCalibrationOn(); m_calDiode=true; @@ -313,10 +335,10 @@ void CComponentCore::calOff() throw ( throw impl; } // guard.release(); - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::calOff()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::calOff()"); + // throw impl; + // } try { m_control->setCalibrationOff(); m_calDiode=false; @@ -389,10 +411,10 @@ void CComponentCore::lnaOff() throw ( ReceiversErrors::ReceiverControlBoardErrorExImpl ) { - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::lnaOff()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::lnaOff()"); + // throw impl; + // } try { m_control-> turnRightLNAsOff(); m_control-> turnLeftLNAsOff(); @@ -412,10 +434,10 @@ void CComponentCore::lnaOn() throw ( ReceiversErrors::ReceiverControlBoardErrorExImpl ) { - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::lnaOn()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::lnaOn()"); + // throw impl; + // } try { m_control-> turnRightLNAsOn(); m_control-> turnLeftLNAsOn(); @@ -830,10 +852,10 @@ void CComponentCore::updateComponent() { baci::ThreadSyncGuard guard(&m_mutex); m_componentStatus=Management::MNG_OK; - if (checkStatusBit(LOCAL)) { - setComponentStatus(Management::MNG_FAILURE); - _IRA_LOGFILTER_LOG(LM_CRITICAL,"CComponentCore::updateComponent()","RECEVER_NOT_REMOTELY_CONTROLLABLE"); - } + // if (checkStatusBit(LOCAL)) { + // setComponentStatus(Management::MNG_FAILURE); + // _IRA_LOGFILTER_LOG(LM_CRITICAL,"CComponentCore::updateComponent()","RECEIVER_NOT_REMOTELY_CONTROLLABLE"); + // } if (checkStatusBit(VACUUMPUMPFAULT)) { setComponentStatus(Management::MNG_WARNING); _IRA_LOGFILTER_LOG(LM_WARNING,"CComponentCore::updateComponent()","VACUUM_PUMP_FAILURE"); @@ -981,6 +1003,22 @@ void CComponentCore::updateIsRemote() throw (ReceiversErrors::ReceiverControlBoa setStatusBit(CONNECTIONERROR); throw impl; } + + if (checkStatusBit(LOCAL) && answer) { + _IRA_LOGFILTER_LOG( + LM_NOTICE, + "CComponentCore::updateIsRemote()", + "RECEIVER_SWITCHED_FROM_LOCAL_TO_REMOTE" + ); + } + else if (!checkStatusBit(LOCAL) && !answer) { + _IRA_LOGFILTER_LOG( + LM_NOTICE, + "CComponentCore::updateIsRemote()", + "RECEIVER_SWITCHED_FROM_REMOTE_TO_LOCAL" + ); + } + if (!answer) setStatusBit(LOCAL); else clearStatusBit(LOCAL); clearStatusBit(CONNECTIONERROR); // the communication was ok so clear the CONNECTIONERROR bit @@ -1027,9 +1065,11 @@ void CComponentCore::updateCryoCoolHead() throw (ReceiversErrors::ReceiverContro { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoCoolHead=m_control->cryoTemperature(0,voltage2Kelvin); + m_cryoCoolHead.temperature = m_control->cryoTemperature(0,voltage2Kelvin); + m_cryoCoolHead.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoCoolHead.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoCoolHead()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -1043,9 +1083,11 @@ void CComponentCore::updateCryoCoolHeadWin() throw (ReceiversErrors::ReceiverCon { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoCoolHeadWin=m_control->cryoTemperature(1,voltage2Kelvin); + m_cryoCoolHeadWin.temperature = m_control->cryoTemperature(1,voltage2Kelvin); + m_cryoCoolHeadWin.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoCoolHeadWin.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoCoolHeadWin()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -1059,9 +1101,11 @@ void CComponentCore::updateCryoLNA() throw (ReceiversErrors::ReceiverControlBoar { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoLNA=m_control->cryoTemperature(3,voltage2Kelvin); + m_cryoLNA.temperature = m_control->cryoTemperature(3,voltage2Kelvin); + m_cryoLNA.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoLNA.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoLNA()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -1075,9 +1119,11 @@ void CComponentCore::updateCryoLNAWin() throw (ReceiversErrors::ReceiverControlB { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoLNAWin=m_control->cryoTemperature(4,voltage2Kelvin); + m_cryoLNAWin.temperature = m_control->cryoTemperature(4,voltage2Kelvin); + m_cryoLNAWin.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoLNAWin.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoLNAWin()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -1091,9 +1137,11 @@ void CComponentCore::updateVertexTemperature() throw (ReceiversErrors::ReceiverC { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_envTemperature =m_control->vertexTemperature(voltage2Celsius); + m_envTemperature.temperature = m_control->vertexTemperature(voltage2Celsius); + m_envTemperature.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_envTemperature.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateVertexTemperature()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); diff --git a/Common/Servers/ReceiversBoss/include/RecvBossCore.h b/Common/Servers/ReceiversBoss/include/RecvBossCore.h index f1336b99a64b6a20f87f62a99ae1a743c9001ff1..12b843be4dc4a1403e16f923c9bf8f02dfe9dc00 100644 --- a/Common/Servers/ReceiversBoss/include/RecvBossCore.h +++ b/Common/Servers/ReceiversBoss/include/RecvBossCore.h @@ -426,8 +426,8 @@ private: #ifdef COMPILE_TARGET_MED void setup(const char * code) throw(ComponentErrors::SocketErrorExImpl,ComponentErrors::ValidationErrorExImpl); - bool sendToRecvControl(const void *buffer,unsigned size); - bool sendToFS(const void *buffer,unsigned size); + bool sendToRecvControl(const void *buffer,int size); + bool sendToFS(const void *buffer,int size); #elif COMPILE_TARGET_NT void setup(const char * code) throw(ComponentErrors::SocketErrorExImpl,ComponentErrors::ValidationErrorExImpl); diff --git a/Common/Servers/ReceiversBoss/src/RecvBossCore_mc.i b/Common/Servers/ReceiversBoss/src/RecvBossCore_mc.i index 9222e17f0ef13af4f91e777a7e47e1c1367a6a6c..7d35b629b2d9e663f7eecd54769d6363023bb934 100644 --- a/Common/Servers/ReceiversBoss/src/RecvBossCore_mc.i +++ b/Common/Servers/ReceiversBoss/src/RecvBossCore_mc.i @@ -1,10 +1,10 @@ //#define RB_DEBUG -#define RECV_ADDRESS "192.167.189.2" +#define RECV_ADDRESS "192.168.51.2" #define RECV_PORT 2096 -#define FS_ADDRESS "192.167.189.62" +#define FS_ADDRESS "192.168.51.14" #define FS_PORT 5002 -#define SXKL_ADDRESS "192.167.189.2" +#define SXKL_ADDRESS "192.168.51.2" #define SXKL_PORT 9876 @@ -109,7 +109,7 @@ void CRecvBossCore::calOn() throw (ComponentErrors::ValidationErrorExImpl,Compon } else if (m_currentRecvCode=="XXP") { // turn the marca on through the FS - IRA::CString fsBuffer("sxkl=*,on\n"); + IRA::CString fsBuffer("calon\n"); if (!sendToFS((const void *)fsBuffer,fsBuffer.GetLength())) { _EXCPT(ComponentErrors::SocketErrorExImpl,impl,"CRecvBossCore::calOn()"); m_status=Management::MNG_FAILURE; @@ -173,7 +173,7 @@ void CRecvBossCore::calOff() throw (ComponentErrors::ValidationErrorExImpl,Compo } else if (m_currentRecvCode=="XXP") { // turn the marca on through thr FS - IRA::CString fsBuffer("sxkl=*,off\n"); + IRA::CString fsBuffer("caloff\n"); if (!sendToFS((const void *)fsBuffer,fsBuffer.GetLength())) { _EXCPT(ComponentErrors::SocketErrorExImpl,impl,"CRecvBossCore::calOff()"); m_status=Management::MNG_FAILURE; @@ -334,6 +334,13 @@ void CRecvBossCore::setup(const char * code) throw (ComponentErrors::SocketError m_currentRecvError=true; throw impl; } + // now set the subreflector configuration through the FS + IRA::CString fsBuffer("scu=kkc\n"); + if (!sendToFS((const void *)fsBuffer,fsBuffer.GetLength())) { + _EXCPT(ComponentErrors::SocketErrorExImpl,impl,"CRecvBossCore::setup()"); + m_status=Management::MNG_FAILURE; + throw impl; + } changeBossStatus(Management::MNG_OK); m_currentRecvCode="KKC"; @@ -1334,32 +1341,35 @@ void CRecvBossCore::publishData() throw (ComponentErrors::NotificationChannelErr } } -bool CRecvBossCore::sendToRecvControl(const void *buffer,unsigned size) +bool CRecvBossCore::sendToRecvControl(const void *buffer,int size) { IRA::CSocket sock; IRA::CError err; char readout[128]; IRA::CString recvIpAddr(RECV_ADDRESS); DWORD recvPort=RECV_PORT; + int count; try { if (sock.Create(err,IRA::CSocket::STREAM)!=IRA::CSocket::SUCCESS) { return false; } - if (sock.setSockMode(err,IRA::CSocket::NONBLOCKING)==IRA::CSocket::FAIL) { + /*if (sock.setSockMode(err,IRA::CSocket::NONBLOCKING)==IRA::CSocket::FAIL) { return false; - } + }*/ if (sock.Connect(err,recvIpAddr,recvPort)==IRA::CSocket::FAIL) { return false; } if (sock.Send(err,buffer,size)!=(int)size) { return false; } - if (sock.Receive(err,(void *)readout,128)==IRA::CSocket::FAIL) { + count=sock.Receive(err,(void *)readout,128); + if (count==IRA::CSocket::FAIL) { return false; } + readout[count]=0; if (strcmp(readout,"ACK\n")!=0) { return false; - } + } sock.Close(err); } catch (...) { @@ -1368,7 +1378,7 @@ bool CRecvBossCore::sendToRecvControl(const void *buffer,unsigned size) return true; } -bool CRecvBossCore::sendToFS(const void *buffer,unsigned size) +bool CRecvBossCore::sendToFS(const void *buffer,int size) { IRA::CSocket sock; IRA::CError err; diff --git a/Common/Servers/Refraction/src/RefractionCore.cpp b/Common/Servers/Refraction/src/RefractionCore.cpp index 473fd107dd4401ef248a8f3ce09fb06875e714b2..6622cb455f40cb20880a3a93a44a4a135fb499bc 100644 --- a/Common/Servers/Refraction/src/RefractionCore.cpp +++ b/Common/Servers/Refraction/src/RefractionCore.cpp @@ -118,11 +118,9 @@ void CRefractionCore::cleanUp() void CRefractionCore::getCorrection(double obsZenithDistance,double waveLen, double &corZenithDistance) { AUTO_TRACE("CRefractionCore::getCorrection()"); - //double elevation; + double correction = 0.0; baci::ThreadSyncGuard guardParametes(&m_parametersMutex); - //elevation = 90.0 - obsZenithDistance*DR2D; - //if (elevation >= 0.0 && elevation <= 90.0) { - if ((obsZenithDistance>=0.0) && (obsZenithDistance<=(DPI/2.0))) { + if (obsZenithDistance>=0.0 && obsZenithDistancegetConfiguration()); } catch (...) { @@ -165,7 +183,7 @@ void CCommandLine::Init(CConfiguration *config) throw (ComponentErrors::SocketEr } //Waits a bit so that everything can settle down - IRA::CIRATools::Wait(0,200000); + IRA::CIRATools::Wait(0,200000);*/ } void CCommandLine::stopDataAcquisition() throw (BackendsErrors::ConnectionExImpl,BackendsErrors::NakExImpl, @@ -437,6 +455,7 @@ void CCommandLine::setConfiguration(const long& inputId,const double& freq,const else newBins = m_bins[inputId]; + if (m_stationSRT == true) { try { Message request = Command::setSection(inputId, newFreq, newBW, newFeed, newPol, newSR, newBins); Message reply = sendBackendCommand(request); @@ -444,7 +463,7 @@ void CCommandLine::setConfiguration(const long& inputId,const double& freq,const for (int j=0;jsetSection(2*inputId,-1, filter, -1, -1, -1, -1); m_totalPower->setSection(2*inputId+1,-1, filter, -1, -1, -1, -1); } + else if (m_SK01S==true) { + if (inputId == 0) { + m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); + m_totalPower->setSection(inputId+1,-1, filter, -1, -1, -1, -1); + } + if (inputId == 1) { + m_totalPower->setSection(inputId+1,-1, filter, -1, -1, -1, -1); + m_totalPower->setSection(inputId+2,-1, filter, -1, -1, -1, -1); + } + } + else if (m_SK02S==true) { + if (inputId == 0) { + m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); + m_totalPower->setSection(inputId+1,-1, filter, -1, -1, -1, -1); + } + if (inputId == 1) { + m_totalPower->setSection(inputId+3,-1, filter, -1, -1, -1, -1); + m_totalPower->setSection(inputId+4,-1, filter, -1, -1, -1, -1); + } + } else if (m_SK03S==true) { if (inputId == 0) { m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); @@ -488,6 +528,26 @@ void CCommandLine::setConfiguration(const long& inputId,const double& freq,const m_totalPower->setSection(inputId+6,-1, filter, -1, -1, -1, -1); } } + else if (m_SK04S==true) { + if (inputId == 0) { + m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); + m_totalPower->setSection(inputId+1,-1, filter, -1, -1, -1, -1); + } + if (inputId == 1) { + m_totalPower->setSection(inputId+7,-1, filter, -1, -1, -1, -1); + m_totalPower->setSection(inputId+8,-1, filter, -1, -1, -1, -1); + } + } + else if (m_SK05S==true) { + if (inputId == 0) { + m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); + m_totalPower->setSection(inputId+1,-1, filter, -1, -1, -1, -1); + } + if (inputId == 1) { + m_totalPower->setSection(inputId+9,-1, filter, -1, -1, -1, -1); + m_totalPower->setSection(inputId+10,-1, filter, -1, -1, -1, -1); + } + } else if (m_SK06S==true) { if (inputId == 0) { m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); @@ -498,6 +558,22 @@ void CCommandLine::setConfiguration(const long& inputId,const double& freq,const m_totalPower->setSection(inputId+12,-1, filter, -1, -1, -1, -1); } } + else if (m_SK01==true) { + if (inputId == 0 || inputId == 1) { + m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); + } + if (inputId == 2 || inputId == 3) { + m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); + } + } + else if (m_SK02==true) { + if (inputId == 0 || inputId == 1) { + m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); + } + if (inputId == 2 || inputId == 3) { + m_totalPower->setSection(inputId+2,-1, filter, -1, -1, -1, -1); + } + } else if (m_SK03==true) { if (inputId == 0 || inputId == 1) { m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); @@ -506,6 +582,22 @@ void CCommandLine::setConfiguration(const long& inputId,const double& freq,const m_totalPower->setSection(inputId+4,-1, filter, -1, -1, -1, -1); } } + else if (m_SK04==true) { + if (inputId == 0 || inputId == 1) { + m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); + } + if (inputId == 2 || inputId == 3) { + m_totalPower->setSection(inputId+6,-1, filter, -1, -1, -1, -1); + } + } + else if (m_SK01==true) { + if (inputId == 0 || inputId == 1) { + m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); + } + if (inputId == 2 || inputId == 3) { + m_totalPower->setSection(inputId+8,-1, filter, -1, -1, -1, -1); + } + } else if (m_SK06==true) { if (inputId == 0 || inputId == 1) { m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); @@ -548,6 +640,78 @@ void CCommandLine::setConfiguration(const long& inputId,const double& freq,const catch (...) { ACS_LOG(LM_FULL_INFO,"CCommandLine::setSection()",(LM_NOTICE,"BACKEND_SARDARA_SET_SECTION ERROR")); } + } + if (m_stationMED == true) { + try { + Message request = Command::setSection(inputId, newFreq, newBW, newFeed, newPol, newSR, newBins); + Message reply = sendBackendCommand(request); + if (reply.is_success_reply()) { + for (int j=0;jsetSection(2*inputId,-1, filter, -1, -1, -1, -1); + m_totalPower->setSection(2*inputId+1,-1, filter, -1, -1, -1, -1); + } + else if (m_SK01S==true) { + if (inputId == 0) { + m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); + m_totalPower->setSection(inputId+1,-1, filter, -1, -1, -1, -1); + } + if (inputId == 1) { + m_totalPower->setSection(inputId+1,-1, filter, -1, -1, -1, -1); + m_totalPower->setSection(inputId+2,-1, filter, -1, -1, -1, -1); + } + } + else if (m_SK01==true) { + if (inputId == 0 || inputId == 1) { + m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); + } + if (inputId == 2 || inputId == 3) { + m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); + } + } + else + m_totalPower->setSection(inputId,-1, filter, -1, -1, -1, -1); + } + ACS_LOG(LM_FULL_INFO,"CCommandLine::setConfiguration()",(LM_NOTICE,"TOTALPOWER_FILTER_CONFIGURED %ld,FILTER=%lf",inputId,filter)); + } + } + } + catch (...) { + ACS_LOG(LM_FULL_INFO,"CCommandLine::setSection()",(LM_NOTICE,"BACKEND_SARDARA_SET_SECTION ERROR")); + } + } } void CCommandLine::getZeroTPI(DWORD *tpi) throw (ComponentErrors::TimeoutExImpl,BackendsErrors::ConnectionExImpl, @@ -738,41 +902,66 @@ void CCommandLine::setDefaultConfiguration(const IRA::CString & config) throw (C ComponentErrors::SocketErrorExImpl,BackendsErrors::NakExImpl,BackendsErrors::MalformedAnswerExImpl,BackendsErrors::ReplyNotValidExImpl,BackendsErrors::BackendFailExImpl) { AUTO_TRACE("CCommandLine::setDefaultConfiguration()"); + if (m_stationSRT==true) { if (config.Compare("SK77")==0) { m_filter=1250.0; m_inputsNumber=m_sectionsNumber; m_SK77=true; - m_SK00=m_SK03=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK03S=m_SK06S=m_SK00S=m_SC00S=m_SL00S=m_SP00S=false; + m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK05=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SK00S=m_SC00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SK00")==0) { + m_filter=1250.0; + m_inputsNumber=m_sectionsNumber; + m_SK00=true; + m_SK77=m_SK03=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK03S=m_SK06S=m_SK00S=m_SC00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SK01")==0) { + m_filter=1250.0; + m_inputsNumber=m_sectionsNumber; + m_SK01=true; + m_SK77=m_SK00=m_SK02=m_SK03=m_SK04=m_SK05=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK00S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SK02")==0) { + m_filter=1250.0; + m_inputsNumber=m_sectionsNumber; + m_SK02=true; + m_SK77=m_SK00=m_SK01=m_SK03=m_SK04=m_SK05=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK00S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; } if (config.Compare("SK03")==0) { m_filter=1250.0; m_inputsNumber=m_sectionsNumber; m_SK03=true; - m_SK77=m_SK06=m_SK00=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK03S=m_SK06S=m_SK00S=m_SC00S=m_SL00S=m_SP00S=false; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK04=m_SK05=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK00S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; } - if (config.Compare("SK06")==0) { + if (config.Compare("SK04")==0) { m_filter=1250.0; m_inputsNumber=m_sectionsNumber; - m_SK06=true; - m_SK77=m_SK03=m_SK00=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK03S=m_SK06S=m_SK00S=m_SC00S=m_SL00S=m_SP00S=false; + m_SK04=true; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK05=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK00S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; } - if (config.Compare("SK00")==0) { + if (config.Compare("SK05")==0) { m_filter=1250.0; m_inputsNumber=m_sectionsNumber; - m_SK00=true; - m_SK77=m_SK03=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK03S=m_SK06S=m_SK00S=m_SC00S=m_SL00S=m_SP00S=false; + m_SK05=true; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK00S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SK06")==0) { + m_filter=1250.0; + m_inputsNumber=m_sectionsNumber; + m_SK06=true; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK05=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK00S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; } if (config.Compare("SC00")==0) { m_filter=1250.0; m_inputsNumber=m_sectionsNumber; m_SC00=true; - m_SK77=m_SK03=m_SK06=m_SK00=m_SL00=m_SP00=m_SK77S=m_SK03S=m_SK06S=m_SK00S=m_SC00S=m_SL00S=m_SP00S=false; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK05=m_SK06=m_SL00=m_SP00=m_SK77S=m_SK00S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; } if (config.Compare("SL00")==0) { m_filter = 2300.0; m_inputsNumber=m_sectionsNumber; m_SL00=true; - m_SK77=m_SK03=m_SK06=m_SK00=m_SC00=m_SP00=m_SK77S=m_SK03S=m_SK06S=m_SK00S=m_SC00S=m_SL00S=m_SP00S=false; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK05=m_SK06=m_SC00=m_SP00=m_SK77S=m_SK00S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; /*if (m_stationSRT == true) { m_ifDistributor->setup("BW-UNFILTERED"); ACS_LOG(LM_FULL_INFO,"CCommandLine::setDefaultConfiguration()",(LM_NOTICE,"IFDISTRIBUTOR_BW-UNFILTERED_CONFIGURED")); @@ -782,49 +971,161 @@ void CCommandLine::setDefaultConfiguration(const IRA::CString & config) throw (C m_filter = 730.0; m_inputsNumber=m_sectionsNumber; m_SP00=true; - m_SK77=m_SK03=m_SK06=m_SK00=m_SC00=m_SL00=m_SK77S=m_SK03S=m_SK06S=m_SK00S=m_SC00S=m_SL00S=m_SP00S=false; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK05=m_SK06=m_SC00=m_SL00=m_SK77S=m_SK00S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; } if (config.Compare("SK77S")==0) { m_filter=1250.0; m_inputsNumber=m_sectionsNumber; m_sectionsNumber=m_sectionsNumber/2; m_SK77S=true; - m_SK77=m_SK03=m_SK06=m_SK00=m_SC00=m_SL00=m_SP00=m_SK03S=m_SK06S=m_SK00S=m_SC00S=m_SL00S=m_SP00S=false; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK05=m_SK06=m_SC00=m_SL00=m_SP00=m_SK00S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SK00S")==0) { + m_filter=1250.0; + m_inputsNumber=m_sectionsNumber; + m_sectionsNumber=m_sectionsNumber/2; + m_SK00S=true; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK05=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SK01S")==0) { + m_filter=1250.0; + m_inputsNumber=m_sectionsNumber; + m_sectionsNumber=m_sectionsNumber/2; + m_SK01S=true; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK05=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK00S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SK02S")==0) { + m_filter=1250.0; + m_inputsNumber=m_sectionsNumber; + m_sectionsNumber=m_sectionsNumber/2; + m_SK02S=true; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK05=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK00S=m_SK01S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; } if (config.Compare("SK03S")==0) { m_filter=1250.0; m_inputsNumber=m_sectionsNumber; m_sectionsNumber=m_sectionsNumber/2; m_SK03S=true; - m_SK77=m_SK03=m_SK06=m_SK00=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK06S=m_SK00S=m_SC00S=m_SL00S=m_SP00S=false; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK05=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK00S=m_SK01S=m_SK02S=m_SK04S=m_SK05S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SK04S")==0) { + m_filter=1250.0; + m_inputsNumber=m_sectionsNumber; + m_sectionsNumber=m_sectionsNumber/2; + m_SK04S=true; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK05=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK00S=m_SK01S=m_SK02S=m_SK03S=m_SK05S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SK05S")==0) { + m_filter=1250.0; + m_inputsNumber=m_sectionsNumber; + m_sectionsNumber=m_sectionsNumber/2; + m_SK05S=true; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK05=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK00S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; } if (config.Compare("SK06S")==0) { m_filter=1250.0; m_inputsNumber=m_sectionsNumber; m_sectionsNumber=m_sectionsNumber/2; m_SK06S=true; - m_SK77=m_SK03=m_SK06=m_SK00=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK03S=m_SK00S=m_SC00S=m_SL00S=m_SP00S=false; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK05=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK00S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SC00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SC00S")==0) { + m_filter=1250.0; + m_inputsNumber=m_sectionsNumber; + m_sectionsNumber=m_sectionsNumber/2; + m_SC00S=true; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK05=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK00S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SL00S")==0) { + m_filter = 2300.0; + m_inputsNumber=m_sectionsNumber; + m_sectionsNumber=m_sectionsNumber/2; + m_SL00S=true; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK05=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK00S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SC00S=m_SP00S=false; + /*if (m_stationSRT == true) { + m_ifDistributor->setup("BW-UNFILTERED"); + ACS_LOG(LM_FULL_INFO,"CCommandLine::setDefaultConfiguration()",(LM_NOTICE,"IFDISTRIBUTOR_BW-UNFILTERED_CONFIGURED")); + }*/ + } + if (config.Compare("SP00S")==0) { + m_filter = 730.0; + m_inputsNumber=m_sectionsNumber; + m_sectionsNumber=m_sectionsNumber/2; + m_SP00S=true; + m_SK77=m_SK00=m_SK01=m_SK02=m_SK03=m_SK04=m_SK05=m_SK06=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK00S=m_SK01S=m_SK02S=m_SK03S=m_SK04S=m_SK05S=m_SK06S=m_SC00S=m_SL00S=false; + } + } + if (m_stationMED==true) { + if (config.Compare("SK01")==0) { + m_filter=1250.0; + m_inputsNumber=m_sectionsNumber; + m_SK01=true; + m_SK00=m_SCC00=m_SCH00=m_SL00=m_SP00=m_SK01S=m_SK00S=m_SCC00S=m_SCH00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SK00")==0) { + m_filter=1250.0; + m_inputsNumber=m_sectionsNumber; + m_SK00=true; + m_SK01=m_SCC00=m_SCH00=m_SL00=m_SP00=m_SK01S=m_SK00S=m_SCC00S=m_SCH00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SCC00")==0) { + m_filter=1250.0; + m_inputsNumber=m_sectionsNumber; + m_SCC00=true; + m_SK00=m_SK01=m_SL00=m_SP00=m_SK00S=m_SK01S=m_SCH00=m_SCC00S=m_SCH00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SCH00")==0) { + m_filter=1250.0; + m_inputsNumber=m_sectionsNumber; + m_SCH00=true; + m_SK00=m_SK01=m_SL00=m_SP00=m_SCC00=m_SK00S=m_SK01S=m_SCC00S=m_SCH00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SL00")==0) { + m_filter = 2300.0; + m_inputsNumber=m_sectionsNumber; + m_SL00=true; + m_SK00=m_SK01=m_SCC00=m_SP00=m_SCH00=m_SK00S=m_SK01S=m_SCC00S=m_SCH00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SP00")==0) { + m_filter = 730.0; + m_inputsNumber=m_sectionsNumber; + m_SP00=true; + m_SK00=m_SK01=m_SCC00=m_SCH00=m_SL00=m_SK00S=m_SK01S=m_SCC00S=m_SCH00S=m_SL00S=m_SP00S=false; } if (config.Compare("SK00S")==0) { m_filter=1250.0; m_inputsNumber=m_sectionsNumber; m_sectionsNumber=m_sectionsNumber/2; m_SK00S=true; - m_SK77=m_SK03=m_SK06=m_SK00=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK03S=m_SK06S=m_SC00S=m_SL00S=m_SP00S=false; + m_SK00=m_SK01=m_SCC00=m_SCH00=m_SL00=m_SP00=m_SK01S=m_SCC00S=m_SCH00S=m_SL00S=m_SP00S=false; } - if (config.Compare("SC00S")==0) { + if (config.Compare("SK01S")==0) { m_filter=1250.0; m_inputsNumber=m_sectionsNumber; m_sectionsNumber=m_sectionsNumber/2; - m_SC00S=true; - m_SK77=m_SK03=m_SK06=m_SK00=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK03S=m_SK06S=m_SK00S=m_SL00S=m_SP00S=false; + m_SK01S=true; + m_SK00=m_SK01=m_SCC00=m_SCH00=m_SL00=m_SP00=m_SK00S=m_SCC00S=m_SCH00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SCC00S")==0) { + m_filter=1250.0; + m_inputsNumber=m_sectionsNumber; + m_sectionsNumber=m_sectionsNumber/2; + m_SCC00S=true; + m_SK00=m_SK01=m_SCC00=m_SCH00=m_SL00=m_SP00=m_SK00S=m_SK01S=m_SCH00S=m_SL00S=m_SP00S=false; + } + if (config.Compare("SCH00S")==0) { + m_filter=1250.0; + m_inputsNumber=m_sectionsNumber; + m_sectionsNumber=m_sectionsNumber/2; + m_SCH00S=true; + m_SK00=m_SK01=m_SCC00=m_SCH00=m_SL00=m_SP00=m_SK00S=m_SK01S=m_SCC00S=m_SL00S=m_SP00S=false; } if (config.Compare("SL00S")==0) { m_filter = 2300.0; m_inputsNumber=m_sectionsNumber; m_sectionsNumber=m_sectionsNumber/2; m_SL00S=true; - m_SK77=m_SK03=m_SK06=m_SK00=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK03S=m_SK06S=m_SK00S=m_SC00S=m_SP00S=false; + m_SK00=m_SK01=m_SCC00=m_SCH00=m_SL00=m_SP00=m_SK00S=m_SK01S=m_SCC00S=m_SCH00S=m_SP00S=false; /*if (m_stationSRT == true) { m_ifDistributor->setup("BW-UNFILTERED"); ACS_LOG(LM_FULL_INFO,"CCommandLine::setDefaultConfiguration()",(LM_NOTICE,"IFDISTRIBUTOR_BW-UNFILTERED_CONFIGURED")); @@ -835,7 +1136,8 @@ void CCommandLine::setDefaultConfiguration(const IRA::CString & config) throw (C m_inputsNumber=m_sectionsNumber; m_sectionsNumber=m_sectionsNumber/2; m_SP00S=true; - m_SK77=m_SK03=m_SK06=m_SK00=m_SC00=m_SL00=m_SP00=m_SK77S=m_SK03S=m_SK06S=m_SK00S=m_SC00S=m_SL00S=false; + m_SK00=m_SK01=m_SCC00=m_SCH00=m_SL00=m_SP00=m_SK00S=m_SK01S=m_SCC00S=m_SCH00S=m_SL00S=false; + } } } @@ -905,6 +1207,14 @@ void CCommandLine::setup(const char *conf) throw (BackendsErrors::BackendBusyExI if(reply.is_success_reply()) { setDefaultConfiguration(conf); for (int i=0;isetSection(i,-1, m_filter, -1, -1, -1, -1); + } + if (i == 2 || i == 3) { + m_totalPower->setSection(i+2,-1, m_filter, -1, -1, -1, -1); + } + } if (m_SK03S==true || m_SK03==true) { if (i == 0 || i == 1) { m_totalPower->setSection(i,-1, m_filter, -1, -1, -1, -1); @@ -913,6 +1223,22 @@ void CCommandLine::setup(const char *conf) throw (BackendsErrors::BackendBusyExI m_totalPower->setSection(i+4,-1, m_filter, -1, -1, -1, -1); } } + if (m_SK04S==true || m_SK04==true) { + if (i == 0 || i == 1) { + m_totalPower->setSection(i,-1, m_filter, -1, -1, -1, -1); + } + if (i == 2 || i == 3) { + m_totalPower->setSection(i+6,-1, m_filter, -1, -1, -1, -1); + } + } + if (m_SK05S==true || m_SK03==true) { + if (i == 0 || i == 1) { + m_totalPower->setSection(i,-1, m_filter, -1, -1, -1, -1); + } + if (i == 2 || i == 3) { + m_totalPower->setSection(i+8,-1, m_filter, -1, -1, -1, -1); + } + } else if (m_SK06S==true || m_SK06==true) { if (i == 0 || i == 1) { m_totalPower->setSection(i,-1, m_filter, -1, -1, -1, -1); @@ -1208,7 +1534,8 @@ void CCommandLine::getPolarization(ACS::longSeq& pol) const { pol.length(m_sectionsNumber); for (int i=0;iCheckProjectCode) the project is checked to be registered in the system. * If not present an error is thrown. The check consist in verifying a folder named "code" exists in SchedDir of the configuration. * @param code new project code + * @param message this is a wellcome message from the control system * @throw ManagementErrors::UnkownProjectCodeErrorExImpl */ -void _setProjectCode(const char* code) throw (ManagementErrors::UnkownProjectCodeErrorExImpl); +void _setProjectCode(const char* code,IRA::CString& message) throw (ManagementErrors::UnkownProjectCodeErrorExImpl); /** * called to set proper values for the rest frequency diff --git a/Common/Servers/Scheduler/include/Core_Resource.h b/Common/Servers/Scheduler/include/Core_Resource.h index 7ae32376c1068e587e24570a78e347149962fb70..edb60c226e1a7d8b5fc72bdfc9106d0d3a71489e 100644 --- a/Common/Servers/Scheduler/include/Core_Resource.h +++ b/Common/Servers/Scheduler/include/Core_Resource.h @@ -28,7 +28,8 @@ m_antennaRTime->axis=Management::MNG_NO_AXIS; \ m_servoRunTime=new MinorServo::TRunTimeParameters; m_servoRunTime->scanAxis=""; \ m_subScanConf.signal=Management::MNG_SIGNAL_NONE; \ - m_scanBinder.init(&m_scanConf); + m_scanBinder.init(&m_scanConf); \ + m_parser=NULL; @@ -46,18 +47,11 @@ ACS_LOG(LM_FULL_INFO, "Core::execute()", (LM_INFO,"RECEIVERS_NC_READY")); \ m_defaultBackendInstance=m_config->getDefaultBackendInstance(); \ m_defaultDataReceiverInstance=m_config->getDefaultDataReceiverInstance(); \ - try { \ - m_parser=new CParser(this,10,true);\ - } \ - catch (...) { \ - _EXCPT(ComponentErrors::MemoryAllocationExImpl,dummy,"CCore::execute()"); \ - throw dummy; \ - } \ - if (!m_timer.init()) { \ + if (!m_timer.init()) { \ _EXCPT(ComponentErrors::TimerErrorExImpl,dummy,"CCore::initialize()"); \ dummy.setReason("Timer could not be initialized"); \ throw dummy; \ - } + } #define RESOURCE_CLEANUP if (m_antennaNC!=NULL) m_antennaNC->disconnect(); \ m_antennaNC=NULL; \ diff --git a/Common/Servers/Scheduler/include/SchedulerImpl.h b/Common/Servers/Scheduler/include/SchedulerImpl.h index 0f16fd928afeba89733158fd24749b38790de7da..d700bedf950df572d6f88c734986d1da95e4a7ef 100644 --- a/Common/Servers/Scheduler/include/SchedulerImpl.h +++ b/Common/Servers/Scheduler/include/SchedulerImpl.h @@ -81,7 +81,7 @@ public: * logs the COMPSTATE_OPERATIONAL * @throw ACSErr::ACSbaseExImpl */ - virtual void execute() throw (ACSErr::ACSbaseExImpl); + virtual void execute(); /** * Called by the container before destroying the server in a normal situation. This function takes charge of @@ -305,10 +305,11 @@ public: * This method allows to set the current running project code. The code will be used to locate schedules files and to store data files on system disks. If the project is not present/registered in the * system an error is thrown. * @param code new project code. If an empty string is given the default code is adopted, the default code is part of the component configuration. + * @param message a wellcome message from control software * @throw CORBA::SystemException * @throw ManagementErrors::ManagementErrorsEx */ - virtual void setProjectCode(const char *code) throw (CORBA::SystemException,ManagementErrors::ManagementErrorsEx); + virtual void setProjectCode(const char *code,CORBA::String_out message) throw (CORBA::SystemException,ManagementErrors::ManagementErrorsEx); /** * This method allow to set the current value for the rest frequency diff --git a/Common/Servers/Scheduler/src/Configuration.cpp b/Common/Servers/Scheduler/src/Configuration.cpp index cbd199194b5632a2aedeca2ee48d3dbc9b5dca04..69003a17cde678bb7ed8e27f5ea86feb250cea41 100644 --- a/Common/Servers/Scheduler/src/Configuration.cpp +++ b/Common/Servers/Scheduler/src/Configuration.cpp @@ -300,6 +300,19 @@ void CConfiguration::init(maci::ContainerServices *Services) throw (ComponentErr ACS_LOG(LM_FULL_INFO,"CConfiguration::init()",(LM_WARNING,"Default backend does not exist")); m_currentBackendIndex=-1; } + + if (!CIRATools::getDBValue(Services,"welcomeMessage",m_welcomeMessage,"alma/","DataBlock/Station")) { + m_welcomeMessage = (const char*)""; + } + std::string welcomeMessage = std::string(m_welcomeMessage); + //Replace every occurrence of the string "\n" (2 characters) with a new line character + while(true) { + std::size_t found = welcomeMessage.find("\\n"); + if(found == std::string::npos) + break; + welcomeMessage.replace(found, 2, "\n"); + } + m_welcomeMessage = welcomeMessage.c_str(); } Management::TScanAxis CConfiguration::str2Axis(const IRA::CString& axis) const diff --git a/Common/Servers/Scheduler/src/Core.cpp b/Common/Servers/Scheduler/src/Core.cpp index 394e3e3f1bffe77b3f83ce1e74cc0409514f90b1..accf1132649bfb7b748c94ddc513f708603edf1f 100644 --- a/Common/Servers/Scheduler/src/Core.cpp +++ b/Common/Servers/Scheduler/src/Core.cpp @@ -29,7 +29,9 @@ void CCore::initialize() m_lastWeatherTime=0; } -void CCore::execute() throw (ComponentErrors::TimerErrorExImpl,ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::MemoryAllocationExImpl,ManagementErrors::ProcedureFileLoadingErrorExImpl) +void CCore::execute() throw (ComponentErrors::TimerErrorExImpl,ComponentErrors::CouldntGetComponentExImpl, + ComponentErrors::MemoryAllocationExImpl,ManagementErrors::ProcedureFileLoadingErrorExImpl, + ComponentErrors::UnexpectedExImpl) { Antenna::TSiteInformation_var site; Antenna::Observatory_var observatory=Antenna::Observatory::_nil(); @@ -51,6 +53,8 @@ void CCore::execute() throw (ComponentErrors::TimerErrorExImpl,ComponentErrors:: Impl.setComponentName((const char*)m_config->getObservatoryComponent()); throw Impl; } + /*catch (...) { + }*/ ACS_LOG(LM_FULL_INFO,"CCore::execute()",(LM_INFO,"OBSERVATORY_LOCATED")); try { site=observatory->getSiteSummary(); //throw CORBA::SYSTEMEXCEPTION @@ -72,8 +76,9 @@ void CCore::execute() throw (ComponentErrors::TimerErrorExImpl,ComponentErrors:: Impl.setComponentName((const char*)observatory->name()); throw Impl; } - RESOURCE_EXEC; loadCustomLogger(m_customLogger,m_customLoggerError); // throw ComponentErrors::CouldntGetComponentExImpl + + RESOURCE_EXEC; // spawn schedule executor thread........ try { @@ -91,6 +96,14 @@ void CCore::execute() throw (ComponentErrors::TimerErrorExImpl,ComponentErrors:: ACS::TimeInterval sleepTime=m_config->getScheduleExecutorSleepTime()*10; m_schedExecuter->setSleepTime(sleepTime); + try { + m_parser=new CParser(this,10,true);\ + } + catch (...) { + _EXCPT(ComponentErrors::MemoryAllocationExImpl,dummy,"CCore::execute()"); + throw dummy; + } + //add local commands m_parser->add("tsys",new function1 >(this,&CCore::_callTSys),0); m_parser->add("wait",new function1 >(this,&CCore::_wait),1); @@ -110,7 +123,7 @@ void CCore::execute() throw (ComponentErrors::TimerErrorExImpl,ComponentErrors:: m_parser->add("log",new function1 >(this,&CCore::_changeLogFile),1); m_parser->add("logMessage",new function1 >(this,&CCore::_logMessage),1); m_parser->add("wx",new function4,O,O,O >(this,&CCore::_getWeatherStationParameters),0); - m_parser->add("project",new function1 >(this,&CCore::_setProjectCode),1); + m_parser->add("project",new function2,O >(this,&CCore::_setProjectCode),1); // no range checks because * is allowed m_parser->add("skydip",new function3 >,I >,I >(this,&CCore::skydip),3); m_parser->add("agc","_tp_agc",2,"NONE"); diff --git a/Common/Servers/Scheduler/src/Core_Operations.i b/Common/Servers/Scheduler/src/Core_Operations.i index bfcea96c6e20a7c7c9dd198b2b47dd64c0a96c7e..c21aa65c95996fb8d33cc777e7360465b010365e 100644 --- a/Common/Servers/Scheduler/src/Core_Operations.i +++ b/Common/Servers/Scheduler/src/Core_Operations.i @@ -533,11 +533,11 @@ void CCore::_fTrack(const char *dev) throw (ComponentErrors::CouldntGetComponent impl.setComponentName(backend->name()); throw impl; } - for (unsigned t=0;tlength();t++) { + /*for (unsigned t=0;tlength();t++) { printf("bck freq :%lf\n",bckinputFreq[t]); printf("bck bw:%lf\n",bckinputBW[t]); - } + }*/ if (inputSection->length()!=(unsigned)inputs) { _EXCPT(ComponentErrors::ValidationErrorExImpl,impl,"CCore::_fTrack()"); impl.setReason("inconsistent data from the backend inputs number"); @@ -545,7 +545,7 @@ void CCore::_fTrack(const char *dev) throw (ComponentErrors::CouldntGetComponent } //--------------------------------------------------------------------------------------------------- //4) info from antenna-------------------------------------------------------------------------------- - printf("RestFrequency : %lf\n",m_restFrequency[0]); + //printf("RestFrequency : %lf\n",m_restFrequency[0]); try { m_antennaBoss->getTopocentricFrequency(m_restFrequency,topocentricFreq.out()); } @@ -573,7 +573,7 @@ void CCore::_fTrack(const char *dev) throw (ComponentErrors::CouldntGetComponent _EXCPT(ComponentErrors::UnexpectedExImpl,impl,"CCore::_fTrack()"); throw impl; } - for (unsigned t=0;tlength();t++) printf("topocentric Freq :%lf\n",topocentricFreq[t]); + //for (unsigned t=0;tlength();t++) printf("topocentric Freq :%lf\n",topocentricFreq[t]); // just to make sure the topocentric sequence has the right dimension! if (topocentricFreq->length()!=m_restFrequency.length()) { topocentricFreq->length(m_restFrequency.length()); @@ -590,7 +590,7 @@ void CCore::_fTrack(const char *dev) throw (ComponentErrors::CouldntGetComponent throw impl; } IFNumber=IFNumberRO->get_sync(comp.out()); // number of output IFs of the receeever - printf("if number :%ld\n",IFNumber); + //printf("if number :%ld\n",IFNumber); try { m_receiversBoss->getIFOutput(bckinputFeed,bckinputIF,fndoutputFreq.out(),fndoutputBw.out(),fndoutputPol.out(),fndoutputLO.out()); } @@ -617,10 +617,10 @@ void CCore::_fTrack(const char *dev) throw (ComponentErrors::CouldntGetComponent impl.setReason("inconsistent data from the receivers if outputs"); throw impl; } - for (unsigned t=0;tlength();t++) { + /*for (unsigned t=0;tlength();t++) { printf("Frequency :%lf\n",fndoutputFreq[t]); printf("BandWidth :%lf\n",fndoutputBw[t]); - } + }*/ //--------------------------------------------------------------------------------------------------- //5) let's start with some computations ----------------------------------------------------------------------------- sectionFreq.length(sections); @@ -631,16 +631,16 @@ void CCore::_fTrack(const char *dev) throw (ComponentErrors::CouldntGetComponent inputLO[j]=fndoutputLO[j]; //if (device=="BCK") if ((device=="ALL") || (device=="LO")) { currentSection=inputSection[j]; - printf("currentSection :%ld\n",currentSection); + //printf("currentSection :%ld\n",currentSection); if (topocentricFreq->length()==1) { inputLO[j]=IRA::CIRATools::roundNearest(topocentricFreq[0]-bckinputFreq[j]- (bckinputBW[j]/2.0),digits); - printf("inputLO[j] :%lf\n",inputLO[j]); + //printf("inputLO[j] :%lf\n",inputLO[j]); } else { inputLO[j]=IRA::CIRATools::roundNearest(topocentricFreq[currentSection]-bckinputFreq[j]- (bckinputBW[j]/2.0),digits); - printf("inputLO[j] :%lf\n",inputLO[j]); + //printf("inputLO[j] :%lf\n",inputLO[j]); } //lo[bckinputIF[j]]=inputLO[j]; // local oscillator per IFs } @@ -654,7 +654,7 @@ void CCore::_fTrack(const char *dev) throw (ComponentErrors::CouldntGetComponent if (bckinputIF[i]==j) { if((lo[j] < 0.0 ) || (inputLO[i] < lo[j])) { // change the local oscillator value if ...... lo[j] = inputLO[i]; - printf("lo changed: #if: %ld, value: %lf \n",j,lo[j]); + //printf("lo changed: #if: %ld, value: %lf \n",j,lo[j]); } } } @@ -743,7 +743,7 @@ void CCore::_fTrack(const char *dev) throw (ComponentErrors::CouldntGetComponent } } -void CCore::_setProjectCode(const char* code) throw (ManagementErrors::UnkownProjectCodeErrorExImpl) +void CCore::_setProjectCode(const char* code,IRA::CString& message) throw (ManagementErrors::UnkownProjectCodeErrorExImpl) { IRA::CString newCode(code); if (newCode=="''") { // if '' given...maps to default user @@ -760,6 +760,11 @@ void CCore::_setProjectCode(const char* code) throw (ManagementErrors::UnkownPro if (m_schedExecuter) { m_schedExecuter->setProjectCode(newCode); } + std::string msg = "Welcome to this facility, " + std::string(code) + "!"; + std::string welcome = std::string(m_config->getWelcomeMessage()); + if(welcome != "") + msg += "\n" + welcome; + message.Format("STR %s", msg.c_str()); } /*void CCore::_winkingMark(const char *arg) throw (ComponentErrors::ValidationErrorExImpl); diff --git a/Common/Servers/Scheduler/src/Core_Resource.i b/Common/Servers/Scheduler/src/Core_Resource.i index dfd753f443368d01345393f81dd138499f8f1368..ea5863cdf5214ca30ac3277f9f0d71bf0df809cb 100644 --- a/Common/Servers/Scheduler/src/Core_Resource.i +++ b/Common/Servers/Scheduler/src/Core_Resource.i @@ -247,16 +247,19 @@ void CCore::loadCustomLogger(Management::CustomLogger_var& ref,bool& errorDetect ACS_LOG(LM_FULL_INFO,"CCore::loadCustomLogger()",(LM_INFO,"CUSTOMLOGGER_LOCATED")); } catch (maciErrType::CannotGetComponentExImpl& ex) { + ref=Management::CustomLogger::_nil(); _ADD_BACKTRACE(ComponentErrors::CouldntGetComponentExImpl,Impl,ex,"CCore::loadCustomLogger()"); Impl.setComponentName((const char*)m_config->getCustomLoggerComponent()); throw Impl; } catch (maciErrType::NoPermissionExImpl& ex) { + ref=Management::CustomLogger::_nil(); _ADD_BACKTRACE(ComponentErrors::CouldntGetComponentExImpl,Impl,ex,"CCore::loadCustomLogger()"); Impl.setComponentName((const char*)m_config->getCustomLoggerComponent()); throw Impl; } catch (maciErrType::NoDefaultComponentExImpl& ex) { + ref=Management::CustomLogger::_nil(); _ADD_BACKTRACE(ComponentErrors::CouldntGetComponentExImpl,Impl,ex,"CCore::loadCustomLogger()"); Impl.setComponentName((const char*)m_config->getCustomLoggerComponent()); throw Impl; diff --git a/Common/Servers/Scheduler/src/SchedulerImpl.cpp b/Common/Servers/Scheduler/src/SchedulerImpl.cpp index 067e0564bab7f5da46cf8ababc8657fbd0575a29..87aacf556d67dbe8c0493ea5bad3a00ef7f6377c 100644 --- a/Common/Servers/Scheduler/src/SchedulerImpl.cpp +++ b/Common/Servers/Scheduler/src/SchedulerImpl.cpp @@ -71,15 +71,14 @@ void SchedulerImpl::initialize() throw (ACSErr::ACSbaseExImpl) ACS_LOG(LM_FULL_INFO,"SchedulerImpl::initialize()",(LM_INFO,"COMPSTATE_INITIALIZED")); } -void SchedulerImpl::execute() throw (ACSErr::ACSbaseExImpl) +void SchedulerImpl::execute() { AUTO_TRACE("SchedulerImpl::execute()"); - _IRA_LOGFILTER_ACTIVATE(m_config.getRepetitionCacheTime(),m_config.getRepetitionExpireTime()); try { m_core->execute(); } catch (ACSErr::ACSbaseExImpl& E) { - _ADD_BACKTRACE(ComponentErrors::InitializationProblemExImpl,_dummy,E,"SchedulerImpl::execute()"); + _ADD_BACKTRACE(ComponentErrors::InitializationProblemExImpl,_dummy,E,"SchedulerImpl::execute()"); throw _dummy; } try { @@ -93,6 +92,7 @@ void SchedulerImpl::execute() throw (ACSErr::ACSbaseExImpl) _ADD_BACKTRACE(ComponentErrors::ThreadErrorExImpl,__dummy,E,"SchedulerImpl::execute()"); throw __dummy; } + _IRA_LOGFILTER_ACTIVATE(m_config.getRepetitionCacheTime(),m_config.getRepetitionExpireTime()); ACS_LOG(LM_FULL_INFO,"SchedulerImpl::execute()",(LM_INFO,"COMPSTATE_OPERATIONAL")); } @@ -362,10 +362,12 @@ void SchedulerImpl::fTrack(const char* dev) throw (ComponentErrors::ComponentErr m_core->_fTrack(dev); } -void SchedulerImpl::setProjectCode(const char *code) throw (CORBA::SystemException,ManagementErrors::ManagementErrorsEx) +void SchedulerImpl::setProjectCode(const char *code, CORBA::String_out message) throw (CORBA::SystemException,ManagementErrors::ManagementErrorsEx) { + IRA::CString msg; try { - m_core->_setProjectCode(code); + m_core->_setProjectCode(code, msg); + message=(const char *)msg; } catch (ManagementErrors::ManagementErrorsExImpl& ex) { ex.log(LM_DEBUG); diff --git a/Common/Simulators/Components/PyPositioner/idl/ComponentErrors.xml b/Common/Simulators/Components/PyPositioner/idl/ComponentErrors.xml deleted file mode 100755 index e114e1846e8cca32a924237a30a8fd269f022ad8..0000000000000000000000000000000000000000 --- a/Common/Simulators/Components/PyPositioner/idl/ComponentErrors.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - diff --git a/Common/Simulators/Components/PyPositioner/idl/TestNamespaceInterface.idl b/Common/Simulators/Components/PyPositioner/idl/TestNamespaceInterface.idl index e2fd9e120bc79681156bd1bae3e0811df19af376..03d884602426cd129c0e87402a30b8f02edc5bd1 100755 --- a/Common/Simulators/Components/PyPositioner/idl/TestNamespaceInterface.idl +++ b/Common/Simulators/Components/PyPositioner/idl/TestNamespaceInterface.idl @@ -6,7 +6,6 @@ #define __TESTNAMESPACE_INTERFACE__IDL__ #include -#include #pragma prefix "alma" @@ -24,8 +23,7 @@ module TestNamespaceInterface { { /** Set the position */ - void setPosition(in double position) - raises (ComponentErrors::ComponentErrorsEx); + void setPosition(in double position); /** Return the actual position */ diff --git a/Common/Simulators/Components/PyPositioner/src/Makefile b/Common/Simulators/Components/PyPositioner/src/Makefile index c1fb49e37f6a9f3f22a548c0c166712a61663336..c752516f6edd4ad18b71a6c63bdacfd15eea0d29 100755 --- a/Common/Simulators/Components/PyPositioner/src/Makefile +++ b/Common/Simulators/Components/PyPositioner/src/Makefile @@ -5,16 +5,12 @@ # Marco Buttu #***************************************************************** -ACSERRDEF= ComponentErrors - -ERRXMLFILE= ../idl/ComponentErrors.xml # Interface # ---------------------------- CDB_SCHEMAS = Positioner IDL_FILES = TestNamespaceInterface -TestNamespaceInterfaceStubs_LIBS = baciStubs acscomponentStubs ACSErrTypeCommon \ - ComponentErrors +TestNamespaceInterfaceStubs_LIBS = baciStubs acscomponentStubs # Python directives @@ -72,15 +68,7 @@ clean_dist : clean_all clean_dist_all man : do_man @echo " . . . man page(s) done" -install : xmlpatch_pre install_all - @chmod $(PERM) $(ERRXMLFILE) - @echo "Patch applied" +install : install_all @rm -rf /tmp/tmp.txt @echo " . . . installation done" @echo " . . . installation done" - - -xmlpatch_pre : - @echo "File permissions: " $(PERM) - @chmod a+w $(ERRXMLFILE) - @echo $(PERM) > /tmp/tmp.txt diff --git a/Common/Simulators/Components/PyPositioner/src/Positioner/PositionerImpl.py b/Common/Simulators/Components/PyPositioner/src/Positioner/PositionerImpl.py index a77630a881d97875dd9ea5ac91da77efd2faec62..b0b705782206df8ffee98a9fdc3d3ef774f2e598 100755 --- a/Common/Simulators/Components/PyPositioner/src/Positioner/PositionerImpl.py +++ b/Common/Simulators/Components/PyPositioner/src/Positioner/PositionerImpl.py @@ -23,7 +23,7 @@ class PositionerImpl(POA, cc, services, lcycle): cc.__init__(self) services.__init__(self) self.position = 0 - self.sequence = (1.1, 2.2, 3.3) + self.sequence = [1.1, 2.2, 3.3] def initialize(self): addProperty(self, 'status', devio_ref=GenericDevIO()) diff --git a/Medicina/CDB/alma/ANTENNA/Mount/Mount.xml b/Medicina/CDB/alma/ANTENNA/Mount/Mount.xml index 3db80b764575c56b07ec27c82c351843749532ae..0dca04b5fb042fc19cbd7d7762322fc8fd34648e 100644 --- a/Medicina/CDB/alma/ANTENNA/Mount/Mount.xml +++ b/Medicina/CDB/alma/ANTENNA/Mount/Mount.xml @@ -15,6 +15,7 @@ ControlThreadPeriod="200000" RepetitionCacheTime="2000000" RepetitionExpireTime="5000000" + CheckOscillation="true" OscillationThreshold="0.01" OscillationAlarmDuration="2000000" OscillationNumberThreshold="4" diff --git a/Medicina/CDB/alma/DataBlock/Station/Station.xml b/Medicina/CDB/alma/DataBlock/Station/Station.xml index 882640efc8eb90e5f5240fba69b52d72c939e3f5..4f0e8522d522df9522220090de415ff4c36498f0 100644 --- a/Medicina/CDB/alma/DataBlock/Station/Station.xml +++ b/Medicina/CDB/alma/DataBlock/Station/Station.xml @@ -16,4 +16,5 @@ height="28.0" yPolarMotion="0.0" xPolarMotion="0.0" - geodeticModel="0" /> + geodeticModel="0" + welcomeMessage="" /> diff --git a/Medicina/CDB/alma/MANAGEMENT/Palmiro/Palmiro.xml b/Medicina/CDB/alma/MANAGEMENT/Palmiro/Palmiro.xml index 11a5973820f9ed45d5db71e49c20c99741eb10e4..7e0cc626b58f65f8b2bc929cb4f9d6ee962baa7d 100644 --- a/Medicina/CDB/alma/MANAGEMENT/Palmiro/Palmiro.xml +++ b/Medicina/CDB/alma/MANAGEMENT/Palmiro/Palmiro.xml @@ -30,7 +30,7 @@ DefaultBackendInstance="BACKENDS/TotalPower" DefaultDataReceiverInstance="MANAGEMENT/FitsZilla" DefaultProjectCode="maintenance" - CheckProjectCode="false" + CheckProjectCode="true" > diff --git a/Medicina/Configuration/CDB/alma/ANTENNA/Mount/Mount.xml b/Medicina/Configuration/CDB/alma/ANTENNA/Mount/Mount.xml index 3db80b764575c56b07ec27c82c351843749532ae..0dca04b5fb042fc19cbd7d7762322fc8fd34648e 100644 --- a/Medicina/Configuration/CDB/alma/ANTENNA/Mount/Mount.xml +++ b/Medicina/Configuration/CDB/alma/ANTENNA/Mount/Mount.xml @@ -15,6 +15,7 @@ ControlThreadPeriod="200000" RepetitionCacheTime="2000000" RepetitionExpireTime="5000000" + CheckOscillation="true" OscillationThreshold="0.01" OscillationAlarmDuration="2000000" OscillationNumberThreshold="4" diff --git a/Medicina/Configuration/CDB/alma/BACKENDS/Sardara/Sardara.xml b/Medicina/Configuration/CDB/alma/BACKENDS/Sardara/Sardara.xml index 6c39010261320d36af4c05f27021472bd89ce5ed..f530a203896b9b410fd7f61c62c740fc0ee4c91d 100644 --- a/Medicina/Configuration/CDB/alma/BACKENDS/Sardara/Sardara.xml +++ b/Medicina/Configuration/CDB/alma/BACKENDS/Sardara/Sardara.xml @@ -13,7 +13,7 @@ CommandLineTimeout="10000000" ConnectTimeout="3000000" PropertyRefreshTime="1000000" - Configuration="SC00" + Configuration="SCC00" TimeTollerance="250000" RepetitionCacheTime="2000000" RepetitionExpireTime="5000000" diff --git a/Medicina/Configuration/CDB/alma/BACKENDS/TotalPower/TotalPower.xml b/Medicina/Configuration/CDB/alma/BACKENDS/TotalPower/TotalPower.xml index 152a6bdaa30b88bc67351d4e07f663efc86ed5a9..55e1242d4fd7d5bf5fa3918532ac2f479ad911fc 100644 --- a/Medicina/Configuration/CDB/alma/BACKENDS/TotalPower/TotalPower.xml +++ b/Medicina/Configuration/CDB/alma/BACKENDS/TotalPower/TotalPower.xml @@ -18,7 +18,7 @@ RepetitionCacheTime="2000000" RepetitionExpireTime="5000000" DataPort="6001" - DataIPAddress="192.168.51.104" + DataIPAddress="192.168.51.100" DataLatency="3000000" SenderSleepTime="300000" SenderResponseTime="1000000" diff --git a/Medicina/Configuration/CDB/alma/DataBlock/DMed/DMed.xml b/Medicina/Configuration/CDB/alma/DataBlock/DMed/DMed.xml index 7fc637c926a7692751213bfd757dc464ad9cb326..7bcefa812655469196f8175ed4ba163cf67652fb 100644 --- a/Medicina/Configuration/CDB/alma/DataBlock/DMed/DMed.xml +++ b/Medicina/Configuration/CDB/alma/DataBlock/DMed/DMed.xml @@ -7,61 +7,60 @@ IP="192.168.51.28" PORT="5003"> - + - + - - - + + + - + - + - + - + - + - - - + + + - - - + + + - + - - + + - + - + - \ No newline at end of file diff --git a/Medicina/Configuration/CDB/alma/DataBlock/PointingModel/PointingModel.xml b/Medicina/Configuration/CDB/alma/DataBlock/PointingModel/PointingModel.xml index c2f78567fc1c465e1789db7c60faae242f2fe834..4a5c808fa5c88035951f638394012bae835f22f3 100644 --- a/Medicina/Configuration/CDB/alma/DataBlock/PointingModel/PointingModel.xml +++ b/Medicina/Configuration/CDB/alma/DataBlock/PointingModel/PointingModel.xml @@ -51,7 +51,7 @@ 1 0.0115609653 1 -0.0054083583 1 -0.0004475396 - 1 0.104534819 + 1 0.120534819 1 -0.0848363936 1 0.0015757678 0 0 @@ -80,15 +80,15 @@ KKC 90.0 - 1 0.1480138302 + 1 0.1510259807 0 0 - 1 0.2130497247 - 1 -0.0194589850 - 1 -0.0056039123 - 1 -0.0000484679 - 1 0.0850518122 - 1 0.0324320570 - 1 0.0265751500 + 1 0.2146179527 + 1 -0.0199117530 + 1 -0.0069123046 + 1 -0.0001305724 + 1 0.1411607116 + 1 0.0013927888 + 1 0.0038510617 0 0 0 0 0 0 @@ -124,7 +124,7 @@ Model XXP conf, id: 25 1 -0.0220953003 1 -0.0062009227 1 -0.0022671977 - 1 0.1425688490 + 1 0.1650 1 -0.1203563809 0 0 0 0 @@ -153,14 +153,14 @@ Model XXP conf, id: 25 CHC 90.0 - 1 -0.1115463972 + 1 -0.0961716101 0 0 - 1 -0.0019724572 - 1 0.0094164684 - 1 -0.0060918964 - 1 -0.0016364682 - 1 0.0940798447 - 1 -0.0872315466 + 1 0.0067673814 + 1 0.0238296818 + 1 -0.0069099185 + 1 -0.0010922987 + 1 0.1375056628 + 1 -0.0890021995 0 0 0 0 0 0 diff --git a/Medicina/Configuration/CDB/alma/DataBlock/Sardara/Sardara.xml b/Medicina/Configuration/CDB/alma/DataBlock/Sardara/Sardara.xml index 177d103b2019c9625e5a1745976dd32b1fe6e0a3..2ecfd12e9b6eb482f04383d39b7ff14afedf4aab 100644 --- a/Medicina/Configuration/CDB/alma/DataBlock/Sardara/Sardara.xml +++ b/Medicina/Configuration/CDB/alma/DataBlock/Sardara/Sardara.xml @@ -21,7 +21,7 @@ - SK03 + SK01 4 TRUE GREGORIAN @@ -30,43 +30,28 @@ 7.0 0 1 2 3 L R L R - 0 0 3 3 + 0 0 1 1 0 1 0 1 1024 - SK06 - 4 - TRUE - GREGORIAN - 2 - 1500.0 - 7.0 - 0 1 2 3 - L R L R - 0 0 6 6 - 0 1 0 1 - 1024 - - - - SK77 - 14 - TRUE - GREGORIAN - 7 + SCC00 + 2 + TRUE + BWG + 1 1500.0 - 7.0 - 0 1 2 3 4 5 6 7 8 9 10 11 12 13 - L R L R L R L R L R L R L R - 0 0 1 1 2 2 3 3 4 4 5 5 6 6 - 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 9.0 + 0 1 + L R + 0 0 + 0 1 1024 - SC00 + SCH00 2 TRUE BWG @@ -126,7 +111,7 @@ - SK03S + SK01S 4 TRUE GREGORIAN @@ -135,43 +120,28 @@ 7.0 0 1 2 3 S S S S - 0 0 3 3 + 0 0 1 1 0 1 0 1 1024 - SK06S - 4 - TRUE - GREGORIAN - 2 - 1500.0 - 7.0 - 0 1 2 3 - S S S S - 0 0 6 6 - 0 1 0 1 - 1024 - - - - SK77S - 14 - TRUE - GREGORIAN - 7 + SCC00S + 2 + TRUE + BWG + 1 1500.0 - 7.0 - 0 1 2 3 4 5 6 7 8 9 10 11 12 13 - S S S S S S S S S S S S S S - 0 0 1 1 2 2 3 3 4 4 5 5 6 6 - 0 1 0 1 0 1 0 1 0 1 0 1 0 1 + 9.0 + 0 1 + S S + 0 0 + 0 1 1024 - SC00S + SCH00S 2 TRUE BWG diff --git a/Medicina/Configuration/CDB/alma/DataBlock/Station/Station.xml b/Medicina/Configuration/CDB/alma/DataBlock/Station/Station.xml index 882640efc8eb90e5f5240fba69b52d72c939e3f5..4f0e8522d522df9522220090de415ff4c36498f0 100644 --- a/Medicina/Configuration/CDB/alma/DataBlock/Station/Station.xml +++ b/Medicina/Configuration/CDB/alma/DataBlock/Station/Station.xml @@ -16,4 +16,5 @@ height="28.0" yPolarMotion="0.0" xPolarMotion="0.0" - geodeticModel="0" /> + geodeticModel="0" + welcomeMessage="" /> diff --git a/Medicina/Configuration/CDB/alma/MANAGEMENT/Palmiro/Palmiro.xml b/Medicina/Configuration/CDB/alma/MANAGEMENT/Palmiro/Palmiro.xml index 11a5973820f9ed45d5db71e49c20c99741eb10e4..7e0cc626b58f65f8b2bc929cb4f9d6ee962baa7d 100644 --- a/Medicina/Configuration/CDB/alma/MANAGEMENT/Palmiro/Palmiro.xml +++ b/Medicina/Configuration/CDB/alma/MANAGEMENT/Palmiro/Palmiro.xml @@ -30,7 +30,7 @@ DefaultBackendInstance="BACKENDS/TotalPower" DefaultDataReceiverInstance="MANAGEMENT/FitsZilla" DefaultProjectCode="maintenance" - CheckProjectCode="false" + CheckProjectCode="true" > diff --git a/Medicina/Configuration/CDB/alma/Procedures/StationProcedures/StationProcedures.xml b/Medicina/Configuration/CDB/alma/Procedures/StationProcedures/StationProcedures.xml index c1177e7c3bce2128d16d831c4b7c1c0b409b0f9a..00c76bfb87d195a650ac02ec3498ad1944beed95 100644 --- a/Medicina/Configuration/CDB/alma/Procedures/StationProcedures/StationProcedures.xml +++ b/Medicina/Configuration/CDB/alma/Procedures/StationProcedures/StationProcedures.xml @@ -9,6 +9,7 @@ receiversSetup=CCC chooseBackend=TotalPower initialize=CCC + dmed=default setSection=0,*,730.0,*,*,*,* setSection=1,*,730.0,*,*,*,* device=0 @@ -23,6 +24,7 @@ receiversSetup=CHC chooseBackend=TotalPower initialize=CHC + dmed=default setSection=0,*,300.0,*,*,*,* setSection=1,*,300.0,*,*,*,* setAttenuation=0,8 @@ -39,6 +41,7 @@ receiversSetup=KKC chooseBackend=TotalPower initialize=KKC + dmed=default device=0 setAttenuation=0,9 setAttenuation=1,9 @@ -55,6 +58,7 @@ receiversSetup=XXP chooseBackend=TotalPower initialize=XXP + dmed=default setSection=0,*,730.0,*,*,*,* setSection=1,*,730.0,*,*,*,* device=0 @@ -70,6 +74,7 @@ receiversMode=NARROWBANDWIDTH chooseBackend=TotalPower initialize=CCCL + dmed=default setSection=0,*,300.0,*,*,*,* setSection=1,*,300.0,*,*,*,* setAttenuation=0,8 @@ -87,6 +92,7 @@ receiversMode=NARROWBANDWIDTH chooseBackend=TotalPower initialize=CHCL + dmed=default setSection=0,*,300.0,*,*,*,* setSection=1,*,300.0,*,*,*,* setAttenuation=0,8 diff --git a/Medicina/Configuration/CDB/alma/RECEIVERS/KBandDualFReceiver/KBandDualFReceiver.xml b/Medicina/Configuration/CDB/alma/RECEIVERS/KBandDualFReceiver/KBandDualFReceiver.xml index d29a449463aa83d349467769923b9ef194c66858..25574d1ce9763454f8cdadfeb74cef9273bb9bce 100644 --- a/Medicina/Configuration/CDB/alma/RECEIVERS/KBandDualFReceiver/KBandDualFReceiver.xml +++ b/Medicina/Configuration/CDB/alma/RECEIVERS/KBandDualFReceiver/KBandDualFReceiver.xml @@ -1,10 +1,6 @@ @@ -17,9 +13,9 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" actionThreadStackSize="2048" monitoringThreadStackSize="4096" - DewarIPAddress="192.167.189.2" + DewarIPAddress="192.168.51.2" DewarPort="10000" - LNAIPAddress="192.167.189.2" + LNAIPAddress="192.168.51.2" LNAPort="10001" WatchDogResponseTime="10000000" WatchDogSleepTime="10000000" diff --git a/Medicina/Configuration/CDB/alma/RECEIVERS/LO/LO.xml b/Medicina/Configuration/CDB/alma/RECEIVERS/LO/LO.xml index 6a22e4e55661dead4c5cbc296cf158bb2c16246e..9a98d696e7bf0c40a8aa11cdae40f32ce6ee9c74 100644 --- a/Medicina/Configuration/CDB/alma/RECEIVERS/LO/LO.xml +++ b/Medicina/Configuration/CDB/alma/RECEIVERS/LO/LO.xml @@ -2,7 +2,7 @@ xmlns:baci="urn:schemas-cosylab-com:BACI:1.0" xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - IP="192.167.189.2" PORT="2096"> + IP="192.168.51.2" PORT="2096"> diff --git a/Medicina/Misc/MedScripts/app-defaults/discosStartup.xml b/Medicina/Misc/MedScripts/app-defaults/discosStartup.xml index 38bd0d82e8d8f63897dbc53f06f6050836c966fc..c0e00968c12e8d9ed35fed43e7935f2f90a406b7 100644 --- a/Medicina/Misc/MedScripts/app-defaults/discosStartup.xml +++ b/Medicina/Misc/MedScripts/app-defaults/discosStartup.xml @@ -26,7 +26,7 @@ true 0 MASTERHOST - + discos WeatherStationContainer @@ -35,7 +35,7 @@ true 0 MASTERHOST - + discos MountContainer @@ -44,7 +44,7 @@ true 0 MASTERHOST - + discos AntennaContainer @@ -53,7 +53,7 @@ true 0 MASTERHOST - + discos ReceiversContainer @@ -62,7 +62,16 @@ true 0 MASTERHOST - + discos + + + LocalOscillatorContainer + py + + true + 0 + MASTERHOST + discos KBandContainer @@ -71,7 +80,7 @@ true 0 MASTERHOST - + discos TotalPowerContainer @@ -80,7 +89,7 @@ true 0 MASTERHOST - + discos ManagementContainer @@ -89,7 +98,7 @@ true 0 MASTERHOST - + discos FitsZillaContainer @@ -98,7 +107,7 @@ true 0 MASTERHOST - + discos CalibrationToolContainer @@ -107,7 +116,7 @@ true 0 MASTERHOST - + discos PointContainer @@ -116,7 +125,7 @@ true 0 MASTERHOST - + discos ExternalClientsContainer @@ -125,7 +134,7 @@ true 0 MASTERHOST - + discos XContainer @@ -134,7 +143,7 @@ true 0 MASTERHOST - + discos diff --git a/Medicina/Misc/MedScripts/src/discosConsole b/Medicina/Misc/MedScripts/src/discosConsole index f05ccb27ce574a2b65d8615c751229d925478d6d..6e7ea6d5bbda98912200585a07ea5a4540cd353f 100644 --- a/Medicina/Misc/MedScripts/src/discosConsole +++ b/Medicina/Misc/MedScripts/src/discosConsole @@ -83,7 +83,7 @@ if [ "$CL_STOP" ] ; then killall -s SIGUSR1 -u $USER -q _tui_ReceiversBossTextClient killall -s SIGUSR1 -u $USER -q _tui_SchedulerTextClient #close the operator input - pkill -SIGINT -f -n -u $USER _tui_SysTerm + pkill -SIGINT -u $USER -f _tui_SysTerm #close the logging display client pkill -SIGUSR1 -f -n -u $USER _gui_customLoggingClient exit diff --git a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureCoolHead.h b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureCoolHead.h index 3de389a51007a56d4d042829cbb4b19e6abd3884..dbe0ca39dc2e4d3952dd9b27450e045b48997baf 100644 --- a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureCoolHead.h +++ b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureCoolHead.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoCoolHead(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoCoolHead(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h index f7a7337b089a36d2914f8ebcaa925e78770e0a06..60926f0131ac54925e57cc4b918d3ad05a507f58 100644 --- a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h +++ b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoCoolHeadWin(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoCoolHeadWin(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureLNA.h b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureLNA.h index cf8722777adf9176e2097d5f2c5f0c247212821a..23ec8fd1276349083608897648f7326c181ca3b2 100644 --- a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureLNA.h +++ b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureLNA.h @@ -56,8 +56,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoLNA(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoLNA(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureLNAWindow.h b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureLNAWindow.h index 3ad24005e399980e23e5cbdc0cdc272c64cd6e7a..a03d53720c9c4276e98fb2b058b14e2fe29e582a 100644 --- a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureLNAWindow.h +++ b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOCryoTemperatureLNAWindow.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoLNAWin(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoLNAWin(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOEnvTemperature.h b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOEnvTemperature.h index 7bafa6fc190d48a63fa70ae304665426af874ffe..3d4fe791bf1e49d0871fdf727f9483bc58d04d84 100644 --- a/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOEnvTemperature.h +++ b/Medicina/Servers/MedicinaKBandDualFReceiver/include/DevIOEnvTemperature.h @@ -48,8 +48,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val = m_pCore->getVertexTemperature(); - timestamp = getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getVertexTemperature(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } diff --git a/Medicina/Servers/MedicinaKBandDualFReceiver/src/MedicinaKBandDualFCore.cpp b/Medicina/Servers/MedicinaKBandDualFReceiver/src/MedicinaKBandDualFCore.cpp index 422f829d987e3e927c38c95e46e41c781a14158c..13f15ccb817316e0dddc1ab5eae7fc452500f3a3 100644 --- a/Medicina/Servers/MedicinaKBandDualFReceiver/src/MedicinaKBandDualFCore.cpp +++ b/Medicina/Servers/MedicinaKBandDualFReceiver/src/MedicinaKBandDualFCore.cpp @@ -141,14 +141,17 @@ void MedicinaKBandDualFCore::updateVertexTemperature() throw (ReceiversErrors::R { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_envTemperature=m_control->vertexTemperature(voltage2Celsius, - MCB_CMD_DATA_TYPE_F32, + m_envTemperature.temperature=m_control->vertexTemperature( + voltage2Celsius, + MCB_CMD_DATA_TYPE_F32, MCB_PORT_TYPE_AD24, MCB_PORT_NUMBER_00_07, 5 ); + m_envTemperature.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_envTemperature.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"MedicinaKBandDualFCore::updateVertexTemperature()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -157,15 +160,18 @@ void MedicinaKBandDualFCore::updateVertexTemperature() throw (ReceiversErrors::R clearStatusBit(CONNECTIONERROR); // The communication was ok so clear the CONNECTIONERROR bit } + void MedicinaKBandDualFCore::updateCryoCoolHead() throw (ReceiversErrors::ReceiverControlBoardErrorExImpl) { - m_cryoCoolHead=0.0; + m_cryoCoolHead.temperature=0.0; + m_cryoCoolHead.timestamp = getTimeStamp(); } void MedicinaKBandDualFCore::updateCryoCoolHeadWin() throw (ReceiversErrors::ReceiverControlBoardErrorExImpl) { - m_cryoCoolHeadWin=0.0; + m_cryoCoolHeadWin.temperature=0.0; + m_cryoCoolHeadWin.timestamp = getTimeStamp(); } @@ -173,9 +179,11 @@ void MedicinaKBandDualFCore::updateCryoLNA() throw (ReceiversErrors::ReceiverCon { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoLNA=m_control->cryoTemperature(1,voltage2Kelvin); + m_cryoLNA.temperature=m_control->cryoTemperature(1,voltage2Kelvin); + m_cryoLNA.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoLNA.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"MedicinaKBandDualFCore::updateCryoLNA()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -189,9 +197,11 @@ void MedicinaKBandDualFCore::updateCryoLNAWin() throw (ReceiversErrors::Receiver { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoLNAWin=m_control->cryoTemperature(0,voltage2Kelvin); + m_cryoLNAWin.temperature=m_control->cryoTemperature(0,voltage2Kelvin); + m_cryoLNAWin.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoLNAWin.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"MedicinaKBandDualFCore::updateCryoLNAWin()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); diff --git a/Medicina/Servers/MedicinaMount/config/CDB/schemas/MedicinaMount.xsd b/Medicina/Servers/MedicinaMount/config/CDB/schemas/MedicinaMount.xsd index c5fdf0fcf1cabd50da005a3f7f7b61e69990aa84..7dbd347358286a71c69ca20c0a0db90c4da7ae54 100644 --- a/Medicina/Servers/MedicinaMount/config/CDB/schemas/MedicinaMount.xsd +++ b/Medicina/Servers/MedicinaMount/config/CDB/schemas/MedicinaMount.xsd @@ -100,7 +100,9 @@ - + + + diff --git a/Medicina/Servers/MedicinaMount/include/Configuration.h b/Medicina/Servers/MedicinaMount/include/Configuration.h index 7379de9520b824d3aa7aa3fee2c279d35bc2fe9b..dcee4e1e1d239012ec375be0da12c9f44db8851b 100644 --- a/Medicina/Servers/MedicinaMount/include/Configuration.h +++ b/Medicina/Servers/MedicinaMount/include/Configuration.h @@ -99,6 +99,9 @@ public: /** Gets the number of times the oscillation has to be hit before an oscillation is declared*/ inline DWORD oscillationNumberThreashold() const { return m_dwoscNumberThreshold; } + /** Flag that indicates whether the oscillation chek must performed or not. */ + inline bool checkForOscillation() const { return m_checkOsc; } + /** * This member function is used to configure component by reading the configuration parameter from the CDB. * This must be the first call before using any other function of this class. @@ -147,6 +150,7 @@ private: DDWORD m_dwoscAlarmDuration; WORD m_dwoscNumberThreshold; DDWORD m_dwoscRecoverTime; + bool m_checkOsc; }; diff --git a/Medicina/Servers/MedicinaMount/src/Configuration.cpp b/Medicina/Servers/MedicinaMount/src/Configuration.cpp index 7b9b8d6040074ae82214bb64ed7c40fe92abb023..f7504523db58f2cbb26c7b5b3853cde418ebef2a 100644 --- a/Medicina/Servers/MedicinaMount/src/Configuration.cpp +++ b/Medicina/Servers/MedicinaMount/src/Configuration.cpp @@ -24,7 +24,7 @@ } \ else { \ FIELD=tmpw; \ - ACS_DEBUG_PARAM("CConfiguration::Init()",DESCR" %lu",tmpw); \ + ACS_DEBUG_PARAM("CConfiguration::Init()",DESCR" %u",tmpw); \ } \ } @@ -43,6 +43,7 @@ void CConfiguration::Init(maci::ContainerServices *Services) throw (ComponentErrors::CDBAccessExImpl) { + IRA::CString check; ACS_TRACE("::CConfiguration::Init()"); // get ACU IP and port number from the database. _GET_STRING_ATTRIBUTE("IPAddress","IP Address:",m_sACUAddress,""); @@ -62,7 +63,9 @@ void CConfiguration::Init(maci::ContainerServices *Services) throw (ComponentErr m_elevationRateInfo.lowerLimit=-m_elevationRateInfo.upperLimit; _GET_DOUBLE_ATTRIBUTE("maxAzimuthRate","Azimuth rate(degrees/sec):",m_azimuthRateInfo.upperLimit,"DataBlock/Mount"); m_azimuthRateInfo.lowerLimit=-m_azimuthRateInfo.upperLimit; - _GET_DOUBLE_ATTRIBUTE("cw_ccw_limit","CW/CCW limit (degrees):",m_cwLimit,"DataBlock/Mount"); + _GET_DOUBLE_ATTRIBUTE("cw_ccw_limit","CW/CCW limit (degrees):",m_cwLimit,"DataBlock/Mount"); + + _GET_STRING_ATTRIBUTE("CheckOscillation","Check oscillation during tracking: ",check,""); _GET_DOUBLE_ATTRIBUTE("OscillationThreshold","Oscillation theshold (deg):",m_doscThreashold,""); _GET_DWORD_ATTRIBUTE("OscillationAlarmDuration","Oscillation alarm duration (uSec):",m_dwoscAlarmDuration,""); _GET_DWORD_ATTRIBUTE("OscillationNumberThreshold","Oscillation number threashold:",m_dwoscNumberThreshold,""); @@ -70,4 +73,6 @@ void CConfiguration::Init(maci::ContainerServices *Services) throw (ComponentErr m_dwoscAlarmDuration*=10; m_dwoscRecoverTime*=10; m_dwcontrolThreadPeriod*=10; + check.MakeUpper(); + m_checkOsc=(check=="TRUE"); } diff --git a/Medicina/Servers/MedicinaMount/src/MedicinaMountImpl.cpp b/Medicina/Servers/MedicinaMount/src/MedicinaMountImpl.cpp index c603ab53c6bc2413e3fd591da494c5647df6f811..d1d91065518e9577f43d76bf45a0364d14d62f2d 100644 --- a/Medicina/Servers/MedicinaMount/src/MedicinaMountImpl.cpp +++ b/Medicina/Servers/MedicinaMount/src/MedicinaMountImpl.cpp @@ -18,8 +18,8 @@ using namespace AntennaErrors; using namespace ComponentErrors; -static char *rcsId="@(#) $Id: MedicinaMountImpl.cpp,v 1.17 2011-04-22 17:15:07 a.orlati Exp $"; -static void *use_rcsId = ((void)&use_rcsId,(void *) &rcsId); +//static char *rcsId="@(#) $Id: MedicinaMountImpl.cpp,v 1.17 2011-04-22 17:15:07 a.orlati Exp $"; +//static void *use_rcsId = ((void)&use_rcsId,(void *) &rcsId); MedicinaMountImpl::MedicinaMountImpl(const ACE_CString &CompName,maci::ContainerServices *containerServices) : diff --git a/Medicina/Servers/MedicinaMount/src/MedicinaMountSocket.cpp b/Medicina/Servers/MedicinaMount/src/MedicinaMountSocket.cpp index 054810d23010775553754979ecd2a42d62af928a..bf3694a17e448aed5e7e69ffb1124713a1aed24e 100644 --- a/Medicina/Servers/MedicinaMount/src/MedicinaMountSocket.cpp +++ b/Medicina/Servers/MedicinaMount/src/MedicinaMountSocket.cpp @@ -842,6 +842,8 @@ double CMedicinaMountSocket::getHWAzimuth(double destination,const CACUInterface void CMedicinaMountSocket::detectOscillation() throw (ConnectionExImpl,SocketErrorExImpl,TimeoutExImpl,AntennaErrors::NakExImpl,AntennaBusyExImpl) { TIMEVALUE now; + // if oscillation is not to be checked then exit immediately + if (!m_configuration->checkForOscillation()) return; double azError=getAzimuthError(); // throw (ConnectionExImpl,SocketErrorExImpl,TimeoutExImpl) IRA::CIRATools::getTime(now); CACUInterface::TAxeModes mode=m_Data.getLastCommandedMode(); diff --git a/Medicina/Servers/MedicinaMount/src/MedicinaMountThread.cpp b/Medicina/Servers/MedicinaMount/src/MedicinaMountThread.cpp index 4612967858ec5d38483d2e7ba86f72677b52e890..695d389de19c01725a9c09316bf8b19d8cdeb131 100644 --- a/Medicina/Servers/MedicinaMount/src/MedicinaMountThread.cpp +++ b/Medicina/Servers/MedicinaMount/src/MedicinaMountThread.cpp @@ -50,8 +50,7 @@ void CMedicinaMountControlThread::runLoop() currentJob.Release(); // this is important in order to avoid possible deadlock. CSecAreaResourceWrapper socket=m_pACUControl->Get(); socket->updateComponent(); // before commenting out or deleting consider that inside this method the flushing of pending event of the log dike object is called - // oscillation detection disabled as it seems the effect disappeared after tuning of servo system parameters - //socket->detectOscillation(); + socket->detectOscillation(); if (currentJobID!=0) { ACSErr::Completion_var comp; if (socket->updateLongJobs(currentJobID,comp.out())) { diff --git a/Noto/CDB/alma/ANTENNA/Mount/Mount.xml b/Noto/CDB/alma/ANTENNA/Mount/Mount.xml index 62b2a8d3bb1610c61f34d0e899d0970a84f21e81..44c2fc8ea4ff976d3a35d2b81c98b4b32da5a4d3 100644 --- a/Noto/CDB/alma/ANTENNA/Mount/Mount.xml +++ b/Noto/CDB/alma/ANTENNA/Mount/Mount.xml @@ -15,6 +15,7 @@ ControlThreadPeriod="200000" RepetitionCacheTime="2000000" RepetitionExpireTime="5000000" + CheckOscillation="true" OscillationThreshold="0.01" OscillationAlarmDuration="2000000" OscillationNumberThreshold="4" diff --git a/Noto/CDB/alma/DataBlock/Station/Station.xml b/Noto/CDB/alma/DataBlock/Station/Station.xml index 6c71799b261cba4e171d205cbd8606520f8b5e0e..ea4f266245cd59f7a6d34a44549a4c76aed84780 100644 --- a/Noto/CDB/alma/DataBlock/Station/Station.xml +++ b/Noto/CDB/alma/DataBlock/Station/Station.xml @@ -16,4 +16,5 @@ height="32.0" yPolarMotion="0.0" xPolarMotion="0.0" - geodeticModel="0" /> + geodeticModel="0" + welcomeMessage="" /> diff --git a/Noto/CDB/alma/WEATHERSTATION/WeatherStation/WeatherStation.xml b/Noto/CDB/alma/WEATHERSTATION/WeatherStation/WeatherStation.xml index 22b444117633d07b15b3753ebc776332db99a1d6..725206827b8ffc74e54db49649cfe2c0fbbafe59 100644 --- a/Noto/CDB/alma/WEATHERSTATION/WeatherStation/WeatherStation.xml +++ b/Noto/CDB/alma/WEATHERSTATION/WeatherStation/WeatherStation.xml @@ -6,7 +6,7 @@ xmlns:baci="urn:schemas-cosylab-com:BACI:1.0" xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - IPAddress="192.167.187.244" + IPAddress="192.167.187.103" port="22222" UpdatingThreadTime="10000000"> diff --git a/Noto/Configuration/CDB/alma/ANTENNA/Mount/Mount.xml b/Noto/Configuration/CDB/alma/ANTENNA/Mount/Mount.xml index 62b2a8d3bb1610c61f34d0e899d0970a84f21e81..44c2fc8ea4ff976d3a35d2b81c98b4b32da5a4d3 100644 --- a/Noto/Configuration/CDB/alma/ANTENNA/Mount/Mount.xml +++ b/Noto/Configuration/CDB/alma/ANTENNA/Mount/Mount.xml @@ -15,6 +15,7 @@ ControlThreadPeriod="200000" RepetitionCacheTime="2000000" RepetitionExpireTime="5000000" + CheckOscillation="true" OscillationThreshold="0.01" OscillationAlarmDuration="2000000" OscillationNumberThreshold="4" diff --git a/Noto/Configuration/CDB/alma/DataBlock/Station/Station.xml b/Noto/Configuration/CDB/alma/DataBlock/Station/Station.xml index 6c71799b261cba4e171d205cbd8606520f8b5e0e..ea4f266245cd59f7a6d34a44549a4c76aed84780 100644 --- a/Noto/Configuration/CDB/alma/DataBlock/Station/Station.xml +++ b/Noto/Configuration/CDB/alma/DataBlock/Station/Station.xml @@ -16,4 +16,5 @@ height="32.0" yPolarMotion="0.0" xPolarMotion="0.0" - geodeticModel="0" /> + geodeticModel="0" + welcomeMessage="" /> diff --git a/Noto/Configuration/CDB/alma/WEATHERSTATION/WeatherStation/WeatherStation.xml b/Noto/Configuration/CDB/alma/WEATHERSTATION/WeatherStation/WeatherStation.xml index 22b444117633d07b15b3753ebc776332db99a1d6..725206827b8ffc74e54db49649cfe2c0fbbafe59 100644 --- a/Noto/Configuration/CDB/alma/WEATHERSTATION/WeatherStation/WeatherStation.xml +++ b/Noto/Configuration/CDB/alma/WEATHERSTATION/WeatherStation/WeatherStation.xml @@ -6,7 +6,7 @@ xmlns:baci="urn:schemas-cosylab-com:BACI:1.0" xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - IPAddress="192.167.187.244" + IPAddress="192.167.187.103" port="22222" UpdatingThreadTime="10000000"> diff --git a/Noto/Servers/NotoReceivers/src/ComponentCore.cpp b/Noto/Servers/NotoReceivers/src/ComponentCore.cpp index 536599e3111157dc8886898bc5ce2bcfbf039986..0c3b7b44374c629a2745c8363101c2989cc5a7f6 100644 --- a/Noto/Servers/NotoReceivers/src/ComponentCore.cpp +++ b/Noto/Servers/NotoReceivers/src/ComponentCore.cpp @@ -3,7 +3,7 @@ #include "Tone.h" #define IS_LO_AVAIL m_configuration.getLocalOscillatorInstance()!="" -#define IS_LO_TUNABLE m_configuration.getLocalOscillatorEnabledReceivers().Find(m_setup)>0 +#define IS_LO_TUNABLE m_configuration.getLocalOscillatorEnabledReceivers().Find(m_setup)>=0 //_IRA_LOGFILTER_IMPORT; diff --git a/SRT/CDB/MACI/Components/BACKENDS/PyCalmux/PyCalmux.xml b/SRT/CDB/MACI/Components/BACKENDS/PyCalmux/PyCalmux.xml new file mode 100644 index 0000000000000000000000000000000000000000..46583798773e85cea63de52652496d767c0bc3b7 --- /dev/null +++ b/SRT/CDB/MACI/Components/BACKENDS/PyCalmux/PyCalmux.xml @@ -0,0 +1,19 @@ + + + + diff --git a/SRT/CDB/MACI/Containers/LocalOscillatorCContainer/LocalOscillatorCContainer.xml b/SRT/CDB/MACI/Containers/LocalOscillatorCContainer/LocalOscillatorCContainer.xml new file mode 100644 index 0000000000000000000000000000000000000000..645ee4c3a80e6ffb3db572aa99ba974944d582be --- /dev/null +++ b/SRT/CDB/MACI/Containers/LocalOscillatorCContainer/LocalOscillatorCContainer.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + diff --git a/SRT/CDB/MACI/Containers/LocalOscillatorKContainer/LocalOscillatorKContainer.xml b/SRT/CDB/MACI/Containers/LocalOscillatorKContainer/LocalOscillatorKContainer.xml new file mode 100644 index 0000000000000000000000000000000000000000..645ee4c3a80e6ffb3db572aa99ba974944d582be --- /dev/null +++ b/SRT/CDB/MACI/Containers/LocalOscillatorKContainer/LocalOscillatorKContainer.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + diff --git a/SRT/CDB/MACI/Containers/PyCalmuxContainer/PyCalmuxContainer.xml b/SRT/CDB/MACI/Containers/PyCalmuxContainer/PyCalmuxContainer.xml new file mode 100644 index 0000000000000000000000000000000000000000..6563a97be273ebaf5e0081e044894672271110e2 --- /dev/null +++ b/SRT/CDB/MACI/Containers/PyCalmuxContainer/PyCalmuxContainer.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + diff --git a/SRT/CDB/alma/BACKENDS/PyCalmux/PyCalmux.xml b/SRT/CDB/alma/BACKENDS/PyCalmux/PyCalmux.xml new file mode 100644 index 0000000000000000000000000000000000000000..1b7485cf85fdd45bf0d57b8447741e2d76dcef4a --- /dev/null +++ b/SRT/CDB/alma/BACKENDS/PyCalmux/PyCalmux.xml @@ -0,0 +1,11 @@ + + + diff --git a/SRT/CDB/alma/BACKENDS/TotalPower/TotalPower.xml b/SRT/CDB/alma/BACKENDS/TotalPower/TotalPower.xml index 38c98a3fe8f32d738a65a3f3121777aa5ebd71ba..59741c7d714acb45d6cca343887eb6ff7e24db3d 100644 --- a/SRT/CDB/alma/BACKENDS/TotalPower/TotalPower.xml +++ b/SRT/CDB/alma/BACKENDS/TotalPower/TotalPower.xml @@ -8,17 +8,17 @@ xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" sender_protocols="TCP=${HOST}:14000" - IPAddress="192.168.51.94" + IPAddress="192.168.200.129" Port="5003" CommandLineTimeout="3500000" ConnectTimeout="3000000" PropertyRefreshTime="1000000" - Configuration="CCC" + Configuration="CCB" TimeTollerance="250000" RepetitionCacheTime="2000000" RepetitionExpireTime="5000000" DataPort="6001" - DataIPAddress="192.167.189.8" + DataIPAddress="192.168.200.203" DataLatency="3000000" SenderSleepTime="300000" SenderResponseTime="1000000" diff --git a/SRT/CDB/alma/DataBlock/PyCalmux/Mapping/Mapping.xml b/SRT/CDB/alma/DataBlock/PyCalmux/Mapping/Mapping.xml new file mode 100755 index 0000000000000000000000000000000000000000..96f1386831e09a6f0a254424d58c9ef5f9bc6400 --- /dev/null +++ b/SRT/CDB/alma/DataBlock/PyCalmux/Mapping/Mapping.xml @@ -0,0 +1,10 @@ + + + + +DBBC60 + + diff --git a/SRT/CDB/alma/DataBlock/Station/Station.xml b/SRT/CDB/alma/DataBlock/Station/Station.xml index b541a6a663b5db28bc7139c0bebd494f268ef6d6..e30eebd0acbb9f70e382411249f9b31c92244258 100644 --- a/SRT/CDB/alma/DataBlock/Station/Station.xml +++ b/SRT/CDB/alma/DataBlock/Station/Station.xml @@ -17,4 +17,5 @@ height="700.0" yPolarMotion="0.0" xPolarMotion="0.0" - geodeticModel="0" /> + geodeticModel="0" + welcomeMessage="Before starting to observe, it is important that you check the status of the telescope visiting the following website:\nhttps://bit.ly/2Xf3aUl\nYou can find it as a bookmark in the browser as well." /> diff --git a/SRT/CDB/alma/MANAGEMENT/Gavino/Gavino.xml b/SRT/CDB/alma/MANAGEMENT/Gavino/Gavino.xml index 7969bde5d97f2653a6178b7ce4877a4bef6ec48c..8bf8de4875ddba9e2e514b05aa7e792d319aa016 100644 --- a/SRT/CDB/alma/MANAGEMENT/Gavino/Gavino.xml +++ b/SRT/CDB/alma/MANAGEMENT/Gavino/Gavino.xml @@ -30,7 +30,7 @@ DefaultBackendInstance="BACKENDS/TotalPower" DefaultDataReceiverInstance="MANAGEMENT/FitsZilla" DefaultProjectCode="Maintenance" - CheckProjectCode="false" + CheckProjectCode="true" > diff --git a/SRT/CDB/alma/MINORSERVO/Boss/Boss.xml b/SRT/CDB/alma/MINORSERVO/Boss/Boss.xml index 6612d5d11eac39b436ffbd3251b7d5a8d7ea5320..d4e2d5e3df522cf17aa21247c842ed51e2af16e7 100644 --- a/SRT/CDB/alma/MINORSERVO/Boss/Boss.xml +++ b/SRT/CDB/alma/MINORSERVO/Boss/Boss.xml @@ -62,7 +62,7 @@ @ GFR: park; @ SRP: TX = (-1.5); TY = (29.556666666666498, 0.263472663139432, -0.018206701940039, 0.000072373113855); - TZ = (-62.4908146635, 6.98439048963, -0.29490654835, 0.00576168925985, -5.37111297435e-05, 1.93982122885e-07 ); + TZ = (-38.3143893309, 4.30888128547, -0.18265795755, 0.00350049382452, -3.17057523513e-05, 1.11006707448e-07); RX = (-0.0055555555555569409, 0.00014822163433269445, 0.000027586713698, -0.000000077732053); RY = (-0.036111111111111108); RZ = (0); diff --git a/SRT/CDB/alma/RECEIVERS/Boss/Boss.xml b/SRT/CDB/alma/RECEIVERS/Boss/Boss.xml index 71c9c8c40ae09140fb1c5437f35919719fedd0a3..94d1d120bbc40eddd07ff6659c2c8c2815460969 100644 --- a/SRT/CDB/alma/RECEIVERS/Boss/Boss.xml +++ b/SRT/CDB/alma/RECEIVERS/Boss/Boss.xml @@ -11,7 +11,7 @@ RepetitionExpireTime="10000000" StatusPersistenceTime="4000000" PropertiesUpdateTime="3000000" - DewarPositionerInterface=""> + DewarPositionerInterface="IDL:alma/Receivers/DewarPositioner:1.0"> @@ -24,8 +24,14 @@ - + - + + + + + + + diff --git a/SRT/Configuration/CDB/MACI/Components/BACKENDS/PyCalmux/PyCalmux.xml b/SRT/Configuration/CDB/MACI/Components/BACKENDS/PyCalmux/PyCalmux.xml new file mode 100644 index 0000000000000000000000000000000000000000..46583798773e85cea63de52652496d767c0bc3b7 --- /dev/null +++ b/SRT/Configuration/CDB/MACI/Components/BACKENDS/PyCalmux/PyCalmux.xml @@ -0,0 +1,19 @@ + + + + diff --git a/SRT/Configuration/CDB/MACI/Components/RECEIVERS/LO_CBAND/LO_CBAND.xml b/SRT/Configuration/CDB/MACI/Components/RECEIVERS/LO_CBAND/LO_CBAND.xml index fd19e1383324891cd6a1afa6d0bbab18bfa0f31e..10c819853d9ee5b4665e96653f65029264f2e226 100644 --- a/SRT/Configuration/CDB/MACI/Components/RECEIVERS/LO_CBAND/LO_CBAND.xml +++ b/SRT/Configuration/CDB/MACI/Components/RECEIVERS/LO_CBAND/LO_CBAND.xml @@ -11,7 +11,7 @@ Name="LO_CBAND" Code="LocalOscillatorImpl.LocalOscillator" Type="IDL:alma/Receivers/LocalOscillator:1.0" - Container="LocalOscillatorLPContainer" + Container="LocalOscillatorCContainer" KeepAliveTime="10" Default="false" ImplLang="py" diff --git a/SRT/Configuration/CDB/MACI/Components/RECEIVERS/LO_KBAND/LO_KBAND.xml b/SRT/Configuration/CDB/MACI/Components/RECEIVERS/LO_KBAND/LO_KBAND.xml index eb9a4c43a3444834af72354f9b447ac762a70227..266c353b109590e190fbeca276bc6fdf82ff3292 100644 --- a/SRT/Configuration/CDB/MACI/Components/RECEIVERS/LO_KBAND/LO_KBAND.xml +++ b/SRT/Configuration/CDB/MACI/Components/RECEIVERS/LO_KBAND/LO_KBAND.xml @@ -11,7 +11,7 @@ Name="LO_KBAND" Code="LocalOscillatorImpl.LocalOscillator" Type="IDL:alma/Receivers/LocalOscillator:1.0" - Container="LocalOscillatorLPContainer" + Container="LocalOscillatorKContainer" KeepAliveTime="10" Default="false" ImplLang="py" diff --git a/SRT/Configuration/CDB/MACI/Containers/LocalOscillatorCContainer/LocalOscillatorCContainer.xml b/SRT/Configuration/CDB/MACI/Containers/LocalOscillatorCContainer/LocalOscillatorCContainer.xml new file mode 100644 index 0000000000000000000000000000000000000000..645ee4c3a80e6ffb3db572aa99ba974944d582be --- /dev/null +++ b/SRT/Configuration/CDB/MACI/Containers/LocalOscillatorCContainer/LocalOscillatorCContainer.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + diff --git a/SRT/Configuration/CDB/MACI/Containers/LocalOscillatorKContainer/LocalOscillatorKContainer.xml b/SRT/Configuration/CDB/MACI/Containers/LocalOscillatorKContainer/LocalOscillatorKContainer.xml new file mode 100644 index 0000000000000000000000000000000000000000..645ee4c3a80e6ffb3db572aa99ba974944d582be --- /dev/null +++ b/SRT/Configuration/CDB/MACI/Containers/LocalOscillatorKContainer/LocalOscillatorKContainer.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + diff --git a/SRT/Configuration/CDB/MACI/Containers/PyCalmuxContainer/PyCalmuxContainer.xml b/SRT/Configuration/CDB/MACI/Containers/PyCalmuxContainer/PyCalmuxContainer.xml new file mode 100644 index 0000000000000000000000000000000000000000..6563a97be273ebaf5e0081e044894672271110e2 --- /dev/null +++ b/SRT/Configuration/CDB/MACI/Containers/PyCalmuxContainer/PyCalmuxContainer.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + diff --git a/SRT/Configuration/CDB/MACI/Managers/Manager/Manager.xml b/SRT/Configuration/CDB/MACI/Managers/Manager/Manager.xml index 2b019586d2a886858daa2121598aec44618ef176..89a110563349da1b04a2d6ef42d675dcac526df9 100755 --- a/SRT/Configuration/CDB/MACI/Managers/Manager/Manager.xml +++ b/SRT/Configuration/CDB/MACI/Managers/Manager/Manager.xml @@ -33,7 +33,6 @@ - diff --git a/SRT/Configuration/CDB/alma/BACKENDS/PyCalmux/PyCalmux.xml b/SRT/Configuration/CDB/alma/BACKENDS/PyCalmux/PyCalmux.xml new file mode 100644 index 0000000000000000000000000000000000000000..efff824a196945c61b59e43312440c33b5a00de3 --- /dev/null +++ b/SRT/Configuration/CDB/alma/BACKENDS/PyCalmux/PyCalmux.xml @@ -0,0 +1,11 @@ + + + diff --git a/SRT/Configuration/CDB/alma/BACKENDS/TotalPower/TotalPower.xml b/SRT/Configuration/CDB/alma/BACKENDS/TotalPower/TotalPower.xml index ddd1531743470443f346bd62e1d0bf4985c91839..59741c7d714acb45d6cca343887eb6ff7e24db3d 100644 --- a/SRT/Configuration/CDB/alma/BACKENDS/TotalPower/TotalPower.xml +++ b/SRT/Configuration/CDB/alma/BACKENDS/TotalPower/TotalPower.xml @@ -18,7 +18,7 @@ RepetitionCacheTime="2000000" RepetitionExpireTime="5000000" DataPort="6001" - DataIPAddress="192.168.200.200" + DataIPAddress="192.168.200.203" DataLatency="3000000" SenderSleepTime="300000" SenderResponseTime="1000000" diff --git a/SRT/Configuration/CDB/alma/DataBlock/PyCalmux/Mapping/Mapping.xml b/SRT/Configuration/CDB/alma/DataBlock/PyCalmux/Mapping/Mapping.xml new file mode 100755 index 0000000000000000000000000000000000000000..091831a26a432fad08ac5d4d4e0ad0ecc7de3c86 --- /dev/null +++ b/SRT/Configuration/CDB/alma/DataBlock/PyCalmux/Mapping/Mapping.xml @@ -0,0 +1,11 @@ + + + + +DBBC60 +DFB80 + + diff --git a/SRT/Configuration/CDB/alma/DataBlock/Sardara/Sardara.xml b/SRT/Configuration/CDB/alma/DataBlock/Sardara/Sardara.xml index 177d103b2019c9625e5a1745976dd32b1fe6e0a3..43975da9bd07daf3678e6c360d6df2cff09e1314 100644 --- a/SRT/Configuration/CDB/alma/DataBlock/Sardara/Sardara.xml +++ b/SRT/Configuration/CDB/alma/DataBlock/Sardara/Sardara.xml @@ -20,6 +20,36 @@ 1024 + + SK01 + 4 + TRUE + GREGORIAN + 2 + 1500.0 + 7.0 + 0 1 2 3 + L R L R + 0 0 1 1 + 0 1 0 1 + 1024 + + + + SK02 + 4 + TRUE + GREGORIAN + 2 + 1500.0 + 7.0 + 0 1 2 3 + L R L R + 0 0 2 2 + 0 1 0 1 + 1024 + + SK03 4 @@ -35,6 +65,36 @@ 1024 + + SK04 + 4 + TRUE + GREGORIAN + 2 + 1500.0 + 7.0 + 0 1 2 3 + L R L R + 0 0 4 4 + 0 1 0 1 + 1024 + + + + SK05 + 4 + TRUE + GREGORIAN + 2 + 1500.0 + 7.0 + 0 1 2 3 + L R L R + 0 0 5 5 + 0 1 0 1 + 1024 + + SK06 4 @@ -125,6 +185,36 @@ 1024 + + SK01S + 4 + TRUE + GREGORIAN + 2 + 1500.0 + 7.0 + 0 1 2 3 + S S S S + 0 0 1 1 + 0 1 0 1 + 1024 + + + + SK02S + 4 + TRUE + GREGORIAN + 2 + 1500.0 + 7.0 + 0 1 2 3 + S S S S + 0 0 2 2 + 0 1 0 1 + 1024 + + SK03S 4 @@ -140,6 +230,36 @@ 1024 + + SK04S + 4 + TRUE + GREGORIAN + 2 + 1500.0 + 7.0 + 0 1 2 3 + S S S S + 0 0 4 4 + 0 1 0 1 + 1024 + + + + SK05S + 4 + TRUE + GREGORIAN + 2 + 1500.0 + 7.0 + 0 1 2 3 + S S S S + 0 0 5 5 + 0 1 0 1 + 1024 + + SK06S 4 diff --git a/SRT/Configuration/CDB/alma/DataBlock/Station/Station.xml b/SRT/Configuration/CDB/alma/DataBlock/Station/Station.xml index 7b56a74e5efc5d2e919a1df0bfef62fc3db812fc..2fd571543bfa40a2db57f74d58b1757aa42bef2f 100644 --- a/SRT/Configuration/CDB/alma/DataBlock/Station/Station.xml +++ b/SRT/Configuration/CDB/alma/DataBlock/Station/Station.xml @@ -17,4 +17,5 @@ height="650.0" yPolarMotion="0.0" xPolarMotion="0.0" - geodeticModel="0" /> + geodeticModel="0" + welcomeMessage="Before starting to observe, it is important that you check the status of the telescope visiting the following website:\nhttps://bit.ly/2Xf3aUl\nYou can find it as a bookmark in the browser as well." /> diff --git a/SRT/Configuration/CDB/alma/MANAGEMENT/Gavino/Gavino.xml b/SRT/Configuration/CDB/alma/MANAGEMENT/Gavino/Gavino.xml index fbbdbdcda6defca2d7e36fd6cf7bc5277a73bfeb..0e7feb798bf5c338aab54a15726f8b5bdb48303a 100644 --- a/SRT/Configuration/CDB/alma/MANAGEMENT/Gavino/Gavino.xml +++ b/SRT/Configuration/CDB/alma/MANAGEMENT/Gavino/Gavino.xml @@ -30,7 +30,7 @@ DefaultBackendInstance="BACKENDS/TotalPower" DefaultDataReceiverInstance="MANAGEMENT/FitsZilla" DefaultProjectCode="Maintenance" - CheckProjectCode="false" + CheckProjectCode="true" > diff --git a/SRT/Configuration/CDB/alma/MINORSERVO/Boss/Boss.xml b/SRT/Configuration/CDB/alma/MINORSERVO/Boss/Boss.xml index fa26b570923cb7d2bbc96363dee19beb9cace73c..a688f9781af6fa73dcdfc2aa0e943135c45b1c51 100644 --- a/SRT/Configuration/CDB/alma/MINORSERVO/Boss/Boss.xml +++ b/SRT/Configuration/CDB/alma/MINORSERVO/Boss/Boss.xml @@ -62,7 +62,7 @@ @ GFR: park; @ SRP: TX = (-1.5); TY = (29.556666666666498, 0.263472663139432, -0.018206701940039, 0.000072373113855); - TZ = (-62.4908146635, 6.98439048963, -0.29490654835, 0.00576168925985, -5.37111297435e-05, 1.93982122885e-07 ); + TZ = (-38.3143893309, 4.30888128547, -0.18265795755, 0.00350049382452, -3.17057523513e-05, 1.11006707448e-07); RX = (-0.0055555555555569409, 0.00014822163433269445, 0.000027586713698, -0.000000077732053); RY = (-0.036111111111111108); RZ = (0); diff --git a/SRT/Misc/SRTScripts/app-defaults/discosStartup.xml b/SRT/Misc/SRTScripts/app-defaults/discosStartup.xml index ef8122fbd93888eb898f0629bb12074630619c62..759140ae0667759647440b5223d38ffcc60f6738 100644 --- a/SRT/Misc/SRTScripts/app-defaults/discosStartup.xml +++ b/SRT/Misc/SRTScripts/app-defaults/discosStartup.xml @@ -14,7 +14,7 @@ - + @@ -82,6 +82,24 @@ MASTERHOST discos + + LocalOscillatorCContainer + py + + true + 0 + MASTERHOST + discos + + + LocalOscillatorKContainer + py + + true + 0 + MASTERHOST + discos + LoggerContainer cpp @@ -154,6 +172,15 @@ MASTERHOST discos + + PyCalmuxContainer + py + + true + 0 + MASTERHOST + discos + SardaraContainer cpp diff --git a/SRT/Servers/SRT7GHzReceiver/include/ComponentCore.h b/SRT/Servers/SRT7GHzReceiver/include/ComponentCore.h index c090d68a0647a6623402f13f86cefaaf5b49aee6..36f3a4a3588cae923f4bdc960f4232f9d06a4ab8 100644 --- a/SRT/Servers/SRT7GHzReceiver/include/ComponentCore.h +++ b/SRT/Servers/SRT7GHzReceiver/include/ComponentCore.h @@ -268,31 +268,31 @@ public: * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at cool head in °K */ - double getCryoCoolHead() const { return m_cryoCoolHead; } + CConfiguration::BoardValue getCryoCoolHead() const { return m_cryoCoolHead; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at cool head window in °K */ - double getCryoCoolHeadWin() const { return m_cryoCoolHeadWin; } + CConfiguration::BoardValue getCryoCoolHeadWin() const { return m_cryoCoolHeadWin; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at LNA in °K */ - double getCryoLNA() const { return m_cryoLNA; } + CConfiguration::BoardValue getCryoLNA() const { return m_cryoLNA; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at LNA window in °K */ - double getCryoLNAWin() const { return m_cryoLNAWin; } + CConfiguration::BoardValue getCryoLNAWin() const { return m_cryoLNAWin; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the vertex temperature */ - double getEnvironmentTemperature() const { return m_environmentTemperature; } + CConfiguration::BoardValue getEnvironmentTemperature() const { return m_environmentTemperature; } /** * This is getter method. No need to make it thread safe...... @@ -405,12 +405,12 @@ private: ACS::longSeq m_polarization; IRA::CString m_setupMode; double m_vacuum; - double m_cryoCoolHead; - double m_cryoCoolHeadWin; - double m_cryoLNA; - double m_cryoLNAWin; + CConfiguration::BoardValue m_cryoCoolHead; + CConfiguration::BoardValue m_cryoCoolHeadWin; + CConfiguration::BoardValue m_cryoLNA; + CConfiguration::BoardValue m_cryoLNAWin; + CConfiguration::BoardValue m_environmentTemperature; double m_vacuumDefault; - double m_environmentTemperature; bool m_calDiode; IRA::ReceiverControl::FetValues m_fetValues; DWORD m_statusWord; diff --git a/SRT/Servers/SRT7GHzReceiver/include/Configuration.h b/SRT/Servers/SRT7GHzReceiver/include/Configuration.h index 3105dbd2fccec694218edb62c9eb39657dd1110c..a3a59804c0759cbf0e0e9bf66d7f9ef5b4de8612 100644 --- a/SRT/Servers/SRT7GHzReceiver/include/Configuration.h +++ b/SRT/Servers/SRT7GHzReceiver/include/Configuration.h @@ -15,6 +15,10 @@ #include #include +// Dummy value for a board connection error +#define CEDUMMY 100000 + + /** * This class implements the component configuration. The data inside this class are initialized at the startup from the * configuration database and then are used (read) inside the component. @@ -48,6 +52,12 @@ public: double relativePower; } TFeedValue; + typedef struct { + double temperature; + ACS::Time timestamp; + } BoardValue; + + /** * Default constructor */ diff --git a/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureCoolHead.h b/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureCoolHead.h index 3de389a51007a56d4d042829cbb4b19e6abd3884..dbe0ca39dc2e4d3952dd9b27450e045b48997baf 100644 --- a/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureCoolHead.h +++ b/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureCoolHead.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoCoolHead(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoCoolHead(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h b/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h index f7a7337b089a36d2914f8ebcaa925e78770e0a06..60926f0131ac54925e57cc4b918d3ad05a507f58 100644 --- a/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h +++ b/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoCoolHeadWin(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoCoolHeadWin(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureLNA.h b/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureLNA.h index 9f181b3ea2cecaa6d068dabf39a1eccebc483d6f..f5376987345778d437f5f84a275e156d53ddc5bb 100644 --- a/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureLNA.h +++ b/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureLNA.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoLNA(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoLNA(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureLNAWindow.h b/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureLNAWindow.h index 3ad24005e399980e23e5cbdc0cdc272c64cd6e7a..a03d53720c9c4276e98fb2b058b14e2fe29e582a 100644 --- a/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureLNAWindow.h +++ b/SRT/Servers/SRT7GHzReceiver/include/DevIOCryoTemperatureLNAWindow.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoLNAWin(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoLNAWin(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRT7GHzReceiver/include/DevIOEnvTemperature.h b/SRT/Servers/SRT7GHzReceiver/include/DevIOEnvTemperature.h index aff44b89d51e4988cafb81b9d4b971afaac5d032..b92bc1f38c7183bc17c8e58f19f64f904951f0f7 100644 --- a/SRT/Servers/SRT7GHzReceiver/include/DevIOEnvTemperature.h +++ b/SRT/Servers/SRT7GHzReceiver/include/DevIOEnvTemperature.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getEnvironmentTemperature(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getEnvironmentTemperature(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRT7GHzReceiver/src/ComponentCore.cpp b/SRT/Servers/SRT7GHzReceiver/src/ComponentCore.cpp index 5290ef93f4662fe76db045a1f7f6fa5641b50b4e..4e29f8e85b1a1dec2d0b690d9e0f8e977e716adc 100644 --- a/SRT/Servers/SRT7GHzReceiver/src/ComponentCore.cpp +++ b/SRT/Servers/SRT7GHzReceiver/src/ComponentCore.cpp @@ -21,7 +21,12 @@ void CComponentCore::initialize(maci::ContainerServices* services) m_control=NULL; m_localOscillatorDevice=Receivers::LocalOscillator::_nil(); m_localOscillatorFault=false; - m_cryoCoolHead=m_cryoCoolHeadWin= m_cryoLNA=m_cryoLNAWin=m_vacuum=0.0; + m_cryoCoolHead.temperature = 0.0; + m_cryoCoolHeadWin.temperature = 0.0; + m_cryoLNA.temperature = 0.0; + m_cryoLNAWin.temperature = 0.0; + m_environmentTemperature.temperature = 20.0; + m_vacuum=0.0; m_calDiode=false; m_fetValues.VDL=m_fetValues.IDL=m_fetValues.VGL=m_fetValues.VDR=m_fetValues.IDR=m_fetValues.VGR=0.0; m_statusWord=0; @@ -142,6 +147,25 @@ void CComponentCore::activate() throw (ReceiversErrors::ModeErrorExImpl,Componen guard.release(); lnaOn(); // throw (ReceiversErrors::NoRemoteControlErrorExImpl,ReceiversErrors::ReceiverControlBoardErrorExImpl) externalCalOff(); + + bool answer; + try { + answer=m_control->isRemoteOn(); + } + catch (IRA::ReceiverControlEx& ex) { + _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::activate()"); + impl.setDetails(ex.what().c_str()); + setStatusBit(CONNECTIONERROR); + throw impl; + } + if (answer) { + _IRA_LOGFILTER_LOG(LM_NOTICE, "CComponentCore::activate()", "RECEIVER_COMMUNICATION_MODE_REMOTE"); + clearStatusBit(LOCAL); + } + else { + _IRA_LOGFILTER_LOG(LM_NOTICE, "CComponentCore::activate()", "RECEIVER_COMMUNICATION_MODE_LOCAL"); + setStatusBit(LOCAL); + } } @@ -157,10 +181,10 @@ void CComponentCore::externalCalOn() throw ( throw impl; } guard.release(); - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::externalCalOn()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::externalCalOn()"); + // throw impl; + // } try { m_control->setExtCalibrationOn(); } @@ -197,10 +221,10 @@ void CComponentCore::externalCalOff() throw ( throw impl; } guard.release(); - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::externalCalOff()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::externalCalOff()"); + // throw impl; + // } try { m_control->setExtCalibrationOff(); } @@ -269,10 +293,10 @@ void CComponentCore::calOn() throw (ReceiversErrors::NoRemoteControlErrorExImpl, throw impl; } // guard.release(); - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::calOn()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::calOn()"); + // throw impl; + // } try { m_control->setCalibrationOn(); } @@ -296,10 +320,10 @@ void CComponentCore::calOff() throw (ReceiversErrors::NoRemoteControlErrorExImpl throw impl; } // guard.release(); - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::calOff()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::calOff()"); + // throw impl; + // } try { m_control->setCalibrationOff(); } @@ -352,10 +376,10 @@ void CComponentCore::vacuumSensorOn() throw (ReceiversErrors::NoRemoteControlErr void CComponentCore::lnaOff() throw (ReceiversErrors::NoRemoteControlErrorExImpl,ReceiversErrors::ReceiverControlBoardErrorExImpl) { - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::lnaOff()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::lnaOff()"); + // throw impl; + // } try { m_control-> turnRightLNAsOff(); m_control-> turnLeftLNAsOff(); @@ -371,10 +395,10 @@ void CComponentCore::lnaOff() throw (ReceiversErrors::NoRemoteControlErrorExImpl void CComponentCore::lnaOn() throw (ReceiversErrors::NoRemoteControlErrorExImpl,ReceiversErrors::ReceiverControlBoardErrorExImpl) { - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::lnaOn()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::lnaOn()"); + // throw impl; + // } try { m_control-> turnRightLNAsOn(); m_control-> turnLeftLNAsOn(); @@ -693,10 +717,10 @@ void CComponentCore::updateComponent() { baci::ThreadSyncGuard guard(&m_mutex); m_componentStatus=Management::MNG_OK; - if (checkStatusBit(LOCAL)) { - setComponentStatus(Management::MNG_FAILURE); - _IRA_LOGFILTER_LOG(LM_CRITICAL,"CComponentCore::updateComponent()","RECEVER_NOT_REMOTELY_CONTROLLABLE"); - } + // if (checkStatusBit(LOCAL)) { + // setComponentStatus(Management::MNG_FAILURE); + // _IRA_LOGFILTER_LOG(LM_CRITICAL,"CComponentCore::updateComponent()","RECEIVER_NOT_REMOTELY_CONTROLLABLE"); + // } if (checkStatusBit(VACUUMPUMPFAULT)) { setComponentStatus(Management::MNG_WARNING); _IRA_LOGFILTER_LOG(LM_WARNING,"CComponentCore::updateComponent()","VACUUM_PUMP_FAILURE"); @@ -832,6 +856,22 @@ void CComponentCore::updateIsRemote() throw (ReceiversErrors::ReceiverControlBoa setStatusBit(CONNECTIONERROR); throw impl; } + + if (checkStatusBit(LOCAL) && answer) { + _IRA_LOGFILTER_LOG( + LM_NOTICE, + "CComponentCore::updateIsRemote()", + "RECEIVER_SWITCHED_FROM_LOCAL_TO_REMOTE" + ); + } + else if (!checkStatusBit(LOCAL) && !answer) { + _IRA_LOGFILTER_LOG( + LM_NOTICE, + "CComponentCore::updateIsRemote()", + "RECEIVER_SWITCHED_FROM_REMOTE_TO_LOCAL" + ); + } + if (!answer) setStatusBit(LOCAL); else clearStatusBit(LOCAL); clearStatusBit(CONNECTIONERROR); // the communication was ok so clear the CONNECTIONERROR bit @@ -876,9 +916,11 @@ void CComponentCore::updateCryoCoolHead() throw (ReceiversErrors::ReceiverContro { // not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoCoolHead=m_control->cryoTemperature(0,CComponentCore::voltage2Kelvin); + m_cryoCoolHead.temperature = m_control->cryoTemperature(0,CComponentCore::voltage2Kelvin); + m_cryoCoolHead.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoCoolHead.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoCoolHead()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -891,9 +933,11 @@ void CComponentCore::updateCryoCoolHeadWin() throw (ReceiversErrors::ReceiverCon { // not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoCoolHeadWin=m_control->cryoTemperature(1,CComponentCore::voltage2Kelvin); + m_cryoCoolHeadWin.temperature = m_control->cryoTemperature(1,CComponentCore::voltage2Kelvin); + m_cryoCoolHeadWin.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoCoolHeadWin.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoCoolHeadWin()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -906,9 +950,11 @@ void CComponentCore::updateCryoLNA() throw (ReceiversErrors::ReceiverControlBoar { // not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoLNA=m_control->cryoTemperature(3,CComponentCore::voltage2Kelvin); + m_cryoLNA.temperature = m_control->cryoTemperature(3,CComponentCore::voltage2Kelvin); + m_cryoLNA.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoLNA.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoLNA()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -921,9 +967,11 @@ void CComponentCore::updateCryoLNAWin() throw (ReceiversErrors::ReceiverControlB { // not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoLNAWin=m_control->cryoTemperature(4,CComponentCore::voltage2Kelvin); + m_cryoLNAWin.temperature = m_control->cryoTemperature(4,CComponentCore::voltage2Kelvin); + m_cryoLNAWin.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoLNAWin.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoLNAWin()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -936,9 +984,11 @@ void CComponentCore::updateEnvironmentTemperature() throw (ReceiversErrors::Rece { // not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_environmentTemperature = m_control->vertexTemperature(CComponentCore::voltage2Celsius); + m_environmentTemperature.temperature = m_control->vertexTemperature(CComponentCore::voltage2Celsius); + m_environmentTemperature.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_environmentTemperature.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateEnvironmentTemperature()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); diff --git a/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureCoolHead.h b/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureCoolHead.h index 3de389a51007a56d4d042829cbb4b19e6abd3884..ea0baa5e2aa599cd8a4cbe1d1c1b10f35884c807 100644 --- a/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureCoolHead.h +++ b/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureCoolHead.h @@ -12,6 +12,8 @@ #include #include +#include "MFKBandBaseConf.h" + /** * This class is derived from template DevIO and it is used by the cryoTemparatureCoolHead property of the component. @@ -54,8 +56,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoCoolHead(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoCoolHead(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** @@ -70,6 +73,7 @@ public: private: CComponentCore* m_pCore; double m_val; + ACS::Time m_timestamp_lc; // Timestamp of last connection }; #endif diff --git a/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h b/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h index f7a7337b089a36d2914f8ebcaa925e78770e0a06..f2489d6726c73c20044f643a53d606aa050efa28 100644 --- a/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h +++ b/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoCoolHeadWin(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoCoolHeadWin(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** @@ -70,6 +71,7 @@ public: private: CComponentCore* m_pCore; double m_val; + ACS::Time m_timestamp_lc; // Timestamp of last connection }; #endif diff --git a/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureLNA.h b/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureLNA.h index cf8722777adf9176e2097d5f2c5f0c247212821a..6fbb0f7b94e8a1f65571bff886c385ed7f6dca24 100644 --- a/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureLNA.h +++ b/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureLNA.h @@ -56,8 +56,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoLNA(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoLNA(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** @@ -72,6 +73,7 @@ public: private: CComponentCore* m_pCore; double m_val; + ACS::Time m_timestamp_lc; // Timestamp of last connection }; #endif diff --git a/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureLNAWindow.h b/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureLNAWindow.h index 3ad24005e399980e23e5cbdc0cdc272c64cd6e7a..6ac4c6038323286265e97c0fe9df248d5ffafa44 100644 --- a/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureLNAWindow.h +++ b/SRT/Servers/SRTKBandMFReceiver/include/DevIOCryoTemperatureLNAWindow.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoLNAWin(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoLNAWin(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** @@ -70,6 +71,7 @@ public: private: CComponentCore* m_pCore; double m_val; + ACS::Time m_timestamp_lc; // Timestamp of last connection }; #endif diff --git a/SRT/Servers/SRTKBandMFReceiver/include/DevIOEnvTemperature.h b/SRT/Servers/SRTKBandMFReceiver/include/DevIOEnvTemperature.h index 7bafa6fc190d48a63fa70ae304665426af874ffe..538523f991c8daa53044e1ef804d35fae67e78dd 100644 --- a/SRT/Servers/SRTKBandMFReceiver/include/DevIOEnvTemperature.h +++ b/SRT/Servers/SRTKBandMFReceiver/include/DevIOEnvTemperature.h @@ -48,8 +48,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val = m_pCore->getVertexTemperature(); - timestamp = getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getVertexTemperature(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } @@ -66,6 +67,7 @@ public: private: CComponentCore* m_pCore; double m_val; + ACS::Time m_timestamp_lc; // Timestamp of last connection }; #endif diff --git a/SRT/Servers/SRTLPBandReceiver/include/ComponentCore.h b/SRT/Servers/SRTLPBandReceiver/include/ComponentCore.h index 3bb68f83fd4d2af97c929d39417e3a5773e6e95f..a9e52ce1e7f2de5a06533f19077be8daf0a1e940 100755 --- a/SRT/Servers/SRTLPBandReceiver/include/ComponentCore.h +++ b/SRT/Servers/SRTLPBandReceiver/include/ComponentCore.h @@ -327,35 +327,35 @@ public: * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at cool head in °K */ - double getCryoCoolHead() const { return m_cryoCoolHead; } + CConfiguration::BoardValue getCryoCoolHead() const { return m_cryoCoolHead; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at cool head window in °K */ - double getCryoCoolHeadWin() const { return m_cryoCoolHeadWin; } + CConfiguration::BoardValue getCryoCoolHeadWin() const { return m_cryoCoolHeadWin; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at LNA in °K */ - double getCryoLNA() const { return m_cryoLNA; } + CConfiguration::BoardValue getCryoLNA() const { return m_cryoLNA; } /** * This is getter method. No need to make it thread safe...... * @return the current value of the cryogenic temperature at LNA window in °K */ - double getCryoLNAWin() const { return m_cryoLNAWin; } + CConfiguration::BoardValue getCryoLNAWin() const { return m_cryoLNAWin; } /** * This is getter method. No need to make it thread safe...... * @return the current vertex temperature in °K */ - double getVertexTemperature() const { return m_envTemperature; } + CConfiguration::BoardValue getVertexTemperature() const { return m_envTemperature; } /** @@ -595,12 +595,12 @@ private: bool m_localOscillatorFault; double m_localOscillatorValue; double m_vacuum; - double m_cryoCoolHead; - double m_cryoCoolHeadWin; - double m_cryoLNA; - double m_cryoLNAWin; + CConfiguration::BoardValue m_cryoCoolHead; + CConfiguration::BoardValue m_cryoCoolHeadWin; + CConfiguration::BoardValue m_cryoLNA; + CConfiguration::BoardValue m_cryoLNAWin; + CConfiguration::BoardValue m_envTemperature; double m_vacuumDefault; - double m_envTemperature; bool m_calDiode; IRA::ReceiverControl::FetValues m_fetValues; DWORD m_statusWord; diff --git a/SRT/Servers/SRTLPBandReceiver/include/Configuration.h b/SRT/Servers/SRTLPBandReceiver/include/Configuration.h index 9bfc1b8ebb9963671db66b20688838659297a638..e008e82e62cdcadc8ade1fb5d7d558ed0f574d7c 100755 --- a/SRT/Servers/SRTLPBandReceiver/include/Configuration.h +++ b/SRT/Servers/SRTLPBandReceiver/include/Configuration.h @@ -17,6 +17,9 @@ #include #include "utils.h" +// Dummy value for a board connection error +#define CEDUMMY 100000 + /** * This class implements the component configuration. The data inside this class are initialized at the startup from the @@ -53,6 +56,12 @@ public: double relativePower; } TFeedValue; + typedef struct { + double temperature; + ACS::Time timestamp; + } BoardValue; + + /** * Default constructor */ diff --git a/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureCoolHead.h b/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureCoolHead.h index 3de389a51007a56d4d042829cbb4b19e6abd3884..4980f46bac84cbb5f3d93d642f14c66b0e490579 100755 --- a/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureCoolHead.h +++ b/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureCoolHead.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoCoolHead(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoCoolHead(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h b/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h index f7a7337b089a36d2914f8ebcaa925e78770e0a06..60926f0131ac54925e57cc4b918d3ad05a507f58 100755 --- a/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h +++ b/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureCoolHeadWindow.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoCoolHeadWin(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoCoolHeadWin(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureLNA.h b/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureLNA.h index cf8722777adf9176e2097d5f2c5f0c247212821a..23ec8fd1276349083608897648f7326c181ca3b2 100755 --- a/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureLNA.h +++ b/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureLNA.h @@ -56,8 +56,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoLNA(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoLNA(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureLNAWindow.h b/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureLNAWindow.h index 3ad24005e399980e23e5cbdc0cdc272c64cd6e7a..a03d53720c9c4276e98fb2b058b14e2fe29e582a 100755 --- a/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureLNAWindow.h +++ b/SRT/Servers/SRTLPBandReceiver/include/DevIOCryoTemperatureLNAWindow.h @@ -54,8 +54,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val=m_pCore->getCryoLNAWin(); - timestamp=getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getCryoLNAWin(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } /** diff --git a/SRT/Servers/SRTLPBandReceiver/include/DevIOEnvTemperature.h b/SRT/Servers/SRTLPBandReceiver/include/DevIOEnvTemperature.h index 7bafa6fc190d48a63fa70ae304665426af874ffe..3d4fe791bf1e49d0871fdf727f9483bc58d04d84 100755 --- a/SRT/Servers/SRTLPBandReceiver/include/DevIOEnvTemperature.h +++ b/SRT/Servers/SRTLPBandReceiver/include/DevIOEnvTemperature.h @@ -48,8 +48,9 @@ public: */ CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) { - m_val = m_pCore->getVertexTemperature(); - timestamp = getTimeStamp(); //Completion time + CConfiguration::BoardValue result = m_pCore->getVertexTemperature(); + m_val = result.temperature; + timestamp = result.timestamp; return m_val; } diff --git a/SRT/Servers/SRTLPBandReceiver/src/ComponentCore.cpp b/SRT/Servers/SRTLPBandReceiver/src/ComponentCore.cpp index f74619cbba97ad311b103d10f457bbe29e21fa67..4c6a81efd6801324e42741b6bd85eb3cc3be2d73 100755 --- a/SRT/Servers/SRTLPBandReceiver/src/ComponentCore.cpp +++ b/SRT/Servers/SRTLPBandReceiver/src/ComponentCore.cpp @@ -15,10 +15,11 @@ void CComponentCore::initialize(maci::ContainerServices* services) { m_services = services; m_control = NULL; - m_cryoCoolHead = 0.0; - m_cryoCoolHeadWin = 0.0; - m_cryoLNA = 0.0; - m_cryoLNAWin = 0.0; + m_cryoCoolHead.temperature = 0.0; + m_cryoCoolHeadWin.temperature = 0.0; + m_cryoLNA.temperature = 0.0; + m_cryoLNAWin.temperature = 0.0; + m_envTemperature.temperature = 20.0; m_vacuum = 0.0; m_fetValues.VDL = 0.0; m_fetValues. IDL = 0.0; @@ -221,6 +222,25 @@ void CComponentCore::activate(const char * setup_mode) throw ( guard.release(); lnaOn(); // Throw (ReceiversErrors::NoRemoteControlErrorExImpl,ReceiversErrors::ReceiverControlBoardErrorExImpl) externalCalOff(); + + bool answer; + try { + answer=m_control->isRemoteOn(); + } + catch (IRA::ReceiverControlEx& ex) { + _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::activate()"); + impl.setDetails(ex.what().c_str()); + setStatusBit(CONNECTIONERROR); + throw impl; + } + if (answer) { + _IRA_LOGFILTER_LOG(LM_NOTICE, "CComponentCore::activate()", "RECEIVER_COMMUNICATION_MODE_REMOTE"); + clearStatusBit(LOCAL); + } + else { + _IRA_LOGFILTER_LOG(LM_NOTICE, "CComponentCore::activate()", "RECEIVER_COMMUNICATION_MODE_LOCAL"); + setStatusBit(LOCAL); + } } @@ -236,10 +256,10 @@ void CComponentCore::externalCalOn() throw ( throw impl; } guard.release(); - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::externalCalOn()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::externalCalOn()"); + // throw impl; + // } try { m_control->setExtCalibrationOn(); } @@ -276,10 +296,10 @@ void CComponentCore::externalCalOff() throw ( throw impl; } guard.release(); - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::externalCalOff()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::externalCalOff()"); + // throw impl; + // } try { m_control->setExtCalibrationOff(); } @@ -323,10 +343,10 @@ void CComponentCore::calOn() throw ( throw impl; } // guard.release(); - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::calOn()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::calOn()"); + // throw impl; + // } try { m_control->setCalibrationOn(); m_calDiode=true; @@ -363,10 +383,10 @@ void CComponentCore::calOff() throw ( throw impl; } // guard.release(); - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::calOff()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::calOff()"); + // throw impl; + // } try { m_control->setCalibrationOff(); m_calDiode=false; @@ -439,10 +459,10 @@ void CComponentCore::lnaOff() throw ( ReceiversErrors::ReceiverControlBoardErrorExImpl ) { - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::lnaOff()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::lnaOff()"); + // throw impl; + // } try { m_control-> turnRightLNAsOff(); m_control-> turnLeftLNAsOff(); @@ -462,10 +482,10 @@ void CComponentCore::lnaOn() throw ( ReceiversErrors::ReceiverControlBoardErrorExImpl ) { - if (checkStatusBit(LOCAL)) { - _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::lnaOn()"); - throw impl; - } + // if (checkStatusBit(LOCAL)) { + // _EXCPT(ReceiversErrors::NoRemoteControlErrorExImpl,impl,"CComponentCore::lnaOn()"); + // throw impl; + // } try { m_control-> turnRightLNAsOn(); m_control-> turnLeftLNAsOn(); @@ -932,10 +952,10 @@ void CComponentCore::updateComponent() { baci::ThreadSyncGuard guard(&m_mutex); m_componentStatus=Management::MNG_OK; - if (checkStatusBit(LOCAL)) { - setComponentStatus(Management::MNG_FAILURE); - _IRA_LOGFILTER_LOG(LM_CRITICAL,"CComponentCore::updateComponent()","RECEVER_NOT_REMOTELY_CONTROLLABLE"); - } + // if (checkStatusBit(LOCAL)) { + // setComponentStatus(Management::MNG_FAILURE); + // _IRA_LOGFILTER_LOG(LM_CRITICAL,"CComponentCore::updateComponent()","RECEIVER_NOT_REMOTELY_CONTROLLABLE"); + // } if (checkStatusBit(VACUUMPUMPFAULT)) { setComponentStatus(Management::MNG_WARNING); _IRA_LOGFILTER_LOG(LM_WARNING,"CComponentCore::updateComponent()","VACUUM_PUMP_FAILURE"); @@ -1081,6 +1101,22 @@ void CComponentCore::updateIsRemote() throw (ReceiversErrors::ReceiverControlBoa setStatusBit(CONNECTIONERROR); throw impl; } + + if (checkStatusBit(LOCAL) && answer) { + _IRA_LOGFILTER_LOG( + LM_NOTICE, + "CComponentCore::updateIsRemote()", + "RECEIVER_SWITCHED_FROM_LOCAL_TO_REMOTE" + ); + } + else if (!checkStatusBit(LOCAL) && !answer) { + _IRA_LOGFILTER_LOG( + LM_NOTICE, + "CComponentCore::updateIsRemote()", + "RECEIVER_SWITCHED_FROM_REMOTE_TO_LOCAL" + ); + } + if (!answer) { setStatusBit(LOCAL); } @@ -1129,9 +1165,11 @@ void CComponentCore::updateCryoCoolHead() throw (ReceiversErrors::ReceiverContro { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoCoolHead=m_control->cryoTemperature(0,CComponentCore::voltage2Kelvin); + m_cryoCoolHead.temperature = m_control->cryoTemperature(0,CComponentCore::voltage2Kelvin); + m_cryoCoolHead.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoCoolHead.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoCoolHead()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -1145,9 +1183,11 @@ void CComponentCore::updateCryoCoolHeadWin() throw (ReceiversErrors::ReceiverCon { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoCoolHeadWin=m_control->cryoTemperature(1,CComponentCore::voltage2Kelvin); + m_cryoCoolHeadWin.temperature = m_control->cryoTemperature(1,CComponentCore::voltage2Kelvin); + m_cryoCoolHeadWin.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoCoolHeadWin.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoCoolHeadWin()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -1161,9 +1201,11 @@ void CComponentCore::updateCryoLNA() throw (ReceiversErrors::ReceiverControlBoar { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoLNA=m_control->cryoTemperature(3,CComponentCore::voltage2Kelvin); + m_cryoLNA.temperature = m_control->cryoTemperature(3,CComponentCore::voltage2Kelvin); + m_cryoLNA.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoLNA.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoLNA()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -1177,9 +1219,11 @@ void CComponentCore::updateCryoLNAWin() throw (ReceiversErrors::ReceiverControlB { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoLNAWin=m_control->cryoTemperature(4,CComponentCore::voltage2Kelvin); + m_cryoLNAWin.temperature = m_control->cryoTemperature(4,CComponentCore::voltage2Kelvin); + m_cryoLNAWin.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoLNAWin.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateCryoLNAWin()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -1193,9 +1237,11 @@ void CComponentCore::updateVertexTemperature() throw (ReceiversErrors::ReceiverC { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_envTemperature = m_control->vertexTemperature(CComponentCore::voltage2Celsius); + m_envTemperature.temperature = m_control->vertexTemperature(CComponentCore::voltage2Celsius); + m_envTemperature.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_envTemperature.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::updateVertexTemperature()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); diff --git a/SRT/Servers/SRTMinorServo/include/MSParameters.h b/SRT/Servers/SRTMinorServo/include/MSParameters.h index 872d7b83d3fdb95c0b081b9bc6c1e4ff6ac19612..e7e8d79ae15b38448def19f6c139bbff1d15e941 100644 --- a/SRT/Servers/SRTMinorServo/include/MSParameters.h +++ b/SRT/Servers/SRTMinorServo/include/MSParameters.h @@ -253,9 +253,9 @@ const string status_messages[16] = { // Set the sleep_time in useconds: for instance 2 * 10 means 2 useconds -const unsigned long scheduler_sleep_time = 20 * 10; -const unsigned long listener_sleep_time = 2 * 10; -const unsigned long status_sleep_time = 2000 * 10; // 2ms +const unsigned long scheduler_sleep_time = 40000 * 10; // 40ms +const unsigned long listener_sleep_time = 10000 * 10; // 10ms +const unsigned long status_sleep_time = 80000 * 10; // 80ms // WPServoTalker parameters #define USLEEP_TIME 5 // 5us diff --git a/SystemMake/Makefile b/SystemMake/Makefile index 0cb74ffd3606619609b970c1a52181f80582c8b0..d9a1728b5402d76d11e1dad7dd1e0fb75a55501f 100644 --- a/SystemMake/Makefile +++ b/SystemMake/Makefile @@ -34,7 +34,7 @@ COMMON_LIBRARIES:=SlaLibrary IRALibrary DiscosVersion TextWindowLibrary ParserLi COMMON_SERVERS:=AntennaBoss Observatory OTF PointingModel Refraction SkySource \ Moon FitsWriter Scheduler ReceiversBoss ExternalClients \ CalibrationTool TotalPower NoiseGenerator CustomLogger \ - XBackend PyDewarPositioner Sardara PyLocalOscillator MFKBandBaseReceiver + XBackend PyDewarPositioner Sardara PyLocalOscillator MFKBandBaseReceiver PyCalmux COMMON_CLIENTS:=AntennaBossTextClient ObservatoryTextClient \ GenericBackendTextClient ReceiversBossTextClient \ SystemTerminal CaltoolClient CustomLoggingClient \ @@ -120,7 +120,7 @@ ifeq ($(STATION),Medicina) SlaLibrary IRALibrary TextWindowLibrary ParserLibrary ComponentProxy ModbusChannel XarcosLibrary \ PyTestingLibrary \ AntennaBoss Observatory OTF PointingModel Refraction SkySource Moon FitsWriter Scheduler ReceiversBoss ExternalClients CalibrationTool \ - Metrology TotalPower NoiseGenerator MedicinaMount MedWeatherStation CustomLogger XBackend MedicinaMinorServo\ + TotalPower NoiseGenerator MedicinaMount MedicinaPyLocalOscillator MedicinaPyDMed CustomLogger XBackend MedicinaMinorServo\ AntennaBossTextClient ObservatoryTextClient GenericBackendTextClient ReceiversBossTextClient SystemTerminal CaltoolClient SchedulerTextClient MinorServoBossTextClient\ MedicinaMountTextClient CustomLoggingClient\ Plotter KStars Scripts MedScripts