@@ -364,10 +364,11 class ABSConfiguration(Configuration): | |||
|
364 | 364 | This function sends the beams list to every abs module. |
|
365 | 365 | It needs 'module_conf' function |
|
366 | 366 | """ |
|
367 | print("Write") | |
|
367 | print("Write 3") | |
|
368 | ||
|
368 | 369 | beams = ABSBeam.objects.filter(abs_conf=self) |
|
369 | 370 | nbeams = len(beams) |
|
370 | ||
|
371 | ||
|
371 | 372 | # Se manda a cero RC para poder realizar cambio de beam |
|
372 | 373 | if self.experiment is None: |
|
373 | 374 | confs = [] |
@@ -412,7 +413,9 class ABSConfiguration(Configuration): | |||
|
412 | 413 | message += ''.join([fromBinary2Char(beam.module_6bits(i)) for beam in beams]) |
|
413 | 414 | status = ['0'] * 64 |
|
414 | 415 | n = 0 |
|
415 | print("Llega una antes entrar a multicast") | |
|
416 | ||
|
417 | print("Llega una antes entrar a multicast4") | |
|
418 | ||
|
416 | 419 | sock = self.send_multicast(message) |
|
417 | 420 | |
|
418 | 421 | while True: |
@@ -561,7 +564,10 class ABSConfiguration(Configuration): | |||
|
561 | 564 | # Create the datagram socket |
|
562 | 565 | sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) |
|
563 | 566 | sock.settimeout(1) |
|
564 |
local_ip = os.environ.get('LOCAL_IP', ' |
|
|
567 | local_ip = os.environ.get('LOCAL_IP', '0.0.0.0') | |
|
568 | local_ip = '0.0.0.0' | |
|
569 | print("He llegado a IP local") | |
|
570 | ||
|
565 | 571 | sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_IF, socket.inet_aton(local_ip)) |
|
566 | 572 | sock.sendto(message.encode(), multicast_group) |
|
567 | 573 | print('Sending ' + message) |
General Comments 0
You need to be logged in to leave comments.
Login now