Index: trunk/absroot/source/abspy/abscontrol/module_status.txt =================================================================== diff --git a/trunk/absroot/source/abspy/abscontrol/module_status.txt b/trunk/absroot/source/abspy/abscontrol/module_status.txt new file mode 10644 --- /dev/null (revision 0) +++ b/trunk/absroot/source/abspy/abscontrol/module_status.txt (revision 124) @@ -0,0 +1,66 @@ +Status of modules +---------------- +192.168.1.1 [1 1] +192.168.1.2 [1 1] +192.168.1.3 [0 0] +192.168.1.4 [0 0] +192.168.1.5 [0 0] +192.168.1.6 [0 0] +192.168.1.7 [0 0] +192.168.1.8 [0 0] +192.168.1.9 [0 0] +192.168.1.10 [0 0] +192.168.1.11 [0 0] +192.168.1.12 [1 1] +192.168.1.13 [0 0] +192.168.1.14 [0 0] +192.168.1.15 [0 0] +192.168.1.16 [0 0] +192.168.1.17 [0 0] +192.168.1.18 [0 0] +192.168.1.19 [0 0] +192.168.1.20 [0 0] +192.168.1.21 [0 0] +192.168.1.22 [0 0] +192.168.1.23 [1 1] +192.168.1.24 [0 0] +192.168.1.25 [0 0] +192.168.1.26 [0 0] +192.168.1.27 [0 0] +192.168.1.28 [0 0] +192.168.1.29 [0 0] +192.168.1.30 [0 0] +192.168.1.31 [0 0] +192.168.1.32 [0 0] +192.168.1.33 [0 0] +192.168.1.34 [0 0] +192.168.1.35 [0 0] +192.168.1.36 [0 0] +192.168.1.37 [0 0] +192.168.1.38 [0 0] +192.168.1.39 [0 0] +192.168.1.40 [0 0] +192.168.1.41 [0 0] +192.168.1.42 [0 0] +192.168.1.43 [0 0] +192.168.1.44 [0 0] +192.168.1.45 [0 0] +192.168.1.46 [0 0] +192.168.1.47 [0 0] +192.168.1.48 [0 0] +192.168.1.49 [0 0] +192.168.1.50 [0 0] +192.168.1.51 [0 0] +192.168.1.52 [0 0] +192.168.1.53 [0 0] +192.168.1.54 [0 0] +192.168.1.55 [0 0] +192.168.1.56 [0 0] +192.168.1.57 [0 0] +192.168.1.58 [0 0] +192.168.1.59 [0 0] +192.168.1.60 [0 0] +192.168.1.61 [0 0] +192.168.1.62 [0 0] +192.168.1.63 [0 0] +192.168.1.64 [0 0] Index: trunk/absroot/source/abspy/abscontrol/server3.py =================================================================== diff --git a/trunk/absroot/source/abspy/abscontrol/server3.py b/trunk/absroot/source/abspy/abscontrol/server3.py --- a/trunk/absroot/source/abspy/abscontrol/server3.py (revision 123) +++ b/trunk/absroot/source/abspy/abscontrol/server3.py (revision 124) @@ -4,7 +4,7 @@ class ABSServer: - def __init__(self,ipSource="localhost", ipDestino="192.168.1.117", portDestino=7000, ipDestino2="192.168.1.11", portDestino2=5500): + def __init__(self,ipSource="localhost", ipDestino="192.168.1.117", portDestino=7000, ipDestino2="192.168.1.11", portDestino2=5500, rx_buffer = "default"): self.ipSource = ipSource self.ipDestino = ipDestino @@ -14,7 +14,8 @@ self.portDestino2 = portDestino2 self.tx_buffer = "default" - self.rx_buffer = "default" +# self.rx_buffer = "default" + self.rx_buffer = rx_buffer self.enaModules = [] self.createObjects() @@ -191,6 +192,45 @@ return self.tx_buffer + def getConnectionStatus(self, cmd): + + ena = self.checkAntenna() + self.enaModules = ena + + blockLst = [] + + for id in range(1,65): + if id not in self.enaModules: + continue + + blockStr = self.__ConnectionWithControlModules(self.rx_buffer,cmd,id) + blockLst.append(blockStr + ", 192.168.1." + str(id) + "\n") + #Using tx buffer + self.tx_buffer = "".join(blockLst) + print self.tx_buffer + + return self.tx_buffer + + def getControlModuleStatus(self, cmd): + + all_blocks = "" +# enaModules = self.checkAntenna() +# enaModules = [11,12,13,14] + + for id in range(1,65): + if id not in self.enaModules: + continue + + one_block = self.__ConnectionWithControlModules(self.rx_buffer,cmd,id) + + all_blocks = all_blocks + one_block + #Using tx buffer + print all_blocks + self.tx_buffer = all_blocks + + return all_blocks + + if __name__ == '__main__': absObj = ABSServer()