##// END OF EJS Templates
Implementacion funcion generacion de estado de modulos de control hacia control central
imanay -
r43:44
parent child
Show More
@@ -1,259 +1,265
1 # imports needed for the file convertion No newline at end of file
1 # imports needed for the file convertion
2 import os No newline at end of file
2 import os
3 import sys No newline at end of file
3 import sys
4 import time No newline at end of file
4 import time
5 import numpy as np No newline at end of file
5 import numpy as np
6 No newline at end of file
6
7 import library No newline at end of file
7 import library
8 No newline at end of file
8
9 class ABSClient: No newline at end of file
9 class ABSClient:
10 No newline at end of file
10
11 def __init__(self,ipSource="localhost", ipDestino="192.168.1.255", portDestino=7000): No newline at end of file
11 def __init__(self,ipSource="localhost", ipDestino="192.168.1.255", portDestino=7000):
12 No newline at end of file
12
13 self.ipSource = ipSource No newline at end of file
13 self.ipSource = ipSource
14 self.ipDestino = ipDestino No newline at end of file
14 self.ipDestino = ipDestino
15 self.portDestino = portDestino No newline at end of file
15 self.portDestino = portDestino
16 No newline at end of file
16
17 self.createObjects() No newline at end of file
17 self.createObjects()
18 No newline at end of file
18
19 def createObjects(self): No newline at end of file
19 def createObjects(self):
20 No newline at end of file
20
21 self.commObj = library.UDPComm(self.ipSource, self.ipDestino, self.portDestino) No newline at end of file
21 self.commObj = library.UDPComm(self.ipSource, self.ipDestino, self.portDestino)
22 No newline at end of file
22
23 def sendFile(self, filename): No newline at end of file
23 def sendFile(self, filename):
24 No newline at end of file
24
25 #From matriz to control module format No newline at end of file
25 #From matriz to control module format
26 self.FuncionMaestra_GeneraFormatoControlCentral(filename) No newline at end of file
26 self.FuncionMaestra_GeneraFormatoControlCentral(filename)
27 FileName = "FormatoControlCentral.txt" No newline at end of file
27 FileName = "FormatoControlCentral.txt"
28 F_Obj = open(FileName,"r") No newline at end of file
28 F_Obj = open(FileName,"r")
29 FileList = F_Obj.readlines() No newline at end of file
29 FileList = F_Obj.readlines()
30 F_Obj.close() No newline at end of file
30 F_Obj.close()
31 FileStr = "".join(FileList) No newline at end of file
31 FileStr = "".join(FileList)
32 data = FileStr No newline at end of file
32 data = FileStr
33 No newline at end of file
33
34 self.commObj.sendTxRxCommand(cmd="SNDF", data=data) No newline at end of file
34 self.commObj.sendTxRxCommand(cmd="SNDF", data=data)
35 No newline at end of file
35
36 def changeBeam(self, newBeam): No newline at end of file
36 def changeBeam(self, newBeam):
37 No newline at end of file
37
38 self.commObj.sendTxRxCommand(cmd="CHGB", data=newBeam) No newline at end of file
38 self.commObj.sendTxRxCommand(cmd="CHGB", data=newBeam)
39
39
No newline at end of file
40 def getStatus(self, data):
40 def getStatus(self):
No newline at end of file
No newline at end of file
41
41
No newline at end of file
No newline at end of file
42 self.commObj.sendTxRxCommand(cmd="ANST", data = data) No newline at end of file
42 self.commObj.sendTxRxCommand(cmd="ANST", data="ABS") No newline at end of file
43 No newline at end of file
43
44 ########## No newline at end of file
44 ##########
45 No newline at end of file
45
46 def FuncionMaestra_GeneraFormatoControlCentral(self,archivo): No newline at end of file
46 def FuncionMaestra_GeneraFormatoControlCentral(self,archivo):
47 """ Funcion que genera un archivo para el control central""" No newline at end of file
47 """ Funcion que genera un archivo para el control central"""
48 No newline at end of file
48
49 # CarpetaDeTrabajo='/home/redes/ABS_Control_2012_09_24/Control_Module_v1_Client_09_24/' No newline at end of file
49 # CarpetaDeTrabajo='/home/redes/ABS_Control_2012_09_24/Control_Module_v1_Client_09_24/'
50 CarpetaDeTrabajo = os.getcwd() + '/' No newline at end of file
50 CarpetaDeTrabajo = os.getcwd() + '/'
51 #print CarpetaDeTrabajo No newline at end of file
51 #print CarpetaDeTrabajo
52 #CarpetaDeTrabajo='/home/redes/workspace/ABS_Client_v2/Debug/' No newline at end of file
52 #CarpetaDeTrabajo='/home/redes/workspace/ABS_Client_v2/Debug/'
53 No newline at end of file
53
54 def lst2string(lst): No newline at end of file
54 def lst2string(lst):
55 string='' No newline at end of file
55 string=''
56 for i in lst: No newline at end of file
56 for i in lst:
57 string=string+i No newline at end of file
57 string=string+i
58 return string No newline at end of file
58 return string
59 No newline at end of file
59
60 def string2lst(string): No newline at end of file
60 def string2lst(string):
61 lst = [] No newline at end of file
61 lst = []
62 for i in string: No newline at end of file
62 for i in string:
63 lst.append(i) No newline at end of file
63 lst.append(i)
64 return lst No newline at end of file
64 return lst
65 No newline at end of file
65
66 No newline at end of file
66
67 def file1(string, type): No newline at end of file
67 def file1(string, type):
68 lst = string2lst(archivo) No newline at end of file
68 lst = string2lst(archivo)
69 fin = -1 No newline at end of file
69 fin = -1
70 t = len(lst) No newline at end of file
70 t = len(lst)
71 for i in np.arange(-1,-t,-1): No newline at end of file
71 for i in np.arange(-1,-t,-1):
72 if lst[i]=='/': No newline at end of file
72 if lst[i]=='/':
73 fin=i No newline at end of file
73 fin=i
74 break No newline at end of file
74 break
75 if type == '1': No newline at end of file
75 if type == '1':
76 nombre2 = lst[fin+1:] No newline at end of file
76 nombre2 = lst[fin+1:]
77 nombre2[-1]='s' No newline at end of file
77 nombre2[-1]='s'
78 nombre2 = lst2string(nombre2) No newline at end of file
78 nombre2 = lst2string(nombre2)
79 return nombre2 No newline at end of file
79 return nombre2
80 if type == '2': No newline at end of file
80 if type == '2':
81 nombre2 = lst[fin+1:] No newline at end of file
81 nombre2 = lst[fin+1:]
82 nombre2[-1]='1' No newline at end of file
82 nombre2[-1]='1'
83 nombre2 = lst2string(nombre2) No newline at end of file
83 nombre2 = lst2string(nombre2)
84 return nombre2 No newline at end of file
84 return nombre2
85 No newline at end of file
85
86 No newline at end of file
86
87 def EliminaSaltoDeLinea(cadena): No newline at end of file
87 def EliminaSaltoDeLinea(cadena):
88 i = 0 No newline at end of file
88 i = 0
89 for elemento in cadena: No newline at end of file
89 for elemento in cadena:
90 if elemento =='\n' or elemento =='\r': No newline at end of file
90 if elemento =='\n' or elemento =='\r':
91 pass No newline at end of file
91 pass
92 else: No newline at end of file
92 else:
93 i=i+1 No newline at end of file
93 i=i+1
94 return cadena [:i] No newline at end of file
94 return cadena [:i]
95 No newline at end of file
95
96 def NumeroDeExperimentos(path): No newline at end of file
96 def NumeroDeExperimentos(path):
97 fichero1=open(path,'r') No newline at end of file
97 fichero1=open(path,'r')
98 cont=0 No newline at end of file
98 cont=0
99 for cadena in fichero1: No newline at end of file
99 for cadena in fichero1:
100 cont=cont+1 No newline at end of file
100 cont=cont+1
101 if cont==3: No newline at end of file
101 if cont==3:
102 nexp='' No newline at end of file
102 nexp=''
103 pos=0 No newline at end of file
103 pos=0
104 for elemento in cadena: No newline at end of file
104 for elemento in cadena:
105 pos=pos+1 No newline at end of file
105 pos=pos+1
106 if elemento=='=': No newline at end of file
106 if elemento=='=':
107 nexp=int(cadena[pos:]) No newline at end of file
107 nexp=int(cadena[pos:])
108 return nexp No newline at end of file
108 return nexp
109 fichero1.close() No newline at end of file
109 fichero1.close()
110 No newline at end of file
110
111 def Paridad(numero): No newline at end of file
111 def Paridad(numero):
112 if numero%2==0: return 'par' No newline at end of file
112 if numero%2==0: return 'par'
113 elif numero%2==1: return 'impar' No newline at end of file
113 elif numero%2==1: return 'impar'
114 No newline at end of file
114
115 def EvaluaCadena(cadena): No newline at end of file
115 def EvaluaCadena(cadena):
116 if len(cadena)>35: No newline at end of file
116 if len(cadena)>35:
117 if cadena[-1]=='$': No newline at end of file
117 if cadena[-1]=='$':
118 return cadena[-35:-2] No newline at end of file
118 return cadena[-35:-2]
119 elif cadena[-1]==']': No newline at end of file
119 elif cadena[-1]==']':
120 return cadena[-34:-1] No newline at end of file
120 return cadena[-34:-1]
121 else: No newline at end of file
121 else:
122 return None No newline at end of file
122 return None
123 No newline at end of file
123
124 def GuardaEnLista(path): No newline at end of file
124 def GuardaEnLista(path):
125 fichero=open(path,'r') No newline at end of file
125 fichero=open(path,'r')
126 lista=[] No newline at end of file
126 lista=[]
127 for cadena in fichero: No newline at end of file
127 for cadena in fichero:
128 cadena = EliminaSaltoDeLinea(cadena) No newline at end of file
128 cadena = EliminaSaltoDeLinea(cadena)
129 cadena = EvaluaCadena(cadena) No newline at end of file
129 cadena = EvaluaCadena(cadena)
130 if cadena != None: No newline at end of file
130 if cadena != None:
131 lista.append(cadena) No newline at end of file
131 lista.append(cadena)
132 fichero.close() No newline at end of file
132 fichero.close()
133 return lista No newline at end of file
133 return lista
134 No newline at end of file
134
135 def CreaFicherosPrevios(): No newline at end of file
135 def CreaFicherosPrevios():
136 vector = GuardaEnLista(archivo) No newline at end of file
136 vector = GuardaEnLista(archivo)
137 for i in range(1,NumeroDeExperimentos(archivo)+1): No newline at end of file
137 for i in range(1,NumeroDeExperimentos(archivo)+1):
138 fichero =open(CarpetaDeTrabajo+str(i)+'.txt','w') No newline at end of file
138 fichero =open(CarpetaDeTrabajo+str(i)+'.txt','w')
139 for j in range(0,16): No newline at end of file
139 for j in range(0,16):
140 fichero.write(vector[j+16*(i-1)]+'\n') No newline at end of file
140 fichero.write(vector[j+16*(i-1)]+'\n')
141 fichero.close() No newline at end of file
141 fichero.close()
142 No newline at end of file
142
143 def CapturaValoresEnArchivo(path,polarizacion='up'): No newline at end of file
143 def CapturaValoresEnArchivo(path,polarizacion='up'):
144 fichero =open(path,'r') No newline at end of file
144 fichero =open(path,'r')
145 cnt=0 No newline at end of file
145 cnt=0
146 lstup=[] No newline at end of file
146 lstup=[]
147 lstdw=[] No newline at end of file
147 lstdw=[]
148 for cadena in fichero: No newline at end of file
148 for cadena in fichero:
149 cnt=cnt+1 No newline at end of file
149 cnt=cnt+1
150 if cnt==5: No newline at end of file
150 if cnt==5:
151 su01=cadena[17:20] No newline at end of file
151 su01=cadena[17:20]
152 su02=cadena[21:24] No newline at end of file
152 su02=cadena[21:24]
153 su03=cadena[25:28] No newline at end of file
153 su03=cadena[25:28]
154 su04=cadena[29:32] No newline at end of file
154 su04=cadena[29:32]
155 if cnt==6: No newline at end of file
155 if cnt==6:
156 su05=cadena[17:20] No newline at end of file
156 su05=cadena[17:20]
157 su06=cadena[21:24] No newline at end of file
157 su06=cadena[21:24]
158 su07=cadena[25:28] No newline at end of file
158 su07=cadena[25:28]
159 su08=cadena[29:32] No newline at end of file
159 su08=cadena[29:32]
160 if cnt==7: No newline at end of file
160 if cnt==7:
161 su09=cadena[17:20] No newline at end of file
161 su09=cadena[17:20]
162 su10=cadena[21:24] No newline at end of file
162 su10=cadena[21:24]
163 su11=cadena[25:28] No newline at end of file
163 su11=cadena[25:28]
164 su12=cadena[29:32] No newline at end of file
164 su12=cadena[29:32]
165 if cnt==8: No newline at end of file
165 if cnt==8:
166 su13=cadena[17:20] No newline at end of file
166 su13=cadena[17:20]
167 su14=cadena[21:24] No newline at end of file
167 su14=cadena[21:24]
168 su15=cadena[25:28] No newline at end of file
168 su15=cadena[25:28]
169 su16=cadena[29:32] No newline at end of file
169 su16=cadena[29:32]
170 if cnt==13: No newline at end of file
170 if cnt==13:
171 sd01=cadena[17:20] No newline at end of file
171 sd01=cadena[17:20]
172 sd02=cadena[21:24] No newline at end of file
172 sd02=cadena[21:24]
173 sd03=cadena[25:28] No newline at end of file
173 sd03=cadena[25:28]
174 sd04=cadena[29:32] No newline at end of file
174 sd04=cadena[29:32]
175 if cnt==14: No newline at end of file
175 if cnt==14:
176 sd05=cadena[17:20] No newline at end of file
176 sd05=cadena[17:20]
177 sd06=cadena[21:24] No newline at end of file
177 sd06=cadena[21:24]
178 sd07=cadena[25:28] No newline at end of file
178 sd07=cadena[25:28]
179 sd08=cadena[29:32] No newline at end of file
179 sd08=cadena[29:32]
180 if cnt==15: No newline at end of file
180 if cnt==15:
181 sd09=cadena[17:20] No newline at end of file
181 sd09=cadena[17:20]
182 sd10=cadena[21:24] No newline at end of file
182 sd10=cadena[21:24]
183 sd11=cadena[25:28] No newline at end of file
183 sd11=cadena[25:28]
184 sd12=cadena[29:32] No newline at end of file
184 sd12=cadena[29:32]
185 if cnt==16: No newline at end of file
185 if cnt==16:
186 sd13=cadena[17:20] No newline at end of file
186 sd13=cadena[17:20]
187 sd14=cadena[21:24] No newline at end of file
187 sd14=cadena[21:24]
188 sd15=cadena[25:28] No newline at end of file
188 sd15=cadena[25:28]
189 sd16=cadena[29:32] No newline at end of file
189 sd16=cadena[29:32]
190 lstup=[su01,su02,su03,su04,su05,su06,su07,su08,su09,su10,su11,su12,su13,su14,su15,su16] No newline at end of file
190 lstup=[su01,su02,su03,su04,su05,su06,su07,su08,su09,su10,su11,su12,su13,su14,su15,su16]
191 lstdw=[sd01,sd02,sd03,sd04,sd05,sd06,sd07,sd08,sd09,sd10,sd11,sd12,sd13,sd14,sd15,sd16] No newline at end of file
191 lstdw=[sd01,sd02,sd03,sd04,sd05,sd06,sd07,sd08,sd09,sd10,sd11,sd12,sd13,sd14,sd15,sd16]
192 if polarizacion=='up': No newline at end of file
192 if polarizacion=='up':
193 return lstup No newline at end of file
193 return lstup
194 elif polarizacion=='dw': No newline at end of file
194 elif polarizacion=='dw':
195 return lstdw No newline at end of file
195 return lstdw
196 fichero.close() No newline at end of file
196 fichero.close()
197 No newline at end of file
197
198 def CreaFormatoFinal(): No newline at end of file
198 def CreaFormatoFinal():
199 ne=NumeroDeExperimentos(archivo) No newline at end of file
199 ne=NumeroDeExperimentos(archivo)
200 No newline at end of file
200
201 #nombre01 = file1(archivo,'1')
201 #nombre01 = file1(archivo,'1')
No newline at end of file
202 nombre02 = file1(archivo,'2') No newline at end of file
202 nombre02 = file1(archivo,'1') No newline at end of file
203 fichero=open(CarpetaDeTrabajo+'FormatoControlCentral.txt','w') No newline at end of file
203 fichero=open(CarpetaDeTrabajo+'FormatoControlCentral.txt','w')
204 fichero.write(nombre02+'\n') No newline at end of file
204 fichero.write(nombre02+'\n')
205 fichero.write(str(ne)+'\n') No newline at end of file
205 fichero.write(str(ne)+'\n')
206 for i in range(1,17): No newline at end of file
206 for i in range(1,17):
207 No newline at end of file
207
208 if i<10: No newline at end of file
208 if i<10:
209 nmod = '0'+str(i) No newline at end of file
209 nmod = '0'+str(i)
210 else: nmod = str(i) No newline at end of file
210 else: nmod = str(i)
211 No newline at end of file
211
212 No newline at end of file
212
213 fichero.write('S'+nmod+'\n') No newline at end of file
213 fichero.write('S'+nmod+'\n')
214 for j in range(1,ne+1): No newline at end of file
214 for j in range(1,ne+1):
215 ruta=CarpetaDeTrabajo+str(j)+'.txt' No newline at end of file
215 ruta=CarpetaDeTrabajo+str(j)+'.txt'
216 lu=CapturaValoresEnArchivo(ruta,polarizacion='up') No newline at end of file
216 lu=CapturaValoresEnArchivo(ruta,polarizacion='up')
217 ld=CapturaValoresEnArchivo(ruta,polarizacion='dw') No newline at end of file
217 ld=CapturaValoresEnArchivo(ruta,polarizacion='dw')
218 part1='' No newline at end of file
218 part1=''
219 part2='' No newline at end of file
219 part2=''
220 if lu[i-1]=='1.0': part1='000' No newline at end of file
220 if lu[i-1]=='1.0': part1='000'
221 if lu[i-1]=='2.0': part1='001' No newline at end of file
221 if lu[i-1]=='2.0': part1='001'
222 if lu[i-1]=='3.0': part1='010' No newline at end of file
222 if lu[i-1]=='3.0': part1='010'
223 if lu[i-1]=='0.0': part1='011' No newline at end of file
223 if lu[i-1]=='0.0': part1='011'
224 if lu[i-1]=='0.5': part1='100' No newline at end of file
224 if lu[i-1]=='0.5': part1='100'
225 if lu[i-1]=='1.5': part1='101' No newline at end of file
225 if lu[i-1]=='1.5': part1='101'
226 if lu[i-1]=='2.5': part1='110' No newline at end of file
226 if lu[i-1]=='2.5': part1='110'
227 if lu[i-1]=='3.5': part1='111' No newline at end of file
227 if lu[i-1]=='3.5': part1='111'
228 if ld[i-1]=='1.0': part2='000' No newline at end of file
228 if ld[i-1]=='1.0': part2='000'
229 if ld[i-1]=='2.0': part2='001' No newline at end of file
229 if ld[i-1]=='2.0': part2='001'
230 if ld[i-1]=='3.0': part2='010' No newline at end of file
230 if ld[i-1]=='3.0': part2='010'
231 if ld[i-1]=='0.0': part2='011' No newline at end of file
231 if ld[i-1]=='0.0': part2='011'
232 if ld[i-1]=='0.5': part2='100' No newline at end of file
232 if ld[i-1]=='0.5': part2='100'
233 if ld[i-1]=='1.5': part2='101' No newline at end of file
233 if ld[i-1]=='1.5': part2='101'
234 if ld[i-1]=='2.5': part2='110' No newline at end of file
234 if ld[i-1]=='2.5': part2='110'
235 if ld[i-1]=='3.5': part2='111' No newline at end of file
235 if ld[i-1]=='3.5': part2='111'
236 fichero.write(part1+part2+'\n') No newline at end of file
236 fichero.write(part1+part2+'\n')
237 fichero.write('------'+'\n') No newline at end of file
237 fichero.write('------'+'\n')
238 fichero.close() No newline at end of file
238 fichero.close()
239 No newline at end of file
239
240 def EliminaArchivosEnLaCarpeta(): No newline at end of file
240 def EliminaArchivosEnLaCarpeta():
241 ne=NumeroDeExperimentos(archivo) No newline at end of file
241 ne=NumeroDeExperimentos(archivo)
242 for i in range(1,ne+1): No newline at end of file
242 for i in range(1,ne+1):
243 os.remove(CarpetaDeTrabajo+str(i)+'.txt') No newline at end of file
243 os.remove(CarpetaDeTrabajo+str(i)+'.txt')
244 No newline at end of file
244
245 CreaFicherosPrevios() No newline at end of file
245 CreaFicherosPrevios()
246 CreaFormatoFinal() No newline at end of file
246 CreaFormatoFinal()
247 EliminaArchivosEnLaCarpeta() No newline at end of file
247 EliminaArchivosEnLaCarpeta()
248 No newline at end of file
248
249 ########## No newline at end of file
249 ##########
250 No newline at end of file
250
251 if __name__ == '__main__': No newline at end of file
251 if __name__ == '__main__':
252 No newline at end of file
252
253 filename = "experimento1.abs" No newline at end of file
253 filename = "experimento1.abs"
254 No newline at end of file
254
255 absObj = ABSClient()
255 absObj = ABSClient()
No newline at end of file
256 # absObj.sendFile(filename) No newline at end of file
256 absObj.sendFile(filename) No newline at end of file
257 # absObj.changeBeam("0") No newline at end of file
257 # absObj.changeBeam("0")
258 # absObj.changeBeam("1") No newline at end of file
258 # absObj.changeBeam("2") No newline at end of file
259 # absObj.changeBeam("2")
260 # absObj.changeBeam("3")
No newline at end of file
261 # absObj.changeBeam("4")
No newline at end of file
262 # absObj.changeBeam("5")
No newline at end of file
263 # absObj.changeBeam("6") No newline at end of file
259 # absObj.changeBeam("7") No newline at end of file
264 # absObj.changeBeam("7")
265 absObj.getStatus(5) No newline at end of file
@@ -1,231 +1,231
1 title ='MST-ISR 2009 (NS-Up)' No newline at end of file
1 title ='MST-ISR 2009 (NS-Up)'
2 No newline at end of file
2
3 #Experiments = 12 No newline at end of file
3 #Experiments = 12
4 No newline at end of file
4
5 1 = No newline at end of file
5 1 =
6 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
6 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
7 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
7 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
8 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
8 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
9 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
9 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
No newline at end of file
10 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
10 [1.0,1.0,1.0,1.0,1.0,2.0,3.0,0.0],$
No newline at end of file
No newline at end of file
11 [0.5,0.5,0.5,1.0,1.0,1.0,1.0,1.0],$
11 [0.5,0.5,0.5,1.0,3.0,2.0,1.0,0.0],$
No newline at end of file
No newline at end of file
12 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
12 [1.0,1.0,1.0,1.0,0.5,1.5,2.5,3.5],$
No newline at end of file
No newline at end of file
13 [0.5,0.5,0.5,0.5,1.0,1.0,1.0,1.0]] No newline at end of file
13 [0.5,0.5,0.5,0.5,2.5,1.5,0.5,0.0]] No newline at end of file
14 No newline at end of file
14
15 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
15 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
16 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
16 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
17 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
17 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
18 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
18 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
19 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
19 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
20 [0.5,0.5,0.5,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
20 [0.5,0.5,0.5,1.0,1.0,1.0,1.0,1.0],$
21 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
21 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
22 [0.5,0.5,0.5,0.5,1.0,1.0,1.0,1.0]] No newline at end of file
22 [0.5,0.5,0.5,0.5,1.0,1.0,1.0,1.0]]
23 No newline at end of file
23
24 2 = No newline at end of file
24 2 =
25 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
25 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
26 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
26 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
27 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
27 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
28 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
28 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
29 [1.0,1.0,1.0,1.0,2.0,2.0,2.0,2.0],$ No newline at end of file
29 [1.0,1.0,1.0,1.0,2.0,2.0,2.0,2.0],$
30 [0.5,0.5,0.5,1.0,2.0,2.0,2.0,2.0],$ No newline at end of file
30 [0.5,0.5,0.5,1.0,2.0,2.0,2.0,2.0],$
31 [1.0,1.0,1.0,1.0,2.0,2.0,2.0,2.0],$ No newline at end of file
31 [1.0,1.0,1.0,1.0,2.0,2.0,2.0,2.0],$
32 [0.5,0.5,0.5,0.5,2.0,2.0,2.0,2.0]] No newline at end of file
32 [0.5,0.5,0.5,0.5,2.0,2.0,2.0,2.0]]
33 No newline at end of file
33
34 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
34 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
35 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
35 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
36 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
36 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
37 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
37 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
38 [1.0,1.0,1.0,1.0,2.0,2.0,2.0,2.0],$ No newline at end of file
38 [1.0,1.0,1.0,1.0,2.0,2.0,2.0,2.0],$
39 [0.5,0.5,0.5,1.0,2.0,2.0,2.0,2.0],$ No newline at end of file
39 [0.5,0.5,0.5,1.0,2.0,2.0,2.0,2.0],$
40 [1.0,1.0,1.0,1.0,2.0,2.0,2.0,2.0],$ No newline at end of file
40 [1.0,1.0,1.0,1.0,2.0,2.0,2.0,2.0],$
41 [0.5,0.5,0.5,0.5,2.0,2.0,2.0,2.0]] No newline at end of file
41 [0.5,0.5,0.5,0.5,2.0,2.0,2.0,2.0]]
42 No newline at end of file
42
43 3 = No newline at end of file
43 3 =
44 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
44 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
45 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
45 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
46 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
46 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
47 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
47 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
48 [1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0],$ No newline at end of file
48 [1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0],$
49 [0.5,0.5,0.5,1.0,3.0,3.0,3.0,3.0],$ No newline at end of file
49 [0.5,0.5,0.5,1.0,3.0,3.0,3.0,3.0],$
50 [1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0],$ No newline at end of file
50 [1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0],$
51 [0.5,0.5,0.5,0.5,3.0,3.0,3.0,3.0]] No newline at end of file
51 [0.5,0.5,0.5,0.5,3.0,3.0,3.0,3.0]]
52 No newline at end of file
52
53 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
53 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
54 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
54 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
55 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
55 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
56 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
56 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
57 [1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0],$ No newline at end of file
57 [1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0],$
58 [0.5,0.5,0.5,1.0,3.0,3.0,3.0,3.0],$ No newline at end of file
58 [0.5,0.5,0.5,1.0,3.0,3.0,3.0,3.0],$
59 [1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0],$ No newline at end of file
59 [1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0],$
60 [0.5,0.5,0.5,0.5,3.0,3.0,3.0,3.0]] No newline at end of file
60 [0.5,0.5,0.5,0.5,3.0,3.0,3.0,3.0]]
61 No newline at end of file
61
62 4 = No newline at end of file
62 4 =
63 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
63 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
64 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
64 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
65 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
65 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
66 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
66 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
67 [1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0],$ No newline at end of file
67 [1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0],$
68 [0.5,0.5,0.5,1.0,0.0,0.0,0.0,0.0],$ No newline at end of file
68 [0.5,0.5,0.5,1.0,0.0,0.0,0.0,0.0],$
69 [1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0],$ No newline at end of file
69 [1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0],$
70 [0.5,0.5,0.5,0.5,0.0,0.0,0.0,0.0]] No newline at end of file
70 [0.5,0.5,0.5,0.5,0.0,0.0,0.0,0.0]]
71 No newline at end of file
71
72 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
72 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
73 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
73 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
74 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
74 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
75 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
75 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
76 [1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0],$ No newline at end of file
76 [1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0],$
77 [0.5,0.5,0.5,1.0,0.0,0.0,0.0,0.0],$ No newline at end of file
77 [0.5,0.5,0.5,1.0,0.0,0.0,0.0,0.0],$
78 [1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0],$ No newline at end of file
78 [1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0],$
79 [0.5,0.5,0.5,0.5,0.0,0.0,0.0,0.0]] No newline at end of file
79 [0.5,0.5,0.5,0.5,0.0,0.0,0.0,0.0]]
80 No newline at end of file
80
81 5 = No newline at end of file
81 5 =
82 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
82 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
83 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
83 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
84 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
84 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
85 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
85 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
86 [1.0,1.0,1.0,1.0,0.5,0.5,0.5,0.5],$ No newline at end of file
86 [1.0,1.0,1.0,1.0,0.5,0.5,0.5,0.5],$
87 [0.5,0.5,0.5,1.0,0.5,0.5,0.5,0.5],$ No newline at end of file
87 [0.5,0.5,0.5,1.0,0.5,0.5,0.5,0.5],$
88 [1.0,1.0,1.0,1.0,0.5,0.5,0.5,0.5],$ No newline at end of file
88 [1.0,1.0,1.0,1.0,0.5,0.5,0.5,0.5],$
89 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]] No newline at end of file
89 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]]
90 No newline at end of file
90
91 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
91 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
92 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
92 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
93 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
93 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
94 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
94 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
95 [1.0,1.0,1.0,1.0,0.5,0.5,0.5,0.5],$ No newline at end of file
95 [1.0,1.0,1.0,1.0,0.5,0.5,0.5,0.5],$
96 [0.5,0.5,0.5,1.0,0.5,0.5,0.5,0.5],$ No newline at end of file
96 [0.5,0.5,0.5,1.0,0.5,0.5,0.5,0.5],$
97 [1.0,1.0,1.0,1.0,0.5,0.5,0.5,0.5],$ No newline at end of file
97 [1.0,1.0,1.0,1.0,0.5,0.5,0.5,0.5],$
98 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]] No newline at end of file
98 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]]
99 No newline at end of file
99
100 6= No newline at end of file
100 6=
101 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
101 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
102 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
102 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
103 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
103 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
104 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
104 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
105 [1.0,1.0,1.0,1.0,1.5,1.5,1.5,1.5],$ No newline at end of file
105 [1.0,1.0,1.0,1.0,1.5,1.5,1.5,1.5],$
106 [0.5,0.5,0.5,1.0,1.5,1.5,1.5,1.5],$ No newline at end of file
106 [0.5,0.5,0.5,1.0,1.5,1.5,1.5,1.5],$
107 [1.0,1.0,1.0,1.0,1.5,1.5,1.5,1.5],$ No newline at end of file
107 [1.0,1.0,1.0,1.0,1.5,1.5,1.5,1.5],$
108 [0.5,0.5,0.5,0.5,1.5,1.5,1.5,1.5]] No newline at end of file
108 [0.5,0.5,0.5,0.5,1.5,1.5,1.5,1.5]]
109 No newline at end of file
109
110 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
110 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
111 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
111 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
112 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
112 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
113 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
113 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
114 [1.0,1.0,1.0,1.0,1.5,1.5,1.5,1.5],$ No newline at end of file
114 [1.0,1.0,1.0,1.0,1.5,1.5,1.5,1.5],$
115 [0.5,0.5,0.5,1.0,1.5,1.5,1.5,1.5],$ No newline at end of file
115 [0.5,0.5,0.5,1.0,1.5,1.5,1.5,1.5],$
116 [1.0,1.0,1.0,1.0,1.5,1.5,1.5,1.5],$ No newline at end of file
116 [1.0,1.0,1.0,1.0,1.5,1.5,1.5,1.5],$
117 [0.5,0.5,0.5,0.5,1.5,1.5,1.5,1.5]] No newline at end of file
117 [0.5,0.5,0.5,0.5,1.5,1.5,1.5,1.5]]
118 No newline at end of file
118
119 7 = No newline at end of file
119 7 =
120 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
120 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
121 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
121 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
122 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
122 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
123 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
123 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
124 [1.0,1.0,1.0,1.0,2.5,2.5,2.5,2.5],$ No newline at end of file
124 [1.0,1.0,1.0,1.0,2.5,2.5,2.5,2.5],$
125 [0.5,0.5,0.5,1.0,2.5,2.5,2.5,2.5],$ No newline at end of file
125 [0.5,0.5,0.5,1.0,2.5,2.5,2.5,2.5],$
126 [1.0,1.0,1.0,1.0,2.5,2.5,2.5,2.5],$ No newline at end of file
126 [1.0,1.0,1.0,1.0,2.5,2.5,2.5,2.5],$
127 [0.5,0.5,0.5,0.5,2.5,2.5,2.5,2.5]] No newline at end of file
127 [0.5,0.5,0.5,0.5,2.5,2.5,2.5,2.5]]
128 No newline at end of file
128
129 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
129 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
130 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
130 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
131 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
131 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
132 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
132 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
133 [1.0,1.0,1.0,1.0,2.5,2.5,2.5,2.5],$ No newline at end of file
133 [1.0,1.0,1.0,1.0,2.5,2.5,2.5,2.5],$
134 [0.5,0.5,0.5,1.0,2.5,2.5,2.5,2.5],$ No newline at end of file
134 [0.5,0.5,0.5,1.0,2.5,2.5,2.5,2.5],$
135 [1.0,1.0,1.0,1.0,2.5,2.5,2.5,2.5],$ No newline at end of file
135 [1.0,1.0,1.0,1.0,2.5,2.5,2.5,2.5],$
136 [0.5,0.5,0.5,0.5,2.5,2.5,2.5,2.5]] No newline at end of file
136 [0.5,0.5,0.5,0.5,2.5,2.5,2.5,2.5]]
137 8 = No newline at end of file
137 8 =
138 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
138 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
139 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
139 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
140 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
140 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
141 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
141 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
142 [1.0,1.0,1.0,1.0,3.5,3.5,3.5,3.5],$ No newline at end of file
142 [1.0,1.0,1.0,1.0,3.5,3.5,3.5,3.5],$
143 [0.5,0.5,0.5,1.0,3.5,3.5,3.5,3.5],$ No newline at end of file
143 [0.5,0.5,0.5,1.0,3.5,3.5,3.5,3.5],$
144 [1.0,1.0,1.0,1.0,3.5,3.5,3.5,3.5],$ No newline at end of file
144 [1.0,1.0,1.0,1.0,3.5,3.5,3.5,3.5],$
145 [0.5,0.5,0.5,0.5,3.5,3.5,3.5,3.5]] No newline at end of file
145 [0.5,0.5,0.5,0.5,3.5,3.5,3.5,3.5]]
146 No newline at end of file
146
147 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
147 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
148 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
148 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
149 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
149 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
150 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
150 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
151 [1.0,1.0,1.0,1.0,3.5,3.5,3.5,3.5],$ No newline at end of file
151 [1.0,1.0,1.0,1.0,3.5,3.5,3.5,3.5],$
152 [0.5,0.5,0.5,1.0,3.5,3.5,3.5,3.5],$ No newline at end of file
152 [0.5,0.5,0.5,1.0,3.5,3.5,3.5,3.5],$
153 [1.0,1.0,1.0,1.0,3.5,3.5,3.5,3.5],$ No newline at end of file
153 [1.0,1.0,1.0,1.0,3.5,3.5,3.5,3.5],$
154 [0.5,0.5,0.5,0.5,3.5,3.5,3.5,3.5]] No newline at end of file
154 [0.5,0.5,0.5,0.5,3.5,3.5,3.5,3.5]]
155 No newline at end of file
155
156 9 = No newline at end of file
156 9 =
157 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
157 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
158 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
158 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
159 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
159 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
160 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
160 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
161 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
161 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
162 [0.5,0.5,0.5,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
162 [0.5,0.5,0.5,1.0,1.0,1.0,1.0,1.0],$
163 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
163 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
164 [0.5,0.5,0.5,0.5,1.0,1.0,1.0,1.0]] No newline at end of file
164 [0.5,0.5,0.5,0.5,1.0,1.0,1.0,1.0]]
165 No newline at end of file
165
166 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
166 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
167 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
167 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
168 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
168 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
169 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
169 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
170 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
170 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
171 [0.5,0.5,0.5,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
171 [0.5,0.5,0.5,1.0,1.0,1.0,1.0,1.0],$
172 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
172 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
173 [0.5,0.5,0.5,0.5,1.0,1.0,1.0,1.0]] No newline at end of file
173 [0.5,0.5,0.5,0.5,1.0,1.0,1.0,1.0]]
174 No newline at end of file
174
175 10 = No newline at end of file
175 10 =
176 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
176 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
177 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
177 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
178 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
178 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
179 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
179 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
180 [1.0,1.0,1.0,1.0,2.0,2.0,2.0,2.0],$ No newline at end of file
180 [1.0,1.0,1.0,1.0,2.0,2.0,2.0,2.0],$
181 [0.5,0.5,0.5,1.0,2.0,2.0,2.0,2.0],$ No newline at end of file
181 [0.5,0.5,0.5,1.0,2.0,2.0,2.0,2.0],$
182 [1.0,1.0,1.0,1.0,2.0,2.0,2.0,2.0],$ No newline at end of file
182 [1.0,1.0,1.0,1.0,2.0,2.0,2.0,2.0],$
183 [0.5,0.5,0.5,0.5,2.0,2.0,2.0,2.0]] No newline at end of file
183 [0.5,0.5,0.5,0.5,2.0,2.0,2.0,2.0]]
184 No newline at end of file
184
185 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
185 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
186 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
186 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
187 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
187 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
188 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
188 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
189 [1.0,1.0,1.0,1.0,2.0,2.0,2.0,2.0],$ No newline at end of file
189 [1.0,1.0,1.0,1.0,2.0,2.0,2.0,2.0],$
190 [0.5,0.5,0.5,1.0,2.0,2.0,2.0,2.0],$ No newline at end of file
190 [0.5,0.5,0.5,1.0,2.0,2.0,2.0,2.0],$
191 [1.0,1.0,1.0,1.0,2.0,2.0,2.0,2.0],$ No newline at end of file
191 [1.0,1.0,1.0,1.0,2.0,2.0,2.0,2.0],$
192 [0.5,0.5,0.5,0.5,2.0,2.0,2.0,2.0]] No newline at end of file
192 [0.5,0.5,0.5,0.5,2.0,2.0,2.0,2.0]]
193 No newline at end of file
193
194 11 = No newline at end of file
194 11 =
195 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
195 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
196 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
196 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
197 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
197 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
198 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
198 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
199 [1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0],$ No newline at end of file
199 [1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0],$
200 [0.5,0.5,0.5,1.0,3.0,3.0,3.0,3.0],$ No newline at end of file
200 [0.5,0.5,0.5,1.0,3.0,3.0,3.0,3.0],$
201 [1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0],$ No newline at end of file
201 [1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0],$
202 [0.5,0.5,0.5,0.5,3.0,3.0,3.0,3.0]] No newline at end of file
202 [0.5,0.5,0.5,0.5,3.0,3.0,3.0,3.0]]
203 No newline at end of file
203
204 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
204 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
205 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
205 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
206 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
206 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
207 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
207 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
208 [1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0],$ No newline at end of file
208 [1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0],$
209 [0.5,0.5,0.5,1.0,3.0,3.0,3.0,3.0],$ No newline at end of file
209 [0.5,0.5,0.5,1.0,3.0,3.0,3.0,3.0],$
210 [1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0],$ No newline at end of file
210 [1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0],$
211 [0.5,0.5,0.5,0.5,3.0,3.0,3.0,3.0]] No newline at end of file
211 [0.5,0.5,0.5,0.5,3.0,3.0,3.0,3.0]]
212 No newline at end of file
212
213 12 = No newline at end of file
213 12 =
214 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
214 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
215 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
215 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
216 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
216 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
217 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
217 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
218 [1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0],$ No newline at end of file
218 [1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0],$
219 [0.5,0.5,0.5,1.0,0.0,0.0,0.0,0.0],$ No newline at end of file
219 [0.5,0.5,0.5,1.0,0.0,0.0,0.0,0.0],$
220 [1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0],$ No newline at end of file
220 [1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0],$
221 [0.5,0.5,0.5,0.5,0.0,0.0,0.0,0.0]] No newline at end of file
221 [0.5,0.5,0.5,0.5,0.0,0.0,0.0,0.0]]
222 No newline at end of file
222
223 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
223 [[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
224 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$ No newline at end of file
224 [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0],$
225 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
225 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
226 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$ No newline at end of file
226 [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5],$
227 [1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0],$ No newline at end of file
227 [1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0],$
228 [0.5,0.5,0.5,1.0,0.0,0.0,0.0,0.0],$ No newline at end of file
228 [0.5,0.5,0.5,1.0,0.0,0.0,0.0,0.0],$
229 [1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0],$ No newline at end of file
229 [1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0],$
230 [0.5,0.5,0.5,0.5,0.0,0.0,0.0,0.0]] No newline at end of file
230 [0.5,0.5,0.5,0.5,0.0,0.0,0.0,0.0]]
231 No newline at end of file
231
@@ -1,136 +1,183
1 import os No newline at end of file
1 import os
2 import library No newline at end of file
2 import library
3 import time No newline at end of file
3 No newline at end of file
4
4 class ABSServer: No newline at end of file
5 class ABSServer:
5 No newline at end of file
6
6 def __init__(self,ipSource="localhost", ipDestino="192.168.1.255", portDestino=7000, ipDestino2="192.168.1.255", portDestino2=5500, ftpPortDestino=None): No newline at end of file
7 def __init__(self,ipSource="localhost", ipDestino="192.168.1.255", portDestino=7000, ipDestino2="192.168.1.255", portDestino2=5500, ftpPortDestino=None):
7 No newline at end of file
8
8 self.ipSource = ipSource No newline at end of file
9 self.ipSource = ipSource
9 self.ipDestino = ipDestino No newline at end of file
10 self.ipDestino = ipDestino
10 self.portDestino = portDestino No newline at end of file
11 self.portDestino = portDestino
11 No newline at end of file
12
12 self.ipDestino2 = ipDestino2 No newline at end of file
13 self.ipDestino2 = ipDestino2
13 self.portDestino2 = portDestino2 No newline at end of file
14 self.portDestino2 = portDestino2
14 No newline at end of file
15
15 self.ftpPortDestino = ftpPortDestino No newline at end of file
16 self.ftpPortDestino = ftpPortDestino
16 No newline at end of file
17
17 self.createObjects() No newline at end of file
18 self.createObjects()
18 No newline at end of file
19
19 def createObjects(self): No newline at end of file
20 def createObjects(self):
20 No newline at end of file
21
21 asServer = True No newline at end of file
22 asServer = True
22 self.commServerObj = library.UDPComm(self.ipSource, self.ipDestino, self.portDestino, asServer) No newline at end of file
23 self.commServerObj = library.UDPComm(self.ipSource, self.ipDestino, self.portDestino, asServer)
23 self.commClientObj = library.UDPComm(self.ipSource, self.ipDestino2, self.portDestino2) No newline at end of file
24 self.commClientObj = library.UDPComm(self.ipSource, self.ipDestino2, self.portDestino2)
24 #self.ftpCommObj = library.FTPComm(self.ipSource, self.ipDestino, self.ftpPortDestino) No newline at end of file
25 #self.ftpCommObj = library.FTPComm(self.ipSource, self.ipDestino, self.ftpPortDestino)
25 No newline at end of file
26
26 def waitRequest(self,nbytes = 16384): No newline at end of file
27 def waitRequest(self,nbytes = 16384):
27 No newline at end of file
28
28 ipSource, ipDestino, cmd, self.datarx = self.commServerObj.waitRequest(nbytes) No newline at end of file
29 ipSource, ipDestino, cmd, self.datarx = self.commServerObj.waitRequest(nbytes)
29 No newline at end of file
30
30 if cmd == "SNDF": No newline at end of file
31 if cmd == "SNDF":
31 self.sendFile(10) No newline at end of file
32 self.sendFile(10)
32 No newline at end of file
33
33 if cmd == "CHGB": No newline at end of file
34 if cmd == "CHGB":
34 self.changeBeam() No newline at end of file
35 self.changeBeam()
35 No newline at end of file
36
36 if cmd == "ANST":
37 if cmd == "ANST":
No newline at end of file
38 self.getStatus(10)
37 self.getStatus() No newline at end of file
No newline at end of file
39
No newline at end of file
40 def sendAnswer(self,nbytes = 16384):
No newline at end of file
41
No newline at end of file
42 # ipSource, ipDestino, cmd, self.datarx = self.commServerObj.sendData(nbytes)
No newline at end of file
43
No newline at end of file
44 pass No newline at end of file
38 No newline at end of file
45
39 def EliminaSaltoDeLinea(cadena): No newline at end of file
46 def EliminaSaltoDeLinea(cadena):
40 i = 0 No newline at end of file
47 i = 0
41 for elemento in cadena: No newline at end of file
48 for elemento in cadena:
42 if elemento =='\n' or elemento =='\r': No newline at end of file
49 if elemento =='\n' or elemento =='\r':
43 pass No newline at end of file
50 pass
44 else: No newline at end of file
51 else:
45 i=i+1 No newline at end of file
52 i=i+1
46 return cadena [:i] No newline at end of file
53 return cadena [:i]
47 No newline at end of file
54
48 def connection_status(self,base): No newline at end of file
55 def connection_status(self,base):
49 #File creation is neccesary? No newline at end of file
56 #File creation is neccesary?
50 number_of_modules = 16 No newline at end of file
57 number_of_modules = 16
51 #base = 10 No newline at end of file
58 #base = 10
52 # Variables for the report No newline at end of file
59 # Variables for the report
53 status_array = ["Status of modules\n"] No newline at end of file
60 status_array = ["Status of modules\n"]
54 status_array.append("----------------\n") No newline at end of file
61 status_array.append("----------------\n")
55 # Variables for the program No newline at end of file
62 # Variables for the program
56 module_list = [] No newline at end of file
63 module_list = []
57 No newline at end of file
64
58 for i in range(number_of_modules): No newline at end of file
65 for i in range(number_of_modules):
59 cmd = "ping -c 1 -w 1 192.168.1."+ str(base + i + 1) + " >> /dev/null" No newline at end of file
66 cmd = "ping -c 1 -w 1 192.168.1."+ str(base + i + 1) + " >> /dev/null"
60 status = os.system(cmd) No newline at end of file
67 status = os.system(cmd)
61 if status == 256: No newline at end of file
68 if status == 256:
62 status_array.append("192.168.1." + str(base + i + 1) + " [0 0]\n") #Un-connected No newline at end of file
69 status_array.append("192.168.1." + str(base + i + 1) + " [0 0]\n") #Un-connected
63 module_list.append("0") No newline at end of file
70 module_list.append("0")
64 else: No newline at end of file
71 else:
65 status_array.append("192.168.1." + str(base + i + 1) + " [1 1]\n") No newline at end of file
72 status_array.append("192.168.1." + str(base + i + 1) + " [1 1]\n")
66 module_list.append("1") No newline at end of file
73 module_list.append("1")
67 # Generating a file report No newline at end of file
74 # Generating a file report
68 if base == 10: No newline at end of file
75 if base == 10:
69 fobj = open("module_status_S.txt","w") No newline at end of file
76 fobj = open("module_status_S.txt","w")
70 else: No newline at end of file
77 else:
71 fobj = open("module_status_N.txt","w") No newline at end of file
78 fobj = open("module_status_N.txt","w")
72 fobj.writelines(status_array) No newline at end of file
79 fobj.writelines(status_array)
73 fobj.close() No newline at end of file
80 fobj.close()
74 # For the program No newline at end of file
81 # For the program
75 return module_list No newline at end of file
82 return module_list
76 No newline at end of file
83
77 def sendFile(self, base): No newline at end of file
84 def sendFile(self, base):
78 No newline at end of file
85
79 #Needed for the file creation No newline at end of file
86 #Needed for the file creation
80 # file_str = self.datarx No newline at end of file
87 # file_str = self.datarx
81 #Needed for the loop No newline at end of file
88 #Needed for the loop
82 rx_frame_list = self.datarx.split('\n',2) No newline at end of file
89 rx_frame_list = self.datarx.split('\n',2)
83 No newline at end of file
90
84 experiment_name = rx_frame_list[0] No newline at end of file
91 experiment_name = rx_frame_list[0]
85 experiment_number = rx_frame_list[1] No newline at end of file
92 experiment_number = rx_frame_list[1]
86 str_control_modules = rx_frame_list[2] No newline at end of file
93 str_control_modules = rx_frame_list[2]
87 lst_control_modules = str_control_modules.split("------\n") No newline at end of file
94 lst_control_modules = str_control_modules.split("------\n")
88 #Setting variables of the loop No newline at end of file
95 #Setting variables of the loop
89 i =3 No newline at end of file
96 i =3
90 module = 1 No newline at end of file
97 module = 1
91 number_of_modules = 16 No newline at end of file
98 number_of_modules = 16
92 number_of_beams = int (experiment_number) No newline at end of file
99 number_of_beams = int (experiment_number)
93 module_list = self.connection_status(10) No newline at end of file
100 module_list = self.connection_status(10)
94 #Loop for creating and sending the control module files No newline at end of file
101 #Loop for creating and sending the control module files
95 while module <= number_of_modules: No newline at end of file
102 while module <= number_of_modules:
96 #Generating the control modules files No newline at end of file
103 #Generating the control modules files
97 fobj = open(experiment_name,"w") No newline at end of file
104 fobj = open(experiment_name,"w")
98 fobj.write(experiment_name + "\n") No newline at end of file
105 fobj.write(experiment_name + "\n")
99 fobj.write("------\n") No newline at end of file
106 fobj.write("------\n")
100 # tmp_list = rx_frame_list[i:i + number_of_beams + 1] No newline at end of file
107 # tmp_list = rx_frame_list[i:i + number_of_beams + 1]
101 fobj.write(lst_control_modules[module-1]) No newline at end of file
108 fobj.write(lst_control_modules[module-1])
102 fobj.write("------\n") No newline at end of file
109 fobj.write("------\n")
103 fobj.close() No newline at end of file
110 fobj.close()
104 if module_list[module -1] == "1": No newline at end of file
111 if module_list[module -1] == "1":
105 #Preparing and doing the tftp command No newline at end of file
112 #Preparing and doing the tftp command
106 cmd = "tftp -m binary 192.168.1."+ str(base + module) +" 69 -c put " + experiment_name No newline at end of file
113 cmd = "tftp -m binary 192.168.1."+ str(base + module) +" 69 -c put " + experiment_name
107 print cmd No newline at end of file
114 print cmd
108 os.system(cmd) No newline at end of file
115 os.system(cmd)
109 #Updating variables of the loop No newline at end of file
116 #Updating variables of the loop
110 i = i + number_of_beams + 2 No newline at end of file
117 i = i + number_of_beams + 2
111 module += 1 No newline at end of file
118 module += 1
112 #Working with the UDP socket No newline at end of file
119 #Working with the UDP socket
113 #self.commClientObj.sendData("CARGA:experimento1.ab1:") No newline at end of file
120 #self.commClientObj.sendData("CARGA:experimento1.ab1:")
114 self.commClientObj.sendData("CARGA:" + experiment_name + ":") No newline at end of file
121 self.commClientObj.sendData("CARGA:" + experiment_name + ":")
115 self.commClientObj.sendData("CAMBIA:0:") No newline at end of file
122 self.commClientObj.sendData("CAMBIA:0:")
116 # No newline at end of file
123 #
117 # self.ftpCommObj.sendFile(filename) No newline at end of file
124 # self.ftpCommObj.sendFile(filename)
118 # rpta = self.commClientObj.sendTxRxCommand(cmd='CARGA', data=filename) No newline at end of file
125 # rpta = self.commClientObj.sendTxRxCommand(cmd='CARGA', data=filename)
119 No newline at end of file
126
120 No newline at end of file
127
121 def changeBeam(self): No newline at end of file
128 def changeBeam(self):
122 No newline at end of file
129
123 #rpta = self.commClientObj.sendTxRxCommand(cmd='CAMBIA', data="0") No newline at end of file
130 #rpta = self.commClientObj.sendTxRxCommand(cmd='CAMBIA', data="0")
124 self.commClientObj.sendData("CAMBIA:" + self.datarx + ":") No newline at end of file
131 self.commClientObj.sendData("CAMBIA:" + self.datarx + ":")
125
132
No newline at end of file
133 def getStatus(self, base): No newline at end of file
126 def getStatus(self): No newline at end of file
127 No newline at end of file
134
128 #rpta = self.commClientObj.sendTxRxCommand(cmd='CHEQUEO', data="0") No newline at end of file
135 #rpta = self.commClientObj.sendTxRxCommand(cmd='CHEQUEO', data="0")
129 self.commClientObj.sendData("CHEQUEO:" + self.datarx + ":") No newline at end of file
136 self.commClientObj.sendData("CHEQUEO:" + self.datarx + ":")
137 seconds = int (self.datarx)
No newline at end of file
138 # Give 5 seconds to the control modules
No newline at end of file
139 time.sleep(seconds)
No newline at end of file
140 # Checking the module connection
No newline at end of file
141 module_list = self.connection_status(10)
No newline at end of file
142 #Generating the complete report
No newline at end of file
143 module = 1
No newline at end of file
144 number_of_modules = 16
No newline at end of file
145 filename1 = "Verificacion"
No newline at end of file
146 filename2 = "report.txt"
No newline at end of file
147 fobj2 = open(filename2,"w")
No newline at end of file
148 fobj2.write("Verification_file\n")
No newline at end of file
149 fobj2.write("-----------------\n")
No newline at end of file
150 fobj2.close()
No newline at end of file
151 while module <= number_of_modules:
No newline at end of file
152 if module_list[module -1] == "1":
No newline at end of file
153 #Preparing and doing the tftp command
No newline at end of file
154 cmd = "tftp -m binary 192.168.1."+ str(base + module) +" 69 -c get " + filename1
No newline at end of file
155 print cmd
No newline at end of file
156 os.system(cmd)
No newline at end of file
157 # Getting data from the control module file
No newline at end of file
158 fobj1 = open(filename1,"r")
No newline at end of file
159 file_list_1 = fobj1.readlines()
No newline at end of file
160 fobj1.close()
No newline at end of file
161 content = file_list_1[2:-1]
No newline at end of file
162 #
No newline at end of file
163 fobj2 = open(filename2,"a")
No newline at end of file
164 if base == 10:
No newline at end of file
165 fobj2.write("S" + str(module) + "\n")
No newline at end of file
166 else:
No newline at end of file
167 fobj2.write("N" + str(module) + "\n")
No newline at end of file
168 fobj2.writelines(content)
No newline at end of file
169 fobj2.write("------\n")
No newline at end of file
170 fobj2.close()
No newline at end of file
171 module = module + 1
No newline at end of file
172 # print "\nFinalizado"
No newline at end of file
173
No newline at end of file
174
No newline at end of file
175 No newline at end of file
130 No newline at end of file
176
131 if __name__ == '__main__': No newline at end of file
177 if __name__ == '__main__':
132 No newline at end of file
178
133 absObj = ABSServer() No newline at end of file
179 absObj = ABSServer()
134 No newline at end of file
180
135 while 1: No newline at end of file
181 while 1:
136 absObj.waitRequest() No newline at end of file
182 absObj.waitRequest()
183 # absObj.sendAnswer(nbytes) No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now