@@ -719,6 +719,15 class ABSConfiguration(Configuration): | |||
|
719 | 719 | to all abs modules. |
|
720 | 720 | """ |
|
721 | 721 | |
|
722 | # Se manda a cero RC para poder realizar cambio de beam | |
|
723 | confs = Configuration.objects.filter(experiment = self.experiment) | |
|
724 | confrc='' | |
|
725 | for conf in confs: | |
|
726 | if conf.device.device_type.name == 'rc': | |
|
727 | confrc = conf | |
|
728 | confrc.stop_device() | |
|
729 | break | |
|
730 | ||
|
722 | 731 | if beam_pos > 0: |
|
723 | 732 | beam_pos = beam_pos - 1 |
|
724 | 733 | else: |
@@ -752,11 +761,22 class ABSConfiguration(Configuration): | |||
|
752 | 761 | sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq) |
|
753 | 762 | |
|
754 | 763 | #print 'sending acknowledgement to all: \n' + message_tx |
|
755 | sock.sendto(message_tx, (multicast_group, 10000)) | |
|
764 | try: | |
|
765 | sock.sendto(message_tx, (multicast_group, 10000)) | |
|
766 | except Exception as e: | |
|
767 | self.message = str(e) | |
|
768 | return False | |
|
756 | 769 | sock.close() |
|
757 | 770 | sock = None |
|
758 | 771 | |
|
759 |
|
|
|
772 | #Start RC | |
|
773 | if confrc: | |
|
774 | #print confrc | |
|
775 | confrc.start_device() | |
|
776 | ||
|
777 | self.message = "ABS Beam has been changed" | |
|
778 | ||
|
779 | return True | |
|
760 | 780 | |
|
761 | 781 | def test1(self): |
|
762 | 782 | t1 = time.time() |
General Comments 0
You need to be logged in to leave comments.
Login now