##// END OF EJS Templates
Monitoring test
imanay -
r244:245
parent child
Show More
@@ -0,0 +1,13
1 import file
2 from client3 import *
3 import sys
4
5 absObj = ABSClient(ipDestino="10.10.10.99")
6 #absObj = ABSClient(ipDestino="10.10.20.27")
7 #absObj = ABSClient()
8 if len(sys.argv) == 2:
9 # ns = "4"
10 arg = sys.argv[1]
11 absObj.getControlModuleStatus_test(arg)
12 else:
13 print "Only one argument needed."
@@ -85,6 +85,15
85 print "======:\n"
85 print "======:\n"
86 print bits
86 print bits
87
87
88 def getControlModuleStatus_test(self, data):
89
90 mnt = self.__ConnectionWithCentralControl(cmd = "MNTR", data = data)
91 #self.__writeFile("report.txt", data)
92
93 print "MNTR:\n"
94 print "======:\n"
95 print mnt
96
88 def getControlModulePhase(self, opt, u = "50", pw = "10"):
97 def getControlModulePhase(self, opt, u = "50", pw = "10"):
89
98
90 if opt == '0':
99 if opt == '0':
@@ -66,6 +66,9
66
66
67 if cmd == "NTST":
67 if cmd == "NTST":
68 datarpta = self.__getConnectionStatus(cmd = cmd, rx_buffer = rx_buffer)
68 datarpta = self.__getConnectionStatus(cmd = cmd, rx_buffer = rx_buffer)
69
70 if cmd == "MNTR":
71 datarpta = self.__getControlModuleStatus_new(cmd = cmd, rx_buffer = rx_buffer)
69
72
70 self.commServerObj.sendData(cmd=cmd, data=datarpta, ipDestino = ipSource)
73 self.commServerObj.sendData(cmd=cmd, data=datarpta, ipDestino = ipSource)
71
74
@@ -281,7 +284,19
281 #Using tx buffer
284 #Using tx buffer
282
285
283 return self.bits
286 return self.bits
284
287
288 def __getControlModuleStatus_new(self, cmd, rx_buffer):
289
290
291 for id in range(1,65):
292 if id not in self.enaModules:
293 continue
294
295 mnt = self.__ConnectionWithControlModules(rx_buffer,cmd,id)
296
297 return mnt
298
299
285 def __getControlModuleBigPhase(self, cmd, rx_buffer):
300 def __getControlModuleBigPhase(self, cmd, rx_buffer):
286
301
287 # all_blocks = ""
302 # all_blocks = ""
@@ -2,7 +2,7
2 from server3 import *
2 from server3 import *
3
3
4 #absObj = ABSServer(ipDestino="100.100.12.117")
4 #absObj = ABSServer(ipDestino="100.100.12.117")
5 absObj = ABSServer(ipDestino="10.10.10.97")
5 absObj = ABSServer(ipDestino="10.10.10.99")
6
6
7 while 1:
7 while 1:
8 absObj.waitRequest() No newline at end of file
8 absObj.waitRequest()
General Comments 0
You need to be logged in to leave comments. Login now