@@ -42,7 +42,7 | |||
|
42 | 42 | |
|
43 | 43 | print "\nWaiting some data" |
|
44 | 44 | trama_rx, self.answer = self.socket_c.recvfrom(nbytes) |
|
45 | print "\nThis socket has received some data" | |
|
45 | print "\nThis socket has received some data from:" | |
|
46 | 46 | print self.answer |
|
47 | 47 | ipSource, ipDestino, cmd, data = self.__getTrama(trama_rx) |
|
48 | 48 | |
@@ -61,7 +61,7 | |||
|
61 | 61 | destiny = self.answer |
|
62 | 62 | # Send messages |
|
63 | 63 | if(self.socket_c.sendto(trama_tx, destiny)): |
|
64 | print "Sending message:[" + trama_tx + "]" | |
|
64 | print "Sending message:[" + trama_tx + "] to " + str(destiny) | |
|
65 | 65 | |
|
66 | 66 | def __getTrama(self, trama): |
|
67 | 67 |
@@ -97,7 +97,7 | |||
|
97 | 97 | #Needed for the loop |
|
98 | 98 | rx_frame_list = self.datarx.split('\n',2) |
|
99 | 99 | |
|
100 | experiment_name = rx_frame_list[0] | |
|
100 | self.experiment_name = rx_frame_list[0] | |
|
101 | 101 | experiment_number = rx_frame_list[1] |
|
102 | 102 | str_control_modules = rx_frame_list[2] |
|
103 | 103 | |
@@ -110,13 +110,11 | |||
|
110 | 110 | if address not in enaModules: |
|
111 | 111 | continue |
|
112 | 112 | |
|
113 | self.__writeModuleFile(experiment_name, lst_control_modules[address-1]) | |
|
114 | ||
|
115 | cmd = "tftp -m binary 192.168.1."+ str(address) +" 69 -c put " + experiment_name | |
|
113 | self.__writeModuleFile(self.experiment_name, lst_control_modules[address-1]) | |
|
114 | ||
|
115 | cmd = "tftp -m binary 192.168.1."+ str(address) +" 69 -c put " + self.experiment_name | |
|
116 | 116 | print cmd |
|
117 | 117 | os.system(cmd) |
|
118 | ||
|
119 | self.experiment_name = experiment_name | |
|
120 | 118 | |
|
121 | 119 | self.__loadFile() |
|
122 | 120 |
General Comments 0
You need to be logged in to leave comments.
Login now