DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
rx_endpoints.py
Go to the documentation of this file.
1import json
2import os.path
3
4rx_endpoints = {}
5with open(os.path.expandvars('$HERMESMODULES_SHARE/config/rx_endpoints.json'), 'r') as f:
6 d = json.load(f)
7 for k,v in d.items():
8
9 assert(v['mac'].count(':') == 5)
10 rx_endpoints[k] = {
11 'mac': int(v['mac'].replace(':', ''), 16),
12 'ip': v['ip'],
13 'port': int(v['port'], 16)
14 }