Commit 2dca3fd6 authored by Milosz Malczak's avatar Milosz Malczak

adc: started using the get_ip function

parent ac817747
......@@ -6,7 +6,7 @@ import argparse
from devices_access import DevicesAccess
from server_expose import ServerExpose
import time
from general.ipaddr import get_ip
def main():
parser = argparse.ArgumentParser()
......@@ -23,7 +23,7 @@ def main():
port = int(args.port[0])
pci_addr = int(args.pci_addr[0])
addr = os.popen("ifconfig| grep inet").read().split()[1]
addr = get_ip()
ADC_idx = addr + '_' + str(port)
unique_ADC_name = 'ADC' + '_' + ADC_idx + '._http._tcp.local.'
......
......@@ -8,6 +8,7 @@ import time
sys.path.append('../')
from general.publisher import Publisher
from general.addresses import server_expose_to_device_port
from general.ipaddr import get_ip
thismodule = sys.modules[__name__]
......@@ -47,7 +48,7 @@ class ServerExpose():
context = zmq.Context()
socket = context.socket(zmq.ROUTER)
monitor = socket.get_monitor_socket()
ip = '128.141.162.185'
ip = get_ip()
port_zmq = str(self.port)
socket.bind("tcp://" + ip + ":" + port_zmq)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment