# SVN changeset patch # User imanay # Date 2013-10-02 15:12:40.088844 # Revision 245 Monitoring test Index: trunk/absroot/source/abspy/bin/client3.py =================================================================== diff --git a/trunk/absroot/source/abspy/bin/client3.py b/trunk/absroot/source/abspy/bin/client3.py --- a/trunk/absroot/source/abspy/bin/client3.py (revision 244) +++ b/trunk/absroot/source/abspy/bin/client3.py (revision 245) @@ -85,6 +85,15 @@ print "======:\n" print bits + def getControlModuleStatus_test(self, data): + + mnt = self.__ConnectionWithCentralControl(cmd = "MNTR", data = data) + #self.__writeFile("report.txt", data) + + print "MNTR:\n" + print "======:\n" + print mnt + def getControlModulePhase(self, opt, u = "50", pw = "10"): if opt == '0': Index: trunk/absroot/source/abspy/bin/server3.py =================================================================== diff --git a/trunk/absroot/source/abspy/bin/server3.py b/trunk/absroot/source/abspy/bin/server3.py --- a/trunk/absroot/source/abspy/bin/server3.py (revision 244) +++ b/trunk/absroot/source/abspy/bin/server3.py (revision 245) @@ -66,6 +66,9 @@ if cmd == "NTST": datarpta = self.__getConnectionStatus(cmd = cmd, rx_buffer = rx_buffer) + + if cmd == "MNTR": + datarpta = self.__getControlModuleStatus_new(cmd = cmd, rx_buffer = rx_buffer) self.commServerObj.sendData(cmd=cmd, data=datarpta, ipDestino = ipSource) @@ -281,7 +284,19 @@ #Using tx buffer return self.bits - + + def __getControlModuleStatus_new(self, cmd, rx_buffer): + + + for id in range(1,65): + if id not in self.enaModules: + continue + + mnt = self.__ConnectionWithControlModules(rx_buffer,cmd,id) + + return mnt + + def __getControlModuleBigPhase(self, cmd, rx_buffer): # all_blocks = "" Index: trunk/absroot/source/abspy/scripts/getControlModuleStatus_new.py =================================================================== diff --git a/trunk/absroot/source/abspy/scripts/getControlModuleStatus_new.py b/trunk/absroot/source/abspy/scripts/getControlModuleStatus_new.py new file mode 10644 --- /dev/null (revision 0) +++ b/trunk/absroot/source/abspy/scripts/getControlModuleStatus_new.py (revision 245) @@ -0,0 +1,13 @@ +import file +from client3 import * +import sys + +absObj = ABSClient(ipDestino="10.10.10.99") +#absObj = ABSClient(ipDestino="10.10.20.27") +#absObj = ABSClient() +if len(sys.argv) == 2: +# ns = "4" + arg = sys.argv[1] + absObj.getControlModuleStatus_test(arg) +else: + print "Only one argument needed." Index: trunk/absroot/source/abspy/scripts/starServer.py =================================================================== diff --git a/trunk/absroot/source/abspy/scripts/starServer.py b/trunk/absroot/source/abspy/scripts/starServer.py --- a/trunk/absroot/source/abspy/scripts/starServer.py (revision 244) +++ b/trunk/absroot/source/abspy/scripts/starServer.py (revision 245) @@ -2,7 +2,7 @@ from server3 import * #absObj = ABSServer(ipDestino="100.100.12.117") -absObj = ABSServer(ipDestino="10.10.10.97") +absObj = ABSServer(ipDestino="10.10.10.99") while 1: absObj.waitRequest() \ No newline at end of file