Exemple #1
0
def writeUHalAddressTable(modules, filename, addrOffset):
    print('Writing uHAL address table XML')

    rw_reg.parseXML(ADDRESS_TABLE_TOP)
    top = rw_reg.getNode('GEM_AMC')
    f = open(filename, 'w')
    f.write('<?xml version="1.0" encoding="ISO-8859-1"?>\n')
    f.write('<node id="top">\n')
    printNodeToUHALFile(top, f, 1, 0, None, addrOffset)
    f.write('</node>\n')
    f.close()
Exemple #2
0
def writeUHalAddressTable(modules, filename, addrOffset, num_of_oh = None):
    print('Writing uHAL address table XML')

    rw_reg.parseXML(ADDRESS_TABLE_TOP, num_of_oh)
    top = rw_reg.getNode('GEM_AMC')

    # AMC specific nodes
    f = open("%s_amc.xml"%(filename), 'w')
    f.write('<?xml version="1.0" encoding="ISO-8859-1"?>\n')
    f.write('<node id="top">\n')
    printNodeToUHALFile(top, f, 1, 0, None, addrOffset)
    f.write('</node>\n')
    f.close()

    # OH specific nodes
    for oh in range(num_of_oh):
        f = open("%s_link%02d.xml"%(filename,oh), 'w')
        f.write('<?xml version="1.0" encoding="ISO-8859-1"?>\n')
        f.write('<node id="top">\n')
        printNodeToUHALFile(top, f, 1, 0, None, addrOffset, oh)
        f.write('</node>\n')
        f.close()
        pass
    pass
Exemple #3
0
def writeUHalAddressTable(modules, filename, addrOffset, num_of_oh=None):
    print('Writing uHAL address table XML')

    rw_reg.parseXML(ADDRESS_TABLE_TOP, num_of_oh)
    top = rw_reg.getNode('GEM_AMC')

    # AMC specific nodes
    f = open("%s_amc.xml" % (filename), 'w')
    f.write('<?xml version="1.0" encoding="ISO-8859-1"?>\n')
    f.write('<node id="top">\n')
    printNodeToUHALFile(top, f, 1, 0, None, addrOffset)
    f.write('</node>\n')
    f.close()

    # OH specific nodes
    for oh in range(num_of_oh):
        f = open("%s_link%02d.xml" % (filename, oh), 'w')
        f.write('<?xml version="1.0" encoding="ISO-8859-1"?>\n')
        f.write('<node id="top">\n')
        printNodeToUHALFile(top, f, 1, 0, None, addrOffset, oh)
        f.write('</node>\n')
        f.close()
        pass
    pass
Exemple #4
0
The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin

from daq_suite.views import *
from rw_reg import parseXML, rpc_connect

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^hello/', hello),
    url(r'^main/', main),
    url(r'^expert_controls_main/', expert_controls_main),
    url(r'^read_fw/', read_fw),
    #url(r'^monitoring/([a-zA-Z]+)/', read_gem_system_module),
    url(r'^monitoring/(\w.+)/', read_gem_system_module),
]
parseXML()
rpc_connect("eagle26")
Exemple #5
0
import xml.etree.ElementTree as xml
import sys, os, subprocess
from time import sleep
from ctypes import *
import timeit
from rw_reg import parseXML, readReg

from gempython.tools.vfat_user_functions_xhal import *

lib = CDLL(os.getenv("XHAL_ROOT")+"/lib/x86_64/librpcman.so")

addrTable = os.getenv("XHAL_ROOT")+'/etc/gem_amc_top.xml'
nodes = parseXML(addrTable)
#nodes = parseXML()

rpc_connect = lib.init
rpc_connect.argtypes = [c_char_p]
rpc_connect.restype = c_uint

update_atdb = lib.update_atdb
update_atdb.argtypes = [c_char_p]
update_atdb.restype = c_uint

ttcGenConf = lib.ttcGenConf
ttcGenConf.restype = c_uint
ttcGenConf.argtypes = [c_uint, c_uint, c_uint, c_uint, c_uint, c_uint, c_bool]

genScan = lib.genScan
genScan.restype = c_uint
genScan.argtypes = [c_uint, c_uint, c_uint, c_uint, 
                    c_uint, c_uint, c_uint, c_uint, 
Exemple #6
0
"""daq_suite URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin

from daq_suite.views import *
from rw_reg import parseXML

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^hello/', hello),
    url(r'^main/', main),
    url(r'^read_fw/', read_fw),
    #url(r'^monitoring/([a-zA-Z]+)/', read_gem_system_module),
    url(r'^monitoring/(\w.+)/', read_gem_system_module),
]
parseXML()