diff --git a/Noto/CDB/alma/RECEIVERS/NotoReceivers/NotoReceivers.xml b/Noto/CDB/alma/RECEIVERS/NotoReceivers/NotoReceivers.xml index f8b91490ffa815a9e6b326b2d3e567e43dff8729..e18478c1ba5588d22535078d8909a1cab21aabdf 100644 --- a/Noto/CDB/alma/RECEIVERS/NotoReceivers/NotoReceivers.xml +++ b/Noto/CDB/alma/RECEIVERS/NotoReceivers/NotoReceivers.xml @@ -2,6 +2,7 @@ <!-- - History: - 17 - 11 -2016 created Andrea Orlati (a.orlati@ira.inaf.it) + LocalOscillatorInstance="RECEIVERS/LocalOscillator" --> <NotoReceivers xmlns="urn:schemas-cosylab-com:NotoReceivers:1.0" @@ -10,7 +11,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" HPIBIPAddress="192.167.187.201" HPIBPort="1234" - LocalOscillatorInstance="RECEIVERS/LocalOscillator" + LocalOscillatorInstance="" LocalOscillatorEnabledReceivers="KKC QQC CCC MMC" FocusSelectorInterface="IDL:alma/Backends/TotalPower:1.0" > diff --git a/Noto/Configuration/CDB/MACI/Components/BACKENDS/TotalPower/TotalPower.xml b/Noto/Configuration/CDB/MACI/Components/BACKENDS/TotalPower/TotalPower.xml index ba08992d614b5507532b531bcea213612ce8e82e..36c714432d32865ac008eabfb07b827ddf124821 100644 --- a/Noto/Configuration/CDB/MACI/Components/BACKENDS/TotalPower/TotalPower.xml +++ b/Noto/Configuration/CDB/MACI/Components/BACKENDS/TotalPower/TotalPower.xml @@ -12,6 +12,7 @@ Code="TotalPowerImpl" Type="IDL:alma/Backends/TotalPower:1.0" Container="TotalPowerContainer" + Default="true" KeepAliveTime="-1" ImplLang="cpp" /> diff --git a/Noto/Configuration/CDB/alma/BACKENDS/TotalPower/TotalPower.xml b/Noto/Configuration/CDB/alma/BACKENDS/TotalPower/TotalPower.xml index 05b5037dca74dac3d4729fcef2e949d28fcdc6cd..67ceeff705400045e54796ec71838affdd40ccec 100644 --- a/Noto/Configuration/CDB/alma/BACKENDS/TotalPower/TotalPower.xml +++ b/Noto/Configuration/CDB/alma/BACKENDS/TotalPower/TotalPower.xml @@ -18,7 +18,7 @@ RepetitionCacheTime="2000000" RepetitionExpireTime="5000000" DataPort="9001" - DataIPAddress="192.167.187.40" + DataIPAddress="192.167.187.17" DataLatency="3000000" SenderSleepTime="300000" SenderResponseTime="1000000" diff --git a/Noto/Configuration/CDB/alma/DataBlock/TotalPower/TotalPower.xml b/Noto/Configuration/CDB/alma/DataBlock/TotalPower/TotalPower.xml index bb03202f4621b5bdf9ef49270e9a7799c423b844..d0c6a31ee47c4d95da4da840ce6597a48a4bb6d3 100644 --- a/Noto/Configuration/CDB/alma/DataBlock/TotalPower/TotalPower.xml +++ b/Noto/Configuration/CDB/alma/DataBlock/TotalPower/TotalPower.xml @@ -80,7 +80,7 @@ <sections>2</sections> <calSwitchingEnabled>FALSE</calSwitchingEnabled> <inputPort>GREGORIAN</inputPort> - <inputPortDB>3</inputPortDB> + <inputPortDB>9</inputPortDB> <inputPortBW>730</inputPortBW> <beams>1</beams> <section_boards>0 1</section_boards> diff --git a/Noto/Configuration/CDB/alma/Procedures/StationProcedures/StationProcedures.xml b/Noto/Configuration/CDB/alma/Procedures/StationProcedures/StationProcedures.xml index 95447e60d286546a9360acc346c666dc91707b48..239e801a7c75d67d6f4d5bc655e5f9f55f560ed2 100644 --- a/Noto/Configuration/CDB/alma/Procedures/StationProcedures/StationProcedures.xml +++ b/Noto/Configuration/CDB/alma/Procedures/StationProcedures/StationProcedures.xml @@ -88,7 +88,7 @@ ifdist=1,3,-1 ifdist=2,3,-1 ifdist=1,-1,10 - ifdist=2,-1,10 + ifdist=2,-1,11 </body> </Procedure> @@ -121,8 +121,8 @@ calOff ifdist=1,2,-1 ifdist=2,2,-1 - ifdist=1,-1,44 - ifdist=2,-1,44 + ifdist=1,-1,22 + ifdist=2,-1,22 </body> </Procedure> @@ -138,8 +138,8 @@ calOff ifdist=1,4,-1 ifdist=2,4,-1 - ifdist=1,-1,8 - ifdist=2,-1,8 + ifdist=1,-1,10 + ifdist=2,-1,10 </body> </Procedure> @@ -155,7 +155,7 @@ calOff ifdist=1,5,-1 ifdist=2,3,-1 - ifdist=1,-1,8 + ifdist=1,-1,10 ifdist=2,-1,10 </body> </Procedure> diff --git a/Noto/Configuration/CDB/alma/WEATHERSTATION/WeatherStation/WeatherStation.xml b/Noto/Configuration/CDB/alma/WEATHERSTATION/WeatherStation/WeatherStation.xml index 725206827b8ffc74e54db49649cfe2c0fbbafe59..22b444117633d07b15b3753ebc776332db99a1d6 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.103" + IPAddress="192.167.187.244" port="22222" UpdatingThreadTime="10000000"> diff --git a/Noto/Servers/NotoPyIfDistributor/src/_ifdist.py b/Noto/Servers/NotoPyIfDistributor/src/_ifdist.py index 0cf6da9202a54e92880378076e436af08b15c09a..72d40a4b24c20648baad75b2d047858fdd17537a 100644 --- a/Noto/Servers/NotoPyIfDistributor/src/_ifdist.py +++ b/Noto/Servers/NotoPyIfDistributor/src/_ifdist.py @@ -31,12 +31,12 @@ def send_command(ip, port, command): s.connect((ip,int(port))) except socket.error: return "Fail" - s.sendall(command) + s.sendall(command.encode()) time.sleep(0.1) response=s.recv(1024) s.close() - response=response.strip().split('\n') - return response + res=response.decode().strip().split('\n') + return res def cdb(xmlstr): root=ET.fromstring(xmlstr) diff --git a/Noto/Servers/NotoPyLocalOscillator/src/NotoLocalOscillatorImpl/CommandLine.py b/Noto/Servers/NotoPyLocalOscillator/src/NotoLocalOscillatorImpl/CommandLine.py index b9b6581983ec7be01cfec9a7a6e8ba9db671afb7..e534a5614c34c628a23381379dfd9cdb1198d19c 100644 --- a/Noto/Servers/NotoPyLocalOscillator/src/NotoLocalOscillatorImpl/CommandLine.py +++ b/Noto/Servers/NotoPyLocalOscillator/src/NotoLocalOscillatorImpl/CommandLine.py @@ -32,7 +32,7 @@ class CommandLine: def initialize(self): #raises an error..... - self.create() + return self.create() def configure(self,ip,port): ''' @@ -42,7 +42,7 @@ class CommandLine: self.ip=ip self.port=port #raises an error..... - self.connect() + return self.connect() def create(self): try: @@ -63,10 +63,17 @@ class CommandLine: def connect(self): try: if self.connected==False: + #print ("PRovo la connessione") self.sock.connect((self.ip,self.port)) + #print ("Conessione ok") self.connected=True - self.sock.sendall('*CLS\n;SYST:ERR?\n++read\n') + cmd="*CLS\n;SYST:ERR?\n++read\n" + #print ("mando stringa di inizializzazione") + self.sock.sendall(cmd.encode()) + #print ("mandata") msg=self.sock.recv(1024) + #print ("ricevuta risposta :") + #print (msg) except socket.error as msg: self.close() return False @@ -169,7 +176,7 @@ class CommandLine: msg="" if self.check(): try: - self.sock.sendall(cmd) + self.sock.sendall(cmd.encode()) except socket.error as msg: self.close() return False,msg @@ -181,7 +188,8 @@ class CommandLine: msg="" if self.check(): try: - self.sock.sendall(cmd+'\n++read\n') + buff=cmd+'\n++read\n' + self.sock.sendall(cmd.encode()) except socket.error as msg: self.close() return False,msg diff --git a/Noto/Servers/NotoPyLocalOscillator/src/NotoLocalOscillatorImpl/NotoLocalOscillator.py b/Noto/Servers/NotoPyLocalOscillator/src/NotoLocalOscillatorImpl/NotoLocalOscillator.py index 1770e98cc9d4bab2b86900a6cee5dfeaf56ba163..f2126f17b432b54c735e54ebbc5dc6627ce7409b 100644 --- a/Noto/Servers/NotoPyLocalOscillator/src/NotoLocalOscillatorImpl/NotoLocalOscillator.py +++ b/Noto/Servers/NotoPyLocalOscillator/src/NotoLocalOscillatorImpl/NotoLocalOscillator.py @@ -99,16 +99,12 @@ class NotoLocalOscillator(Receivers__POA.LocalOscillator, CharacteristicComponen except Exception: exc=ComponentErrorsImpl.CDBAccessExImpl() raise exc - try: - self.cl.initialize() - except CommandLineError as ex: + if not self.cl.initialize(): exc=ComponentErrorsImpl.SocketErrorExImpl() exc.setData('Reason',ex.__str__) raise exc - try: - self.cl.configure(IP,PORT) - except CommandLineError as ex: - msg="cannot connect to synthesiser, IP %s, error message is %s" %(IP,ex.__str__) + if not self.cl.configure(IP,PORT): + msg="cannot connect to synthesiser, IP %s, PORT %s" %(IP,PORT) exc=ComponentErrorsImpl.SocketErrorExImpl() exc.setData('Reason',msg) raise exc