diff --git a/.gitignore b/.gitignore index 7000f2c77cbf4cf85fea2d641cfe50dc6499c774..a6d12176212b4287397fbc6c1aa4222b19e3fb20 100644 --- a/.gitignore +++ b/.gitignore @@ -163,7 +163,7 @@ package-lock.json poetry.lock -felixclass.log -optoboard.log +*felixclass.log +*optoboard.log .AFTER ui/.AFTER diff --git a/itk_demo_optoboard/ConfigGUI.json b/itk_demo_optoboard/ConfigGUI.json new file mode 100644 index 0000000000000000000000000000000000000000..fed4d0dc2814b3103e2603f9673ad23d14a287a2 --- /dev/null +++ b/itk_demo_optoboard/ConfigGUI.json @@ -0,0 +1,111 @@ +{ + "defaultConfig": "SR1", + "Basic": [ + { + "ConfigurationDB": "http://localhost:5000", + "ConfigurationPath": "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + "Position": "OB0", + "debugCheckBox": false, + "flx_G": "0", + "flx_d": "0", + "inDBCheckBox": false, + "serialNumber": "30000000", + "testmode": false, + "vtrxVersion": "1.3", + "withoutFelixcore": false + } + ], + "SR1": [ + { + "ConfigurationDB": "http://localhost:5000", + "ConfigurationPath": "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + "Position": "OB0", + "debugCheckBox": false, + "flx_G": "0", + "flx_d": "0", + "inDBCheckBox": false, + "serialNumber": "00000000", + "testmode": true, + "vtrxVersion": "1.3", + "withoutFelixcore": false + }, + { + "ConfigurationDB": "http://localhost:5000", + "ConfigurationPath": "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + "Position": "OB1", + "debugCheckBox": false, + "flx_G": "0", + "flx_d": "0", + "inDBCheckBox": false, + "serialNumber": "00000000", + "testmode": true, + "vtrxVersion": "1.3", + "withoutFelixcore": false + }, + { + "ConfigurationDB": "http://localhost:5000", + "ConfigurationPath": "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + "Position": "OB2", + "debugCheckBox": false, + "flx_G": "0", + "flx_d": "0", + "inDBCheckBox": false, + "serialNumber": "00000000", + "testmode": false, + "vtrxVersion": "1.3", + "withoutFelixcore": false + }, + { + "ConfigurationDB": "http://localhost:5000", + "ConfigurationPath": "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + "Position": "OB3", + "debugCheckBox": false, + "flx_G": "0", + "flx_d": "0", + "inDBCheckBox": false, + "serialNumber": "00000000", + "testmode": false, + "vtrxVersion": "1.3", + "withoutFelixcore": false + }, + { + "ConfigurationDB": "http://localhost:5000", + "ConfigurationPath": "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + "Position": "OB4", + "debugCheckBox": false, + "flx_G": "0", + "flx_d": "0", + "inDBCheckBox": false, + "serialNumber": "00000000", + "testmode": false, + "vtrxVersion": "1.3", + "withoutFelixcore": false + }, + { + "ConfigurationDB": "http://localhost:5000", + "ConfigurationPath": "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + "Position": "OB5", + "debugCheckBox": false, + "flx_G": "0", + "flx_d": "0", + "inDBCheckBox": false, + "serialNumber": "00000000", + "testmode": false, + "vtrxVersion": "1.3", + "withoutFelixcore": false + }, + { + "ConfigurationDB": "http://localhost:5000", + "ConfigurationPath": "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + "Position": "OB6", + "debugCheckBox": false, + "flx_G": "0", + "flx_d": "0", + "inDBCheckBox": false, + "serialNumber": "00000000", + "testmode": false, + "vtrxVersion": "1.3", + "withoutFelixcore": false + } + ] +} \ No newline at end of file diff --git a/itk_demo_optoboard/ConfigGUICopy.json b/itk_demo_optoboard/ConfigGUICopy.json new file mode 100644 index 0000000000000000000000000000000000000000..487ace6a86f780359b00c127a9056abae1982504 --- /dev/null +++ b/itk_demo_optoboard/ConfigGUICopy.json @@ -0,0 +1,113 @@ +{ + "defaultConfig": "SR1", + + "Basic": [ + { + "serialNumber": "30000000", + "Position": "OB0", + "vtrxVersion": "1.3", + "flx_G": "0", + "flx_d": "0", + "withoutFelixcore": false, + "ConfigurationPath": "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + "inDBCheckBox": false, + "ConfigurationDB": "http://localhost:5000", + "debugCheckBox": false, + "testmode": false + } + ], + + "SR1": [ + { + "serialNumber": "00000000", + "Position": "OB0", + "vtrxVersion": "1.3", + "flx_G": "0", + "flx_d": "0", + "withoutFelixcore": false, + "ConfigurationPath": "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + "inDBCheckBox": false, + "ConfigurationDB": "http://localhost:5000", + "debugCheckBox": false, + "testmode": false + }, + { + "serialNumber": "00000000", + "Position": "OB1", + "vtrxVersion": "1.3", + "flx_G": "0", + "flx_d": "0", + "withoutFelixcore": false, + "ConfigurationPath": "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + "inDBCheckBox": false, + "ConfigurationDB": "http://localhost:5000", + "debugCheckBox": false, + "testmode": false + }, + { + "serialNumber": "00000000", + "Position": "OB2", + "vtrxVersion": "1.3", + "flx_G": "0", + "flx_d": "0", + "withoutFelixcore": false, + "ConfigurationPath": "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + "inDBCheckBox": false, + "ConfigurationDB": "http://localhost:5000", + "debugCheckBox": false, + "testmode": false + }, + { + "serialNumber": "00000000", + "Position": "OB3", + "vtrxVersion": "1.3", + "flx_G": "0", + "flx_d": "0", + "withoutFelixcore": false, + "ConfigurationPath": "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + "inDBCheckBox": false, + "ConfigurationDB": "http://localhost:5000", + "debugCheckBox": false, + "testmode": false + }, + { + "serialNumber": "00000000", + "Position": "OB4", + "vtrxVersion": "1.3", + "flx_G": "0", + "flx_d": "0", + "withoutFelixcore": false, + "ConfigurationPath": "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + "inDBCheckBox": false, + "ConfigurationDB": "http://localhost:5000", + "debugCheckBox": false, + "testmode": false + }, + { + "serialNumber": "00000000", + "Position": "OB5", + "vtrxVersion": "1.3", + "flx_G": "0", + "flx_d": "0", + "withoutFelixcore": false, + "ConfigurationPath": "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + "inDBCheckBox": false, + "ConfigurationDB": "http://localhost:5000", + "debugCheckBox": false, + "testmode": false + }, + { + "serialNumber": "00000000", + "Position": "OB6", + "vtrxVersion": "1.3", + "flx_G": "0", + "flx_d": "0", + "withoutFelixcore": false, + "ConfigurationPath": "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + "inDBCheckBox": false, + "ConfigurationDB": "http://localhost:5000", + "debugCheckBox": false, + "testmode": false + } + ] +} diff --git a/itk_demo_optoboard/app_factory.py b/itk_demo_optoboard/app_factory.py index 559a40ec12ca8590632b0b496bc1d04a051e0589..b76627db4032ceb71ddd415af073f2f5986f2119 100644 --- a/itk_demo_optoboard/app_factory.py +++ b/itk_demo_optoboard/app_factory.py @@ -7,6 +7,7 @@ from flask_cors import CORS ### from flask import after_this_request, jsonify from celery import Celery + ### @@ -36,29 +37,28 @@ def create_app(): ProblemException, connexion_error_response ) # validation-errors + # create the app flask_app = app.app CORS(flask_app) - - # @flask_app.route("/", defaults={"path": ""}) - #@flask_app.route("/<path:path>") -# def catch_all(path): -# return flask_app.send_static_file("index.html") + # @flask_app.route("/<path:path>") + #@flask_app.route("/", defaults={"path": ""}) + #def catch_all(path): + # return flask_app.send_static_file("index.html") with app.app.app_context(): app.add_api("openapi.yaml") flask_app.config.update( - CELERY_BROKER_URL='amqp://guest@localhost//', - CELERY_RESULT_BACKEND='rpc://guest@localhost//' + CELERY_BROKER_URL="amqp://guest@localhost//", + CELERY_RESULT_BACKEND="rpc://guest@localhost//", ) - proxied = ReverseProxied(flask_app.wsgi_app, script_name="/optoboard/api/") + proxied = ReverseProxied(flask_app.wsgi_app, script_name="/optoboard/api/") flask_app.wsgi_app = proxied - -### -### + ### + ### # with app.app.app_context(): # @flask_app.route("/testCelery", methods=['GET','POST']) # def testCelery(): @@ -69,27 +69,31 @@ def create_app(): # resultWait = result.wait() # print("After wait") # return resultWait - -### + + ### return app -#celery = make_celery(flask_app) + + +# celery = make_celery(flask_app) + def make_celery(): celery = Celery( __name__, - backend='rpc://guest@localhost//', - broker='amqp://guest@localhost//', - include = ["itk_demo_optoboard.celeryTasks"] + backend="rpc://guest@localhost//", + broker="amqp://guest@localhost//", + include=["itk_demo_optoboard.celeryTasks"], ) return celery + def init_celery(celery, app): - #celery = Celery( + # celery = Celery( # app.import_name, # backend=app.config['CELERY_RESULT_BACKEND'], # broker=app.config['CELERY_BROKER_URL'] - #) + # ) celery.conf.update(app.config) class ContextTask(celery.Task): @@ -161,6 +165,3 @@ class ReverseProxied: if server: environ["HTTP_HOST"] = server return self.app(environ, start_response) - - - diff --git a/itk_demo_optoboard/celeryTasks.py b/itk_demo_optoboard/celeryTasks.py index 9093739a373b1e5f6d6c942950015e3436b886f8..fc3937be1a941887da65dd3e8802189ee3c01891 100644 --- a/itk_demo_optoboard/celeryTasks.py +++ b/itk_demo_optoboard/celeryTasks.py @@ -4,101 +4,203 @@ import json import sys from collections import OrderedDict -sys.path.append(os.getcwd() + '/itk_demo_optoboard/optoboard_felix') -from additional_driver.DB_access import configDbUnavailable, getConfigDataset, checkAvailableDatasetInDB +sys.path.append(os.getcwd() + "/itk_demo_optoboard/optoboard_felix") +from additional_driver.DB_access import ( + configDbUnavailable, + getConfigDataset, + checkAvailableDatasetInDB, +) from driver.Optoboard import Optoboard from driver.log import logger, ch -from driver.Comm_wrapper import Comm_wrapper +from driver.CommWrapper import CommWrapper from driver.components import components ### initialize the optoboard object + @celery.task() -def initializeOptoboardTasks(optoboard_serial, config_path, vtrx_v, flx_G, flx_d, woflxcore, CONFIGDB_ADDRESS, configInDB, debug, testmode): - - ######### Provide the configuration file - global glob_config_path - glob_config_path = config_path - - if not configInDB: - with open(os.getcwd() + config_path) as f: - try: - config_file = json.load(f) - logger.info('Initialising config from %s', config_path) - except: - raise Exception("Unavailable local configuration file!") - else: - if configDbUnavailable(CONFIGDB_ADDRESS): - raise Exception('Unavailable configuration database') - else: config_file = getConfigDataset() - - if optoboard_serial in components.keys(): - - ######### Provide the component dataset - global components_opto - components_opto = OrderedDict(components[optoboard_serial]) +def initOptoListTask(optoboard_list): + global optoboard_dic + global opto_info_dic + optoboard_dic = {} + opto_info_dic = {} + + for x in optoboard_list["optoList"]: + + if x["serialNumber"] in components.keys(): + + opto_info_dic[x["Position"]] = {} + + ######### Provide the component dataset + components_opto = OrderedDict(components[x["serialNumber"]]) + opto_info_dic[x["Position"]]["components"] = components_opto + + if x["vtrxVersion"] == "1.2": + vtrx_v_string = "1_2" + elif x["vtrxVersion"] == "1.3": + vtrx_v_string = "1_3" + else: + raise ValueError("Invalid vtrx version provided!") + + if not x["inDBCheckBox"]: + if x["ConfigurationPath"] != "": + configuration_path = ( + os.getcwd() + + "/itk_demo_optoboard/optoboard_felix/configs/optoboard" + + str(components_opto["optoboard_v"]) + + "_lpgbtv" + + str(components_opto["lpgbt_v"]) + + "_gbcr" + + str(components_opto["gbcr_v"]) + + "_vtrxv" + + vtrx_v_string + + "_default.json" + ) + else: + configuration_path = os.getcwd() + x["ConfigurationPath"] + with open(configuration_path) as f: + try: + config_file = json.load(f) + logger.info("Initialising config from %s", x["ConfigurationPath"]) + except: + raise Exception("Unavailable local configuration file!") + else: + if configDbUnavailable(x["ConfigurationDB"]): + raise Exception("Unavailable configuration database") + else: + config_file = getConfigDataset() ######### Initialize the communication wrapper - global Communication_wrapper - Communication_wrapper = Comm_wrapper(flx_G=flx_G, flx_d=flx_d, lpgbt_master_addr=components_opto['lpgbt_master_addr'], lpgbt_v=components_opto["lpgbt_v"], - woflxcore=woflxcore, test_mode=testmode) + Communication_wrapper = CommWrapper( + flx_G=x["flx_G"], + flx_d=x["flx_d"], + lpgbt_master_addr=components_opto["lpgbt_master_addr"], + lpgbt_v=components_opto["lpgbt_v"], + woflxcore=x["withoutFelixcore"], + test_mode=x["testmode"], + ) ######### Initialize the optoboard + optoboard_dic[x["Position"]] = Optoboard( + config_file, + x["serialNumber"], + x["vtrxVersion"], + components_opto, + Communication_wrapper, + x["debugCheckBox"], + ) + logger.info("Optoboard in position " + x["Position"] + " has been added!") + return opto_info_dic + + +@celery.task() +def getOptoGUIConfTasks(): + with open(os.getcwd() + "/itk_demo_optoboard/ConfigGUI.json") as f: + config_json = json.load(f) + defaultConfig = config_json["defaultConfig"] + OptoGUIConf = {x: config_json[x] for x in config_json if x != "defaultConfig"} + + return OptoGUIConf, defaultConfig + + +@celery.task() +def modifyOptoGUIConfTasks(confKey, newConfiguration): + if confKey != "defaultConfig": + newConfiguration = json.loads(newConfiguration) + + with open(os.getcwd() + "/itk_demo_optoboard/ConfigGUI.json", "r+") as f: + config_json = json.load(f) + config_json[confKey] = newConfiguration + + defaultConfig = config_json["defaultConfig"] + OptoGUIConf = {x: config_json[x] for x in config_json if x != "defaultConfig"} + + # logger.warn(json.dumps(config_json, indent = 4)) + f.seek(0) + f.truncate(0) + json.dump(config_json, f, indent=2) - global optoObject - optoObject = Optoboard(config_file, optoboard_serial, vtrx_v, components_opto, Communication_wrapper, debug) - logger.info("The optoboard object 'optoObject' is now available!") + return OptoGUIConf, defaultConfig - return True, optoObject.lpgbt_v, optoObject.activeLpgbt, optoObject.activeGbcr - else: - return False, "", "", "" @celery.task() -def writeReadTasks(device, registerName, fieldName, newValue): +def writeReadTasks(optoboardPosition, device, registerName, fieldName, newValue): RequestStatus = 200 - replyTasks = '' - replyTasks = eval("optoObject." + device).write_read(registerName, fieldName, newValue) - #except Exception as inst: + replyTasks = "" + try: + replyTasks = eval( + 'optoboard_dic["' + optoboardPosition + '"].' + device + ).write_read(registerName, fieldName, newValue) + return replyTasks + except: + return -1 + # except Exception as inst: # if 'Resourses locked: felixcore is probably running!' in inst.args: # RequestStatus = 404 # else: # RequestStatus = 500 - return replyTasks#, RequestStatus + # , RequestStatus + @celery.task() -def readTasks(device, registerName, fieldName): - replyTasks = eval("optoObject." + device).read(registerName, fieldName) - return replyTasks +def readTasks(optoboardPosition, device, registerName, fieldName): + try: + replyTasks = eval('optoboard_dic["' + optoboardPosition + '"].' + device).read( + registerName, fieldName + ) + return replyTasks + except: + return -1 + + +### optoboard status + @celery.task() -def sendRegisterNoReadBackTasks(device, registerName, fieldName, newValue): - eval("optoObject." + device).write(registerName, fieldName, newValue) +def statusCheckTasks(optoboardPosition): + full_dic = optoboard_dic[optoboardPosition].opto_doc() + status = {"lpgbt1": 0, "lpgbt1": 0, "lpgbt1": 0, "lpgbt1": 0} + for key, device_dic in full_dic.items(): + if key[:-1] == "lpgbt": + if device_dic["PUSM_ready"] is True: + status[key] = 1 + return status + ### configuration tasks + @celery.task() -def configureTasks(config_path, activeLpgbt, activeGbcr, configInDB): - global optoObject - if config_path != glob_config_path: - optoObject = Optoboard(config_file, optoObject.optoboard_serial, optoObject.vtrx_v, components_opto, Communication_wrapper, optoObject.debug) +def configureTasks(optoboardPosition, activeLpgbt, activeGbcr): try: - optoObject.configure(activeLpgbt, activeGbcr) + optoboard_dic[optoboardPosition].configure(activeLpgbt, activeGbcr) return "Optoboard configuration completed" - except: + except: + # logger.warn("Failed configuring!") return "Optoboard configuration failed" @celery.task() -def set_I2C_settingsTasks(): - optoObject.lpgbt1.configure_I2C_controller() +def configureAllTasks(): + try: + for pos, opto in optoboard_dic.items(): + opto.configure() + return "Configuration completed" + except: + return "Configuration failed" + ### task for BER test + @celery.task() -def BERT_Tasks(device, BERTSOURCE_G, BERTSOURCE_C, BERTMEASTIME): - BERT_result = eval('optoObject.' + device).bert(BERTSOURCE_G, BERTSOURCE_C, BERTMEASTIME) +def BERT_Tasks(optoboardPosition, device, channel, meastime): + BERT_result = eval('optoboard_dic["' + optoboardPosition + '"].' + device).bert( + channel + 1, 6, meastime + ) return BERT_result + ### read current state of sensors on the optoboard """ @@ -109,10 +211,12 @@ def testCharacteristicsTasks(device): return replyTasks """ + @celery.task() def configDbUnavailableTasks(CONFIGDB_ADDRESS): return configDbUnavailable(CONFIGDB_ADDRESS) - + + @celery.task() def checkAvailableDatasetInDBTasks(path, inDB, CONFIGDB_ADDRESS): return checkAvailableDatasetInDB(path, inDB, CONFIGDB_ADDRESS) diff --git a/itk_demo_optoboard/optoboard_felix b/itk_demo_optoboard/optoboard_felix index 4280793829fe7d6d95c257cce08131f3e4be22ed..2dc4b31b2158ad31475db62f252caf1f4c502a35 160000 --- a/itk_demo_optoboard/optoboard_felix +++ b/itk_demo_optoboard/optoboard_felix @@ -1 +1 @@ -Subproject commit 4280793829fe7d6d95c257cce08131f3e4be22ed +Subproject commit 2dc4b31b2158ad31475db62f252caf1f4c502a35 diff --git a/itk_demo_optoboard/routes.py b/itk_demo_optoboard/routes.py index 80a53efe897777f7f4d238e9b4a6078900f6e04e..04fbf8c4ad8aa7f5ba5eb6c094a4cf5bab0b99b7 100644 --- a/itk_demo_optoboard/routes.py +++ b/itk_demo_optoboard/routes.py @@ -1,213 +1,197 @@ from connexion import request - -# from itk_demo_optoboard.backend import write_read_reg -# from itk_demo_optoboard.backend import I2C_controller -# from itk_demo_optoboard.backend import write_read_reg -# from itk_demo_optoboard.backend import read_reg -# from itk_demo_optoboard.backend import set_I2C_settings -# from itk_demo_optoboard.backend import send_multiple_commands -#from itk_demo_optoboard.driver.control import * - -#from itk_demo_optoboard.lpgbt_control_lib.lpgbt_control_lib.lpgbt_register_map_v1 import LpgbtRegisterMapV1 - from time import sleep import subprocess import logging import json import os - logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) ch = logging.StreamHandler() logger.addHandler(ch) -#lpGBT_reg_map = LpgbtRegisterMapV1() - def health(): con = {"status": 200} - return con, 200, {'content-type': 'application/json'} + return con, 200, {"content-type": "application/json"} - -def initializeOptoboard_wrapper(): +def sendOptoList(): payload = request.get_json() - optoserial = str(payload["optoserial"]) - config_path = str(payload["config_path"]) - vtrx_v = str(payload["vtrx_v"]) - flx_G = int(payload["flx_G"]) - flx_d = int(payload["flx_d"]) - woflxcore = bool(payload["woflxcore"]) - CONFIGDB_ADDRESS = str(payload["CONFIGDB_ADDRESS"]) + opto_info_dic = initOptoListTask.delay(payload).wait() - configInDB = bool(payload["configInDB"]) - debug = bool(payload["debug"]) - testmode = bool(payload["testmode"]) + return opto_info_dic, 200, {"content-type": "application/json"} - boolSerial, lpgbt_v, activeLpgbt, activeGbcr = initializeOptoboardTasks.delay(optoserial, config_path, vtrx_v, flx_G, flx_d, woflxcore, CONFIGDB_ADDRESS, configInDB, debug, testmode).wait() - - return {"boolSerial" : boolSerial, "lpgbt_v" : str(lpgbt_v), "activeLpgbt": activeLpgbt, "activeGbcr": activeGbcr}, 200, {'content-type': 'application/json'} - - -def testCharacteristics_wrapper(): - device = request.get_json() - #print(payload) - - characteristics = testCharacteristicsTasks.delay(device).wait() - return characteristics, 200, {'content-type': 'application/json'} +def getOptoGUIConf(): + OptoGUIConf, defaultConfig = getOptoGUIConfTasks.delay().wait() + return ( + {"optoGUIConf": OptoGUIConf, "defaultConfig": defaultConfig}, + 200, + {"content-type": "application/json"}, + ) -def sendRegister_wrapper(): +def modifyOptoGUIConf(): payload = request.get_json() - print(payload) + confKey = str(payload["confKey"]) + newConfiguration = str(payload["newConfiguration"]) - device = payload['device'] - registerName = payload['registerName'] - fieldName = payload['settingName'] - newValue = payload['newValue'] - if fieldName == 'DPDATAPATTERN': - newValue = int(newValue,2) - else: newValue = int(newValue) + OptoGUIConf, defaultConfig = modifyOptoGUIConfTasks.delay( + confKey, newConfiguration + ).wait() - read_back = writeReadTasks.delay(device, registerName.upper(), fieldName.upper(), newValue).wait() - #read_back = write_read(device, registerName.upper(), fieldName.upper(), newValue) + return ( + {"optoGUIConf": OptoGUIConf, "defaultConfig": defaultConfig}, + 200, + {"content-type": "application/json"}, + ) - return str(f'Read-back value {read_back}'), 200, {'content-type': 'application/json'} -def sendRegisterNoReadBack_wrapper(): +def write_read_wrapper(): + payload = request.get_json() - print(payload) - device = payload['device'] - registerName = payload['registerName'] - fieldName = payload['settingName'] - newValue = payload['newValue'] - newValue = int(newValue) + optoboardPosition = str(payload["optoboardPosition"]) + device = str(payload["device"]) + register = str(payload["register"])[0].upper() + try: + subregister = str(payload["register"])[1].upper() + except: + subregister = None + newValue = int(payload["newValue"], 16) - sendRegisterNoReadBackTasks.delay(device, registerName.upper(), fieldName.upper(), newValue).wait() + read_back = writeReadTasks.delay( + optoboardPosition, device, register, subregister, newValue + ).wait() + return read_back, {"content-type": "application/json"} - return str(f'Written register: {registerName}_{fieldName}. No read-back requested!'), 200, {'content-type': 'application/json'} -def sendRegisterEQ_wrapper(): +def read_wrapper(): + payload = request.get_json() - print(payload) - device = payload['device'] - registerName0 = payload['registerName0'] - registerName1 = payload['registerName1'] - fieldName = payload['settingName'] - newValue = payload['newValue'] + optoboardPosition = str(payload["optoboardPosition"]) + device = str(payload["device"]) + register = str(payload["register"])[0].upper() + try: + subregister = str(payload["register"])[1].upper() + except: + subregister = None - newValue = str('{0:02b}'.format(int(newValue))) + read_back = readTasks.delay(optoboardPosition, device, register, subregister).wait() - read_back0 = writeReadTasks.delay(device, registerName0.upper(), fieldName.upper(), int(newValue[1])).wait() - read_back1 = writeReadTasks.delay(device, registerName1.upper(), fieldName.upper(), int(newValue[0])).wait() + return read_back, 200, {"content-type": "application/json"} - return str(f'Read-back value {read_back1}{read_back0} Give a look to Modal!'), 200, {'content-type': 'application/json'} -def sendConstPattern_wrapper(): +def configure_wrapper(): + payload = request.get_json() - print(payload) - device = payload['device'] - fieldName = payload['settingName'] - newValue1, newValue2, newValue3, newValue4 = int(payload['newValue1'],2), int(payload['newValue2'],2), int(payload['newValue3'],2), int(payload['newValue4'],2) - registerName1, registerName2, registerName3, registerName4 = payload['registerName1'], payload['registerName2'], payload['registerName3'], payload['registerName4'] + optoboardPosition = str(payload["optoboardPosition"]) + activeLpgbt = str(payload["activeLpgbt"]) + activeGbcr = str(payload["activeGbcr"]) + if activeLpgbt == "None": + activeLpgbt = None + if activeGbcr == "None": + activeGbcr = None - read_back1 = writeReadTasks.delay(device, registerName1.upper(), fieldName.upper(), newValue1).wait() - read_back2 = writeReadTasks.delay(device, registerName2.upper(), fieldName.upper(), newValue2).wait() - read_back3 = writeReadTasks.delay(device, registerName3.upper(), fieldName.upper(), newValue3).wait() - read_back4 = writeReadTasks.delay(device, registerName4.upper(), fieldName.upper(), newValue4).wait() + reply = configureTasks.delay(optoboardPosition, activeLpgbt, activeGbcr).wait() + return reply, 200, {"content-type": "application/json"} - return str(f'Read-back value {read_back1} - {read_back2} - {read_back3} - {read_back4}'), 200, {'content-type': 'application/json'} +def configureAll_wrapper(): + reply = configureAllTasks.delay().wait() + return reply, 200, {"content-type": "application/json"} -def write_read_wrapper(): +""" def initializeOptoboard_wrapper(): payload = request.get_json() + optoserial = str(payload["optoserial"]) + config_path = str(payload["config_path"]) + vtrx_v = str(payload["vtrx_v"]) + flx_G = int(payload["flx_G"]) + flx_d = int(payload["flx_d"]) + woflxcore = bool(payload["woflxcore"]) + CONFIGDB_ADDRESS = str(payload["CONFIGDB_ADDRESS"]) - device = str(payload["device"]) - register = str(payload["register"]) - newValue = int(payload["newValue"], 16) - - read_back = writeReadTasks.delay(device, register.upper(), None, newValue).wait() - #print("AAA", RequestStatus) - return read_back, {'content-type': 'application/json'} - -def read_wrapper(): + configInDB = bool(payload["configInDB"]) + debug = bool(payload["debug"]) + testmode = bool(payload["testmode"]) - payload = request.get_json() + boolSerial, lpgbt_v, activeLpgbt, activeGbcr = initializeOptoboardTasks.delay(optoserial, config_path, vtrx_v, flx_G, flx_d, woflxcore, CONFIGDB_ADDRESS, configInDB, debug, testmode).wait() - device = str(payload["device"]) - register = str(payload["register"]) + return {"boolSerial" : boolSerial, "lpgbt_v" : str(lpgbt_v), "activeLpgbt": activeLpgbt, "activeGbcr": activeGbcr}, 200, {'content-type': 'application/json'} """ - read_back = readTasks.delay(device, register.upper(), None).wait() - return read_back, 200, {'content-type': 'application/json'} +""" def sendRegister_wrapper(): + payload = request.get_json() + print(payload) + device = payload['device'] + registerName = payload['registerName'] + fieldName = payload['settingName'] + newValue = payload['newValue'] + if fieldName == 'DPDATAPATTERN': + newValue = int(newValue,2) + else: newValue = int(newValue) + read_back = writeReadTasks.delay(device, registerName.upper(), fieldName.upper(), newValue).wait() + #read_back = write_read(device, registerName.upper(), fieldName.upper(), newValue) -def set_I2C_settings_wrapper(): + return str(f'Read-back value {read_back}'), 200, {'content-type': 'application/json'} """ - try: - set_I2C_settingsTasks.delay().wait() - reply = "I2C configuration completed" - except: - reply = "I2C configuration failed" +def statuscheck(): + payload = request.get_json() + optoboardPosition = str(payload["optoboardPosition"]) + status = statusCheckTasks.delay(optoboardPosition).wait() - return str(reply), 200, {'content-type': 'application/json'} + return status, 200, {"content-type": "application/json"} -def configure_wrapper(): +def testCharacteristics_wrapper(): + device = request.get_json() + # print(payload) - payload = request.get_json() - config_path = str(payload["config_path"]) - activeLpgbt = str(payload["activeLpgbt"]) - activeGbcr = str(payload["activeGbcr"]) - configInDB = bool(payload["loadFromConfigDB"]) - if activeLpgbt=="None": activeLpgbt=None - if activeGbcr=="None": activeGbcr=None + characteristics = testCharacteristicsTasks.delay(device).wait() - reply = configureTasks.delay(config_path, activeLpgbt, activeGbcr, configInDB).wait() - return reply, 200, {'content-type': 'application/json'} #{"reply": reply} + return characteristics, 200, {"content-type": "application/json"} def BERT_wrapper(): payload = request.get_json() + optoboardPosition = str(payload["optoboardPosition"]) device = str(payload["device"]) + channel = int(payload["channel"]) + meastime = int(payload["meastime"]) - BERT_error_count, total_bits, BER_limit = BERT_Tasks.delay(device).wait() + BERT_error_count, total_bits, BER_limit = BERT_Tasks.delay( + optoboardPosition, device, channel, meastime + ).wait() - return {"BERT_error_count": "{:.3e}".format(BERT_error_count), "total_bits": "{:.3e}".format(total_bits), "BER_limit": "{:.3e}".format(BER_limit)}, 200, {'content-type': 'application/json'} + return ( + { + "BERT_error_count": "{:.3e}".format(BERT_error_count), + "total_bits": "{:.3e}".format(total_bits), + "BER_limit": "{:.3e}".format(BER_limit), + }, + 200, + {"content-type": "application/json"}, + ) def configDbUnavailable_wrapper(): - CONFIGDB_ADDRESS=request.get_json()['CONFIGDB_ADDRESS'] - return configDbUnavailableTasks.delay(CONFIGDB_ADDRESS).wait(), 200, {'content-type': 'application/json'} -""" -def initOptoBoardClass_wrapper(): + CONFIGDB_ADDRESS = request.get_json()["CONFIGDB_ADDRESS"] + return ( + configDbUnavailableTasks.delay(CONFIGDB_ADDRESS).wait(), + 200, + {"content-type": "application/json"}, + ) - payload = request.get_json() - - config_path = str(payload["config_path"]) - optoboard_serial = str(payload["optoboard_serial"]) - vtrx_v = str(payload["vtrx_v"]) - flx_G = str(payload["flx_G"]) - flx_d = str(payload["flx_d"]) - woflxcore = str(payload["woflxcore"]) - CONFIGDB_ADDRESS = str(payload["CONFIGDB_ADDRESS"]) #"http://localhost:5000" - configInDB = str(payload["configInDB"]) - - initOptoBoardClassTasks(config_path, optoboard_serial, vtrx_v, flx_G, flx_d, woflxcore, CONFIGDB_ADDRESS, configInDB) - - return {"Optoboard object initialized successfully!"} -""" def testCelery_wrapper(): @@ -217,33 +201,21 @@ def testCelery_wrapper(): reply = result.wait() print("After wait") - return reply, 200, {'content-type': 'application/json'} - - -def sendFelixSettings_wrapper(): - payload = request.get_json() - print(payload) + return reply, 200, {"content-type": "application/json"} - return str('WORKS!'), 200, {'content-type': 'application/json'} def checkAvailableDatasetInDB_wrapper(): payload = request.get_json() - path = payload['path'] - inDB = payload['inDB'] - CONFIGDB_ADDRESS = payload['CONFIGDB_ADDRESS'] - isAvailable = checkAvailableDatasetInDBTasks.delay(path, inDB, CONFIGDB_ADDRESS).wait() - - return str(isAvailable), 200, {'content-type': 'application/json'} - - -def config_file_provider_wrapper(): - - payload = request.get_json() - config_file = config_file_providerTasks.delay(payload['name']).wait() + path = payload["path"] + inDB = payload["inDB"] + CONFIGDB_ADDRESS = payload["CONFIGDB_ADDRESS"] + isAvailable = checkAvailableDatasetInDBTasks.delay( + path, inDB, CONFIGDB_ADDRESS + ).wait() - return json.dumps(config_file), 200, {'content-type': 'application/json'} + return str(isAvailable), 200, {"content-type": "application/json"} from wsgi import celery -from itk_demo_optoboard.celeryTasks import * \ No newline at end of file +from itk_demo_optoboard.celeryTasks import * diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index 09af24209a5214e696bffc575faf72c33fe7961d..94a88b62f34c0c96abb6667d771c231cc1f31e00 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -8,11 +8,10 @@ info: email: dalsanto.daniele@cern.ch/roman.mueller@cern.ch servers: - - url: http://localhost:5000 + - url: http://localhost:5009 description: This is a dummy value describing the base URL for the API. paths: - /health: get: tags: @@ -23,97 +22,115 @@ paths: responses: 200: description: json serialized object containing the status of the optoboard microservice - content: + content: application/json: schema: type: object allOf: - - $ref: '#/components/schemas/standard_model' + - $ref: "#/components/schemas/standard_model" - - /testCharacteristics_wrapper: - post: - summary: Endpoint, which provides lpgbt characteristics - x-openapi-router-controller: itk_demo_optoboard.routes - operationId: testCharacteristics_wrapper - requestBody: - description: json serialized object containing data to specify the requested component - content: - application/json: - schema: - $ref: "#/components/schemas/deviceName" - responses: - 200: - $ref: '#/components/responses/characteristics_read' - - - /sendRegister: - post: - summary: Receive register name and settings and writes it after having converted to the proper address - description: Receive register name and settings and writes it + /getOptoGUIConf: + get: + tags: + - Default + summary: Get the json file for the Configuration of the GUI x-openapi-router-controller: itk_demo_optoboard.routes - operationId: sendRegister_wrapper - requestBody: - description: json object with register name, setting name and new value to write - content: - application/json: - schema: - $ref: '#/components/schemas/sendRegister' + operationId: getOptoGUIConf responses: 200: - $ref: '#/components/responses/config_response' + description: json serialized object containing the status of the optoboard microservice + content: + application/json: + schema: + type: object - /sendRegisterNoReadBack: + /modifyOptoGUIConf: post: - summary: Receive register name and settings and writes it after having converted to the proper address - description: Receive register name and settings and writes it + summary: Get the json file for the Configuration of the GUI x-openapi-router-controller: itk_demo_optoboard.routes - operationId: sendRegisterNoReadBack_wrapper + operationId: modifyOptoGUIConf requestBody: - description: json object with register name, setting name and new value to write + description: modify json file with configurations content: - application/json: + application/json: schema: - $ref: '#/components/schemas/sendRegister' + type: object + properties: + confKey: + type: string + example: "SR1" + description: Key of the list to be modified + newConfiguration: + type: string responses: 200: - $ref: '#/components/responses/config_response' + description: json serialized object containing the status of the optoboard microservice + content: + application/json: + schema: + type: object - /sendRegisterEQ: + /sendOptoList: post: - summary: Receive register name and settings and writes it after having converted to the proper address (EQUALIZER) - description: Receive register name and settings and writes it (EQUALIZER) + summary: Endpoint which defines the list of optoboards x-openapi-router-controller: itk_demo_optoboard.routes - operationId: sendRegisterEQ_wrapper + operationId: sendOptoList requestBody: - description: json object with register name, setting name and new value to write + description: json serialized object containing data to specify the requested component content: - application/json: + application/json: schema: - $ref: '#/components/schemas/sendRegisterEQ' + type: object + properties: + optoList: + type: array + items: {} responses: 200: - $ref: '#/components/responses/config_response' - - /sendConstPattern: + description: Returns a value that signals if successful + content: + application/json: + schema: + type: object + properties: + optoGUIConf: + type: object + example: {} + description: json file for OptoGUI configuration + defaultConfig: + type: string + example: "SR1" + description: ID for the configuration + + /statuscheck: post: - summary: Send 4 bytes for constant pattern - description: Send 4 bytes for constant pattern, could be substituted by a sendRegister x4 + summary: Endpoint which provides information about the status of the optoboard x-openapi-router-controller: itk_demo_optoboard.routes - operationId: sendConstPattern_wrapper + operationId: statuscheck requestBody: - description: json object with register name x4, setting name and new value x4 to write + description: json serialized object containing data to specify the requested component content: - application/json: + application/json: schema: - $ref: '#/components/schemas/sendConstPattern' + type: object + properties: + optoboardPosition: + type: string + example: "OB0" + description: Unique optoboard position + required: + - optoboardPosition responses: 200: - $ref: '#/components/responses/config_response' + description: Returns a value that signals if successful + content: + application/json: + schema: + type: object /sendWriteRequest: - post: - summary: Write register from name or hexadecimal address + post: + summary: Write register from name or hexadecimal address description: Write register from name or hexadecimal address x-openapi-router-controller: itk_demo_optoboard.routes operationId: write_read_wrapper @@ -122,14 +139,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/sendWriteRequest' + $ref: "#/components/schemas/sendWriteRequest" responses: 200: - $ref: '#/components/responses/config_response' + $ref: "#/components/responses/config_response" /sendReadRequest: - post: - summary: Read register from name or hexadecimal address + post: + summary: Read register from name or hexadecimal address description: Read register from name or hexadecimal address x-openapi-router-controller: itk_demo_optoboard.routes operationId: read_wrapper @@ -138,22 +155,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/sendReadRequest' + $ref: "#/components/schemas/sendReadRequest" responses: 200: - $ref: '#/components/responses/config_response' + $ref: "#/components/responses/config_response" - - - /set_I2C_settings: + /testCharacteristics_wrapper: post: - summary: Configure the set_i2c_settings - description: Send multiple registers + summary: Endpoint, which provides lpgbt characteristics x-openapi-router-controller: itk_demo_optoboard.routes - operationId: set_I2C_settings_wrapper + operationId: testCharacteristics_wrapper + requestBody: + description: json serialized object containing data to specify the requested component + content: + application/json: + schema: + $ref: "#/components/schemas/deviceName" responses: 200: - $ref: '#/components/responses/config_response' + $ref: "#/components/responses/characteristics_read" /configure: post: @@ -166,12 +186,22 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/path_model' + $ref: "#/components/schemas/configure" responses: 200: - $ref: '#/components/responses/config_response' + $ref: "#/components/responses/config_response" - /BERT_wrapper: + /configureAll: + get: + summary: Does a configuration of the Optoboard based on a json file in server + description: Configure the Optoboard + x-openapi-router-controller: itk_demo_optoboard.routes + operationId: configureAll_wrapper + responses: + 200: + $ref: "#/components/responses/config_response" + + /BERT_wrapper: post: summary: Does a BER Test description: Does a BER Test @@ -184,93 +214,39 @@ paths: schema: type: object properties: + optoboardPosition: + type: string + example: "OB0" + description: Optoboard position device: type: string example: "lpgbt1" description: response-text - required: - - device - responses: - 200: - $ref: '#/components/responses/BERT_response' - - /initializeOptoboard: - post: - summary: Initialize Optoboard - description: Initialize Optoboard object - x-openapi-router-controller: itk_demo_optoboard.routes - operationId: initializeOptoboard_wrapper - requestBody: - description: json serialized object containing the parameters needed for the inizialization of the optoboard object - content: - application/json: - schema: - type: object - properties: - optoserial: - type: string - example: "00000000" - description: response-text - vtrx_v: - type: string - example: "1_2" - description: response-text - flx_G: + meastime: type: integer - example: 0 - description: response-text - flx_d: + example: 12 + description: BERT length + channel: type: integer example: 0 - description: response-text - woflxcore: - type: boolean - example: false - description: response-text - config_path: - type: string - example: 'itk_demo_optoboard/optoboard_felix/configs/00000000_test_v1.json' - description: response-text - CONFIGDB_ADDRESS: - type: string - example: "http://localhost:5000" - description: response-text - configInDB: - type: boolean - example: false - description: response-text - debug: - type: boolean - example: false - description: response-text - testmode: - type: boolean - example: false - description: Enable the test mode allowing to use the microservice without felix + description: Uplink channel required: - - optoserial - - vtrx_v - - flx_G - - flx_d - - woflxcore - - config_path - - CONFIGDB_ADDRESS - - configInDB - - debug - - testmode + - device + - channel + - meastime responses: 200: - $ref: '#/components/responses/OptoSerial_response' + $ref: "#/components/responses/BERT_response" /configDbUnavailable_wrapper: post: - summary: Check if the configuration database is unavailable - description: Check availability of configdb + summary: Check if the configuration database is unavailable + description: Check availability of configdb x-openapi-router-controller: itk_demo_optoboard.routes operationId: configDbUnavailable_wrapper requestBody: description: Config DB address - content: + content: application/json: schema: type: object @@ -279,7 +255,7 @@ paths: type: string example: "https://localhost:5000" description: Config DB address - responses: + responses: 200: description: Returns a value that signals if the configuration was successful content: @@ -307,24 +283,7 @@ paths: description: empty responses: 200: - $ref: '#/components/responses/testCelery_response' - - - /sendFelixSettings: - post: - summary: Send fice settings - description: Send a dictionary with minimal Felix settings - x-openapi-router-controller: itk_demo_optoboard.routes - operationId: sendFelixSettings_wrapper - requestBody: - description: json object with Felix settings - content: - application/json: - schema: - $ref: '#/components/schemas/deviceName' - responses: - 200: - $ref: '#/components/responses/config_response' + $ref: "#/components/responses/testCelery_response" /checkAvailableDatasetInDB: post: @@ -350,11 +309,11 @@ paths: type: string example: "https://localhost:5000" description: Config DB address - required: + required: - path - inDB - CONFIGDB_ADDRESS - responses: + responses: 200: description: Returns a value that signals if the configuration was successful content: @@ -363,37 +322,6 @@ paths: type: integer example: 0 - /config_file_provider: - post: - summary: Fetch configuration file - description: Fetch configuration file - x-openapi-router-controller: itk_demo_optoboard.routes - operationId: config_file_provider_wrapper - requestBody: - description: json serialized object - content: - application/json: - schema: - type: object - properties: - name: - type: string - example: "components.json" - description: response-text - vtrx_v: - type: string - example: "1.2" - inDB: - type: integer - example: 1 - required: - - name - - vtrx_v - - inDB - responses: - 200: - $ref: '#/components/responses/config_response' - components: schemas: standard_model: @@ -416,35 +344,30 @@ components: required: - device - path_model: + configure: type: object properties: - config_path: + optoboardPosition: type: string - example: "/itk_demo_optoboard/optoboard_felix/configs/00000000_test_v1.json" + example: "OB0" activeLpgbt: type: string example: "1111" activeGbcr: type: string example: "1111" - ConfigDB: - type: string - example: "localhost/5010" - loadFromConfigDB: - type: boolean - example: false required: - - config_path + - optoboardPosition - activeLpgbt - activeGbcr - - ConfigDB - - loadFromConfigDB - sendWriteRequest: type: object properties: + optoboardPosition: + type: string + example: "OB0" + description: Unique position of the optoboard device: type: string example: "lpgbt1master" @@ -452,12 +375,13 @@ components: register: type: string example: "SomeName" - description: Register name + description: Register name newValue: type: string example: "0" description: New value for the considered setting of the register required: + - optoboardPosition - register - device - newValue @@ -465,125 +389,22 @@ components: sendReadRequest: type: object properties: - device: - type: string - example: "lpgbt1master" - description: Name of the device to which the read/write request is sent - register: - type: string - example: "SomeName" - description: Register name - required: - - register - - device - - sendRegister: - type: object - properties: - device: - type: string - example: "lpgbt1master" - description: Name of the device to which the read/write request is sent - registerName: - type: string - example: "SomeName" - description: Register name - settingName: - type: string - example: "SomeName" - description: Setting name - newValue: - type: string - example: "0" - description: New value for the considered setting of the register - - required: - - registerName - - settingName - - sendRegisterEQ: - type: object - properties: - device: - type: string - example: "lpgbt1master" - description: Name of the device to which the read/write request is sent - registerName0: - type: string - example: "SomeName" - description: Register name bit 0 - registerName1: + optoboardPosition: type: string - example: "SomeName" - description: Register name bit 1 - settingName: - type: string - example: "SomeName" - description: Setting name - newValue: - type: string - example: "0" - description: New value for the considered setting of the register - - required: - - registerName0 - - registerName1 - - settingName - - sendConstPattern: - type: object - properties: + example: "OB0" + description: Unique position of the optoboard device: type: string example: "lpgbt1" description: Name of the device to which the read/write request is sent - settingName: - type: string - example: "SomeName" - description: Setting name - registerName1: - type: string - example: "SomeName" - description: Register name - newValue1: - type: string - example: "0" - description: New value for the considered setting of the register - registerName2: - type: string - example: "SomeName" - description: Register name - newValue2: - type: string - example: "0" - description: New value for the considered setting of the register - registerName3: - type: string - example: "SomeName" - description: Register name - newValue3: - type: string - example: "0" - description: New value for the considered setting of the register - registerName4: + register: type: string example: "SomeName" description: Register name - newValue4: - type: string - example: "0" - description: New value for the considered setting of the register required: - - registerName1 - - registerName2 - - registerName3 - - registerName4 - - newValue1 - - newValue2 - - newValue3 - - newValue4 - - settingName - + - optoboardPosition + - register + - device responses: config_response: @@ -600,23 +421,23 @@ components: application/json: schema: type: object - properties: - VREF: + properties: + VREF: type: string example: "0" - VDDIO: + VDDIO: type: string example: "0" - VDDTX: + VDDTX: type: string example: "0" - VDDRX: + VDDRX: type: string example: "0" - VDD: + VDD: type: string example: "0" - Temp: + Temp: type: string example: "0" @@ -626,49 +447,18 @@ components: application/json: schema: type: object - properties: - BERT_error_count: - type: string - example: "0" - total_bits: + properties: + BERT_error_count: type: string example: "0" - BER_limit: + total_bits: type: string example: "0" - - Configuration_result: - description: Returns the configuration result - content: - application/json: - schema: - type: object - properties: - reply: - type: string - example: "Configuration result" - - OptoSerial_response: - description: does the serial exist - content: - application/json: - schema: - type: object - properties: - boolSerial: - type: boolean - example: true - lpgbt_v: + BER_limit: type: string example: "0" - activeLpgbt: - type: string - example: "0000" - activeGbcr: - type: string - example: "0000" - testCelery_response: + testCelery_response: description: Test endpoint content: application/json: diff --git a/ui/package.json b/ui/package.json index 20887f976435dbcf491c41491dd13053f499c775..ab477e8fa81f3f46d34d267f84e95c83f167a618 100644 --- a/ui/package.json +++ b/ui/package.json @@ -6,6 +6,7 @@ "@itk-demo-sw/components": "^1.0.0", "@itk-demo-sw/hooks": "^1.0.0", "@itk-demo-sw/utility-functions": "^1.0.0", + "@patternfly/react-code-editor": "^4.82.113", "@patternfly/react-core": "^4.175.4", "@testing-library/jest-dom": "^5.15.1", "@testing-library/react": "^11.2.7", @@ -14,6 +15,7 @@ "@types/node": "^12.20.37", "@types/react": "^17.0.37", "@types/react-dom": "^17.0.11", + "json-loader": "^0.5.7", "react": "^17.0.2", "react-dom": "^17.0.2", "react-scripts": "4.0.3", diff --git a/ui/src/Config/00000000_test_v0.json b/ui/src/Config/00000000_test_v0.json deleted file mode 100644 index 0c014402aa14cfc531e76ee790f9f3b9f1c38f80..0000000000000000000000000000000000000000 --- a/ui/src/Config/00000000_test_v0.json +++ /dev/null @@ -1,2318 +0,0 @@ -{ - "Optoboard": - { - "serial": "08000000", - "flx_G": 0, - "flx_i": 0, - "flx_d": 0 - }, - - "power_up_registers_master": - [ - "CLKGCONFIG0", - "CLKGCONFIG1", - "CLKGPLLRES", - "CLKGPLLINTCUR", - "CLKGPLLPROPCUR", - "CLKGCDRPROPCUR", - "CLKGCDRINTCUR", - "CLKGCDRFFPROPCUR", - "CLKGFLLINTCUR", - "CLKGFFCAP", - "CLKGCNTOVERRIDE", - "CLKGOVERRIDECAPBANK", - "CLKGWAITTIME", - "CLKGLFCONFIG0", - "CLKGLFCONFIG1", - "EPRXDLLCONFIG", - "EPRXLOCKFILTER", - "LDCONFIGH", - "EPRX0CONTROL", - "EPRX00CHNCNTR", - "EPRX1CONTROL", - "EPRX10CHNCNTR", - "EPRX2CONTROL", - "EPRX20CHNCNTR", - "EPRX3CONTROL", - "EPRX30CHNCNTR", - "EPRX4CONTROL", - "EPRX40CHNCNTR", - "EPRX5CONTROL", - "EPRX50CHNCNTR", - "EQCONFIG", - "FAMAXHEADERFOUNDCOUNT", - "FAMAXHEADERFOUNDCOUNTAFTERNF", - "FAMAXHEADERNOTFOUNDCOUNT", - "EPTXDATARATE", - "EPTX10ENABLE", - "EPTX32ENABLE", - "EPTX00CHNCNTR", - "EPTX02CHNCNTR", - "EPTX10CHNCNTR", - "EPTX12CHNCNTR", - "EPTX20CHNCNTR", - "EPTX22CHNCNTR", - "EPTX30CHNCNTR", - "EPTX32CHNCNTR", - "EPCLK5CHNCNTRH", - "EPCLK5CHNCNTRL", - "EPCLK2CHNCNTRH", - "EPCLK26CHNCNTRH", - "EPCLK19CHNCNTRH", - "POWERUP2" - ], - - "power_up_registers_slave": - [ - "REFCLK", - "CLKGCONFIG0", - "CLKGCONFIG1", - "CLKGPLLRES", - "CLKGPLLINTCUR", - "CLKGCDRINTCUR", - "CLKGCDRFFPROPCUR", - "CLKGFLLINTCUR", - "CLKGFFCAP", - "CLKGCNTOVERRIDE", - "CLKGOVERRIDECAPBANK", - "CLKGWAITTIME", - "CLKGLFCONFIG0", - "CLKGLFCONFIG1", - "PSDLLCONFIG", - "EPRXDLLCONFIG", - "EPRXLOCKFILTER", - "LDCONFIGH", - "EPRX0CONTROL", - "EPRX00CHNCNTR", - "EPRX1CONTROL", - "EPRX10CHNCNTR", - "EPRX2CONTROL", - "EPRX20CHNCNTR", - "EPRX3CONTROL", - "EPRX30CHNCNTR", - "EPRX4CONTROL", - "EPRX40CHNCNTR", - "EPRX5CONTROL", - "EPRX50CHNCNTR", - "EPCLK5CHNCNTRH", - "EPCLK5CHNCNTRL", - "POWERUP2" - ], - - "lpgbt": - { - "ADCCAL0": - { - "ADCCALGAIN2SEHIGH": [0, 0, 0, 0] - }, - "ADCCAL1": - { - "ADCCALGAIN2SELOW": [0, 0, 0, 0] - }, - "ADCCAL10": - { - "ADCCALGAIN8DIFLOW": [0, 0, 0, 0] - }, - "ADCCAL11": - { - "ADCCALGAIN8DIFHIGH": [0, 0, 0, 0], - "ADCCALGAIN8DIRFLOW": [0, 0, 0, 0] - }, - "ADCCAL12": - { - "ADCCALGAIN16DIFHIGH": [0, 0, 0, 0] - }, - "ADCCAL13": - { - "ADCCALGAIN16DIFLOW": [0, 0, 0, 0] - }, - "ADCCAL14": - { - "ADCCALGAIN16DIFHIGH": [0, 0, 0, 0], - "ADCCALGAIN16DIRFLOW": [0, 0, 0, 0] - }, - "ADCCAL2": - { - "ADCCALGAIN2SEHIGH": [0, 0, 0, 0], - "ADCCALGAIN2SELOW": [0, 0, 0, 0] - }, - "ADCCAL3": - { - "ADCCALGAIN2DIFHIGH": [0, 0, 0, 0] - }, - "ADCCAL4": - { - "ADCCALGAIN2DIFLOW": [0, 0, 0, 0] - }, - "ADCCAL5": - { - "ADCCALGAIN2DIFHIGH": [0, 0, 0, 0], - "ADCCALGAIN2DIRFLOW": [0, 0, 0, 0] - }, - "ADCCAL6": - { - "ADCCALGAIN4DIFHIGH": [0, 0, 0, 0] - }, - "ADCCAL7": - { - "ADCCALGAIN4DIFLOW": [0, 0, 0, 0] - }, - "ADCCAL8": - { - "ADCCALGAIN4DIFHIGH": [0, 0, 0, 0], - "ADCCALGAIN4DIRFLOW": [0, 0, 0, 0] - }, - "ADCCAL9": - { - "ADCCALGAIN8DIFHIGH": [0, 0, 0, 0] - }, - "ADCCONFIG": - { - "ADCCONVERT": [0, 0, 0, 0], - "ADCENABLE": [0, 0, 0, 0], - "ADCGAINSELECT": [0, 0, 0, 0] - }, - "ADCMON": - { - "TEMPSENSRESET": [0, 0, 0, 0], - "VDDANMONENA": [0, 0, 0, 0], - "VDDMONENA": [0, 0, 0, 0], - "VDDPSTMONENA": [0, 0, 0, 0], - "VDDRXMONENA": [0, 0, 0, 0], - "VDDTXMONENA": [0, 0, 0, 0] - }, - "ADCSELECT": - { - "ADCINNSELECT": [0, 0, 0, 0], - "ADCINPSELECT": [0, 0, 0, 0] - }, - "BERTCONFIG": - { - "BERTMEASTIME": [0, 0, 0, 0], - "BERTSTART": [0, 0, 0, 0], - "SKIPDISABLE": [0, 0, 0, 0] - }, - "BERTDATAPATTERN0": - { - "BERTDATAPATTERN": [0, 0, 0, 0] - }, - "BERTDATAPATTERN1": - { - "BERTDATAPATTERN": [0, 0, 0, 0] - }, - "BERTDATAPATTERN2": - { - "BERTDATAPATTERN": [0, 0, 0, 0] - }, - "BERTDATAPATTERN3": - { - "BERTDATAPATTERN": [0, 0, 0, 0] - }, - "BERTSOURCE": - { - "BERTSOURCE": [0, 0, 0, 0] - }, - "CHIPCONFIG": - { - "CHIPADDRESSBAR": [0, 0, 0, 0], - "HIGHSPEEDDATAININVERT": [0, 0, 0, 0], - "HIGHSPEEDDATAOUTINVERT": [0, 0, 0, 0] - }, - "CHIPID0": - { - "CHIPID": [0, 0, 0, 0] - }, - "CHIPID1": - { - "CHIPID": [0, 0, 0, 0] - }, - "CHIPID2": - { - "CHIPID": [0, 0, 0, 0] - }, - "CHIPID3": - { - "CHIPID": [0, 0, 0, 0] - }, - "CLKGCDRFFPROPCUR": - { - "CLKGCDRFEEDFORWARDPROPCUR": [5, 5, 5, 5], - "CLKGCDRFEEDFORWARDPROPCURWHENLOCKED": [5, 5, 5, 5] - }, - "CLKGCDRINTCUR": - { - "CLKGCDRINTCUR": [0, 0, 0, 0], - "CLKGCDRINTCURWHENLOCKED": [0, 0, 0, 0] - }, - "CLKGCDRPROPCUR": - { - "CLKGCDRPROPCUR": [5, 5, 5, 5], - "CLKGCDRPROPCURWHENLOCKED": [5, 5, 5, 5] - }, - "CLKGCNTOVERRIDE": - { - "CDRCOCONNECTPLL": [0, 0, 0, 0], - "CDRCODISDATACOUNTERREF": [0, 0, 0, 0], - "CDRCODISDESVBIASGEN": [0, 0, 0, 0], - "CDRCOENABLECDR": [0, 0, 0, 0], - "CDRCOENABLEFD": [0, 0, 0, 0], - "CDRCOENABLEPLL": [0, 0, 0, 0], - "CDRCOREFCLKSEL": [0, 0, 0, 0], - "CLKGCOOVERRIDEVC": [0, 0, 0, 0] - }, - "CLKGCONFIG0": - { - "CLKGBIASGENCONFIG": [8, 8, 8, 8], - "CLKGCALIBRATIONENDOFCOUNT": [12, 12, 12, 12] - }, - "CLKGCONFIG1": - { - "CDRCONTROLOVERRIDEENABLE": [0, 0, 0, 0], - "CLKGCDRRES": [1, 1, 1, 1], - "CLKGDISABLEFRAMEALIGNERLOCKCONTROL": [0, 0, 0, 0], - "CLKGVCODAC": [8, 8, 8, 8], - "CLKGVCORAILMODE": [1, 1, 1, 1] - }, - "CLKGFFCAP": - { - "CDRCOCONNECTCDR": [0, 0, 0, 0], - "CLKGCAPBANKOVERRIDEENABLE": [0, 0, 0, 0], - "CLKGFEEDFORWARDCAP": [3, 3, 3, 3], - "CLKGFEEDFORWARDCAPWHENLOCKED": [3, 3, 3, 3] - }, - "CLKGFLLINTCUR": - { - "CLKGFLLINTCUR": [5, 5, 5, 5], - "CLKGFLLINTCURWHENLOCKED": [0, 0, 0, 0] - }, - "CLKGLFCONFIG0": - { - "CLKGCAPBANKSELECT": [0, 1, 1, 1], - "CLKGLOCKFILTERENABLE": [0, 0, 0, 0], - "CLKGLOCKFILTERLOCKTHRCOUNTER": [0, 15, 15, 15] - }, - "CLKGLFCONFIG1": - { - "CLKGLOCKFILTERRELOCKTHRCOUNTER": [9, 9, 9, 9], - "CLKGLOCKFILTERUNLOCKTHRCOUNTER": [9, 9, 9, 9] - }, - "CLKGOVERRIDECAPBANK": - { - "CLKGCAPBANKSELECT": [0, 0, 0, 0] - }, - "CLKGPLLINTCUR": - { - "CLKGPLLINTCUR": [5, 5, 5, 5], - "CLKGPLLINTCURWHENLOCKED": [5, 5, 5, 5] - }, - "CLKGPLLPROPCUR": - { - "CLKGPLLPROPCUR": [5, 5, 5, 5], - "CLKGPLLPROPCURWHENLOCKED": [5, 5, 5, 5] - }, - "CLKGPLLRES": - { - "CLKGPLLRES": [0, 4, 4, 4], - "CLKGPLLRESWHENLOCKED": [0, 4, 4, 4] - }, - "CLKGWAITTIME": - { - "CLKGWAITCDRTIME": [8, 8, 8, 8], - "CLKGWAITPLLTIME": [8, 8, 8, 8] - }, - "CLKTREE": - { - "CLKTREEADISABLE": [0, 0, 0, 0], - "CLKTREEBDISABLE": [0, 0, 0, 0], - "CLKTREECDISABLE": [0, 0, 0, 0], - "CLKTREEMAGICNUMBER": [0, 0, 0, 0] - }, - "CONFIGPINS": - { - "CONFIGSELECT": [0, 0, 0, 0], - "LOCKMODE": [0, 0, 0, 0], - "LPGBTMODE": [0, 0, 0, 0], - "STATEOVERRIDE": [0, 0, 0, 0], - "VCOBYPASS": [0, 0, 0, 0] - }, - "CURDACCALH": - { - "CURDACCAL": [0, 0, 0, 0] - }, - "CURDACCALL": - { - "CURDACCAL": [0, 0, 0, 0] - }, - "CURDACCHN": - { - "CURDACCHNENABLE": [0, 0, 0, 0] - }, - "CURDACVALUE": - { - "CURDACSELECT": [0, 0, 0, 0] - }, - "DACCAL0": - { - "DACCALMINCODE": [0, 0, 0, 0] - }, - "DACCAL1": - { - "DACCALMAXCODE": [0, 0, 0, 0] - }, - "DACCAL2": - { - "DACCALMAXCODE": [0, 0, 0, 0], - "DACCALMINCODE": [0, 0, 0, 0] - }, - "DACCONFIGH": - { - "CURDACENABLE": [0, 0, 0, 0], - "VOLDACENABLE": [0, 0, 0, 0], - "VOLDACVALUE": [0, 0, 0, 0] - }, - "DACCONFIGL": - { - "VOLDACVALUE": [0, 0, 0, 0] - }, - "DATAPATH": - { - "DLDPBYPASDEINTERLEVEAR": [0, 0, 0, 0], - "DLDPBYPASFECDECODER": [0, 0, 0, 0], - "DLDPBYPASSDESCRAMBLER": [0, 0, 0, 0], - "DLDPFECERRCNTENA": [0, 0, 0, 0], - "ULDPBYPASSFECCODER": [0, 0, 0, 0], - "ULDPBYPASSINTERLEAVER": [0, 0, 0, 0], - "ULDPBYPASSSCRAMBLER": [0, 0, 0, 0] - }, - "DPDATAPATTERN0": - { - "DPDATAPATTERN": [0, 0, 0, 0] - }, - "DPDATAPATTERN1": - { - "DPDATAPATTERN": [0, 0, 0, 0] - }, - "DPDATAPATTERN2": - { - "DPDATAPATTERN": [0, 0, 0, 0] - }, - "DPDATAPATTERN3": - { - "DPDATAPATTERN": [0, 0, 0, 0] - }, - "EOMCONFIGH": - { - "EOMBYPASSPHASEINTERPOLATOR": [0, 0, 0, 0], - "EOMENABLE": [0, 0, 0, 0], - "EOMENDOFCOUNTSEL": [0, 0, 0, 0], - "EOMSTART": [0, 0, 0, 0] - }, - "EOMCONFIGL": - { - "EOMPHASESEL": [0, 0, 0, 0] - }, - "EOMVOFSEL": - { - "EOMVOFSEL": [0, 0, 0, 0] - }, - "EPCLK0CHNCNTRH": - { - "EPCLK0DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK0FREQ": [0, 0, 0, 0], - "EPCLK0INVERT": [0, 0, 0, 0] - }, - "EPCLK0CHNCNTRL": - { - "EPCLK0PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK0PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK0PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK10CHNCNTRH": - { - "EPCLK10DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK10FREQ": [0, 0, 0, 0], - "EPCLK10INVERT": [0, 0, 0, 0] - }, - "EPCLK10CHNCNTRL": - { - "EPCLK10PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK10PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK10PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK11CHNCNTRH": - { - "EPCLK11DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK11FREQ": [0, 0, 0, 0], - "EPCLK11INVERT": [0, 0, 0, 0] - }, - "EPCLK11CHNCNTRL": - { - "EPCLK11PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK11PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK11PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK12CHNCNTRH": - { - "EPCLK12DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK12FREQ": [0, 0, 0, 0], - "EPCLK12INVERT": [0, 0, 0, 0] - }, - "EPCLK12CHNCNTRL": - { - "EPCLK12PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK12PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK12PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK13CHNCNTRH": - { - "EPCLK13DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK13FREQ": [0, 0, 0, 0], - "EPCLK13INVERT": [0, 0, 0, 0] - }, - "EPCLK13CHNCNTRL": - { - "EPCLK13PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK13PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK13PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK14CHNCNTRH": - { - "EPCLK14DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK14FREQ": [0, 0, 0, 0], - "EPCLK14INVERT": [0, 0, 0, 0] - }, - "EPCLK14CHNCNTRL": - { - "EPCLK14PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK14PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK14PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK15CHNCNTRH": - { - "EPCLK15DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK15FREQ": [0, 0, 0, 0], - "EPCLK15INVERT": [0, 0, 0, 0] - }, - "EPCLK15CHNCNTRL": - { - "EPCLK15PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK15PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK15PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK16CHNCNTRH": - { - "EPCLK16DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK16FREQ": [0, 0, 0, 0], - "EPCLK16INVERT": [0, 0, 0, 0] - }, - "EPCLK16CHNCNTRL": - { - "EPCLK16PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK16PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK16PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK17CHNCNTRH": - { - "EPCLK17DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK17FREQ": [0, 0, 0, 0], - "EPCLK17INVERT": [0, 0, 0, 0] - }, - "EPCLK17CHNCNTRL": - { - "EPCLK17PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK17PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK17PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK18CHNCNTRH": - { - "EPCLK18DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK18FREQ": [0, 0, 0, 0], - "EPCLK18INVERT": [0, 0, 0, 0] - }, - "EPCLK18CHNCNTRL": - { - "EPCLK18PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK18PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK18PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK19CHNCNTRH": - { - "EPCLK19DRIVESTRENGTH": [3, 0, 0, 0], - "EPCLK19FREQ": [1, 0, 0, 0], - "EPCLK19INVERT": [0, 0, 0, 0] - }, - "EPCLK19CHNCNTRL": - { - "EPCLK19PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK19PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK19PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK1CHNCNTRH": - { - "EPCLK1DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK1FREQ": [0, 0, 0, 0], - "EPCLK1INVERT": [0, 0, 0, 0] - }, - "EPCLK1CHNCNTRL": - { - "EPCLK1PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK1PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK1PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK20CHNCNTRH": - { - "EPCLK20DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK20FREQ": [0, 0, 0, 0], - "EPCLK20INVERT": [0, 0, 0, 0] - }, - "EPCLK20CHNCNTRL": - { - "EPCLK20PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK20PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK20PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK21CHNCNTRH": - { - "EPCLK21DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK21FREQ": [0, 0, 0, 0], - "EPCLK21INVERT": [0, 0, 0, 0] - }, - "EPCLK21CHNCNTRL": - { - "EPCLK21PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK21PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK21PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK22CHNCNTRH": - { - "EPCLK22DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK22FREQ": [0, 0, 0, 0], - "EPCLK22INVERT": [0, 0, 0, 0] - }, - "EPCLK22CHNCNTRL": - { - "EPCLK22PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK22PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK22PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK23CHNCNTRH": - { - "EPCLK23DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK23FREQ": [0, 0, 0, 0], - "EPCLK23INVERT": [0, 0, 0, 0] - }, - "EPCLK23CHNCNTRL": - { - "EPCLK23PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK23PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK23PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK24CHNCNTRH": - { - "EPCLK24DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK24FREQ": [0, 0, 0, 0], - "EPCLK24INVERT": [0, 0, 0, 0] - }, - "EPCLK24CHNCNTRL": - { - "EPCLK24PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK24PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK24PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK25CHNCNTRH": - { - "EPCLK25DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK25FREQ": [0, 0, 0, 0], - "EPCLK25INVERT": [0, 0, 0, 0] - }, - "EPCLK25CHNCNTRL": - { - "EPCLK25PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK25PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK25PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK26CHNCNTRH": - { - "EPCLK26DRIVESTRENGTH": [3, 0, 0, 0], - "EPCLK26FREQ": [1, 0, 0, 0], - "EPCLK26INVERT": [1, 0, 0, 0] - }, - "EPCLK26CHNCNTRL": - { - "EPCLK26PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK26PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK26PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK27CHNCNTRH": - { - "EPCLK27DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK27FREQ": [0, 0, 0, 0], - "EPCLK27INVERT": [0, 0, 0, 0] - }, - "EPCLK27CHNCNTRL": - { - "EPCLK27PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK27PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK27PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK28CHNCNTRH": - { - "EPCLK28DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK28FREQ": [0, 0, 0, 0], - "EPCLK28INVERT": [0, 0, 0, 0] - }, - "EPCLK28CHNCNTRL": - { - "EPCLK28PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK28PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK28PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK2CHNCNTRH": - { - "EPCLK2DRIVESTRENGTH": [3, 0, 0, 0], - "EPCLK2FREQ": [1, 0, 0, 0], - "EPCLK2INVERT": [1, 0, 0, 0] - }, - "EPCLK2CHNCNTRL": - { - "EPCLK2PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK2PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK2PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK3CHNCNTRH": - { - "EPCLK3DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK3FREQ": [0, 0, 0, 0], - "EPCLK3INVERT": [0, 0, 0, 0] - }, - "EPCLK3CHNCNTRL": - { - "EPCLK3PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK3PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK3PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK4CHNCNTRH": - { - "EPCLK4DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK4FREQ": [0, 0, 0, 0], - "EPCLK4INVERT": [0, 0, 0, 0] - }, - "EPCLK4CHNCNTRL": - { - "EPCLK4PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK4PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK4PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK5CHNCNTRH": - { - "EPCLK5DRIVESTRENGTH": [7, 7, 7, 7], - "EPCLK5FREQ": [5, 5, 5, 5], - "EPCLK5INVERT": [0, 0, 0, 0] - }, - "EPCLK5CHNCNTRL": - { - "EPCLK5PREEMPHASISMODE": [3, 3, 3, 3], - "EPCLK5PREEMPHASISSTRENGTH": [3, 3, 3, 3], - "EPCLK5PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK6CHNCNTRH": - { - "EPCLK6DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK6FREQ": [0, 0, 0, 0], - "EPCLK6INVERT": [0, 0, 0, 0] - }, - "EPCLK6CHNCNTRL": - { - "EPCLK6PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK6PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK6PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK7CHNCNTRH": - { - "EPCLK7DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK7FREQ": [0, 0, 0, 0], - "EPCLK7INVERT": [0, 0, 0, 0] - }, - "EPCLK7CHNCNTRL": - { - "EPCLK7PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK7PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK7PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK8CHNCNTRH": - { - "EPCLK8DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK8FREQ": [0, 0, 0, 0], - "EPCLK8INVERT": [0, 0, 0, 0] - }, - "EPCLK8CHNCNTRL": - { - "EPCLK8PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK8PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK8PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK9CHNCNTRH": - { - "EPCLK9DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK9FREQ": [0, 0, 0, 0], - "EPCLK9INVERT": [0, 0, 0, 0] - }, - "EPCLK9CHNCNTRL": - { - "EPCLK9PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK9PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK9PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPRX00CHNCNTR": - { - "EPRX00ACBIAS": [0, 0, 0, 0], - "EPRX00EQ": [0, 0, 0, 0], - "EPRX00INVERT": [1, 1, 1, 1], - "EPRX00PHASESELECT": [0, 0, 0, 0], - "EPRX00TERM": [1, 1, 1, 1] - }, - "EPRX01CHNCNTR": - { - "EPRX01ACBIAS": [0, 0, 0, 0], - "EPRX01EQ": [0, 0, 0, 0], - "EPRX01INVERT": [0, 0, 0, 0], - "EPRX01PHASESELECT": [0, 0, 0, 0], - "EPRX01TERM": [0, 0, 0, 0] - }, - "EPRX02CHNCNTR": - { - "EPRX02ACBIAS": [0, 0, 0, 0], - "EPRX02EQ": [0, 0, 0, 0], - "EPRX02INVERT": [0, 0, 0, 0], - "EPRX02PHASESELECT": [0, 0, 0, 0], - "EPRX02TERM": [0, 0, 0, 0] - }, - "EPRX03CHNCNTR": - { - "EPRX03ACBIAS": [0, 0, 0, 0], - "EPRX03EQ": [0, 0, 0, 0], - "EPRX03INVERT": [0, 0, 0, 0], - "EPRX03PHASESELECT": [0, 0, 0, 0], - "EPRX03TERM": [0, 0, 0, 0] - }, - "EPRX0CONTROL": - { - "EPRX00ENABLE": [1, 1, 1, 1], - "EPRX01ENABLE": [0, 0, 0, 0], - "EPRX02ENABLE": [0, 0, 0, 0], - "EPRX03ENABLE": [0, 0, 0, 0], - "EPRX0DATARATE": [3, 3, 3, 3], - "EPRX0TRACKMODE": [3, 3, 3, 3] - }, - "EPRX0CURRENTPHASE10": - { - "EPRX0CURRENTPHASE0": [0, 0, 0, 0], - "EPRX0CURRENTPHASE1": [0, 0, 0, 0] - }, - "EPRX0CURRENTPHASE32": - { - "EPRX0CURRENTPHASE2": [0, 0, 0, 0], - "EPRX0CURRENTPHASE3": [0, 0, 0, 0] - }, - "EPRX0LOCKED": - { - "EPRX0CHNLOCKED": [0, 0, 0, 0], - "EPRX0STATE": [0, 0, 0, 0] - }, - "EPRX10CHNCNTR": - { - "EPRX10ACBIAS": [0, 0, 0, 0], - "EPRX10EQ": [0, 0, 0, 0], - "EPRX10INVERT": [1, 1, 1, 1], - "EPRX10PHASESELECT": [0, 0, 0, 0], - "EPRX10TERM": [1, 1, 1, 1] - }, - "EPRX11CHNCNTR": - { - "EPRX11ACBIAS": [0, 0, 0, 0], - "EPRX11EQ": [0, 0, 0, 0], - "EPRX11INVERT": [0, 0, 0, 0], - "EPRX11PHASESELECT": [0, 0, 0, 0], - "EPRX11TERM": [0, 0, 0, 0] - }, - "EPRX12CHNCNTR": - { - "EPRX12ACBIAS": [0, 0, 0, 0], - "EPRX12EQ": [0, 0, 0, 0], - "EPRX12INVERT": [0, 0, 0, 0], - "EPRX12PHASESELECT": [0, 0, 0, 0], - "EPRX12TERM": [0, 0, 0, 0] - }, - "EPRX13CHNCNTR": - { - "EPRX13ACBIAS": [0, 0, 0, 0], - "EPRX13EQ": [0, 0, 0, 0], - "EPRX13INVERT": [0, 0, 0, 0], - "EPRX13PHASESELECT": [0, 0, 0, 0], - "EPRX13TERM": [0, 0, 0, 0] - }, - "EPRX1CONTROL": - { - "EPRX10ENABLE": [1, 1, 1, 1], - "EPRX11ENABLE": [0, 0, 0, 0], - "EPRX12ENABLE": [0, 0, 0, 0], - "EPRX13ENABLE": [0, 0, 0, 0], - "EPRX1DATARATE": [3, 3, 3, 3], - "EPRX1TRACKMODE": [3, 3, 3, 3] - }, - "EPRX1CURRENTPHASE10": - { - "EPRX1CURRENTPHASE0": [0, 0, 0, 0], - "EPRX1CURRENTPHASE1": [0, 0, 0, 0] - }, - "EPRX1CURRENTPHASE32": - { - "EPRX1CURRENTPHASE2": [0, 0, 0, 0], - "EPRX1CURRENTPHASE3": [0, 0, 0, 0] - }, - "EPRX1LOCKED": - { - "EPRX1CHNLOCKED": [0, 0, 0, 0], - "EPRX1STATE": [0, 0, 0, 0] - }, - "EPRX20CHNCNTR": - { - "EPRX20ACBIAS": [0, 0, 0, 0], - "EPRX20EQ": [0, 0, 0, 0], - "EPRX20INVERT": [1, 1, 1, 1], - "EPRX20PHASESELECT": [0, 0, 0, 0], - "EPRX20TERM": [1, 1, 1, 1] - }, - "EPRX21CHNCNTR": - { - "EPRX21ACBIAS": [0, 0, 0, 0], - "EPRX21EQ": [0, 0, 0, 0], - "EPRX21INVERT": [0, 0, 0, 0], - "EPRX21PHASESELECT": [0, 0, 0, 0], - "EPRX21TERM": [0, 0, 0, 0] - }, - "EPRX22CHNCNTR": - { - "EPRX22ACBIAS": [0, 0, 0, 0], - "EPRX22EQ": [0, 0, 0, 0], - "EPRX22INVERT": [0, 0, 0, 0], - "EPRX22PHASESELECT": [0, 0, 0, 0], - "EPRX22TERM": [0, 0, 0, 0] - }, - "EPRX23CHNCNTR": - { - "EPRX23ACBIAS": [0, 0, 0, 0], - "EPRX23EQ": [0, 0, 0, 0], - "EPRX23INVERT": [0, 0, 0, 0], - "EPRX23PHASESELECT": [0, 0, 0, 0], - "EPRX23TERM": [0, 0, 0, 0] - }, - "EPRX2CONTROL": - { - "EPRX20ENABLE": [1, 1, 1, 1], - "EPRX21ENABLE": [0, 0, 0, 0], - "EPRX22ENABLE": [0, 0, 0, 0], - "EPRX23ENABLE": [0, 0, 0, 0], - "EPRX2DATARATE": [3, 3, 3, 3], - "EPRX2TRACKMODE": [3, 3, 3, 3] - }, - "EPRX2CURRENTPHASE10": - { - "EPRX2CURRENTPHASE0": [0, 0, 0, 0], - "EPRX2CURRENTPHASE1": [0, 0, 0, 0] - }, - "EPRX2CURRENTPHASE32": - { - "EPRX2CURRENTPHASE2": [0, 0, 0, 0], - "EPRX2CURRENTPHASE3": [0, 0, 0, 0] - }, - "EPRX2LOCKED": - { - "EPRX2CHNLOCKED": [0, 0, 0, 0], - "EPRX2STATE": [0, 0, 0, 0] - }, - "EPRX30CHNCNTR": - { - "EPRX30ACBIAS": [0, 0, 0, 0], - "EPRX30EQ": [0, 0, 0, 0], - "EPRX30INVERT": [1, 1, 1, 1], - "EPRX30PHASESELECT": [0, 0, 0, 0], - "EPRX30TERM": [1, 1, 1, 1] - }, - "EPRX31CHNCNTR": - { - "EPRX31ACBIAS": [0, 0, 0, 0], - "EPRX31EQ": [0, 0, 0, 0], - "EPRX31INVERT": [0, 0, 0, 0], - "EPRX31PHASESELECT": [0, 0, 0, 0], - "EPRX31TERM": [0, 0, 0, 0] - }, - "EPRX32CHNCNTR": - { - "EPRX32ACBIAS": [0, 0, 0, 0], - "EPRX32EQ": [0, 0, 0, 0], - "EPRX32INVERT": [0, 0, 0, 0], - "EPRX32PHASESELECT": [0, 0, 0, 0], - "EPRX32TERM": [0, 0, 0, 0] - }, - "EPRX33CHNCNTR": - { - "EPRX33ACBIAS": [0, 0, 0, 0], - "EPRX33EQ": [0, 0, 0, 0], - "EPRX33INVERT": [0, 0, 0, 0], - "EPRX33PHASESELECT": [0, 0, 0, 0], - "EPRX33TERM": [0, 0, 0, 0] - }, - "EPRX3CONTROL": - { - "EPRX30ENABLE": [1, 1, 1, 1], - "EPRX31ENABLE": [0, 0, 0, 0], - "EPRX32ENABLE": [0, 0, 0, 0], - "EPRX33ENABLE": [0, 0, 0, 0], - "EPRX3DATARATE": [3, 3, 3, 3], - "EPRX3TRACKMODE": [3, 3, 3, 3] - }, - "EPRX3CURRENTPHASE10": - { - "EPRX3CURRENTPHASE0": [0, 0, 0, 0], - "EPRX3CURRENTPHASE1": [0, 0, 0, 0] - }, - "EPRX3CURRENTPHASE32": - { - "EPRX3CURRENTPHASE2": [0, 0, 0, 0], - "EPRX3CURRENTPHASE3": [0, 0, 0, 0] - }, - "EPRX3LOCKED": - { - "EPRX3CHNLOCKED": [0, 0, 0, 0], - "EPRX3STATE": [0, 0, 0, 0] - }, - "EPRX40CHNCNTR": - { - "EPRX40ACBIAS": [0, 0, 0, 0], - "EPRX40EQ": [0, 0, 0, 0], - "EPRX40INVERT": [0, 0, 0, 0], - "EPRX40PHASESELECT": [0, 0, 0, 0], - "EPRX40TERM": [1, 1, 1, 1] - }, - "EPRX41CHNCNTR": - { - "EPRX41ACBIAS": [0, 0, 0, 0], - "EPRX41EQ": [0, 0, 0, 0], - "EPRX41INVERT": [0, 0, 0, 0], - "EPRX41PHASESELECT": [0, 0, 0, 0], - "EPRX41TERM": [0, 0, 0, 0] - }, - "EPRX42CHNCNTR": - { - "EPRX42ACBIAS": [0, 0, 0, 0], - "EPRX42EQ": [0, 0, 0, 0], - "EPRX42INVERT": [0, 0, 0, 0], - "EPRX42PHASESELECT": [0, 0, 0, 0], - "EPRX42TERM": [0, 0, 0, 0] - }, - "EPRX43CHNCNTR": - { - "EPRX43ACBIAS": [0, 0, 0, 0], - "EPRX43EQ": [0, 0, 0, 0], - "EPRX43INVERT": [0, 0, 0, 0], - "EPRX43PHASESELECT": [0, 0, 0, 0], - "EPRX43TERM": [0, 0, 0, 0] - }, - "EPRX4CONTROL": - { - "EPRX40ENABLE": [1, 1, 1, 1], - "EPRX41ENABLE": [0, 0, 0, 0], - "EPRX42ENABLE": [0, 0, 0, 0], - "EPRX43ENABLE": [0, 0, 0, 0], - "EPRX4DATARATE": [3, 3, 3, 3], - "EPRX4TRACKMODE": [3, 3, 3, 3] - }, - "EPRX4CURRENTPHASE10": - { - "EPRX4CURRENTPHASE0": [0, 0, 0, 0], - "EPRX4CURRENTPHASE1": [0, 0, 0, 0] - }, - "EPRX4LOCKED": - { - "EPRX4CHNLOCKED": [0, 0, 0, 0], - "EPRX4STATE": [0, 0, 0, 0] - }, - "EPRX50CHNCNTR": - { - "EPRX50ACBIAS": [0, 0, 0, 0], - "EPRX50EQ": [0, 0, 0, 0], - "EPRX50INVERT": [0, 0, 0, 0], - "EPRX50PHASESELECT": [0, 0, 0, 0], - "EPRX50TERM": [1, 1, 1, 1] - }, - "EPRX51CHNCNTR": - { - "EPRX51ACBIAS": [0, 0, 0, 0], - "EPRX51EQ": [0, 0, 0, 0], - "EPRX51INVERT": [0, 0, 0, 0], - "EPRX51PHASESELECT": [0, 0, 0, 0], - "EPRX51TERM": [0, 0, 0, 0] - }, - "EPRX52CHNCNTR": - { - "EPRX52ACBIAS": [0, 0, 0, 0], - "EPRX52EQ": [0, 0, 0, 0], - "EPRX52INVERT": [0, 0, 0, 0], - "EPRX52PHASESELECT": [0, 0, 0, 0], - "EPRX52TERM": [0, 0, 0, 0] - }, - "EPRX53CHNCNTR": - { - "EPRX53ACBIAS": [0, 0, 0, 0], - "EPRX53EQ": [0, 0, 0, 0], - "EPRX53INVERT": [0, 0, 0, 0], - "EPRX53PHASESELECT": [0, 0, 0, 0], - "EPRX53TERM": [0, 0, 0, 0] - }, - "EPRX5CONTROL": - { - "EPRX50ENABLE": [1, 1, 1, 1], - "EPRX51ENABLE": [0, 0, 0, 0], - "EPRX52ENABLE": [0, 0, 0, 0], - "EPRX53ENABLE": [0, 0, 0, 0], - "EPRX5DATARATE": [3, 3, 3, 3], - "EPRX5TRACKMODE": [3, 3, 3, 3] - }, - "EPRX60CHNCNTR": - { - "EPRX60ACBIAS": [0, 0, 0, 0], - "EPRX60EQ": [0, 0, 0, 0], - "EPRX60INVERT": [0, 0, 0, 0], - "EPRX60PHASESELECT": [0, 0, 0, 0], - "EPRX60TERM": [0, 0, 0, 0] - }, - "EPRX61CHNCNTR": - { - "EPRX61ACBIAS": [0, 0, 0, 0], - "EPRX61EQ": [0, 0, 0, 0], - "EPRX61INVERT": [0, 0, 0, 0], - "EPRX61PHASESELECT": [0, 0, 0, 0], - "EPRX61TERM": [0, 0, 0, 0] - }, - "EPRX62CHNCNTR": - { - "EPRX62ACBIAS": [0, 0, 0, 0], - "EPRX62EQ": [0, 0, 0, 0], - "EPRX62INVERT": [0, 0, 0, 0], - "EPRX62PHASESELECT": [0, 0, 0, 0], - "EPRX62TERM": [0, 0, 0, 0] - }, - "EPRX63CHNCNTR": - { - "EPRX63ACBIAS": [0, 0, 0, 0], - "EPRX63EQ": [0, 0, 0, 0], - "EPRX63INVERT": [0, 0, 0, 0], - "EPRX63PHASESELECT": [0, 0, 0, 0], - "EPRX63TERM": [0, 0, 0, 0] - }, - "EPRX6CONTROL": - { - "EPRX60ENABLE": [0, 0, 0, 0], - "EPRX61ENABLE": [0, 0, 0, 0], - "EPRX62ENABLE": [0, 0, 0, 0], - "EPRX63ENABLE": [0, 0, 0, 0], - "EPRX6DATARATE": [0, 0, 0, 0], - "EPRX6TRACKMODE": [0, 0, 0, 0] - }, - "EPRXDLLCONFIG": - { - "EPRXDATAGATINGENABLE": [0, 0, 0, 0], - "EPRXDLLCOARSELOCKDETECTION": [1, 1, 1, 1], - "EPRXDLLCONFIRMCOUNT": [2, 2, 2, 2], - "EPRXDLLCURRENT": [1, 1, 1, 1], - "EPRXDLLFSMCLKALWAYSON": [0, 0, 0, 0], - "EPRXENABLEREINIT": [0, 0, 0, 0] - }, - "EPRXECCHNCNTR": - { - "EPRXECACBIAS": [0, 0, 0, 0], - "EPRXECENABLE": [0, 0, 0, 0], - "EPRXECINVERT": [0, 0, 0, 0], - "EPRXECPHASESELECT": [0, 0, 0, 0], - "EPRXECTERM": [0, 0, 0, 0] - }, - "EPRXECCONTROL": - { - "EPRXECTRACKMODE": [0, 0, 0, 0] - }, - "EPRXEQ10CONTROL": - { - "EPRX00EQ": [0, 0, 0, 0], - "EPRX01EQ": [0, 0, 0, 0], - "EPRX02EQ": [0, 0, 0, 0], - "EPRX03EQ": [0, 0, 0, 0], - "EPRX10EQ": [0, 0, 0, 0], - "EPRX11EQ": [0, 0, 0, 0], - "EPRX12EQ": [0, 0, 0, 0], - "EPRX13EQ": [0, 0, 0, 0] - }, - "EPRXEQ32CONTROL": - { - "EPRX20EQ": [0, 0, 0, 0], - "EPRX21EQ": [0, 0, 0, 0], - "EPRX22EQ": [0, 0, 0, 0], - "EPRX23EQ": [0, 0, 0, 0], - "EPRX30EQ": [0, 0, 0, 0], - "EPRX31EQ": [0, 0, 0, 0], - "EPRX32EQ": [0, 0, 0, 0], - "EPRX33EQ": [0, 0, 0, 0] - }, - "EPRXEQ54CONTROL": - { - "EPRX40EQ": [0, 0, 0, 0], - "EPRX41EQ": [0, 0, 0, 0], - "EPRX42EQ": [0, 0, 0, 0], - "EPRX43EQ": [0, 0, 0, 0], - "EPRX50EQ": [0, 0, 0, 0], - "EPRX51EQ": [0, 0, 0, 0], - "EPRX52EQ": [0, 0, 0, 0], - "EPRX53EQ": [0, 0, 0, 0] - }, - "EPRXEQ6CONTROL": - { - "EPRX60EQ": [0, 0, 0, 0], - "EPRX61EQ": [0, 0, 0, 0], - "EPRX62EQ": [0, 0, 0, 0], - "EPRX63EQ": [0, 0, 0, 0] - }, - "EPRXLOCKFILTER": - { - "EPRXLOCKTHRESHOLD": [5, 5, 5, 5], - "EPRXRELOCKTHRESHOLD": [5, 5, 5, 5] - }, - "EPRXPRBS0": - { - "EPRX00PRBSENABLE": [0, 0, 0, 0], - "EPRX01PRBSENABLE": [0, 0, 0, 0], - "EPRX02PRBSENABLE": [0, 0, 0, 0], - "EPRX03PRBSENABLE": [0, 0, 0, 0], - "EPRX10PRBSENABLE": [0, 0, 0, 0], - "EPRX11PRBSENABLE": [0, 0, 0, 0], - "EPRX12PRBSENABLE": [0, 0, 0, 0], - "EPRX13PRBSENABLE": [0, 0, 0, 0] - }, - "EPRXPRBS1": - { - "EPRX20PRBSENABLE": [0, 0, 0, 0], - "EPRX21PRBSENABLE": [0, 0, 0, 0], - "EPRX22PRBSENABLE": [0, 0, 0, 0], - "EPRX23PRBSENABLE": [0, 0, 0, 0], - "EPRX30PRBSENABLE": [0, 0, 0, 0], - "EPRX31PRBSENABLE": [0, 0, 0, 0], - "EPRX32PRBSENABLE": [0, 0, 0, 0], - "EPRX33PRBSENABLE": [0, 0, 0, 0] - }, - "EPRXPRBS2": - { - "EPRX40PRBSENABLE": [0, 0, 0, 0], - "EPRX41PRBSENABLE": [0, 0, 0, 0], - "EPRX42PRBSENABLE": [0, 0, 0, 0], - "EPRX43PRBSENABLE": [0, 0, 0, 0], - "EPRX50PRBSENABLE": [0, 0, 0, 0], - "EPRX51PRBSENABLE": [0, 0, 0, 0], - "EPRX52PRBSENABLE": [0, 0, 0, 0], - "EPRX53PRBSENABLE": [0, 0, 0, 0] - }, - "EPRXPRBS3": - { - "EPRX60PRBSENABLE": [0, 0, 0, 0], - "EPRX61PRBSENABLE": [0, 0, 0, 0], - "EPRX62PRBSENABLE": [0, 0, 0, 0], - "EPRX63PRBSENABLE": [0, 0, 0, 0], - "EPRXECPRBSENABLE": [0, 0, 0, 0] - }, - "EPRXTRAIN10": - { - "EPRX0TRAIN": [0, 0, 0, 0], - "EPRX1TRAIN": [0, 0, 0, 0] - }, - "EPRXTRAIN32": - { - "EPRX2TRAIN": [0, 0, 0, 0], - "EPRX3TRAIN": [0, 0, 0, 0] - }, - "EPRXTRAIN54": - { - "EPRX4TRAIN": [0, 0, 0, 0], - "EPRX5TRAIN": [0, 0, 0, 0] - }, - "EPRXTRAINEC6": - { - "EPRX6TRAIN": [0, 0, 0, 0], - "EPRXECTRAIN": [0, 0, 0, 0] - }, - "EPTX00CHNCNTR": - { - "EPTX00DRIVESTRENGTH": [3, 0, 0, 0], - "EPTX00PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX00PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX01CHNCNTR": - { - "EPTX01DRIVESTRENGTH": [0, 0, 0, 0], - "EPTX01PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX01PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX01_00CHNCNTR": - { - "EPTX00INVERT": [0, 0, 0, 0], - "EPTX00PREEMPHASISWIDTH": [0, 0, 0, 0], - "EPTX01INVERT": [0, 0, 0, 0], - "EPTX01PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTX02CHNCNTR": - { - "EPTX02DRIVESTRENGTH": [3, 0, 0, 0], - "EPTX02PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX02PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX03CHNCNTR": - { - "EPTX03DRIVESTRENGTH": [0, 0, 0, 0], - "EPTX03PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX03PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX03_02CHNCNTR": - { - "EPTX02INVERT": [0, 0, 0, 0], - "EPTX02PREEMPHASISWIDTH": [0, 0, 0, 0], - "EPTX03INVERT": [0, 0, 0, 0], - "EPTX03PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTX10CHNCNTR": - { - "EPTX10DRIVESTRENGTH": [3, 0, 0, 0], - "EPTX10PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX10PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX10ENABLE": - { - "EPTX00ENABLE": [1, 0, 0, 0], - "EPTX01ENABLE": [0, 0, 0, 0], - "EPTX02ENABLE": [1, 0, 0, 0], - "EPTX03ENABLE": [0, 0, 0, 0], - "EPTX10ENABLE": [1, 0, 0, 0], - "EPTX11ENABLE": [0, 0, 0, 0], - "EPTX12ENABLE": [1, 0, 0, 0], - "EPTX13ENABLE": [0, 0, 0, 0] - }, - "EPTX11CHNCNTR": - { - "EPTX11DRIVESTRENGTH": [0, 0, 0, 0], - "EPTX11PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX11PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX11_10CHNCNTR": - { - "EPTX10INVERT": [0, 0, 0, 0], - "EPTX10PREEMPHASISWIDTH": [0, 0, 0, 0], - "EPTX11INVERT": [0, 0, 0, 0], - "EPTX11PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTX12CHNCNTR": - { - "EPTX12DRIVESTRENGTH": [3, 0, 0, 0], - "EPTX12PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX12PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX13CHNCNTR": - { - "EPTX13DRIVESTRENGTH": [0, 0, 0, 0], - "EPTX13PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX13PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX13_12CHNCNTR": - { - "EPTX12INVERT": [0, 0, 0, 0], - "EPTX12PREEMPHASISWIDTH": [0, 0, 0, 0], - "EPTX13INVERT": [0, 0, 0, 0], - "EPTX13PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTX20CHNCNTR": - { - "EPTX20DRIVESTRENGTH": [3, 0, 0, 0], - "EPTX20PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX20PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX21CHNCNTR": - { - "EPTX21DRIVESTRENGTH": [0, 0, 0, 0], - "EPTX21PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX21PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX21_20CHNCNTR": - { - "EPTX20INVERT": [0, 0, 0, 0], - "EPTX20PREEMPHASISWIDTH": [0, 0, 0, 0], - "EPTX21INVERT": [0, 0, 0, 0], - "EPTX21PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTX22CHNCNTR": - { - "EPTX22DRIVESTRENGTH": [3, 0, 0, 0], - "EPTX22PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX22PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX23CHNCNTR": - { - "EPTX23DRIVESTRENGTH": [0, 0, 0, 0], - "EPTX23PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX23PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX23_22CHNCNTR": - { - "EPTX22INVERT": [0, 0, 0, 0], - "EPTX22PREEMPHASISWIDTH": [0, 0, 0, 0], - "EPTX23INVERT": [0, 0, 0, 0], - "EPTX23PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTX30CHNCNTR": - { - "EPTX30DRIVESTRENGTH": [3, 0, 0, 0], - "EPTX30PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX30PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX31CHNCNTR": - { - "EPTX31DRIVESTRENGTH": [0, 0, 0, 0], - "EPTX31PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX31PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX31_30CHNCNTR": - { - "EPTX30INVERT": [0, 0, 0, 0], - "EPTX30PREEMPHASISWIDTH": [0, 0, 0, 0], - "EPTX31INVERT": [0, 0, 0, 0], - "EPTX31PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTX32CHNCNTR": - { - "EPTX32DRIVESTRENGTH": [3, 0, 0, 0], - "EPTX32PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX32PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX32ENABLE": - { - "EPTX20ENABLE": [1, 0, 0, 0], - "EPTX21ENABLE": [0, 0, 0, 0], - "EPTX22ENABLE": [1, 0, 0, 0], - "EPTX23ENABLE": [0, 0, 0, 0], - "EPTX30ENABLE": [1, 0, 0, 0], - "EPTX31ENABLE": [0, 0, 0, 0], - "EPTX32ENABLE": [1, 0, 0, 0], - "EPTX33ENABLE": [0, 0, 0, 0] - }, - "EPTX33CHNCNTR": - { - "EPTX33DRIVESTRENGTH": [0, 0, 0, 0], - "EPTX33PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX33PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX33_32CHNCNTR": - { - "EPTX32INVERT": [0, 0, 0, 0], - "EPTX32PREEMPHASISWIDTH": [0, 0, 0, 0], - "EPTX33INVERT": [0, 0, 0, 0], - "EPTX33PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTXCONTROL": - { - "EPTX0MIRRORENABLE": [0, 0, 0, 0], - "EPTX1MIRRORENABLE": [0, 0, 0, 0], - "EPTX2MIRRORENABLE": [0, 0, 0, 0], - "EPTX3MIRRORENABLE": [0, 0, 0, 0], - "EPTXECENABLE": [0, 0, 0, 0], - "EPTXECINVERT": [0, 0, 0, 0], - "EPTXECPREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTXDATARATE": - { - "EPTX0DATARATE": [2, 0, 0, 0], - "EPTX1DATARATE": [2, 0, 0, 0], - "EPTX2DATARATE": [2, 0, 0, 0], - "EPTX3DATARATE": [2, 0, 0, 0] - }, - "EPTXECCHNCNTR": - { - "EPTXECDRIVESTRENGTH": [0, 0, 0, 0], - "EPTXECPREEMPHASISMODE": [0, 0, 0, 0], - "EPTXECPREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EQCONFIG": - { - "EQATTENUATION": [3, 0, 0, 0], - "EQCAP": [0, 0, 0, 0] - }, - "EQRES": - { - "EQRES0": [0, 0, 0, 0], - "EQRES1": [0, 0, 0, 0], - "EQRES2": [0, 0, 0, 0], - "EQRES3": [0, 0, 0, 0] - }, - "FAFAMAXSKIPCYCLECOUNTAFTERNF": - { - "FAMAXSKIPCYCLECOUNTAFTERNF": [58, 0, 0, 0] - }, - "FAMAXHEADERFOUNDCOUNT": - { - "FAMAXHEADERFOUNDCOUNT": [10, 0, 0, 0] - }, - "FAMAXHEADERFOUNDCOUNTAFTERNF": - { - "FAMAXHEADERFOUNDCOUNTAFTERNF": [26, 0, 0, 0] - }, - "FAMAXHEADERNOTFOUNDCOUNT": - { - "FAMAXHEADERNOTFOUNDCOUNT": [42, 0, 0, 0] - }, - "FORCEENABLE": - { - "FORCERXENABLE": [0, 0, 0, 0], - "FORCETXENABLE": [0, 0, 0, 0], - "I2CMCLKALWAYSENABLE": [0, 0, 0, 0], - "LDFORCEENABLE": [0, 0, 0, 0], - "PSFSMCLKALWAYSON": [0, 0, 0, 0], - "TESTCLKFORCEENABLE": [0, 0, 0, 0] - }, - "FUSEBLOWADDH": - { - "FUSEBLOWADDRESS": [0, 0, 0, 0] - }, - "FUSEBLOWADDL": - { - "FUSEBLOWADDRESS": [0, 0, 0, 0] - }, - "FUSEBLOWDATAA": - { - "FUSEBLOWDATA": [0, 0, 0, 0] - }, - "FUSEBLOWDATAB": - { - "FUSEBLOWDATA": [0, 0, 0, 0] - }, - "FUSEBLOWDATAC": - { - "FUSEBLOWDATA": [0, 0, 0, 0] - }, - "FUSEBLOWDATAD": - { - "FUSEBLOWDATA": [0, 0, 0, 0] - }, - "FUSECONTROL": - { - "FUSEBLOW": [0, 0, 0, 0], - "FUSEBLOWPULSELENGTH": [0, 0, 0, 0], - "FUSEREAD": [0, 0, 0, 0] - }, - "FUSEMAGIC": - { - "FUSEMAGICNUMBER": [0, 0, 0, 0] - }, - "I2CM0ADDRESS": - { - "I2CM0ADDRESS": [0, 0, 0, 0] - }, - "I2CM0CMD": - { - "I2CM0CMD": [0, 0, 0, 0] - }, - "I2CM0CONFIG": - { - "I2CM0ADDRESSEXT": [0, 0, 0, 0], - "I2CM0SCLDRIVESTRENGTH": [0, 0, 0, 0], - "I2CM0SCLPULLUPENABLE": [1, 0, 0, 0], - "I2CM0SDADRIVESTRENGTH": [0, 0, 0, 0], - "I2CM0SDAPULLUPENABLE": [1, 0, 0, 0] - }, - "I2CM0DATA0": - { - "I2CM0DATA": [0, 0, 0, 0] - }, - "I2CM0DATA1": - { - "I2CM0DATA": [0, 0, 0, 0] - }, - "I2CM0DATA2": - { - "I2CM0DATA": [0, 0, 0, 0] - }, - "I2CM0DATA3": - { - "I2CM0DATA": [0, 0, 0, 0] - }, - "I2CM1ADDRESS": - { - "I2CM1ADDRESS": [0, 0, 0, 0] - }, - "I2CM1CMD": - { - "I2CM1CMD": [0, 0, 0, 0] - }, - "I2CM1CONFIG": - { - "I2CM1ADDRESSEXT": [0, 0, 0, 0], - "I2CM1SCLDRIVESTRENGTH": [0, 0, 0, 0], - "I2CM1SCLPULLUPENABLE": [1, 0, 0, 0], - "I2CM1SDADRIVESTRENGTH": [0, 0, 0, 0], - "I2CM1SDAPULLUPENABLE": [1, 0, 0, 0] - }, - "I2CM1DATA0": - { - "I2CM1DATA": [0, 0, 0, 0] - }, - "I2CM1DATA1": - { - "I2CM1DATA": [0, 0, 0, 0] - }, - "I2CM1DATA2": - { - "I2CM1DATA": [0, 0, 0, 0] - }, - "I2CM1DATA3": - { - "I2CM1DATA": [0, 0, 0, 0] - }, - "I2CM2ADDRESS": - { - "I2CM2ADDRESS": [0, 0, 0, 0] - }, - "I2CM2CMD": - { - "I2CM2CMD": [0, 0, 0, 0] - }, - "I2CM2CONFIG": - { - "I2CM2ADDRESSEXT": [0, 0, 0, 0], - "I2CM2SCLDRIVESTRENGTH": [1, 0, 0, 0], - "I2CM2SCLPULLUPENABLE": [0, 0, 0, 0], - "I2CM2SDADRIVESTRENGTH": [0, 0, 0, 0], - "I2CM2SDAPULLUPENABLE": [1, 0, 0, 0] - }, - "I2CM2DATA0": - { - "I2CM2DATA": [0, 0, 0, 0] - }, - "I2CM2DATA1": - { - "I2CM2DATA": [0, 0, 0, 0] - }, - "I2CM2DATA2": - { - "I2CM2DATA": [0, 0, 0, 0] - }, - "I2CM2DATA3": - { - "I2CM2DATA": [0, 0, 0, 0] - }, - "I2CMTRANSADDRESS": - { - "I2CMTRANSADDRESS": [0, 0, 0, 0] - }, - "I2CMTRANSCONFIG": - { - "I2CMTRANSADDRESSEXT": [0, 0, 0, 0], - "I2CMTRANSCHANNEL": [0, 0, 0, 0], - "I2CMTRANSENABLE": [0, 0, 0, 0] - }, - "I2CMTRANSCTRL": - { - "I2CMTRANSCTRL": [0, 0, 0, 0] - }, - "I2CMTRANSDATA0": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA1": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA10": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA11": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA12": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA13": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA14": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA15": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA2": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA3": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA4": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA5": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA6": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA7": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA8": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA9": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CSLAVEADDRESS": - { - "ASICCONTROLADR": [0, 0, 0, 0] - }, - "LDCONFIGH": - { - "LDEMPHASISENABLE": [0, 0, 0, 0], - "LDMODULATIONCURRENT": [32, 0, 0, 0] - }, - "LDCONFIGL": - { - "LDEMPHASISAMP": [0, 0, 0, 0], - "LDEMPHASISSHORT": [0, 0, 0, 0] - }, - "PGCONFIG": - { - "PGDELAY": [0, 0, 0, 0], - "PGENABLE": [0, 0, 0, 0], - "PGLEVEL": [0, 0, 0, 0] - }, - "PIODIRH": - { - "PIODIR": [0, 0, 0, 0] - }, - "PIODIRL": - { - "PIODIR": [0, 0, 0, 0] - }, - "PIODRIVESTRENGTHH": - { - "PIODRIVESTRENGTH": [0, 0, 0, 0] - }, - "PIODRIVESTRENGTHL": - { - "PIODRIVESTRENGTH": [0, 0, 0, 0] - }, - "PIOOUTH": - { - "PIOOUT": [0, 0, 0, 0] - }, - "PIOOUTL": - { - "PIOOUT": [0, 0, 0, 0] - }, - "PIOPULLENAH": - { - "PIOPULLENABLE": [0, 0, 0, 0] - }, - "PIOPULLENAL": - { - "PIOPULLENABLE": [0, 0, 0, 0] - }, - "PIOUPDOWNH": - { - "PIOUPDOWN": [0, 0, 0, 0] - }, - "PIOUPDOWNL": - { - "PIOUPDOWN": [0, 0, 0, 0] - }, - "POWERUP0": - { - "PUSMDLLWDOGDISABLE": [0, 0, 0, 0], - "PUSMPLLTIMEOUTCONFIG": [0, 0, 0, 0], - "PUSMPLLWDOGDISABLE": [0, 0, 0, 0], - "PUSMREADYWHENCHNSLOCKED": [0, 0, 0, 0] - }, - "POWERUP1": - { - "PUSMCHANNELSTIMEOUTCONFIG": [0, 0, 0, 0], - "PUSMDLLTIMEOUTCONFIG": [0, 0, 0, 0] - }, - "POWERUP2": - { - "DLLCONFIGDONE": [1, 1, 1, 1], - "PLLCONFIGDONE": [1, 1, 1, 1], - "UPDATEENABLE": [0, 0, 0, 0] - }, - "POWERUP3": - { - "PUSMFORCESTATE": [0, 0, 0, 0], - "PUSMSTATEFORCED": [0, 0, 0, 0] - }, - "POWERUP4": - { - "PUSMFORCEMAGIC": [0, 0, 0, 0] - }, - "PROCESSANDSEUMONITOR": - { - "DLDPFECCOUNTERENABLE": [0, 0, 0, 0], - "PMCHANNEL": [0, 0, 0, 0], - "PMENABLE": [0, 0, 0, 0], - "SEUENABLE": [0, 0, 0, 0] - }, - "PS0CONFIG": - { - "PS0DELAY": [0, 0, 0, 0], - "PS0DRIVESTRENGTH": [0, 0, 0, 0], - "PS0ENABLEFINETUNE": [0, 0, 0, 0], - "PS0FREQ": [0, 0, 0, 0] - }, - "PS0DELAY": - { - "PS0DELAY": [0, 0, 0, 0] - }, - "PS0OUTDRIVER": - { - "PS0PREEMPHASISMODE": [0, 0, 0, 0], - "PS0PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "PS0PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "PS1CONFIG": - { - "PS1DELAY": [0, 0, 0, 0], - "PS1DRIVESTRENGTH": [0, 0, 0, 0], - "PS1ENABLEFINETUNE": [0, 0, 0, 0], - "PS1FREQ": [0, 0, 0, 0] - }, - "PS1DELAY": - { - "PS1DELAY": [0, 0, 0, 0] - }, - "PS1OUTDRIVER": - { - "PS1PREEMPHASISMODE": [0, 0, 0, 0], - "PS1PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "PS1PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "PS2CONFIG": - { - "PS2DELAY": [0, 0, 0, 0], - "PS2DRIVESTRENGTH": [0, 0, 0, 0], - "PS2ENABLEFINETUNE": [0, 0, 0, 0], - "PS2FREQ": [0, 0, 0, 0] - }, - "PS2DELAY": - { - "PS2DELAY": [0, 0, 0, 0] - }, - "PS2OUTDRIVER": - { - "PS2PREEMPHASISMODE": [0, 0, 0, 0], - "PS2PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "PS2PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "PS3CONFIG": - { - "PS3DELAY": [0, 0, 0, 0], - "PS3DRIVESTRENGTH": [0, 0, 0, 0], - "PS3ENABLEFINETUNE": [0, 0, 0, 0], - "PS3FREQ": [0, 0, 0, 0] - }, - "PS3DELAY": - { - "PS3DELAY": [0, 0, 0, 0] - }, - "PS3OUTDRIVER": - { - "PS3PREEMPHASISMODE": [0, 0, 0, 0], - "PS3PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "PS3PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "PSDLLCONFIG": - { - "EPRXUNLOCKTHRESHOLD": [0, 0, 0, 0], - "PSDLLCONFIRMCOUNT": [0, 0, 0, 0], - "PSDLLCURRENTSEL": [0, 0, 0, 0] - }, - "REFCLK": - { - "REFCLKACBIAS": [0, 0, 0, 0], - "REFCLKFORCEENABLE": [0, 0, 0, 0], - "REFCLKTERM": [0, 0, 0, 0], - "TESTCLKSETCM": [0, 0, 0, 0] - }, - "RESETCONFIG": - { - "BODENABLE": [0, 0, 0, 0], - "BODLEVEL": [0, 0, 0, 0], - "RESETOUTDRIVESTRENGTH": [0, 0, 0, 0], - "RESETOUTLENGTH": [0, 0, 0, 0] - }, - "RST0": - { - "RSTCONFIG": [0, 0, 0, 0], - "RSTFUSES": [0, 0, 0, 0], - "RSTI2CM0": [0, 0, 0, 0], - "RSTI2CM1": [0, 0, 0, 0], - "RSTI2CM2": [0, 0, 0, 0], - "RSTPLLDIGITAL": [0, 0, 0, 0], - "RSTRXLOGIC": [0, 0, 0, 0], - "RSTTXLOGIC": [0, 0, 0, 0] - }, - "RST1": - { - "RSTEPRX0DLL": [0, 0, 0, 0], - "RSTEPRX1DLL": [0, 0, 0, 0], - "RSTEPRX2DLL": [0, 0, 0, 0], - "RSTEPRX3DLL": [0, 0, 0, 0], - "RSTEPRX4DLL": [0, 0, 0, 0], - "RSTEPRX5DLL": [0, 0, 0, 0], - "RSTEPRX6DLL": [0, 0, 0, 0], - "RSTFRAMEALIGNER": [0, 0, 0, 0] - }, - "RST2": - { - "RESETOUTFORCEACTIVE": [0, 0, 0, 0], - "RSTPS0DLL": [0, 0, 0, 0], - "RSTPS1DLL": [0, 0, 0, 0], - "RSTPS2DLL": [0, 0, 0, 0], - "RSTPS3DLL": [0, 0, 0, 0], - "SKIPFORCE": [0, 0, 0, 0] - }, - "SCCONFIG": - { - "SCPARITYCHECKDISABLE": [0, 0, 0, 0] - }, - "TEMPCALH": - { - "TEMPCAL": [0, 0, 0, 0] - }, - "TEMPCALL": - { - "TEMPCAL": [0, 0, 0, 0] - }, - "TO0SEL": - { - "TO0SELECT": [0, 0, 0, 0] - }, - "TO1SEL": - { - "TO1SELECT": [0, 0, 0, 0] - }, - "TO2SEL": - { - "TO2SELECT": [0, 0, 0, 0] - }, - "TO3SEL": - { - "TO3SELECT": [0, 0, 0, 0] - }, - "TO4DRIVER": - { - "TO4DRIVESTRENGTH": [0, 0, 0, 0], - "TO4PREEMPHASISMODE": [0, 0, 0, 0], - "TO4PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "TO4SEL": - { - "TO4SELECT": [0, 0, 0, 0] - }, - "TO5DRIVER": - { - "TO5DRIVESTRENGTH": [0, 0, 0, 0], - "TO5PREEMPHASISMODE": [0, 0, 0, 0], - "TO5PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "TO5SEL": - { - "TO5SELECT": [0, 0, 0, 0] - }, - "TODRIVINGSTRENGTH": - { - "TO0DS": [0, 0, 0, 0], - "TO1DS": [0, 0, 0, 0], - "TO2DS": [0, 0, 0, 0], - "TO3DS": [0, 0, 0, 0] - }, - "TOPREEMP": - { - "TO4INVERT": [0, 0, 0, 0], - "TO4PREEMPHASISWIDTH": [0, 0, 0, 0], - "TO5INVERT": [0, 0, 0, 0], - "TO5PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "ULDATASOURCE0": - { - "ULECDATASOURCE": [0, 0, 0, 0], - "ULSERTESTPATTERN": [0, 0, 0, 0] - }, - "ULDATASOURCE1": - { - "LDDATASOURCE": [0, 0, 0, 0], - "ULG0DATASOURCE": [0, 0, 0, 0], - "ULG1DATASOURCE": [0, 0, 0, 0] - }, - "ULDATASOURCE2": - { - "ULG2DATASOURCE": [0, 0, 0, 0], - "ULG3DATASOURCE": [0, 0, 0, 0] - }, - "ULDATASOURCE3": - { - "ULG4DATASOURCE": [0, 0, 0, 0], - "ULG5DATASOURCE": [0, 0, 0, 0] - }, - "ULDATASOURCE4": - { - "DLECDATASOURCE": [0, 0, 0, 0], - "ULG6DATASOURCE": [0, 0, 0, 0], - "ULICDATASOURCE": [0, 0, 0, 0] - }, - "ULDATASOURCE5": - { - "DLG0DATASOURCE": [0, 0, 0, 0], - "DLG1DATASOURCE": [0, 0, 0, 0], - "DLG2DATASOURCE": [0, 0, 0, 0], - "DLG3DATASOURCE": [0, 0, 0, 0] - }, - "USERID0": - { - "USERID": [0, 0, 0, 0] - }, - "USERID1": - { - "USERID": [0, 0, 0, 0] - }, - "USERID2": - { - "USERID": [0, 0, 0, 0] - }, - "USERID3": - { - "USERID": [0, 0, 0, 0] - }, - "VREFCNTR": - { - "VREFENABLE": [0, 0, 0, 0], - "VREFTUNE": [0, 0, 0, 0] - } - }, - - "gbcr": - { - "CH1DOWNLINK0": - { - "TX1DISDLEMP": [0, 0, 0, 0], - "TX1DLATT": [3, 3, 3, 3], - "TX1DLSR": [5, 5, 5, 5] - }, - "CH1DOWNLINK1": - { - "TX1DISDLBIAS": [0, 0, 0, 0], - "TX1DISDLLPFBIAS": [1, 1, 1, 1] - }, - "CH1UPLINK0": - { - "CH1CMLAMPLSEL": [7, 7, 7, 7], - "CH1DISEQLF": [1, 1, 1, 1], - "CH1EQATT": [3, 3, 3, 3] - }, - "CH1UPLINK1": - { - "CH1CTLEHFSR": [11, 11, 11, 11], - "CH1CTLEMFSR": [11, 11, 11, 11] - }, - "CH1UPLINK2": - { - "CH1DIS": [0, 0, 0, 0], - "CH1DISDFF": [1, 1, 1, 1], - "CH1DISLPF": [0, 0, 0, 0] - }, - "CH2DOWNLINK0": - { - "TX2DISDLEMP": [0, 0, 0, 0], - "TX2DLATT": [3, 3, 3, 3], - "TX2DLSR": [5, 5, 5, 5] - }, - "CH2DOWNLINK1": - { - "TX2DISDLBIAS": [0, 0, 0, 0], - "TX2DISDLLPFBIAS": [1, 1, 1, 1] - }, - "CH2UPLINK0": - { - "CH2CMLAMPLSEL": [7, 7, 7, 7], - "CH2DISEQLF": [1, 1, 1, 1], - "CH2EQATT": [3, 3, 3, 3] - }, - "CH2UPLINK1": - { - "CH2CTLEHFSR": [11, 11, 11, 11], - "CH2CTLEMFSR": [11, 11, 11, 11] - }, - "CH2UPLINK2": - { - "CH2DIS": [0, 0, 0, 0], - "CH2DISDFF": [1, 1, 1, 1], - "CH2DISLPF": [0, 0, 0, 0] - }, - "CH3UPLINK0": - { - "CH3CMLAMPLSEL": [7, 7, 7, 7], - "CH3DISEQLF": [1, 1, 1, 1], - "CH3EQATT": [3, 3, 3, 3] - }, - "CH3UPLINK1": - { - "CH3CTLEHFSR": [11, 11, 11, 11], - "CH3CTLEMFSR": [11, 11, 11, 11] - }, - "CH3UPLINK2": - { - "CH3DIS": [0, 0, 0, 0], - "CH3DISDFF": [1, 1, 1, 1], - "CH3DISLPF": [0, 0, 0, 0] - }, - "CH4UPLINK0": - { - "CH4CMLAMPLSEL": [7, 7, 7, 7], - "CH4DISEQLF": [1, 1, 1, 1], - "CH4EQATT": [3, 3, 3, 3] - }, - "CH4UPLINK1": - { - "CH4CTLEHFSR": [11, 11, 11, 11], - "CH4CTLEMFSR": [11, 11, 11, 11] - }, - "CH4UPLINK2": - { - "CH4DIS": [0, 0, 0, 0], - "CH4DISDFF": [1, 1, 1, 1], - "CH4DISLPF": [0, 0, 0, 0] - }, - "CH5UPLINK0": - { - "CH5CMLAMPLSEL": [7, 7, 7, 7], - "CH5DISEQLF": [1, 1, 1, 1], - "CH5EQATT": [3, 3, 3, 3] - }, - "CH5UPLINK1": - { - "CH5CTLEHFSR": [11, 11, 11, 11], - "CH5CTLEMFSR": [11, 11, 11, 11] - }, - "CH5UPLINK2": - { - "CH5DIS": [0, 0, 0, 0], - "CH5DISDFF": [1, 1, 1, 1], - "CH5DISLPF": [0, 0, 0, 0] - }, - "CH6UPLINK0": - { - "CH6CMLAMPLSEL": [7, 7, 7, 7], - "CH6DISEQLF": [1, 1, 1, 1], - "CH6EQATT": [3, 3, 3, 3] - }, - "CH6UPLINK1": - { - "CH6CTLEHFSR": [11, 11, 11, 11], - "CH6CTLEMFSR": [11, 11, 11, 11] - }, - "CH6UPLINK2": - { - "CH6DIS": [0, 0, 0, 0], - "CH6DISDFF": [1, 1, 1, 1], - "CH6DISLPF": [0, 0, 0, 0] - }, - "CH7UPLINK0": - { - "CH7CMLAMPLSEL": [7, 7, 7, 7], - "CH7DISEQLF": [1, 1, 1, 1], - "CH7EQATT": [3, 3, 3, 3] - }, - "CH7UPLINK1": - { - "CH7CTLEHFSR": [11, 11, 11, 11], - "CH7CTLEMFSR": [11, 11, 11, 11] - }, - "CH7UPLINK2": - { - "CH7DIS": [0, 0, 0, 0], - "CH7DISDFF": [1, 1, 1, 1], - "CH7DISLPF": [0, 0, 0, 0] - }, - "LVDSRXTX": - { - "DISTX": [0, 0, 0, 0], - "RXEN": [1, 1, 1, 1], - "RXENTERMINATION": [1, 1, 1, 1], - "RXEQ": [0, 0, 0, 0], - "RXINVDATA": [0, 0, 0, 0], - "RXSETCM": [1, 1, 1, 1] - }, - "PHASESHIFTER0": - { - "DLLCAPRESET": [0, 0, 0, 0], - "DLLENABLE": [1, 1, 1, 1] - }, - "PHASESHIFTER1": - { - "DLLCHARGEPUMPCURRENT": [15, 15, 15, 15], - "DLLFORCEDOWN": [1, 1, 1, 1] - }, - "PHASESHIFTER2": - { - "DLLCLOCKDELAYCH6": [5, 5, 5, 5], - "DLLCLOCKDELAYCH7": [5, 5, 5, 5] - }, - "PHASESHIFTER3": - { - "DLLCLOCKDELAYCH4": [5, 5, 5, 5], - "DLLCLOCKDELAYCH5": [5, 5, 5, 5] - }, - "PHASESHIFTER4": - { - "DLLCLOCKDELAYCH6": [5, 5, 5, 5], - "DLLCLOCKDELAYCH7": [5, 5, 5, 5] - }, - "PHASESHIFTER5": - { - "DLLCLOCKDELAYCH1": [5, 5, 5, 5], - "DLLCLOCKDELAYCHTEST": [5, 5, 5, 5] - } - }, - - "vtrx": - { - "C0BC": - { - "C0BiasCur": 47 - }, - "C0CR": - { - "C0BEN": 1, - "C0CEN": 1, - "C0FEP": 0, - "C0LAEN": 1, - "C0MEN": 1, - "C0REP": 0 - }, - "C0EA": - { - "C0EmpAmp": 0 - }, - "C0MC": - { - "C0ModCur": 38 - }, - "C1BC": - { - "C1BiasCur": 47 - }, - "C1CR": - { - "C1BEN": 1, - "C1CEN": 1, - "C1FEP": 0, - "C1LAEN": 1, - "C1MEN": 1, - "C1REP": 0 - }, - "C1EA": - { - "C1EmpAmp": 0 - }, - "C1MC": - { - "C1ModCur": 38 - }, - "C2BC": - { - "C2BiasCur": 47 - }, - "C2CR": - { - "C2BEN": 1, - "C2CEN": 1, - "C2FEP": 0, - "C2LAEN": 1, - "C2MEN": 1, - "C2REP": 0 - }, - "C2EA": - { - "C2EmpAmp": 0 - }, - "C2MC": - { - "C2ModCur": 38 - }, - "C3BC": - { - "C3BiasCur": 47 - }, - "C3CR": - { - "C3BEN": 1, - "C3CEN": 1, - "C3FEP": 0, - "C3LAEN": 1, - "C3MEN": 1, - "C3REP": 0 - }, - "C3EA": - { - "C3EmpAmp": 0 - }, - "C3MC": - { - "C3ModCur": 38 - }, - "CCNF": - { - "CEA": 1, - "CEB": 1, - "CEC": 1, - "CSEN": 0 - }, - "CSE": - { - "ClkSpyEna": 0 - }, - "GCR": - { - "GBEN": 1, - "GCEN": 1, - "GLAEN": 1, - "GMEN": 1, - "GPEN": 1 - }, - "ODC": - { - "DS": 1 - } - } -} \ No newline at end of file diff --git a/ui/src/Config/00000000_test_v1.json b/ui/src/Config/00000000_test_v1.json deleted file mode 100644 index 2ec4e4da0f6d746129c98fc3f979d913b40ace68..0000000000000000000000000000000000000000 --- a/ui/src/Config/00000000_test_v1.json +++ /dev/null @@ -1,2334 +0,0 @@ -{ - "Optoboard": - { - "serial": "00000000", - "flx_G": 0, - "flx_i": 0, - "flx_d": 0 - }, - - "power_up_registers_master": - [ - "CLKGCONFIG0", - "CLKGCONFIG1", - "CLKGPLLRES", - "CLKGPLLINTCUR", - "CLKGPLLPROPCUR", - "CLKGCDRPROPCUR", - "CLKGCDRINTCUR", - "CLKGCDRFFPROPCUR", - "CLKGFLLINTCUR", - "CLKGFFCAP", - "CLKGCNTOVERRIDE", - "CLKGOVERRIDECAPBANK", - "CLKGWAITTIME", - "CLKGLFCONFIG0", - "CLKGLFCONFIG1", - "EPRXDLLCONFIG", - "EPRXLOCKFILTER", - "EPRXLOCKFILTER2", - "LDCONFIGH", - "EPRX0CONTROL", - "EPRX00CHNCNTR", - "EPRX1CONTROL", - "EPRX10CHNCNTR", - "EPRX2CONTROL", - "EPRX20CHNCNTR", - "EPRX3CONTROL", - "EPRX30CHNCNTR", - "EPRX4CONTROL", - "EPRX40CHNCNTR", - "EPRX5CONTROL", - "EPRX50CHNCNTR", - "EQCONFIG", - "FAMAXHEADERFOUNDCOUNT", - "FAMAXHEADERFOUNDCOUNTAFTERNF", - "FAMAXHEADERNOTFOUNDCOUNT", - "EPTXDATARATE", - "EPTX10ENABLE", - "EPTX32ENABLE", - "EPTX00CHNCNTR", - "EPTX02CHNCNTR", - "EPTX10CHNCNTR", - "EPTX12CHNCNTR", - "EPTX20CHNCNTR", - "EPTX22CHNCNTR", - "EPTX30CHNCNTR", - "EPTX32CHNCNTR", - "EPCLK5CHNCNTRH", - "EPCLK5CHNCNTRL", - "EPCLK2CHNCNTRH", - "EPCLK2CHNCNTRL", - "EPCLK26CHNCNTRH", - "EPCLK26CHNCNTRL", - "EPCLK19CHNCNTRH", - "EPCLK19CHNCNTRL", - "POWERUP2" - ], - - "power_up_registers_slave": - [ - "REFCLK", - "CLKGCONFIG0", - "CLKGCONFIG1", - "CLKGPLLRES", - "CLKGPLLINTCUR", - "CLKGCDRINTCUR", - "CLKGCDRFFPROPCUR", - "CLKGFLLINTCUR", - "CLKGFFCAP", - "CLKGCNTOVERRIDE", - "CLKGOVERRIDECAPBANK", - "CLKGWAITTIME", - "CLKGLFCONFIG0", - "CLKGLFCONFIG1", - "PSDLLCONFIG", - "EPRXDLLCONFIG", - "EPRXLOCKFILTER", - "EPRXLOCKFILTER2", - "LDCONFIGH", - "EPRX0CONTROL", - "EPRX00CHNCNTR", - "EPRX1CONTROL", - "EPRX10CHNCNTR", - "EPRX2CONTROL", - "EPRX20CHNCNTR", - "EPRX3CONTROL", - "EPRX30CHNCNTR", - "EPRX4CONTROL", - "EPRX40CHNCNTR", - "EPRX5CONTROL", - "EPRX50CHNCNTR", - "EPCLK5CHNCNTRH", - "EPCLK5CHNCNTRL", - "POWERUP2" - ], - - "lpgbt": - { - "ADCCAL0": - { - "ADCCALGAIN2SEHIGH": [0, 0, 0, 0] - }, - "ADCCAL1": - { - "ADCCALGAIN2SELOW": [0, 0, 0, 0] - }, - "ADCCAL10": - { - "ADCCALGAIN8DIFLOW": [0, 0, 0, 0] - }, - "ADCCAL11": - { - "ADCCALGAIN8DIFHIGH": [0, 0, 0, 0], - "ADCCALGAIN8DIRFLOW": [0, 0, 0, 0] - }, - "ADCCAL12": - { - "ADCCALGAIN16DIFHIGH": [0, 0, 0, 0] - }, - "ADCCAL13": - { - "ADCCALGAIN16DIFLOW": [0, 0, 0, 0] - }, - "ADCCAL14": - { - "ADCCALGAIN16DIFHIGH": [0, 0, 0, 0], - "ADCCALGAIN16DIRFLOW": [0, 0, 0, 0] - }, - "ADCCAL2": - { - "ADCCALGAIN2SEHIGH": [0, 0, 0, 0], - "ADCCALGAIN2SELOW": [0, 0, 0, 0] - }, - "ADCCAL3": - { - "ADCCALGAIN2DIFHIGH": [0, 0, 0, 0] - }, - "ADCCAL4": - { - "ADCCALGAIN2DIFLOW": [0, 0, 0, 0] - }, - "ADCCAL5": - { - "ADCCALGAIN2DIFHIGH": [0, 0, 0, 0], - "ADCCALGAIN2DIRFLOW": [0, 0, 0, 0] - }, - "ADCCAL6": - { - "ADCCALGAIN4DIFHIGH": [0, 0, 0, 0] - }, - "ADCCAL7": - { - "ADCCALGAIN4DIFLOW": [0, 0, 0, 0] - }, - "ADCCAL8": - { - "ADCCALGAIN4DIFHIGH": [0, 0, 0, 0], - "ADCCALGAIN4DIRFLOW": [0, 0, 0, 0] - }, - "ADCCAL9": - { - "ADCCALGAIN8DIFHIGH": [0, 0, 0, 0] - }, - "ADCCONFIG": - { - "ADCCONVERT": [0, 0, 0, 0], - "ADCENABLE": [0, 0, 0, 0], - "ADCGAINSELECT": [0, 0, 0, 0] - }, - "ADCMON": - { - "TEMPSENSRESET": [0, 0, 0, 0], - "VDDANMONENA": [0, 0, 0, 0], - "VDDMONENA": [0, 0, 0, 0], - "VDDRXMONENA": [0, 0, 0, 0], - "VDDTXMONENA": [0, 0, 0, 0] - }, - "ADCSELECT": - { - "ADCINNSELECT": [0, 0, 0, 0], - "ADCINPSELECT": [0, 0, 0, 0] - }, - "BERTCONFIG": - { - "BERTMEASTIME": [0, 0, 0, 0], - "BERTSTART": [0, 0, 0, 0], - "SKIPDISABLE": [0, 0, 0, 0] - }, - "BERTDATAPATTERN0": - { - "BERTDATAPATTERN": [0, 0, 0, 0] - }, - "BERTDATAPATTERN1": - { - "BERTDATAPATTERN": [0, 0, 0, 0] - }, - "BERTDATAPATTERN2": - { - "BERTDATAPATTERN": [0, 0, 0, 0] - }, - "BERTDATAPATTERN3": - { - "BERTDATAPATTERN": [0, 0, 0, 0] - }, - "BERTSOURCE": - { - "BERTSOURCE": [0, 0, 0, 0] - }, - "CHIPCONFIG": - { - "CHIPADDRESSBAR": [0, 0, 0, 0], - "HIGHSPEEDDATAININVERT": [0, 0, 0, 0], - "HIGHSPEEDDATAOUTINVERT": [0, 0, 0, 0] - }, - "CHIPID0": - { - "CHIPID": [0, 0, 0, 0] - }, - "CHIPID1": - { - "CHIPID": [0, 0, 0, 0] - }, - "CHIPID2": - { - "CHIPID": [0, 0, 0, 0] - }, - "CHIPID3": - { - "CHIPID": [0, 0, 0, 0] - }, - "CLKGCDRFFPROPCUR": - { - "CLKGCDRFEEDFORWARDPROPCUR": [6, 6, 6, 6], - "CLKGCDRFEEDFORWARDPROPCURWHENLOCKED": [6, 6, 6, 6] - }, - "CLKGCDRINTCUR": - { - "CLKGCDRINTCUR": [5, 5, 5, 5], - "CLKGCDRINTCURWHENLOCKED": [5, 5, 5, 5] - }, - "CLKGCDRPROPCUR": - { - "CLKGCDRPROPCUR": [5, 5, 5, 5], - "CLKGCDRPROPCURWHENLOCKED": [5, 5, 5, 5] - }, - "CLKGCNTOVERRIDE": - { - "CDRCOCONNECTPLL": [0, 0, 0, 0], - "CDRCODISDATACOUNTERREF": [0, 0, 0, 0], - "CDRCODISDESVBIASGEN": [0, 0, 0, 0], - "CDRCOENABLECDR": [0, 0, 0, 0], - "CDRCOENABLEFD": [0, 0, 0, 0], - "CDRCOENABLEPLL": [0, 0, 0, 0], - "CDRCOREFCLKSEL": [0, 0, 0, 0], - "CLKGCOOVERRIDEVC": [0, 0, 0, 0] - }, - "CLKGCONFIG0": - { - "CLKGBIASGENCONFIG": [8, 0, 0, 0], - "CLKGCALIBRATIONENDOFCOUNT": [14, 0, 0, 0] - }, - "CLKGCONFIG1": - { - "CDRCONTROLOVERRIDEENABLE": [0, 0, 0, 0], - "CLKGCDRRES": [1, 1, 1, 1], - "CLKGDISABLEFRAMEALIGNERLOCKCONTROL": [0, 0, 0, 0], - "CLKGVCODAC": [8, 8, 8, 8], - "CLKGVCORAILMODE": [1, 1, 1, 1] - }, - "CLKGFFCAP": - { - "CDRCOCONNECTCDR": [0, 0, 0, 0], - "CLKGCAPBANKOVERRIDEENABLE": [0, 0, 0, 0], - "CLKGFEEDFORWARDCAP": [3, 3, 3, 3], - "CLKGFEEDFORWARDCAPWHENLOCKED": [3, 3, 3, 3] - }, - "CLKGFLLINTCUR": - { - "CLKGFLLINTCUR": [5, 5, 5, 5], - "CLKGFLLINTCURWHENLOCKED": [5, 5, 5, 5] - }, - "CLKGLFCONFIG0": - { - "CLKGCAPBANKSELECT": [0, 0, 0, 0], - "CLKGLOCKFILTERCLKALWAYSON": [0, 0, 0, 0], - "CLKGLOCKFILTERENABLE": [1, 1, 1, 1], - "CLKGLOCKFILTERLOCKTHRCOUNTER": [15, 15, 15, 15] - }, - "CLKGLFCONFIG1": - { - "CLKGLOCKFILTERRELOCKTHRCOUNTER": [15, 15, 15, 15], - "CLKGLOCKFILTERUNLOCKTHRCOUNTER": [15, 15, 15, 15] - }, - "CLKGOVERRIDECAPBANK": - { - "CLKGCAPBANKSELECT": [0, 0, 0, 0] - }, - "CLKGPLLINTCUR": - { - "CLKGPLLINTCUR": [9, 9, 9, 9], - "CLKGPLLINTCURWHENLOCKED": [9, 9, 9, 9] - }, - "CLKGPLLPROPCUR": - { - "CLKGPLLPROPCUR": [9, 9, 9, 9], - "CLKGPLLPROPCURWHENLOCKED": [9, 9, 9, 9] - }, - "CLKGPLLRES": - { - "CLKGPLLRES": [2, 2, 2, 2], - "CLKGPLLRESWHENLOCKED": [2, 2, 2, 2] - }, - "CLKGWAITTIME": - { - "CLKGWAITCDRTIME": [8, 8, 8, 8], - "CLKGWAITPLLTIME": [8, 8, 8, 8] - }, - "CLKTREE": - { - "CLKTREEADISABLE": [0, 0, 0, 0], - "CLKTREEBDISABLE": [0, 0, 0, 0], - "CLKTREECDISABLE": [0, 0, 0, 0], - "CLKTREEMAGICNUMBER": [0, 0, 0, 0] - }, - "CRC0": - { - "CRC32": [0, 0, 0, 0] - }, - "CRC1": - { - "CRC32": [0, 0, 0, 0] - }, - "CRC2": - { - "CRC32": [0, 0, 0, 0] - }, - "CRC3": - { - "CRC32": [0, 0, 0, 0] - }, - "CURDACCALH": - { - "CURDACCAL": [0, 0, 0, 0] - }, - "CURDACCALL": - { - "CURDACCAL": [0, 0, 0, 0] - }, - "CURDACCHN": - { - "CURDACCHNENABLE": [0, 0, 0, 0] - }, - "CURDACVALUE": - { - "CURDACSELECT": [0, 0, 0, 0] - }, - "DACCAL0": - { - "DACCALMINCODE": [0, 0, 0, 0] - }, - "DACCAL1": - { - "DACCALMAXCODE": [0, 0, 0, 0] - }, - "DACCAL2": - { - "DACCALMAXCODE": [0, 0, 0, 0], - "DACCALMINCODE": [0, 0, 0, 0] - }, - "DACCONFIGH": - { - "CURDACENABLE": [0, 0, 0, 0], - "VOLDACENABLE": [0, 0, 0, 0], - "VOLDACVALUE": [0, 0, 0, 0] - }, - "DACCONFIGL": - { - "VOLDACVALUE": [0, 0, 0, 0] - }, - "DATAPATH": - { - "DLDPBYPASDEINTERLEVEAR": [0, 0, 0, 0], - "DLDPBYPASFECDECODER": [0, 0, 0, 0], - "DLDPBYPASSDESCRAMBLER": [0, 0, 0, 0], - "DLDPFECCOUNTERENABLE": [0, 0, 0, 0], - "ULDPBYPASSFECCODER": [0, 0, 0, 0], - "ULDPBYPASSINTERLEAVER": [0, 0, 0, 0], - "ULDPBYPASSSCRAMBLER": [0, 0, 0, 0] - }, - "DPDATAPATTERN0": - { - "DPDATAPATTERN": [0, 0, 0, 0] - }, - "DPDATAPATTERN1": - { - "DPDATAPATTERN": [0, 0, 0, 0] - }, - "DPDATAPATTERN2": - { - "DPDATAPATTERN": [0, 0, 0, 0] - }, - "DPDATAPATTERN3": - { - "DPDATAPATTERN": [0, 0, 0, 0] - }, - "EOMCONFIGH": - { - "EOMBYPASSPHASEINTERPOLATOR": [0, 0, 0, 0], - "EOMENABLE": [0, 0, 0, 0], - "EOMENDOFCOUNTSEL": [0, 0, 0, 0], - "EOMSTART": [0, 0, 0, 0] - }, - "EOMCONFIGL": - { - "EOMPHASESEL": [0, 0, 0, 0] - }, - "EOMVOFSEL": - { - "EOMVOFSEL": [0, 0, 0, 0] - }, - "EPCLK0CHNCNTRH": - { - "EPCLK0DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK0FREQ": [0, 0, 0, 0], - "EPCLK0INVERT": [0, 0, 0, 0], - "EPCLK0LOWRES": [0, 0, 0, 0] - }, - "EPCLK0CHNCNTRL": - { - "EPCLK0PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK0PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK0PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK10CHNCNTRH": - { - "EPCLK10DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK10FREQ": [0, 0, 0, 0], - "EPCLK10INVERT": [0, 0, 0, 0], - "EPCLK10LOWRES": [0, 0, 0, 0] - }, - "EPCLK10CHNCNTRL": - { - "EPCLK10PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK10PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK10PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK11CHNCNTRH": - { - "EPCLK11DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK11FREQ": [0, 0, 0, 0], - "EPCLK11INVERT": [0, 0, 0, 0], - "EPCLK11LOWRES": [0, 0, 0, 0] - }, - "EPCLK11CHNCNTRL": - { - "EPCLK11PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK11PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK11PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK12CHNCNTRH": - { - "EPCLK12DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK12FREQ": [0, 0, 0, 0], - "EPCLK12INVERT": [0, 0, 0, 0], - "EPCLK12LOWRES": [0, 0, 0, 0] - }, - "EPCLK12CHNCNTRL": - { - "EPCLK12PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK12PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK12PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK13CHNCNTRH": - { - "EPCLK13DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK13FREQ": [0, 0, 0, 0], - "EPCLK13INVERT": [0, 0, 0, 0], - "EPCLK13LOWRES": [0, 0, 0, 0] - }, - "EPCLK13CHNCNTRL": - { - "EPCLK13PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK13PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK13PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK14CHNCNTRH": - { - "EPCLK14DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK14FREQ": [0, 0, 0, 0], - "EPCLK14INVERT": [0, 0, 0, 0], - "EPCLK14LOWRES": [0, 0, 0, 0] - }, - "EPCLK14CHNCNTRL": - { - "EPCLK14PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK14PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK14PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK15CHNCNTRH": - { - "EPCLK15DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK15FREQ": [0, 0, 0, 0], - "EPCLK15INVERT": [0, 0, 0, 0], - "EPCLK15LOWRES": [0, 0, 0, 0] - }, - "EPCLK15CHNCNTRL": - { - "EPCLK15PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK15PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK15PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK16CHNCNTRH": - { - "EPCLK16DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK16FREQ": [0, 0, 0, 0], - "EPCLK16INVERT": [0, 0, 0, 0], - "EPCLK16LOWRES": [0, 0, 0, 0] - }, - "EPCLK16CHNCNTRL": - { - "EPCLK16PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK16PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK16PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK17CHNCNTRH": - { - "EPCLK17DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK17FREQ": [0, 0, 0, 0], - "EPCLK17INVERT": [0, 0, 0, 0], - "EPCLK17LOWRES": [0, 0, 0, 0] - }, - "EPCLK17CHNCNTRL": - { - "EPCLK17PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK17PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK17PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK18CHNCNTRH": - { - "EPCLK18DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK18FREQ": [0, 0, 0, 0], - "EPCLK18INVERT": [0, 0, 0, 0], - "EPCLK18LOWRES": [0, 0, 0, 0] - }, - "EPCLK18CHNCNTRL": - { - "EPCLK18PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK18PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK18PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK19CHNCNTRH": - { - "EPCLK19DRIVESTRENGTH": [3, 0, 0, 0], - "EPCLK19FREQ": [1, 0, 0, 0], - "EPCLK19INVERT": [0, 0, 0, 0], - "EPCLK19LOWRES": [0, 0, 0, 0] - }, - "EPCLK19CHNCNTRL": - { - "EPCLK19PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK19PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK19PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK1CHNCNTRH": - { - "EPCLK1DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK1FREQ": [0, 0, 0, 0], - "EPCLK1INVERT": [0, 0, 0, 0], - "EPCLK1LOWRES": [0, 0, 0, 0] - }, - "EPCLK1CHNCNTRL": - { - "EPCLK1PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK1PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK1PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK20CHNCNTRH": - { - "EPCLK20DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK20FREQ": [0, 0, 0, 0], - "EPCLK20INVERT": [0, 0, 0, 0], - "EPCLK20LOWRES": [0, 0, 0, 0] - }, - "EPCLK20CHNCNTRL": - { - "EPCLK20PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK20PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK20PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK21CHNCNTRH": - { - "EPCLK21DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK21FREQ": [0, 0, 0, 0], - "EPCLK21INVERT": [0, 0, 0, 0], - "EPCLK21LOWRES": [0, 0, 0, 0] - }, - "EPCLK21CHNCNTRL": - { - "EPCLK21PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK21PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK21PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK22CHNCNTRH": - { - "EPCLK22DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK22FREQ": [0, 0, 0, 0], - "EPCLK22INVERT": [0, 0, 0, 0], - "EPCLK22LOWRES": [0, 0, 0, 0] - }, - "EPCLK22CHNCNTRL": - { - "EPCLK22PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK22PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK22PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK23CHNCNTRH": - { - "EPCLK23DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK23FREQ": [0, 0, 0, 0], - "EPCLK23INVERT": [0, 0, 0, 0], - "EPCLK23LOWRES": [0, 0, 0, 0] - }, - "EPCLK23CHNCNTRL": - { - "EPCLK23PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK23PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK23PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK24CHNCNTRH": - { - "EPCLK24DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK24FREQ": [0, 0, 0, 0], - "EPCLK24INVERT": [0, 0, 0, 0], - "EPCLK24LOWRES": [0, 0, 0, 0] - }, - "EPCLK24CHNCNTRL": - { - "EPCLK24PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK24PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK24PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK25CHNCNTRH": - { - "EPCLK25DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK25FREQ": [0, 0, 0, 0], - "EPCLK25INVERT": [0, 0, 0, 0], - "EPCLK25LOWRES": [0, 0, 0, 0] - }, - "EPCLK25CHNCNTRL": - { - "EPCLK25PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK25PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK25PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK26CHNCNTRH": - { - "EPCLK26DRIVESTRENGTH": [3, 0, 0, 0], - "EPCLK26FREQ": [1, 0, 0, 0], - "EPCLK26INVERT": [1, 0, 0, 0], - "EPCLK26LOWRES": [0, 0, 0, 0] - }, - "EPCLK26CHNCNTRL": - { - "EPCLK26PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK26PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK26PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK27CHNCNTRH": - { - "EPCLK27DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK27FREQ": [0, 0, 0, 0], - "EPCLK27INVERT": [0, 0, 0, 0], - "EPCLK27LOWRES": [0, 0, 0, 0] - }, - "EPCLK27CHNCNTRL": - { - "EPCLK27PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK27PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK27PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK28CHNCNTRH": - { - "EPCLK28DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK28FREQ": [0, 0, 0, 0], - "EPCLK28INVERT": [0, 0, 0, 0], - "EPCLK28LOWRES": [0, 0, 0, 0] - }, - "EPCLK28CHNCNTRL": - { - "EPCLK28PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK28PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK28PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK2CHNCNTRH": - { - "EPCLK2DRIVESTRENGTH": [3, 0, 0, 0], - "EPCLK2FREQ": [1, 0, 0, 0], - "EPCLK2INVERT": [1, 0, 0, 0], - "EPCLK2LOWRES": [0, 0, 0, 0] - }, - "EPCLK2CHNCNTRL": - { - "EPCLK2PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK2PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK2PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK3CHNCNTRH": - { - "EPCLK3DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK3FREQ": [0, 0, 0, 0], - "EPCLK3INVERT": [0, 0, 0, 0], - "EPCLK3LOWRES": [0, 0, 0, 0] - }, - "EPCLK3CHNCNTRL": - { - "EPCLK3PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK3PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK3PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK4CHNCNTRH": - { - "EPCLK4DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK4FREQ": [0, 0, 0, 0], - "EPCLK4INVERT": [0, 0, 0, 0], - "EPCLK4LOWRES": [0, 0, 0, 0] - }, - "EPCLK4CHNCNTRL": - { - "EPCLK4PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK4PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK4PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK5CHNCNTRH": - { - "EPCLK5DRIVESTRENGTH": [7, 7, 7, 7], - "EPCLK5FREQ": [6, 6, 6, 6], - "EPCLK5INVERT": [0, 0, 0, 0], - "EPCLK5LOWRES": [0, 0, 0, 0] - }, - "EPCLK5CHNCNTRL": - { - "EPCLK5PREEMPHASISMODE": [3, 3, 3, 3], - "EPCLK5PREEMPHASISSTRENGTH": [3, 3, 3, 3], - "EPCLK5PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK6CHNCNTRH": - { - "EPCLK6DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK6FREQ": [0, 0, 0, 0], - "EPCLK6INVERT": [0, 0, 0, 0], - "EPCLK6LOWRES": [0, 0, 0, 0] - }, - "EPCLK6CHNCNTRL": - { - "EPCLK6PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK6PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK6PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK7CHNCNTRH": - { - "EPCLK7DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK7FREQ": [0, 0, 0, 0], - "EPCLK7INVERT": [0, 0, 0, 0], - "EPCLK7LOWRES": [0, 0, 0, 0] - }, - "EPCLK7CHNCNTRL": - { - "EPCLK7PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK7PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK7PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK8CHNCNTRH": - { - "EPCLK8DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK8FREQ": [0, 0, 0, 0], - "EPCLK8INVERT": [0, 0, 0, 0], - "EPCLK8LOWRES": [0, 0, 0, 0] - }, - "EPCLK8CHNCNTRL": - { - "EPCLK8PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK8PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK8PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPCLK9CHNCNTRH": - { - "EPCLK9DRIVESTRENGTH": [0, 0, 0, 0], - "EPCLK9FREQ": [0, 0, 0, 0], - "EPCLK9INVERT": [0, 0, 0, 0], - "EPCLK9LOWRES": [0, 0, 0, 0] - }, - "EPCLK9CHNCNTRL": - { - "EPCLK9PREEMPHASISMODE": [0, 0, 0, 0], - "EPCLK9PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPCLK9PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPRX00CHNCNTR": - { - "EPRX00ACBIAS": [0, 0, 0, 0], - "EPRX00EQ": [0, 0, 0, 0], - "EPRX00INVERT": [1, 1, 1, 1], - "EPRX00PHASESELECT": [0, 0, 0, 0], - "EPRX00TERM": [1, 1, 1, 1] - }, - "EPRX01CHNCNTR": - { - "EPRX01ACBIAS": [0, 0, 0, 0], - "EPRX01EQ": [0, 0, 0, 0], - "EPRX01INVERT": [0, 0, 0, 0], - "EPRX01PHASESELECT": [0, 0, 0, 0], - "EPRX01TERM": [0, 0, 0, 0] - }, - "EPRX02CHNCNTR": - { - "EPRX02ACBIAS": [0, 0, 0, 0], - "EPRX02EQ": [0, 0, 0, 0], - "EPRX02INVERT": [0, 0, 0, 0], - "EPRX02PHASESELECT": [0, 0, 0, 0], - "EPRX02TERM": [0, 0, 0, 0] - }, - "EPRX03CHNCNTR": - { - "EPRX03ACBIAS": [0, 0, 0, 0], - "EPRX03EQ": [0, 0, 0, 0], - "EPRX03INVERT": [0, 0, 0, 0], - "EPRX03PHASESELECT": [0, 0, 0, 0], - "EPRX03TERM": [0, 0, 0, 0] - }, - "EPRX0CONTROL": - { - "EPRX00ENABLE": [1, 1, 1, 1], - "EPRX01ENABLE": [0, 0, 0, 0], - "EPRX02ENABLE": [0, 0, 0, 0], - "EPRX03ENABLE": [0, 0, 0, 0], - "EPRX0DATARATE": [3, 3, 3, 3], - "EPRX0TRACKMODE": [3, 3, 3, 3] - }, - "EPRX10CHNCNTR": - { - "EPRX10ACBIAS": [0, 0, 0, 0], - "EPRX10EQ": [0, 0, 0, 0], - "EPRX10INVERT": [1, 1, 1, 1], - "EPRX10PHASESELECT": [0, 0, 0, 0], - "EPRX10TERM": [1, 1, 1, 1] - }, - "EPRX11CHNCNTR": - { - "EPRX11ACBIAS": [0, 0, 0, 0], - "EPRX11EQ": [0, 0, 0, 0], - "EPRX11INVERT": [0, 0, 0, 0], - "EPRX11PHASESELECT": [0, 0, 0, 0], - "EPRX11TERM": [0, 0, 0, 0] - }, - "EPRX12CHNCNTR": - { - "EPRX12ACBIAS": [0, 0, 0, 0], - "EPRX12EQ": [0, 0, 0, 0], - "EPRX12INVERT": [0, 0, 0, 0], - "EPRX12PHASESELECT": [0, 0, 0, 0], - "EPRX12TERM": [0, 0, 0, 0] - }, - "EPRX13CHNCNTR": - { - "EPRX13ACBIAS": [0, 0, 0, 0], - "EPRX13EQ": [0, 0, 0, 0], - "EPRX13INVERT": [0, 0, 0, 0], - "EPRX13PHASESELECT": [0, 0, 0, 0], - "EPRX13TERM": [0, 0, 0, 0] - }, - "EPRX1CONTROL": - { - "EPRX10ENABLE": [1, 1, 1, 1], - "EPRX11ENABLE": [0, 0, 0, 0], - "EPRX12ENABLE": [0, 0, 0, 0], - "EPRX13ENABLE": [0, 0, 0, 0], - "EPRX1DATARATE": [3, 3, 3, 3], - "EPRX1TRACKMODE": [3, 3, 3, 3] - }, - "EPRX20CHNCNTR": - { - "EPRX20ACBIAS": [0, 0, 0, 0], - "EPRX20EQ": [0, 0, 0, 0], - "EPRX20INVERT": [1, 1, 1, 1], - "EPRX20PHASESELECT": [0, 0, 0, 0], - "EPRX20TERM": [1, 1, 1, 1] - }, - "EPRX21CHNCNTR": - { - "EPRX21ACBIAS": [0, 0, 0, 0], - "EPRX21EQ": [0, 0, 0, 0], - "EPRX21INVERT": [0, 0, 0, 0], - "EPRX21PHASESELECT": [0, 0, 0, 0], - "EPRX21TERM": [0, 0, 0, 0] - }, - "EPRX22CHNCNTR": - { - "EPRX22ACBIAS": [0, 0, 0, 0], - "EPRX22EQ": [0, 0, 0, 0], - "EPRX22INVERT": [0, 0, 0, 0], - "EPRX22PHASESELECT": [0, 0, 0, 0], - "EPRX22TERM": [0, 0, 0, 0] - }, - "EPRX23CHNCNTR": - { - "EPRX23ACBIAS": [0, 0, 0, 0], - "EPRX23EQ": [0, 0, 0, 0], - "EPRX23INVERT": [0, 0, 0, 0], - "EPRX23PHASESELECT": [0, 0, 0, 0], - "EPRX23TERM": [0, 0, 0, 0] - }, - "EPRX2CONTROL": - { - "EPRX20ENABLE": [1, 1, 1, 1], - "EPRX21ENABLE": [0, 0, 0, 0], - "EPRX22ENABLE": [0, 0, 0, 0], - "EPRX23ENABLE": [0, 0, 0, 0], - "EPRX2DATARATE": [3, 3, 3, 3], - "EPRX2TRACKMODE": [3, 3, 3, 3] - }, - "EPRX30CHNCNTR": - { - "EPRX30ACBIAS": [0, 0, 0, 0], - "EPRX30EQ": [0, 0, 0, 0], - "EPRX30INVERT": [1, 1, 1, 1], - "EPRX30PHASESELECT": [0, 0, 0, 0], - "EPRX30TERM": [1, 1, 1, 1] - }, - "EPRX31CHNCNTR": - { - "EPRX31ACBIAS": [0, 0, 0, 0], - "EPRX31EQ": [0, 0, 0, 0], - "EPRX31INVERT": [0, 0, 0, 0], - "EPRX31PHASESELECT": [0, 0, 0, 0], - "EPRX31TERM": [0, 0, 0, 0] - }, - "EPRX32CHNCNTR": - { - "EPRX32ACBIAS": [0, 0, 0, 0], - "EPRX32EQ": [0, 0, 0, 0], - "EPRX32INVERT": [0, 0, 0, 0], - "EPRX32PHASESELECT": [0, 0, 0, 0], - "EPRX32TERM": [0, 0, 0, 0] - }, - "EPRX33CHNCNTR": - { - "EPRX33ACBIAS": [0, 0, 0, 0], - "EPRX33EQ": [0, 0, 0, 0], - "EPRX33INVERT": [0, 0, 0, 0], - "EPRX33PHASESELECT": [0, 0, 0, 0], - "EPRX33TERM": [0, 0, 0, 0] - }, - "EPRX3CONTROL": - { - "EPRX30ENABLE": [1, 1, 1, 1], - "EPRX31ENABLE": [0, 0, 0, 0], - "EPRX32ENABLE": [0, 0, 0, 0], - "EPRX33ENABLE": [0, 0, 0, 0], - "EPRX3DATARATE": [3, 3, 3, 3], - "EPRX3TRACKMODE": [3, 3, 3, 3] - }, - "EPRX40CHNCNTR": - { - "EPRX40ACBIAS": [0, 0, 0, 0], - "EPRX40EQ": [0, 0, 0, 0], - "EPRX40INVERT": [0, 0, 0, 0], - "EPRX40PHASESELECT": [0, 0, 0, 0], - "EPRX40TERM": [1, 1, 1, 1] - }, - "EPRX41CHNCNTR": - { - "EPRX41ACBIAS": [0, 0, 0, 0], - "EPRX41EQ": [0, 0, 0, 0], - "EPRX41INVERT": [0, 0, 0, 0], - "EPRX41PHASESELECT": [0, 0, 0, 0], - "EPRX41TERM": [0, 0, 0, 0] - }, - "EPRX42CHNCNTR": - { - "EPRX42ACBIAS": [0, 0, 0, 0], - "EPRX42EQ": [0, 0, 0, 0], - "EPRX42INVERT": [0, 0, 0, 0], - "EPRX42PHASESELECT": [0, 0, 0, 0], - "EPRX42TERM": [0, 0, 0, 0] - }, - "EPRX43CHNCNTR": - { - "EPRX43ACBIAS": [0, 0, 0, 0], - "EPRX43EQ": [0, 0, 0, 0], - "EPRX43INVERT": [0, 0, 0, 0], - "EPRX43PHASESELECT": [0, 0, 0, 0], - "EPRX43TERM": [0, 0, 0, 0] - }, - "EPRX4CONTROL": - { - "EPRX40ENABLE": [1, 1, 1, 1], - "EPRX41ENABLE": [0, 0, 0, 0], - "EPRX42ENABLE": [0, 0, 0, 0], - "EPRX43ENABLE": [0, 0, 0, 0], - "EPRX4DATARATE": [3, 3, 3, 3], - "EPRX4TRACKMODE": [3, 3, 3, 3] - }, - "EPRX50CHNCNTR": - { - "EPRX50ACBIAS": [0, 0, 0, 0], - "EPRX50EQ": [0, 0, 0, 0], - "EPRX50INVERT": [0, 0, 0, 0], - "EPRX50PHASESELECT": [0, 0, 0, 0], - "EPRX50TERM": [1, 1, 1, 1] - }, - "EPRX51CHNCNTR": - { - "EPRX51ACBIAS": [0, 0, 0, 0], - "EPRX51EQ": [0, 0, 0, 0], - "EPRX51INVERT": [0, 0, 0, 0], - "EPRX51PHASESELECT": [0, 0, 0, 0], - "EPRX51TERM": [0, 0, 0, 0] - }, - "EPRX52CHNCNTR": - { - "EPRX52ACBIAS": [0, 0, 0, 0], - "EPRX52EQ": [0, 0, 0, 0], - "EPRX52INVERT": [0, 0, 0, 0], - "EPRX52PHASESELECT": [0, 0, 0, 0], - "EPRX52TERM": [0, 0, 0, 0] - }, - "EPRX53CHNCNTR": - { - "EPRX53ACBIAS": [0, 0, 0, 0], - "EPRX53EQ": [0, 0, 0, 0], - "EPRX53INVERT": [0, 0, 0, 0], - "EPRX53PHASESELECT": [0, 0, 0, 0], - "EPRX53TERM": [0, 0, 0, 0] - }, - "EPRX5CONTROL": - { - "EPRX50ENABLE": [1, 1, 1, 1], - "EPRX51ENABLE": [0, 0, 0, 0], - "EPRX52ENABLE": [0, 0, 0, 0], - "EPRX53ENABLE": [0, 0, 0, 0], - "EPRX5DATARATE": [3, 3, 3, 3], - "EPRX5TRACKMODE": [3, 3, 3, 3] - }, - "EPRX60CHNCNTR": - { - "EPRX60ACBIAS": [0, 0, 0, 0], - "EPRX60EQ": [0, 0, 0, 0], - "EPRX60INVERT": [0, 0, 0, 0], - "EPRX60PHASESELECT": [0, 0, 0, 0], - "EPRX60TERM": [0, 0, 0, 0] - }, - "EPRX61CHNCNTR": - { - "EPRX61ACBIAS": [0, 0, 0, 0], - "EPRX61EQ": [0, 0, 0, 0], - "EPRX61INVERT": [0, 0, 0, 0], - "EPRX61PHASESELECT": [0, 0, 0, 0], - "EPRX61TERM": [0, 0, 0, 0] - }, - "EPRX62CHNCNTR": - { - "EPRX62ACBIAS": [0, 0, 0, 0], - "EPRX62EQ": [0, 0, 0, 0], - "EPRX62INVERT": [0, 0, 0, 0], - "EPRX62PHASESELECT": [0, 0, 0, 0], - "EPRX62TERM": [0, 0, 0, 0] - }, - "EPRX63CHNCNTR": - { - "EPRX63ACBIAS": [0, 0, 0, 0], - "EPRX63EQ": [0, 0, 0, 0], - "EPRX63INVERT": [0, 0, 0, 0], - "EPRX63PHASESELECT": [0, 0, 0, 0], - "EPRX63TERM": [0, 0, 0, 0] - }, - "EPRX6CONTROL": - { - "EPRX60ENABLE": [0, 0, 0, 0], - "EPRX61ENABLE": [0, 0, 0, 0], - "EPRX62ENABLE": [0, 0, 0, 0], - "EPRX63ENABLE": [0, 0, 0, 0], - "EPRX6DATARATE": [0, 0, 0, 0], - "EPRX6TRACKMODE": [0, 0, 0, 0] - }, - "EPRXDLLCONFIG": - { - "EPRXDATAGATINGDISABLE": [0, 0, 0, 0], - "EPRXDLLCOARSELOCKDETECTION": [1, 1, 1, 1], - "EPRXDLLCONFIRMCOUNT": [2, 2, 2, 2], - "EPRXDLLCURRENT": [1, 1, 1, 1], - "EPRXDLLFSMCLKALWAYSON": [0, 0, 0, 0], - "EPRXENABLEREINIT": [0, 0, 0, 0] - }, - "EPRXECCHNCNTR": - { - "EPRXECACBIAS": [0, 0, 0, 0], - "EPRXECINVERT": [0, 0, 0, 0], - "EPRXECPHASESELECT": [0, 0, 0, 0], - "EPRXECPULLUPENABLE": [0, 0, 0, 0], - "EPRXECTERM": [0, 0, 0, 0] - }, - "EPRXECCONTROL": - { - "EPRXECAUTOPHASERESETDISABLE": [0, 0, 0, 0], - "EPRXECENABLE": [0, 0, 0, 0], - "EPRXECTRACKMODE": [0, 0, 0, 0] - }, - "EPRXEQ10CONTROL": - { - "EPRX00EQ": [0, 0, 0, 0], - "EPRX01EQ": [0, 0, 0, 0], - "EPRX02EQ": [0, 0, 0, 0], - "EPRX03EQ": [0, 0, 0, 0], - "EPRX10EQ": [0, 0, 0, 0], - "EPRX11EQ": [0, 0, 0, 0], - "EPRX12EQ": [0, 0, 0, 0], - "EPRX13EQ": [0, 0, 0, 0] - }, - "EPRXEQ32CONTROL": - { - "EPRX20EQ": [0, 0, 0, 0], - "EPRX21EQ": [0, 0, 0, 0], - "EPRX22EQ": [0, 0, 0, 0], - "EPRX23EQ": [0, 0, 0, 0], - "EPRX30EQ": [0, 0, 0, 0], - "EPRX31EQ": [0, 0, 0, 0], - "EPRX32EQ": [0, 0, 0, 0], - "EPRX33EQ": [0, 0, 0, 0] - }, - "EPRXEQ54CONTROL": - { - "EPRX40EQ": [0, 0, 0, 0], - "EPRX41EQ": [0, 0, 0, 0], - "EPRX42EQ": [0, 0, 0, 0], - "EPRX43EQ": [0, 0, 0, 0], - "EPRX50EQ": [0, 0, 0, 0], - "EPRX51EQ": [0, 0, 0, 0], - "EPRX52EQ": [0, 0, 0, 0], - "EPRX53EQ": [0, 0, 0, 0] - }, - "EPRXEQ6CONTROL": - { - "EPRX60EQ": [0, 0, 0, 0], - "EPRX61EQ": [0, 0, 0, 0], - "EPRX62EQ": [0, 0, 0, 0], - "EPRX63EQ": [0, 0, 0, 0] - }, - "EPRXLOCKFILTER": - { - "EPRXLOCKTHRESHOLD": [5, 5, 5, 5], - "EPRXRELOCKTHRESHOLD": [5, 5, 5, 5] - }, - "EPRXLOCKFILTER2": - { - "EPRXUNLOCKTHRESHOLD": [5, 5, 5, 5] - }, - "EPRXPRBS0": - { - "EPRX00PRBSENABLE": [0, 0, 0, 0], - "EPRX01PRBSENABLE": [0, 0, 0, 0], - "EPRX02PRBSENABLE": [0, 0, 0, 0], - "EPRX03PRBSENABLE": [0, 0, 0, 0], - "EPRX10PRBSENABLE": [0, 0, 0, 0], - "EPRX11PRBSENABLE": [0, 0, 0, 0], - "EPRX12PRBSENABLE": [0, 0, 0, 0], - "EPRX13PRBSENABLE": [0, 0, 0, 0] - }, - "EPRXPRBS1": - { - "EPRX20PRBSENABLE": [0, 0, 0, 0], - "EPRX21PRBSENABLE": [0, 0, 0, 0], - "EPRX22PRBSENABLE": [0, 0, 0, 0], - "EPRX23PRBSENABLE": [0, 0, 0, 0], - "EPRX30PRBSENABLE": [0, 0, 0, 0], - "EPRX31PRBSENABLE": [0, 0, 0, 0], - "EPRX32PRBSENABLE": [0, 0, 0, 0], - "EPRX33PRBSENABLE": [0, 0, 0, 0] - }, - "EPRXPRBS2": - { - "EPRX40PRBSENABLE": [0, 0, 0, 0], - "EPRX41PRBSENABLE": [0, 0, 0, 0], - "EPRX42PRBSENABLE": [0, 0, 0, 0], - "EPRX43PRBSENABLE": [0, 0, 0, 0], - "EPRX50PRBSENABLE": [0, 0, 0, 0], - "EPRX51PRBSENABLE": [0, 0, 0, 0], - "EPRX52PRBSENABLE": [0, 0, 0, 0], - "EPRX53PRBSENABLE": [0, 0, 0, 0] - }, - "EPRXPRBS3": - { - "EPRX60PRBSENABLE": [0, 0, 0, 0], - "EPRX61PRBSENABLE": [0, 0, 0, 0], - "EPRX62PRBSENABLE": [0, 0, 0, 0], - "EPRX63PRBSENABLE": [0, 0, 0, 0], - "EPRXECPRBSENABLE": [0, 0, 0, 0] - }, - "EPRXTRAIN10": - { - "EPRX0TRAIN": [0, 0, 0, 0], - "EPRX1TRAIN": [0, 0, 0, 0] - }, - "EPRXTRAIN32": - { - "EPRX2TRAIN": [0, 0, 0, 0], - "EPRX3TRAIN": [0, 0, 0, 0] - }, - "EPRXTRAIN54": - { - "EPRX4TRAIN": [0, 0, 0, 0], - "EPRX5TRAIN": [0, 0, 0, 0] - }, - "EPRXTRAINEC6": - { - "EPRX6TRAIN": [0, 0, 0, 0] - }, - "EPTX00CHNCNTR": - { - "EPTX00DRIVESTRENGTH": [3, 0, 0, 0], - "EPTX00PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX00PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX01CHNCNTR": - { - "EPTX01DRIVESTRENGTH": [0, 0, 0, 0], - "EPTX01PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX01PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX01_00CHNCNTR": - { - "EPTX00INVERT": [0, 0, 0, 0], - "EPTX00PREEMPHASISWIDTH": [0, 0, 0, 0], - "EPTX01INVERT": [0, 0, 0, 0], - "EPTX01PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTX02CHNCNTR": - { - "EPTX02DRIVESTRENGTH": [3, 0, 0, 0], - "EPTX02PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX02PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX03CHNCNTR": - { - "EPTX03DRIVESTRENGTH": [0, 0, 0, 0], - "EPTX03PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX03PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX03_02CHNCNTR": - { - "EPTX02INVERT": [0, 0, 0, 0], - "EPTX02PREEMPHASISWIDTH": [0, 0, 0, 0], - "EPTX03INVERT": [0, 0, 0, 0], - "EPTX03PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTX10CHNCNTR": - { - "EPTX10DRIVESTRENGTH": [3, 0, 0, 0], - "EPTX10PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX10PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX10ENABLE": - { - "EPTX00ENABLE": [1, 0, 0, 0], - "EPTX01ENABLE": [0, 0, 0, 0], - "EPTX02ENABLE": [1, 0, 0, 0], - "EPTX03ENABLE": [0, 0, 0, 0], - "EPTX10ENABLE": [1, 0, 0, 0], - "EPTX11ENABLE": [0, 0, 0, 0], - "EPTX12ENABLE": [1, 0, 0, 0], - "EPTX13ENABLE": [0, 0, 0, 0] - }, - "EPTX11CHNCNTR": - { - "EPTX11DRIVESTRENGTH": [0, 0, 0, 0], - "EPTX11PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX11PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX11_10CHNCNTR": - { - "EPTX10INVERT": [0, 0, 0, 0], - "EPTX10PREEMPHASISWIDTH": [0, 0, 0, 0], - "EPTX11INVERT": [0, 0, 0, 0], - "EPTX11PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTX12CHNCNTR": - { - "EPTX12DRIVESTRENGTH": [3, 0, 0, 0], - "EPTX12PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX12PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX13CHNCNTR": - { - "EPTX13DRIVESTRENGTH": [0, 0, 0, 0], - "EPTX13PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX13PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX13_12CHNCNTR": - { - "EPTX12INVERT": [0, 0, 0, 0], - "EPTX12PREEMPHASISWIDTH": [0, 0, 0, 0], - "EPTX13INVERT": [0, 0, 0, 0], - "EPTX13PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTX20CHNCNTR": - { - "EPTX20DRIVESTRENGTH": [3, 0, 0, 0], - "EPTX20PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX20PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX21CHNCNTR": - { - "EPTX21DRIVESTRENGTH": [0, 0, 0, 0], - "EPTX21PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX21PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX21_20CHNCNTR": - { - "EPTX20INVERT": [0, 0, 0, 0], - "EPTX20PREEMPHASISWIDTH": [0, 0, 0, 0], - "EPTX21INVERT": [0, 0, 0, 0], - "EPTX21PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTX22CHNCNTR": - { - "EPTX22DRIVESTRENGTH": [3, 0, 0, 0], - "EPTX22PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX22PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX23CHNCNTR": - { - "EPTX23DRIVESTRENGTH": [0, 0, 0, 0], - "EPTX23PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX23PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX23_22CHNCNTR": - { - "EPTX22INVERT": [0, 0, 0, 0], - "EPTX22PREEMPHASISWIDTH": [0, 0, 0, 0], - "EPTX23INVERT": [0, 0, 0, 0], - "EPTX23PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTX30CHNCNTR": - { - "EPTX30DRIVESTRENGTH": [3, 0, 0, 0], - "EPTX30PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX30PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX31CHNCNTR": - { - "EPTX31DRIVESTRENGTH": [0, 0, 0, 0], - "EPTX31PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX31PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX31_30CHNCNTR": - { - "EPTX30INVERT": [0, 0, 0, 0], - "EPTX30PREEMPHASISWIDTH": [0, 0, 0, 0], - "EPTX31INVERT": [0, 0, 0, 0], - "EPTX31PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTX32CHNCNTR": - { - "EPTX32DRIVESTRENGTH": [3, 0, 0, 0], - "EPTX32PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX32PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX32ENABLE": - { - "EPTX20ENABLE": [1, 0, 0, 0], - "EPTX21ENABLE": [0, 0, 0, 0], - "EPTX22ENABLE": [1, 0, 0, 0], - "EPTX23ENABLE": [0, 0, 0, 0], - "EPTX30ENABLE": [1, 0, 0, 0], - "EPTX31ENABLE": [0, 0, 0, 0], - "EPTX32ENABLE": [1, 0, 0, 0], - "EPTX33ENABLE": [0, 0, 0, 0] - }, - "EPTX33CHNCNTR": - { - "EPTX33DRIVESTRENGTH": [0, 0, 0, 0], - "EPTX33PREEMPHASISMODE": [0, 0, 0, 0], - "EPTX33PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "EPTX33_32CHNCNTR": - { - "EPTX32INVERT": [0, 0, 0, 0], - "EPTX32PREEMPHASISWIDTH": [0, 0, 0, 0], - "EPTX33INVERT": [0, 0, 0, 0], - "EPTX33PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTXCONTROL": - { - "EPTX0MIRRORENABLE": [0, 0, 0, 0], - "EPTX1MIRRORENABLE": [0, 0, 0, 0], - "EPTX2MIRRORENABLE": [0, 0, 0, 0], - "EPTX3MIRRORENABLE": [0, 0, 0, 0] - }, - "EPTXDATARATE": - { - "EPTX0DATARATE": [2, 0, 0, 0], - "EPTX1DATARATE": [2, 0, 0, 0], - "EPTX2DATARATE": [2, 0, 0, 0], - "EPTX3DATARATE": [2, 0, 0, 0] - }, - "EPTXECCHNCNTR": - { - "EPTXECDRIVESTRENGTH": [0, 0, 0, 0], - "EPTXECENABLE": [0, 0, 0, 0], - "EPTXECINVERT": [0, 0, 0, 0], - "EPTXECTRISTATE": [0, 0, 0, 0] - }, - "EPTXECCHNCNTR2": - { - "EPTXECPREEMPHASISMODE": [0, 0, 0, 0], - "EPTXECPREEMPHASISSTRENGTH": [0, 0, 0, 0], - "EPTXECPREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "EPTXLOWRES0": - { - "EPTX00LOWRES": [0, 0, 0, 0], - "EPTX01LOWRES": [0, 0, 0, 0], - "EPTX02LOWRES": [0, 0, 0, 0], - "EPTX03LOWRES": [0, 0, 0, 0], - "EPTX10LOWRES": [0, 0, 0, 0], - "EPTX11LOWRES": [0, 0, 0, 0], - "EPTX12LOWRES": [0, 0, 0, 0], - "EPTX13LOWRES": [0, 0, 0, 0] - }, - "EPTXLOWRES1": - { - "EPTX20LOWRES": [0, 0, 0, 0], - "EPTX21LOWRES": [0, 0, 0, 0], - "EPTX22LOWRES": [0, 0, 0, 0], - "EPTX23LOWRES": [0, 0, 0, 0], - "EPTX30LOWRES": [0, 0, 0, 0], - "EPTX31LOWRES": [0, 0, 0, 0], - "EPTX32LOWRES": [0, 0, 0, 0], - "EPTX33LOWRES": [0, 0, 0, 0] - }, - "EQCONFIG": - { - "EQATTENUATION": [3, 0, 0, 0], - "EQCAP": [0, 0, 0, 0] - }, - "EQRES": - { - "EQRES0": [0, 0, 0, 0], - "EQRES1": [0, 0, 0, 0], - "EQRES2": [0, 0, 0, 0], - "EQRES3": [0, 0, 0, 0] - }, - "FAMAXHEADERFOUNDCOUNT": - { - "FAMAXHEADERFOUNDCOUNT": [16, 0, 0, 0] - }, - "FAMAXHEADERFOUNDCOUNTAFTERNF": - { - "FAMAXHEADERFOUNDCOUNTAFTERNF": [16, 0, 0, 0] - }, - "FAMAXHEADERNOTFOUNDCOUNT": - { - "FAMAXHEADERNOTFOUNDCOUNT": [16, 0, 0, 0] - }, - "FORCEENABLE": - { - "FORCERXENABLE": [0, 0, 0, 0], - "FORCETXENABLE": [0, 0, 0, 0], - "I2CMCLKALWAYSENABLE": [0, 0, 0, 0], - "LDFORCEENABLE": [0, 0, 0, 0], - "PSFSMCLKALWAYSON": [0, 0, 0, 0] - }, - "FUSEBLOWADDH": - { - "FUSEBLOWADDRESS": [0, 0, 0, 0] - }, - "FUSEBLOWADDL": - { - "FUSEBLOWADDRESS": [0, 0, 0, 0] - }, - "FUSEBLOWDATAA": - { - "FUSEBLOWDATA": [0, 0, 0, 0] - }, - "FUSEBLOWDATAB": - { - "FUSEBLOWDATA": [0, 0, 0, 0] - }, - "FUSEBLOWDATAC": - { - "FUSEBLOWDATA": [0, 0, 0, 0] - }, - "FUSEBLOWDATAD": - { - "FUSEBLOWDATA": [0, 0, 0, 0] - }, - "FUSECONTROL": - { - "FUSEBLOW": [0, 0, 0, 0], - "FUSEBLOWPULSELENGTH": [0, 0, 0, 0], - "FUSEREAD": [0, 0, 0, 0] - }, - "FUSEMAGIC": - { - "FUSEMAGICNUMBER": [0, 0, 0, 0] - }, - "I2CM0ADDRESS": - { - "I2CM0ADDRESS": [0, 0, 0, 0] - }, - "I2CM0CMD": - { - "I2CM0CMD": [0, 0, 0, 0] - }, - "I2CM0CONFIG": - { - "I2CM0ADDRESSEXT": [0, 0, 0, 0], - "I2CM0SCLDRIVESTRENGTH": [0, 0, 0, 0], - "I2CM0SCLPULLUPENABLE": [1, 0, 0, 0], - "I2CM0SDADRIVESTRENGTH": [0, 0, 0, 0], - "I2CM0SDAPULLUPENABLE": [1, 0, 0, 0] - }, - "I2CM0DATA0": - { - "I2CM0DATA": [0, 0, 0, 0] - }, - "I2CM0DATA1": - { - "I2CM0DATA": [0, 0, 0, 0] - }, - "I2CM0DATA2": - { - "I2CM0DATA": [0, 0, 0, 0] - }, - "I2CM0DATA3": - { - "I2CM0DATA": [0, 0, 0, 0] - }, - "I2CM1ADDRESS": - { - "I2CM1ADDRESS": [0, 0, 0, 0] - }, - "I2CM1CMD": - { - "I2CM1CMD": [0, 0, 0, 0] - }, - "I2CM1CONFIG": - { - "I2CM1ADDRESSEXT": [0, 0, 0, 0], - "I2CM1SCLDRIVESTRENGTH": [0, 0, 0, 0], - "I2CM1SCLPULLUPENABLE": [1, 0, 0, 0], - "I2CM1SDADRIVESTRENGTH": [0, 0, 0, 0], - "I2CM1SDAPULLUPENABLE": [1, 0, 0, 0] - }, - "I2CM1DATA0": - { - "I2CM1DATA": [0, 0, 0, 0] - }, - "I2CM1DATA1": - { - "I2CM1DATA": [0, 0, 0, 0] - }, - "I2CM1DATA2": - { - "I2CM1DATA": [0, 0, 0, 0] - }, - "I2CM1DATA3": - { - "I2CM1DATA": [0, 0, 0, 0] - }, - "I2CM2ADDRESS": - { - "I2CM2ADDRESS": [0, 0, 0, 0] - }, - "I2CM2CMD": - { - "I2CM2CMD": [0, 0, 0, 0] - }, - "I2CM2CONFIG": - { - "I2CM2ADDRESSEXT": [0, 0, 0, 0], - "I2CM2SCLDRIVESTRENGTH": [1, 0, 0, 0], - "I2CM2SCLPULLUPENABLE": [0, 0, 0, 0], - "I2CM2SDADRIVESTRENGTH": [0, 0, 0, 0], - "I2CM2SDAPULLUPENABLE": [1, 0, 0, 0] - }, - "I2CM2DATA0": - { - "I2CM2DATA": [0, 0, 0, 0] - }, - "I2CM2DATA1": - { - "I2CM2DATA": [0, 0, 0, 0] - }, - "I2CM2DATA2": - { - "I2CM2DATA": [0, 0, 0, 0] - }, - "I2CM2DATA3": - { - "I2CM2DATA": [0, 0, 0, 0] - }, - "I2CMCLKDISABLE": - { - "I2CM0CLKDISABLE": [0, 0, 0, 0], - "I2CM1CLKDISABLE": [0, 0, 0, 0], - "I2CM2CLKDISABLE": [0, 0, 0, 0] - }, - "I2CMTRANSADDRESS": - { - "I2CMTRANSADDRESS": [0, 0, 0, 0] - }, - "I2CMTRANSCONFIG": - { - "I2CMTRANS10BITADDR": [0, 0, 0, 0], - "I2CMTRANSADDRESSEXT": [0, 0, 0, 0], - "I2CMTRANSCHANNEL": [0, 0, 0, 0], - "I2CMTRANSENABLE": [0, 0, 0, 0] - }, - "I2CMTRANSCTRL": - { - "I2CMTRANSCTRL": [0, 0, 0, 0] - }, - "I2CMTRANSDATA0": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA1": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA10": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA11": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA12": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA13": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA14": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA15": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA2": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA3": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA4": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA5": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA6": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA7": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA8": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "I2CMTRANSDATA9": - { - "I2CMTRANSDATA": [0, 0, 0, 0] - }, - "LDCONFIGH": - { - "LDEMPHASISENABLE": [0, 0, 0, 0], - "LDMODULATIONCURRENT": [127, 127, 127, 127] - }, - "LDCONFIGL": - { - "LDEMPHASISAMP": [0, 0, 0, 0], - "LDEMPHASISSHORT": [0, 0, 0, 0] - }, - "PGCONFIG": - { - "PGDELAY": [0, 0, 0, 0], - "PGENABLE": [0, 0, 0, 0], - "PGLEVEL": [0, 0, 0, 0] - }, - "PIODIRH": - { - "PIODIR": [0, 0, 0, 0] - }, - "PIODIRL": - { - "PIODIR": [0, 0, 0, 0] - }, - "PIODRIVESTRENGTHH": - { - "PIODRIVESTRENGTH": [0, 0, 0, 0] - }, - "PIODRIVESTRENGTHL": - { - "PIODRIVESTRENGTH": [0, 0, 0, 0] - }, - "PIOOUTH": - { - "PIOOUT": [0, 0, 0, 0] - }, - "PIOOUTL": - { - "PIOOUT": [0, 0, 0, 0] - }, - "PIOPULLENAH": - { - "PIOPULLENABLE": [0, 0, 0, 0] - }, - "PIOPULLENAL": - { - "PIOPULLENABLE": [0, 0, 0, 0] - }, - "PIOUPDOWNH": - { - "PIOUPDOWN": [0, 0, 0, 0] - }, - "PIOUPDOWNL": - { - "PIOUPDOWN": [0, 0, 0, 0] - }, - "POWERUP0": - { - "PUSMPLLTIMEOUTCONFIG": [0, 0, 0, 0], - "PUSMREADYWHENCHNSLOCKED": [0, 0, 0, 0] - }, - "POWERUP1": - { - "PUSMCHANNELSTIMEOUTCONFIG": [0, 0, 0, 0], - "PUSMDLLTIMEOUTCONFIG": [0, 0, 0, 0] - }, - "POWERUP2": - { - "DLLCONFIGDONE": [1, 1, 1, 1], - "PLLCONFIGDONE": [1, 1, 1, 1] - }, - "POWERUP3": - { - "PUSMFORCESTATE": [0, 0, 0, 0], - "PUSMSTATEFORCED": [0, 0, 0, 0] - }, - "POWERUP4": - { - "PUSMFORCEMAGIC": [0, 0, 0, 0] - }, - "PROCESSANDSEUMONITOR": - { - "PMCHANNEL": [0, 0, 0, 0], - "PMENABLE": [0, 0, 0, 0], - "SEUENABLE": [0, 0, 0, 0] - }, - "PS0CONFIG": - { - "PS0DELAY": [0, 0, 0, 0], - "PS0DRIVESTRENGTH": [0, 0, 0, 0], - "PS0ENABLEFINETUNE": [0, 0, 0, 0], - "PS0FREQ": [0, 0, 0, 0] - }, - "PS0DELAY": - { - "PS0DELAY": [0, 0, 0, 0] - }, - "PS0OUTDRIVER": - { - "PS0PREEMPHASISMODE": [0, 0, 0, 0], - "PS0PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "PS0PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "PS1CONFIG": - { - "PS1DELAY": [0, 0, 0, 0], - "PS1DRIVESTRENGTH": [0, 0, 0, 0], - "PS1ENABLEFINETUNE": [0, 0, 0, 0], - "PS1FREQ": [0, 0, 0, 0] - }, - "PS1DELAY": - { - "PS1DELAY": [0, 0, 0, 0] - }, - "PS1OUTDRIVER": - { - "PS1PREEMPHASISMODE": [0, 0, 0, 0], - "PS1PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "PS1PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "PS2CONFIG": - { - "PS2DELAY": [0, 0, 0, 0], - "PS2DRIVESTRENGTH": [0, 0, 0, 0], - "PS2ENABLEFINETUNE": [0, 0, 0, 0], - "PS2FREQ": [0, 0, 0, 0] - }, - "PS2DELAY": - { - "PS2DELAY": [0, 0, 0, 0] - }, - "PS2OUTDRIVER": - { - "PS2PREEMPHASISMODE": [0, 0, 0, 0], - "PS2PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "PS2PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "PS3CONFIG": - { - "PS3DELAY": [0, 0, 0, 0], - "PS3DRIVESTRENGTH": [0, 0, 0, 0], - "PS3ENABLEFINETUNE": [0, 0, 0, 0], - "PS3FREQ": [0, 0, 0, 0] - }, - "PS3DELAY": - { - "PS3DELAY": [0, 0, 0, 0] - }, - "PS3OUTDRIVER": - { - "PS3PREEMPHASISMODE": [0, 0, 0, 0], - "PS3PREEMPHASISSTRENGTH": [0, 0, 0, 0], - "PS3PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "PSDLLCONFIG": - { - "PSDLLCONFIRMCOUNT": [0, 0, 0, 0], - "PSDLLCURRENTSEL": [0, 0, 0, 0] - }, - "PSLOWRES": - { - "PS0LOWRES": [0, 0, 0, 0], - "PS1LOWRES": [0, 0, 0, 0], - "PS2LOWRES": [0, 0, 0, 0], - "PS3LOWRES": [0, 0, 0, 0] - }, - "READY": - { - "READYCHNSENABLE": [0, 0, 0, 0], - "READYCLKGENABLE": [0, 0, 0, 0], - "READYDLLSENABLE": [0, 0, 0, 0], - "READYPUSMDISABLE": [0, 0, 0, 0] - }, - "REFCLK": - { - "REFCLKACBIAS": [0, 0, 0, 0], - "REFCLKFORCEENABLE": [0, 0, 0, 0], - "REFCLKTERM": [0, 0, 0, 0] - }, - "RESETCONFIG": - { - "BODENABLE": [0, 0, 0, 0], - "BODLEVEL": [0, 0, 0, 0] - }, - "RST0": - { - "RSTCONFIG": [0, 0, 0, 0], - "RSTFUSES": [0, 0, 0, 0], - "RSTI2CM0": [0, 0, 0, 0], - "RSTI2CM1": [0, 0, 0, 0], - "RSTI2CM2": [0, 0, 0, 0], - "RSTPLLDIGITAL": [0, 0, 0, 0], - "RSTRXLOGIC": [0, 0, 0, 0], - "RSTTXLOGIC": [0, 0, 0, 0] - }, - "RST1": - { - "RSTEPRX0DLL": [0, 0, 0, 0], - "RSTEPRX1DLL": [0, 0, 0, 0], - "RSTEPRX2DLL": [0, 0, 0, 0], - "RSTEPRX3DLL": [0, 0, 0, 0], - "RSTEPRX4DLL": [0, 0, 0, 0], - "RSTEPRX5DLL": [0, 0, 0, 0], - "RSTEPRX6DLL": [0, 0, 0, 0], - "RSTFRAMEALIGNER": [0, 0, 0, 0] - }, - "RST2": - { - "RESETOUTFORCEACTIVE": [0, 0, 0, 0], - "RSTPS0DLL": [0, 0, 0, 0], - "RSTPS1DLL": [0, 0, 0, 0], - "RSTPS2DLL": [0, 0, 0, 0], - "RSTPS3DLL": [0, 0, 0, 0], - "SKIPFORCE": [0, 0, 0, 0] - }, - "SCCONFIG": - { - "SCPARITYCHECKDISABLE": [0, 0, 0, 0] - }, - "TEMPCALH": - { - "TEMPCAL": [0, 0, 0, 0] - }, - "TEMPCALL": - { - "TEMPCAL": [0, 0, 0, 0] - }, - "TO0SEL": - { - "TO0SELECT": [0, 0, 0, 0] - }, - "TO1SEL": - { - "TO1SELECT": [0, 0, 0, 0] - }, - "TO2SEL": - { - "TO2SELECT": [0, 0, 0, 0] - }, - "TO3SEL": - { - "TO3SELECT": [0, 0, 0, 0] - }, - "TO4DRIVER": - { - "TO4DRIVESTRENGTH": [0, 0, 0, 0], - "TO4PREEMPHASISMODE": [0, 0, 0, 0], - "TO4PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "TO4SEL": - { - "TO4SELECT": [0, 0, 0, 0] - }, - "TO5DRIVER": - { - "TO5DRIVESTRENGTH": [0, 0, 0, 0], - "TO5PREEMPHASISMODE": [0, 0, 0, 0], - "TO5PREEMPHASISSTRENGTH": [0, 0, 0, 0] - }, - "TO5SEL": - { - "TO5SELECT": [0, 0, 0, 0] - }, - "TODRIVINGSTRENGTH": - { - "TO0DS": [0, 0, 0, 0], - "TO1DS": [0, 0, 0, 0], - "TO2DS": [0, 0, 0, 0], - "TO3DS": [0, 0, 0, 0] - }, - "TOPREEMP": - { - "TO4INVERT": [0, 0, 0, 0], - "TO4PREEMPHASISWIDTH": [0, 0, 0, 0], - "TO5INVERT": [0, 0, 0, 0], - "TO5PREEMPHASISWIDTH": [0, 0, 0, 0] - }, - "ULDATASOURCE0": - { - "ULECDATASOURCE": [0, 0, 0, 0], - "ULSERTESTPATTERN": [0, 0, 0, 0] - }, - "ULDATASOURCE1": - { - "LDDATASOURCE": [0, 0, 0, 0], - "ULG0DATASOURCE": [0, 0, 0, 0], - "ULG1DATASOURCE": [0, 0, 0, 0] - }, - "ULDATASOURCE2": - { - "ULG2DATASOURCE": [0, 0, 0, 0], - "ULG3DATASOURCE": [0, 0, 0, 0] - }, - "ULDATASOURCE3": - { - "ULG4DATASOURCE": [0, 0, 0, 0], - "ULG5DATASOURCE": [0, 0, 0, 0] - }, - "ULDATASOURCE4": - { - "DLECDATASOURCE": [0, 0, 0, 0], - "ULG6DATASOURCE": [0, 0, 0, 0], - "ULICDATASOURCE": [0, 0, 0, 0] - }, - "ULDATASOURCE5": - { - "DLG0DATASOURCE": [0, 0, 0, 0], - "DLG1DATASOURCE": [0, 0, 0, 0], - "DLG2DATASOURCE": [0, 0, 0, 0], - "DLG3DATASOURCE": [0, 0, 0, 0] - }, - "USERID0": - { - "USERID": [0, 0, 0, 0] - }, - "USERID1": - { - "USERID": [0, 0, 0, 0] - }, - "USERID2": - { - "USERID": [0, 0, 0, 0] - }, - "USERID3": - { - "USERID": [0, 0, 0, 0] - }, - "VREFCNTR": - { - "VREFENABLE": [0, 0, 0, 0] - }, - "VREFTUNE": - { - "VREFTUNE": [0, 0, 0, 0] - }, - "WATCHDOG": - { - "PUSMCHECKSUMWDOGENABLE": [0, 0, 0, 0], - "PUSMDLLWDOGDISABLE": [0, 0, 0, 0], - "PUSMPLLWDOGDISABLE": [0, 0, 0, 0] - } - }, - - "gbcr": - { - "CH1DOWNLINK0": - { - "TX1DISDLEMP": [0, 0, 0, 0], - "TX1DLATT": [3, 3, 3, 3], - "TX1DLSR": [5, 5, 5, 5] - }, - "CH1DOWNLINK1": - { - "TX1DISDLBIAS": [0, 0, 0, 0], - "TX1DISDLLPFBIAS": [1, 1, 1, 1] - }, - "CH1UPLINK0": - { - "CH1CMLAMPLSEL": [7, 7, 7, 7], - "CH1DISEQLF": [1, 1, 1, 1], - "CH1EQATT": [3, 3, 3, 3] - }, - "CH1UPLINK1": - { - "CH1CTLEHFSR": [11, 11, 11, 11], - "CH1CTLEMFSR": [11, 11, 11, 11] - }, - "CH1UPLINK2": - { - "CH1DIS": [0, 0, 0, 0], - "CH1DISDFF": [1, 1, 1, 1], - "CH1DISLPF": [0, 0, 0, 0] - }, - "CH2DOWNLINK0": - { - "TX2DISDLEMP": [0, 0, 0, 0], - "TX2DLATT": [3, 3, 3, 3], - "TX2DLSR": [5, 5, 5, 5] - }, - "CH2DOWNLINK1": - { - "TX2DISDLBIAS": [0, 0, 0, 0], - "TX2DISDLLPFBIAS": [1, 1, 1, 1] - }, - "CH2UPLINK0": - { - "CH2CMLAMPLSEL": [7, 7, 7, 7], - "CH2DISEQLF": [1, 1, 1, 1], - "CH2EQATT": [3, 3, 3, 3] - }, - "CH2UPLINK1": - { - "CH2CTLEHFSR": [11, 11, 11, 11], - "CH2CTLEMFSR": [11, 11, 11, 11] - }, - "CH2UPLINK2": - { - "CH2DIS": [0, 0, 0, 0], - "CH2DISDFF": [1, 1, 1, 1], - "CH2DISLPF": [0, 0, 0, 0] - }, - "CH3UPLINK0": - { - "CH3CMLAMPLSEL": [7, 7, 7, 7], - "CH3DISEQLF": [1, 1, 1, 1], - "CH3EQATT": [3, 3, 3, 3] - }, - "CH3UPLINK1": - { - "CH3CTLEHFSR": [11, 11, 11, 11], - "CH3CTLEMFSR": [11, 11, 11, 11] - }, - "CH3UPLINK2": - { - "CH3DIS": [0, 0, 0, 0], - "CH3DISDFF": [1, 1, 1, 1], - "CH3DISLPF": [0, 0, 0, 0] - }, - "CH4UPLINK0": - { - "CH4CMLAMPLSEL": [7, 7, 7, 7], - "CH4DISEQLF": [1, 1, 1, 1], - "CH4EQATT": [3, 3, 3, 3] - }, - "CH4UPLINK1": - { - "CH4CTLEHFSR": [11, 11, 11, 11], - "CH4CTLEMFSR": [11, 11, 11, 11] - }, - "CH4UPLINK2": - { - "CH4DIS": [0, 0, 0, 0], - "CH4DISDFF": [1, 1, 1, 1], - "CH4DISLPF": [0, 0, 0, 0] - }, - "CH5UPLINK0": - { - "CH5CMLAMPLSEL": [7, 7, 7, 7], - "CH5DISEQLF": [1, 1, 1, 1], - "CH5EQATT": [3, 3, 3, 3] - }, - "CH5UPLINK1": - { - "CH5CTLEHFSR": [11, 11, 11, 11], - "CH5CTLEMFSR": [11, 11, 11, 11] - }, - "CH5UPLINK2": - { - "CH5DIS": [0, 0, 0, 0], - "CH5DISDFF": [1, 1, 1, 1], - "CH5DISLPF": [0, 0, 0, 0] - }, - "CH6UPLINK0": - { - "CH6CMLAMPLSEL": [7, 7, 7, 7], - "CH6DISEQLF": [1, 1, 1, 1], - "CH6EQATT": [3, 3, 3, 3] - }, - "CH6UPLINK1": - { - "CH6CTLEHFSR": [11, 11, 11, 11], - "CH6CTLEMFSR": [11, 11, 11, 11] - }, - "CH6UPLINK2": - { - "CH6DIS": [0, 0, 0, 0], - "CH6DISDFF": [1, 1, 1, 1], - "CH6DISLPF": [0, 0, 0, 0] - }, - "CH7UPLINK0": - { - "CH7CMLAMPLSEL": [7, 7, 7, 7], - "CH7DISEQLF": [1, 1, 1, 1], - "CH7EQATT": [3, 3, 3, 3] - }, - "CH7UPLINK1": - { - "CH7CTLEHFSR": [11, 11, 11, 11], - "CH7CTLEMFSR": [11, 11, 11, 11] - }, - "CH7UPLINK2": - { - "CH7DIS": [0, 0, 0, 0], - "CH7DISDFF": [1, 1, 1, 1], - "CH7DISLPF": [0, 0, 0, 0] - }, - "LVDSRXTX": - { - "DISTX": [0, 0, 0, 0], - "RXEN": [1, 1, 1, 1], - "RXENTERMINATION": [1, 1, 1, 1], - "RXEQ": [0, 0, 0, 0], - "RXINVDATA": [0, 0, 0, 0], - "RXSETCM": [1, 1, 1, 1] - }, - "PHASESHIFTER0": - { - "DLLCAPRESET": [0, 0, 0, 0], - "DLLENABLE": [1, 1, 1, 1] - }, - "PHASESHIFTER1": - { - "DLLCHARGEPUMPCURRENT": [15, 15, 15, 15], - "DLLFORCEDOWN": [1, 1, 1, 1] - }, - "PHASESHIFTER2": - { - "DLLCLOCKDELAYCH6": [5, 5, 5, 5], - "DLLCLOCKDELAYCH7": [5, 5, 5, 5] - }, - "PHASESHIFTER3": - { - "DLLCLOCKDELAYCH4": [5, 5, 5, 5], - "DLLCLOCKDELAYCH5": [5, 5, 5, 5] - }, - "PHASESHIFTER4": - { - "DLLCLOCKDELAYCH6": [5, 5, 5, 5], - "DLLCLOCKDELAYCH7": [5, 5, 5, 5] - }, - "PHASESHIFTER5": - { - "DLLCLOCKDELAYCH1": [5, 5, 5, 5], - "DLLCLOCKDELAYCHTEST": [5, 5, 5, 5] - } - }, - - "vtrx": - { - "C0BC": - { - "C0BiasCur": 47 - }, - "C0CR": - { - "C0BEN": 1, - "C0CEN": 1, - "C0FEP": 0, - "C0LAEN": 1, - "C0MEN": 1, - "C0REP": 0 - }, - "C0EA": - { - "C0EmpAmp": 0 - }, - "C0MC": - { - "C0ModCur": 38 - }, - "C1BC": - { - "C1BiasCur": 47 - }, - "C1CR": - { - "C1BEN": 1, - "C1CEN": 1, - "C1FEP": 0, - "C1LAEN": 1, - "C1MEN": 1, - "C1REP": 0 - }, - "C1EA": - { - "C1EmpAmp": 0 - }, - "C1MC": - { - "C1ModCur": 38 - }, - "C2BC": - { - "C2BiasCur": 47 - }, - "C2CR": - { - "C2BEN": 1, - "C2CEN": 1, - "C2FEP": 0, - "C2LAEN": 1, - "C2MEN": 1, - "C2REP": 0 - }, - "C2EA": - { - "C2EmpAmp": 0 - }, - "C2MC": - { - "C2ModCur": 38 - }, - "C3BC": - { - "C3BiasCur": 47 - }, - "C3CR": - { - "C3BEN": 1, - "C3CEN": 1, - "C3FEP": 0, - "C3LAEN": 1, - "C3MEN": 1, - "C3REP": 0 - }, - "C3EA": - { - "C3EmpAmp": 0 - }, - "C3MC": - { - "C3ModCur": 38 - }, - "CCNF": - { - "CEA": 1, - "CEB": 1, - "CEC": 1, - "CSEN": 0 - }, - "CSE": - { - "ClkSpyEna": 0 - }, - "GCR": - { - "GBEN": 1, - "GCEN": 1, - "GLAEN": 1, - "GMEN": 1, - "GPEN": 1 - }, - "ODC": - { - "DS": 1 - } - } -} \ No newline at end of file diff --git a/ui/src/Config/Configurations.js b/ui/src/Config/Configurations.js new file mode 100644 index 0000000000000000000000000000000000000000..4f07d364778a767e061aaef4494588f07c8c6d0d --- /dev/null +++ b/ui/src/Config/Configurations.js @@ -0,0 +1,122 @@ +const defaultConfig = "SR1"; + +const Configurations = { + Basic: [ + { + serialNumber: "30000000", + Position: "OB0", + vtrxVersion: "1.3", + flx_G: "0", + flx_d: "0", + withoutFelixcore: false, + ConfigurationPath: + "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + inDBCheckBox: false, + ConfigurationDB: "http://localhost:5000", + debugCheckBox: false, + testmode: false, + }, + ], + SR1: [ + { + serialNumber: "00000000", + Position: "OB0", + vtrxVersion: "1.3", + flx_G: "0", + flx_d: "0", + withoutFelixcore: false, + ConfigurationPath: + "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + inDBCheckBox: false, + ConfigurationDB: "http://localhost:5000", + debugCheckBox: false, + testmode: false, + }, + { + serialNumber: "00000000", + Position: "OB1", + vtrxVersion: "1.3", + flx_G: "0", + flx_d: "0", + withoutFelixcore: false, + ConfigurationPath: + "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + inDBCheckBox: false, + ConfigurationDB: "http://localhost:5000", + debugCheckBox: false, + testmode: false, + }, + { + serialNumber: "00000000", + Position: "OB2", + vtrxVersion: "1.3", + flx_G: "0", + flx_d: "0", + withoutFelixcore: false, + ConfigurationPath: + "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + inDBCheckBox: false, + ConfigurationDB: "http://localhost:5000", + debugCheckBox: false, + testmode: false, + }, + { + serialNumber: "00000000", + Position: "OB3", + vtrxVersion: "1.3", + flx_G: "0", + flx_d: "0", + withoutFelixcore: false, + ConfigurationPath: + "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + inDBCheckBox: false, + ConfigurationDB: "http://localhost:5000", + debugCheckBox: false, + testmode: false, + }, + { + serialNumber: "00000000", + Position: "OB4", + vtrxVersion: "1.3", + flx_G: "0", + flx_d: "0", + withoutFelixcore: false, + ConfigurationPath: + "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + inDBCheckBox: false, + ConfigurationDB: "http://localhost:5000", + debugCheckBox: false, + testmode: false, + }, + { + serialNumber: "00000000", + Position: "OB5", + vtrxVersion: "1.3", + flx_G: "0", + flx_d: "0", + withoutFelixcore: false, + ConfigurationPath: + "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + inDBCheckBox: false, + ConfigurationDB: "http://localhost:5000", + debugCheckBox: false, + testmode: false, + }, + { + serialNumber: "00000000", + Position: "OB6", + vtrxVersion: "1.3", + flx_G: "0", + flx_d: "0", + withoutFelixcore: false, + ConfigurationPath: + "/itk_demo_optoboard/optoboard_felix/configs/optoboard_lpgbtv1_gbcr2_vtrxv1_3_default.json", + inDBCheckBox: false, + ConfigurationDB: "http://localhost:5000", + debugCheckBox: false, + testmode: false, + }, + ], +}; + +export { defaultConfig, Configurations }; diff --git a/ui/src/Config/Registers.js b/ui/src/Config/Registers.js new file mode 100644 index 0000000000000000000000000000000000000000..351fb7db934db12b389e0dba765843079fc37d92 --- /dev/null +++ b/ui/src/Config/Registers.js @@ -0,0 +1,625 @@ +const lpgbtv0Write = {}; + +const lpgbtv1Write = { + EPRXDLLCONFIG: { + values: [0, 255], + subregisters: [ + { EPRXDLLCURRENT: [0, 3] }, + { EPRXDLLCONFIRMCOUNT: [0, 3] }, + { EPRXDLLFSMCLKALWAYSON: [0, 1] }, + { EPRXDLLCOARSELOCKDETECTION: [0, 1] }, + { EPRXENABLEREINIT: [0, 1] }, + { EPRXDATAGATINGDISABLE: [0, 1] }, + ], + }, + LDCONFIGH: { + values: [0, 255], + subregisters: [ + { LDEMPHASISENABLE: [0, 1] }, + { LDMODULATIONCURRENT: [0, 127] }, + ], + }, + EPRX0CONTROL: { + values: [0, 255], + subregisters: [ + { EPRX03ENABLE: [0, 1] }, + { EPRX02ENABLE: [0, 1] }, + { EPRX01ENABLE: [0, 1] }, + { EPRX00ENABLE: [0, 1] }, + { EPRX0DATARATE: [0, 3] }, + { EPRX0TRACKMODE: [0, 3] }, + ], + }, + EPRX00CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPRX00PHASESELECT: [0, 15] }, + { EPRX00INVERT: [0, 1] }, + { EPRX00ACBIAS: [0, 1] }, + { EPRX00TERM: [0, 1] }, + { EPRX00EQ: [0, 1] }, + ], + }, + EPRX1CONTROL: { + values: [0, 255], + subregisters: [ + { EPRX13ENABLE: [0, 1] }, + { EPRX12ENABLE: [0, 1] }, + { EPRX11ENABLE: [0, 1] }, + { EPRX10ENABLE: [0, 1] }, + { EPRX1DATARATE: [0, 3] }, + { EPRX1TRACKMODE: [0, 3] }, + ], + }, + EPRX10CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPRX10PHASESELECT: [0, 15] }, + { EPRX10INVERT: [0, 1] }, + { EPRX10ACBIAS: [0, 1] }, + { EPRX10TERM: [0, 1] }, + { EPRX10EQ: [0, 1] }, + ], + }, + EPRX2CONTROL: { + values: [0, 255], + subregisters: [ + { EPRX23ENABLE: [0, 1] }, + { EPRX22ENABLE: [0, 1] }, + { EPRX21ENABLE: [0, 1] }, + { EPRX20ENABLE: [0, 1] }, + { EPRX2DATARATE: [0, 3] }, + { EPRX2TRACKMODE: [0, 3] }, + ], + }, + EPRX20CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPRX20PHASESELECT: [0, 15] }, + { EPRX20INVERT: [0, 1] }, + { EPRX20ACBIAS: [0, 1] }, + { EPRX20TERM: [0, 1] }, + { EPRX20EQ: [0, 1] }, + ], + }, + EPRX3CONTROL: { + values: [0, 255], + subregisters: [ + { EPRX33ENABLE: [0, 1] }, + { EPRX32ENABLE: [0, 1] }, + { EPRX31ENABLE: [0, 1] }, + { EPRX30ENABLE: [0, 1] }, + { EPRX3DATARATE: [0, 3] }, + { EPRX3TRACKMODE: [0, 3] }, + ], + }, + EPRX30CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPRX30PHASESELECT: [0, 15] }, + { EPRX30INVERT: [0, 1] }, + { EPRX30ACBIAS: [0, 1] }, + { EPRX30TERM: [0, 1] }, + { EPRX30EQ: [0, 1] }, + ], + }, + EPRX4CONTROL: { + values: [0, 255], + subregisters: [ + { EPRX43ENABLE: [0, 1] }, + { EPRX42ENABLE: [0, 1] }, + { EPRX41ENABLE: [0, 1] }, + { EPRX40ENABLE: [0, 1] }, + { EPRX4DATARATE: [0, 3] }, + { EPRX4TRACKMODE: [0, 3] }, + ], + }, + EPRX40CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPRX40PHASESELECT: [0, 15] }, + { EPRX40INVERT: [0, 1] }, + { EPRX40ACBIAS: [0, 1] }, + { EPRX40TERM: [0, 1] }, + { EPRX40EQ: [0, 1] }, + ], + }, + EPRX5CONTROL: { + values: [0, 255], + subregisters: [ + { EPRX53ENABLE: [0, 1] }, + { EPRX52ENABLE: [0, 1] }, + { EPRX51ENABLE: [0, 1] }, + { EPRX50ENABLE: [0, 1] }, + { EPRX5DATARATE: [0, 3] }, + { EPRX5TRACKMODE: [0, 3] }, + ], + }, + EPRX50CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPRX50PHASESELECT: [0, 15] }, + { EPRX50INVERT: [0, 1] }, + { EPRX50ACBIAS: [0, 1] }, + { EPRX50TERM: [0, 1] }, + { EPRX50EQ: [0, 1] }, + ], + }, + EPTXDATARATE: { + values: [0, 255], + subregisters: [ + { EPTX0DATARATE: [0, 3] }, + { EPTX1DATARATE: [0, 3] }, + { EPTX2DATARATE: [0, 3] }, + { EPTX3DATARATE: [0, 3] }, + ], + }, + EPTX10ENABLE: { + values: [0, 255], + subregisters: [ + { EPTX13ENABLE: [0, 1] }, + { EPTX12ENABLE: [0, 1] }, + { EPTX11ENABLE: [0, 1] }, + { EPTX10ENABLE: [0, 1] }, + { EPTX03ENABLE: [0, 1] }, + { EPTX02ENABLE: [0, 1] }, + { EPTX01ENABLE: [0, 1] }, + { EPTX00ENABLE: [0, 1] }, + ], + }, + EPTX32ENABLE: { + values: [0, 255], + subregisters: [ + { EPTX33ENABLE: [0, 1] }, + { EPTX32ENABLE: [0, 1] }, + { EPTX31ENABLE: [0, 1] }, + { EPTX30ENABLE: [0, 1] }, + { EPTX23ENABLE: [0, 1] }, + { EPTX22ENABLE: [0, 1] }, + { EPTX21ENABLE: [0, 1] }, + { EPTX20ENABLE: [0, 1] }, + ], + }, + EPTX00CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPTX00PREEMPHASISSTRENGTH: [0, 7] }, + { EPTX00PREEMPHASISMODE: [0, 3] }, + { EPTX00DRIVESTRENGTH: [0, 7] }, + ], + }, + EPTX01_00CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPTX01INVERT: [0, 1] }, + { EPTX01PREEMPHASISWIDTH: [0, 7] }, + { EPTX00INVERT: [0, 1] }, + { EPTX00PREEMPHASISWIDTH: [0, 7] }, + ], + }, + EPTX02CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPTX02PREEMPHASISSTRENGTH: [0, 7] }, + { EPTX02PREEMPHASISMODE: [0, 3] }, + { EPTX02DRIVESTRENGTH: [0, 7] }, + ], + }, + EPTX03_02CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPTX03INVERT: [0, 1] }, + { EPTX03PREEMPHASISWIDTH: [0, 7] }, + { EPTX02INVERT: [0, 1] }, + { EPTX02PREEMPHASISWIDTH: [0, 7] }, + ], + }, + EPTX10CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPTX10PREEMPHASISSTRENGTH: [0, 7] }, + { EPTX10PREEMPHASISMODE: [0, 3] }, + { EPTX10DRIVESTRENGTH: [0, 7] }, + ], + }, + EPTX11_10CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPTX11INVERT: [0, 1] }, + { EPTX11PREEMPHASISWIDTH: [0, 7] }, + { EPTX10INVERT: [0, 1] }, + { EPTX10PREEMPHASISWIDTH: [0, 7] }, + ], + }, + EPTX12CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPTX12PREEMPHASISSTRENGTH: [0, 7] }, + { EPTX12PREEMPHASISMODE: [0, 3] }, + { EPTX12DRIVESTRENGTH: [0, 7] }, + ], + }, + EPTX13_12CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPTX13INVERT: [0, 1] }, + { EPTX13PREEMPHASISWIDTH: [0, 7] }, + { EPTX12INVERT: [0, 1] }, + { EPTX12PREEMPHASISWIDTH: [0, 7] }, + ], + }, + EPTX20CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPTX20PREEMPHASISSTRENGTH: [0, 7] }, + { EPTX20PREEMPHASISMODE: [0, 3] }, + { EPTX20DRIVESTRENGTH: [0, 7] }, + ], + }, + EPTX21_20CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPTX21INVERT: [0, 1] }, + { EPTX21PREEMPHASISWIDTH: [0, 7] }, + { EPTX20INVERT: [0, 1] }, + { EPTX20PREEMPHASISWIDTH: [0, 7] }, + ], + }, + EPTX22CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPTX22PREEMPHASISSTRENGTH: [0, 7] }, + { EPTX22PREEMPHASISMODE: [0, 3] }, + { EPTX22DRIVESTRENGTH: [0, 7] }, + ], + }, + EPTX23_22CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPTX23INVERT: [0, 1] }, + { EPTX23PREEMPHASISWIDTH: [0, 7] }, + { EPTX22INVERT: [0, 1] }, + { EPTX22PREEMPHASISWIDTH: [0, 7] }, + ], + }, + EPTX30CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPTX30PREEMPHASISSTRENGTH: [0, 7] }, + { EPTX30PREEMPHASISMODE: [0, 3] }, + { EPTX30DRIVESTRENGTH: [0, 7] }, + ], + }, + EPTX31_30CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPTX31INVERT: [0, 1] }, + { EPTX31PREEMPHASISWIDTH: [0, 7] }, + { EPTX30INVERT: [0, 1] }, + { EPTX30PREEMPHASISWIDTH: [0, 7] }, + ], + }, + EPTX32CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPTX32PREEMPHASISSTRENGTH: [0, 7] }, + { EPTX32PREEMPHASISMODE: [0, 3] }, + { EPTX32DRIVESTRENGTH: [0, 7] }, + ], + }, + EPTX33_32CHNCNTR: { + values: [0, 255], + subregisters: [ + { EPTX33INVERT: [0, 1] }, + { EPTX33PREEMPHASISWIDTH: [0, 7] }, + { EPTX32INVERT: [0, 1] }, + { EPTX32PREEMPHASISWIDTH: [0, 7] }, + ], + }, +}; + +const lpgbtv0Read = { + ...lpgbtv0Write, + ...{ + ROM: { + values: [], + subregisters: [{ ROMREG: [] }], + }, + }, +}; + +const lpgbtv1Read = { + ...lpgbtv1Write, + ...{ + ROM: { + values: [], + subregisters: [{ ROMREG: [] }], + }, + }, +}; + +const gbcrv2 = { + CH1UPLINK0: { + values: [0, 63], + subregisters: [ + { CH1DISEQLF: [0, 1] }, + { CH1EQATT: [0, 3] }, + { CH1CMLAMPLSEL: [0, 7] }, + ], + }, + CH1UPLINK1: { + values: [0, 255], + subregisters: [{ CH1CTLEHFSR: [0, 15] }, { CH1CTLEHFSR: [0, 15] }], + }, + CH1UPLINK2: { + values: [0, 7], + subregisters: [ + { CH1DIS: [0, 1] }, + { CH1DISDFF: [0, 1] }, + { CH1DISLPF: [0, 1] }, + ], + }, + CH2UPLINK0: { + values: [0, 63], + subregisters: [ + { CH2DISEQLF: [0, 1] }, + { CH2EQATT: [0, 3] }, + { CH2CMLAMPLSEL: [0, 7] }, + ], + }, + CH2UPLINK1: { + values: [0, 255], + subregisters: [{ CH2CTLEHFSR: [0, 15] }, { CH2CTLEHFSR: [0, 15] }], + }, + CH2UPLINK2: { + values: [0, 7], + subregisters: [ + { CH2DIS: [0, 1] }, + { CH2DISDFF: [0, 1] }, + { CH2DISLPF: [0, 1] }, + ], + }, + CH3UPLINK0: { + values: [0, 63], + subregisters: [ + { CH3DISEQLF: [0, 1] }, + { CH3EQATT: [0, 3] }, + { CH3CMLAMPLSEL: [0, 7] }, + ], + }, + CH3UPLINK1: { + values: [0, 255], + subregisters: [{ CH3CTLEHFSR: [0, 15] }, { CH3CTLEHFSR: [0, 15] }], + }, + CH3UPLINK2: { + values: [0, 7], + subregisters: [ + { CH3DIS: [0, 1] }, + { CH3DISDFF: [0, 1] }, + { CH3DISLPF: [0, 1] }, + ], + }, + CH4UPLINK0: { + values: [0, 63], + subregisters: [ + { CH4DISEQLF: [0, 1] }, + { CH4EQATT: [0, 3] }, + { CH4CMLAMPLSEL: [0, 7] }, + ], + }, + CH4UPLINK1: { + values: [0, 255], + subregisters: [{ CH4CTLEHFSR: [0, 15] }, { CH4CTLEHFSR: [0, 15] }], + }, + CH4UPLINK2: { + values: [0, 7], + subregisters: [ + { CH4DIS: [0, 1] }, + { CH4DISDFF: [0, 1] }, + { CH4DISLPF: [0, 1] }, + ], + }, + CH5UPLINK0: { + values: [0, 63], + subregisters: [ + { CH5DISEQLF: [0, 1] }, + { CH5EQATT: [0, 3] }, + { CH5CMLAMPLSEL: [0, 7] }, + ], + }, + CH5UPLINK1: { + values: [0, 255], + subregisters: [{ CH5CTLEHFSR: [0, 15] }, { CH5CTLEHFSR: [0, 15] }], + }, + CH5UPLINK2: { + values: [0, 7], + subregisters: [ + { CH5DIS: [0, 1] }, + { CH5DISDFF: [0, 1] }, + { CH5DISLPF: [0, 1] }, + ], + }, + CH6UPLINK0: { + values: [0, 63], + subregisters: [ + { CH6DISEQLF: [0, 1] }, + { CH6EQATT: [0, 3] }, + { CH6CMLAMPLSEL: [0, 7] }, + ], + }, + CH6UPLINK1: { + values: [0, 255], + subregisters: [{ CH6CTLEHFSR: [0, 15] }, { CH6CTLEHFSR: [0, 15] }], + }, + CH6UPLINK2: { + values: [0, 7], + subregisters: [ + { CH6DIS: [0, 1] }, + { CH6DISDFF: [0, 1] }, + { CH6DISLPF: [0, 1] }, + ], + }, + CH7UPLINK0: { + values: [0, 63], + subregisters: [ + { CH7DISEQLF: [0, 1] }, + { CH7EQATT: [0, 3] }, + { CH7CMLAMPLSEL: [0, 7] }, + ], + }, + CH7UPLINK1: { + values: [0, 255], + subregisters: [{ CH7CTLEHFSR: [0, 15] }, { CH7CTLEHFSR: [0, 15] }], + }, + CH7UPLINK2: { + values: [0, 7], + subregisters: [ + { CH7DIS: [0, 1] }, + { CH7DISDFF: [0, 1] }, + { CH7DISLPF: [0, 1] }, + ], + }, + CH1DOWNLINK0: { + values: [0, 63], + subregisters: [ + { TX1DLATT: [0, 3] }, + { TX1DISDLEMP: [0, 1] }, + { TX1DLSR: [0, 7] }, + ], + }, + CH1DOWNLINK1: { + values: [0, 3], + subregisters: [{ TX1DISDLBIAS: [0, 1] }, { TX1DISDLLPFBIAS: [0, 1] }], + }, + CH2DOWNLINK0: { + values: [0, 63], + subregisters: [ + { TX2DLATT: [0, 3] }, + { TX2DISDLEMP: [0, 1] }, + { TX2DLSR: [0, 7] }, + ], + }, + CH2DOWNLINK1: { + values: [0, 3], + subregisters: [{ TX2DISDLBIAS: [0, 1] }, { TX2DISDLLPFBIAS: [0, 1] }], + }, + PHASESHIFTER0: { + values: [0, 3], + subregisters: [{ DLLENABLE: [0, 1] }, { DLLCAPRESET: [0, 1] }], + }, + PHASESHIFTER1: { + values: [0, 31], + subregisters: [{ DLLFORCEDOWN: [0, 1] }, { DLLCHARGEPUMPCURRENT: [0, 15] }], + }, + PHASESHIFTER2: { + values: [0, 255], + subregisters: [ + { DLLCLOCKDELAYCH7: [0, 15] }, + { DLLCLOCKDELAYCH6: [0, 15] }, + ], + }, + PHASESHIFTER3: { + values: [0, 255], + subregisters: [ + { DLLCLOCKDELAYCH5: [0, 15] }, + { DLLCLOCKDELAYCH4: [0, 15] }, + ], + }, + PHASESHIFTER4: { + values: [0, 255], + subregisters: [ + { DLLCLOCKDELAYCH3: [0, 15] }, + { DLLCLOCKDELAYCH2: [0, 15] }, + ], + }, + PHASESHIFTER5: { + values: [0, 255], + subregisters: [ + { DLLCLOCKDELAYCH1: [0, 15] }, + { DLLCLOCKDELAYCHTEST: [0, 15] }, + ], + }, + LVDSRXTX: { + values: [0, 127], + subregisters: [ + { RXEN: [0, 1] }, + { RXSETCM: [0, 1] }, + { RXENTERMINATION: [0, 1] }, + { RXINVDATA: [0, 1] }, + { RXEQ: [0, 3] }, + { DISTX: [0, 1] }, + ], + }, +}; + +const gbcrv3 = {}; + +const vtrxv12 = { + C0CR: { + subregisters: [ + { C0FEP: [0, 1] }, + { C0REP: [0, 1] }, + { C0MEN: [0, 1] }, + { C0BEN: [0, 1] }, + { C0LAEN: [0, 1] }, + { C0CEN: [0, 1] }, + ], + values: [0, 63], + }, + C1CR: { + subregisters: [ + { C1FEP: [0, 1] }, + { C1REP: [0, 1] }, + { C1MEN: [0, 1] }, + { C1BEN: [0, 1] }, + { C1LAEN: [0, 1] }, + { C1CEN: [0, 1] }, + ], + values: [0, 63], + }, + C2CR: { + subregisters: [ + { C2FEP: [0, 1] }, + { C2REP: [0, 1] }, + { C2MEN: [0, 1] }, + { C2BEN: [0, 1] }, + { C2LAEN: [0, 1] }, + { C2CEN: [0, 1] }, + ], + values: [0, 63], + }, + C3CR: { + subregisters: [ + { C3FEP: [0, 1] }, + { C3REP: [0, 1] }, + { C3MEN: [0, 1] }, + { C3BEN: [0, 1] }, + { C3LAEN: [0, 1] }, + { C3CEN: [0, 1] }, + ], + values: [0, 63], + }, +}; + +const vtrxv13 = { + GCR: { + subregisters: [ + { CH1EN: [0, 1] }, + { CH2EN: [0, 1] }, + { CH3EN: [0, 1] }, + { CH4EN: [0, 1] }, + ], + values: [0, 15], + }, +}; + +export const Registers = { + lpgbtv0Write: lpgbtv0Write, + lpgbtv1Write: lpgbtv1Write, + lpgbtv0Read: lpgbtv0Read, + lpgbtv1Read: lpgbtv1Read, + gbcrv2: gbcrv2, + gbcrv3: gbcrv3, + vtrxv12: vtrxv12, + vtrxv13: vtrxv13, +}; diff --git a/ui/src/Controls/Config.js b/ui/src/Controls/Config.js deleted file mode 100644 index 6b08986aa103c03f4c3096ccc01e064fee414723..0000000000000000000000000000000000000000 --- a/ui/src/Controls/Config.js +++ /dev/null @@ -1,147 +0,0 @@ -import React, { useState, useEffect } from "react"; -import { - Button, - PanelMainBody, - PanelMain, - Panel, - Bullseye, - Flex, - FlexItem, - Checkbox, - Switch -} from "@patternfly/react-core"; -import { getPostBody, checkResponse } from '../utils/utility-functions' - -function Config(){ - const [isLoading, setisLoading] = useState(false); - const [switchState, setswitchState] = useState(false); - const [CheckBox_lpgbt1, toggleBox_lpgbt1] = useState(true); - const [CheckBox_lpgbt2, toggleBox_lpgbt2] = useState(true); - const [CheckBox_lpgbt3, toggleBox_lpgbt3] = useState(true); - const [CheckBox_lpgbt4, toggleBox_lpgbt4] = useState(true); - const [CheckBox_gbcr1, toggleBox_gbcr1] = useState(true); - const [CheckBox_gbcr2, toggleBox_gbcr2] = useState(true); - const [CheckBox_gbcr3, toggleBox_gbcr3] = useState(true); - const [CheckBox_gbcr4, toggleBox_gbcr4] = useState(true); - - const configure = () => { - console.log("Starting configuration of the Optoboard!") - let body={} - if (switchState) { - body = { - activeLpgbt: (this.state.CheckBox_lpgbt1 ? "1":"0") + (this.state.CheckBox_lpgbt2 ? "1":"0") + (this.state.CheckBox_lpgbt3 ? "1":"0") + (this.state.CheckBox_lpgbt4 ? "1":"0"), - activeGbcr: (this.state.CheckBox_gbcr1 ? "1":"0") + (this.state.CheckBox_gbcr2 ? "1":"0") + (this.state.CheckBox_gbcr3 ? "1":"0") + (this.state.CheckBox_gbcr4 ? "1":"0"), - } - } else { - body = { - activeLpgbt: "None", - activeGbcr: "None", - } - }; - setisLoading(true); - console.log(body); - - fetch(`${this.props.backendUrl}/configure`, getPostBody(body)).then( - (response) => checkResponse(response)).then((data) => {console.log(data); setisLoading(false);}); - //if (data == "Optoboard configuration completed") { EnableI2C(); DataSet(this.state.pathToJson, this.state.vtrxVersionValue, this.state.inDBCheckBox) }; - //});.catch(err => {this.setState({isLoading: false});}); - - - }; - const stringLPGBT = (switchState) ? <h4>lpgbt to configure</h4> : <h4 style={{color:"grey"}}>lpgbt to configure</h4> - const stringGBCR = (switchState) ? <h4> gbcr to configure</h4> : <h4 style={{color:"grey"}}> gbcr to configure</h4> - - useEffect(() => { - const stringLPGBT = (switchState) ? <h4>lpgbt to configure</h4> : <h4 style={{color:"grey"}}>lpgbt to configure</h4> - const stringGBCR = (switchState) ? <h4> gbcr to configure</h4> : <h4 style={{color:"grey"}}> gbcr to configure</h4> - } - ); - - return( - <React.Fragment> - - <Flex direction={{ default: 'column' }}> - <Panel variant="raised"> - <PanelMain> - <PanelMainBody> - - - <Bullseye> - <Button - spinnerAriaValueText={isLoading ? 'Loading' : undefined} - isLoading={isLoading} - id="readCharacteristics" - variant={"primary"} - onClick={(event) => { - configure(); - }} - > - {isLoading ? "Configuring..." : "Configure Optoboard" } - </Button> - </Bullseye> - - <Bullseye> - <Flex> - <FlexItem> - <Bullseye> - <h3>Manual selection</h3> - </Bullseye> - </FlexItem> - <FlexItem> - <Switch - id="no-label-switch-off" - aria-label="Message when on" - //labelOff="Message when off" - isChecked={switchState} - onChange={() => setswitchState(!switchState)} - //isReversed - /> - </FlexItem> - </Flex> - </Bullseye> - - <Bullseye> - <Flex> - <FlexItem> - {stringLPGBT} - </FlexItem> - <FlexItem> - <Bullseye> - <Checkbox label={""} isChecked={CheckBox_lpgbt1} onChange={() => {toggleBox_lpgbt1(!CheckBox_lpgbt1)}} id={"lpgbt_config_1"} name={"lpgbt_config_1"} isDisabled={!switchState}/> - <Checkbox label={""} isChecked={CheckBox_lpgbt2} onChange={() => {toggleBox_lpgbt2(!CheckBox_lpgbt2)}} id={"lpgbt_config_2"} name={"lpgbt_config_2"} isDisabled={!switchState}/> - <Checkbox label={""} isChecked={CheckBox_lpgbt3} onChange={() => toggleBox_lpgbt3(!CheckBox_lpgbt3)} id={"lpgbt_config_3"} name={"lpgbt_config_3"} isDisabled={!switchState}/> - <Checkbox label={""} isChecked={CheckBox_lpgbt4} onChange={() => toggleBox_lpgbt4(!CheckBox_lpgbt4)} id={"lpgbt_config_4"} name={"lpgbt_config_4"} isDisabled={!switchState}/> - </Bullseye> - </FlexItem> - </Flex> - </Bullseye> - - <Bullseye> - <Flex> - <FlexItem > - {stringGBCR} - </FlexItem> - <FlexItem> - <Bullseye> - <Checkbox label={""} isChecked={CheckBox_gbcr1} onChange={() => toggleBox_gbcr1(!CheckBox_gbcr1)} id={"gbcr_config_1"} name={"gbcr_config_1"} isDisabled={!switchState}/> - <Checkbox label={""} isChecked={CheckBox_gbcr2} onChange={() => toggleBox_gbcr2(!CheckBox_gbcr2)} id={"gbcr_config_2"} name={"gbcr_config_2"} isDisabled={!switchState}/> - <Checkbox label={""} isChecked={CheckBox_gbcr3} onChange={() => toggleBox_gbcr3(!CheckBox_gbcr3)} id={"gbcr_config_3"} name={"gbcr_config_3"} isDisabled={!switchState}/> - <Checkbox label={""} isChecked={CheckBox_gbcr4} onChange={() => toggleBox_gbcr4(!CheckBox_gbcr4)} id={"gbcr_config_4"} name={"gbcr_config_4"} isDisabled={!switchState}/> - </Bullseye> - </FlexItem> - </Flex> - </Bullseye> - - </PanelMainBody> - </PanelMain> - </Panel> - </Flex> - - </React.Fragment> - ) -} - - - - -export {Config}; \ No newline at end of file diff --git a/ui/src/Controls/Diagnosis.js b/ui/src/Controls/Diagnosis.js deleted file mode 100644 index d8b1e38e6fa36b27c513533d50450ca23dd93cdc..0000000000000000000000000000000000000000 --- a/ui/src/Controls/Diagnosis.js +++ /dev/null @@ -1,442 +0,0 @@ -import React from "react"; -import { - Button, - Checkbox, - InputGroup, - InputGroupText, - Dropdown, - DropdownToggle, - DropdownItem, - FormSelect, - FormSelectOption, - FormSelectOptionGroup, - Text, - TextInput, - TextContent, - TextVariants, - Form, - FormGroup, - PanelMainBody, - PanelMain, - Panel, - PanelHeader, - SidebarContent, - Sidebar, - Flex, - FlexItem, - Grid, - GridItem, - Bullseye, - Tooltip, -} from "@patternfly/react-core"; - -import { getPostBody, checkResponse } from '../utils/utility-functions' -import { FormSelectInputNewer } from "../Widgets/FormSelectInput"; - - -class WriteRead4User extends React.Component { - constructor(props) { - super(props); - this.state = { - - device_val : 0, - device : [ - { label: 'lpgbt1', disabled: false, value: '0'}, - { label: 'lpgbt2', disabled: false, value: '1'}, - { label: 'lpgbt3', disabled: false, value: '2'}, - { label: 'lpgbt4', disabled: false, value: '3'}, - { label: 'gbcr1', disabled: false, value: '4'}, - { label: 'gbcr2', disabled: false, value: '5'}, - { label: 'gbcr3', disabled: false, value: '6'}, - { label: 'gbcr4', disabled: false, value: '7'}, - ], - - value_read : "", - reg_write : "", - value_write : "", - read_back_read: "", - read_back_write: "", - }; - - this.onChange_device = (device_val) => { - this.setState({ device_val : device_val }); - console.log(device_val); - }; - - this.handleTextInputChange = value_read => { - this.setState({ value_read }); - }; - this.handleTextInputChange2 = reg_write => { - this.setState({ reg_write }); - }; - this.handleTextInputChange3 = value_write => { - this.setState({ value_write }); - }; - this.handleReadBack = data => { - this.setState({...this.state, read_back_read : data}); - }; - this.handleWriteReadBack = data => { - this.setState({...this.state, read_back_write : data}); - }; - this.read_device = (reg_address) => { - //var re = /[0-9A-Fa-f]{6}/g; - const requestData = { - register: reg_address, - device: this.state.device[this.state.device_val].label, - } - - console.log(requestData) - fetch(`${this.props.backendUrl}/sendReadRequest`, getPostBody(requestData)).then((response) => checkResponse(response)).then((data) => {console.log(data); this.handleReadBack(data)} - ).catch(err => {console.log(err)}); - }; - this.write_device = (reg_address,new_reg_value) => { - const requestData = { - device: this.state.device[this.state.device_val].label, - register: reg_address, - newValue: new_reg_value, - } - - console.log(requestData) - fetch(`${this.props.backendUrl}/sendWriteRequest`, getPostBody(requestData)).then((response) => checkResponse(response)).then((data) => {console.log(data); this.handleWriteReadBack(data)} - ).catch(err => {console.log(err)}); - }; - }; - - - render (){ - - return( - <React.Fragment> - - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Grid> - <Bullseye> - <GridItem span={7}> - <Bullseye> - <h4> Select the device: </h4> - </Bullseye> - </GridItem> - - <GridItem span={5}> - <Bullseye> - <FormSelectInputNewer id={"selectDeviceSimplePanelRead"} items={this.state.device} value={this.state.device_val} onChange={this.onChange_device}/> - </Bullseye> - </GridItem> - </Bullseye> - </Grid> - - </PanelMainBody> - </PanelMain> - </Panel> - - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Grid> - - <Bullseye> - <GridItem span={8}> - <Bullseye> - <Tooltip content={ <div>Use rom register for testing. In lpgbt v1 the return has to be 166. </div> }> - <Button id="read_reg_send_command" variant="primary" onClick={() => this.read_device(this.state.value_read)}> - <h3> Read register </h3> - </Button> - </Tooltip> - </Bullseye> - </GridItem> - </Bullseye> - - - <GridItem span={6}> - <Bullseye> - <h4>Address (hex)</h4> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <TextInput id="read_input" name="read_input" value={this.state.value_read} onChange={this.handleTextInputChange}/> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <h4>Read back value:</h4> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h5}>{this.state.read_back_read}</Text> - </TextContent> - </Bullseye> - </GridItem> - - </Grid> - - </PanelMainBody> - </PanelMain> - </Panel> - - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Grid> - - <Bullseye> - <GridItem span={8} rowSpan={1}> - <Bullseye> - <Button id="write_pri_send_command" variant="primary" onClick={() => this.write_device(this.state.reg_write, this.state.value_write)}> - <h3> Write register </h3> - </Button> - </Bullseye> - </GridItem> - </Bullseye> - - <GridItem span={6}> - <Bullseye> - <h4>Address</h4> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <TextInput id="write_address" name="write_address" value={this.state.reg_write} onChange={this.handleTextInputChange2}/> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <h4>Value (hex)</h4> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <TextInput id="write_value" name="write_value" value={this.state.value_write} onChange={this.handleTextInputChange3}/> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <h4>Read back value</h4> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h5}>{this.state.read_back_write}</Text> - </TextContent> - </Bullseye> - </GridItem> - </Grid> - - </PanelMainBody> - </PanelMain> - </Panel> - </React.Fragment> -);}; -} - - - -class WriteReadHorizontal extends React.Component { - constructor(props) { - super(props); - this.state = { - value_read : "", - reg_write : "", - value_write : "", - read_back_read: "-_-", - read_back_write: "-_-", - }; - this.handleTextInputChange = value_read => { - this.setState({ value_read }); - }; - this.handleTextInputChange2 = reg_write => { - this.setState({ reg_write }); - }; - this.handleTextInputChange3 = value_write => { - this.setState({ value_write }); - }; - this.handleReadBack = data => { - this.setState({...this.state, read_back_read : data}); - }; - this.handleWriteReadBack = data => { - this.setState({...this.state, read_back_write : data}); - }; - this.read_device = (reg_address) => { - //var re = /[0-9A-Fa-f]{6}/g; - const requestData = { - //fice_G: this.props.fice_g, - //fice_d: this.props.fice_d, - //fice_i: this.props.fice_i, - //fice_I: this.props.fice_I, - //optoboard_serial: this.props.serial, - register: reg_address, - device: this.props.device, - //isMaster: this.props.isMaster, - //i2c_master_val: this.props.i2c_master_val, - } - - console.log(requestData) - fetch(`${this.props.backendUrl}/sendReadRequest`, getPostBody(requestData)).then((response) => checkResponse(response)).then((data) => {console.log(data); this.handleReadBack(data)} - ).catch(err => {console.log(err)}); - }; - this.write_device = (reg_address,new_reg_value) => { - const requestData = { -/* fice_G: this.props.fice_g, - fice_d: this.props.fice_d, - fice_i: this.props.fice_i, - fice_I: this.props.fice_I, - optoboard_serial: this.props.serial, - reg_addr: reg_address, - isMaster: this.props.isMaster, - i2c_master_val: this.props.i2c_master_val,*/ - device: this.props.device, - register: reg_address, - newValue: new_reg_value, - } - - console.log(requestData) - fetch(`${this.props.backendUrl}/sendWriteRequest`, getPostBody(requestData)).then((response) => checkResponse(response)).then((data) => {console.log(data); this.handleWriteReadBack(data)} - ).catch(err => {console.log(err)}); - }; - }; - - render (){ - const VariableReadBack = "hex_value" - return( - <React.Fragment> - - <Flex> - <FlexItem flex={{ default: 'flex_1' }}> - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Bullseye> - <Flex> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Button id="read_reg_send_command" variant="primary" onClick={() => this.read_device(this.state.value_read)}> - <h3> Read register </h3> - </Button> - </Bullseye> - </FlexItem> - </Flex> - </Bullseye> - - <Flex> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>Address </h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextInput id="read_input" name="read_input" value={this.state.value_read} onChange={this.handleTextInputChange}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_2' }}> - <Bullseye> - <h4>Read back value:</h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h5}>{this.state.read_back_read}</Text> - </TextContent> - </Bullseye> - </FlexItem> - - </Flex> - - </PanelMainBody> - </PanelMain> - </Panel> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Bullseye> - <Flex> - <Bullseye> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Button id="write_pri_send_command" variant="primary" onClick={() => this.write_device(this.state.reg_write, this.state.value_write)}> - <h3> Write register </h3> - </Button> - </Bullseye> - </FlexItem> - </Bullseye> - </Flex> - </Bullseye> - - <Flex> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>Address </h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextInput id="write_address" name="write_address" value={this.state.reg_write} onChange={this.handleTextInputChange2}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>Value </h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextInput id="write_value" name="write_value" value={this.state.value_write} onChange={this.handleTextInputChange3}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_2' }}> - <Bullseye> - <h4>Read back value</h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h5}>{this.state.read_back_write}</Text> - </TextContent> - </Bullseye> - </FlexItem> - </Flex> - - </PanelMainBody> - </PanelMain> - </Panel> - </FlexItem> - - </Flex> - </React.Fragment> -);}; -} - -export {WriteRead4User, WriteReadHorizontal}; diff --git a/ui/src/Controls/Downlinks_master.js b/ui/src/Controls/Downlinks_master.js deleted file mode 100644 index 51a41e6c0a3a37cb4b392be03c27d30d6744d739..0000000000000000000000000000000000000000 --- a/ui/src/Controls/Downlinks_master.js +++ /dev/null @@ -1,168 +0,0 @@ -import React from "react"; -import { - Text, - TextContent, - TextVariants, - PanelMainBody, - PanelMain, - Panel, - Flex, - FlexItem, - Bullseye, - Switch, - Tooltip, -} from "@patternfly/react-core"; - -import { FormSelectInputNew } from "../Widgets/FormSelectInput"; - - -class Downlinks_master extends React.Component { - constructor(props) { - super(props); - this.state = { - PreEmphasisStrength : [ {label: "0.0 mA", disabled: false, value: 0}, - {label: "0.5 mA", disabled: false, value: 1}, - {label: "1.0 mA", disabled: false, value: 2}, - {label: "1.5 mA", disabled: false, value: 3}, - {label: "2.0 mA", disabled: false, value: 4}, - {label: "2.5 mA", disabled: false, value: 5}, - {label: "3.0 mA", disabled: false, value: 6}, - {label: "3.5 mA", disabled: false, value: 7},], - PreEmphasisStrength_val : String(props.ConfigurationFile["lpgbt"]['EPTX'+props.id+'CHNCNTR']["EPTX"+props.id+"PREEMPHASISSTRENGTH"][Number(props.lpGBTNum)-1]), - DriveStrength : [ {label: "0.0 mA", disabled: false, value: 0}, - {label: "0.5 mA", disabled: false, value: 1}, - {label: "1.0 mA", disabled: false, value: 2}, - {label: "1.5 mA", disabled: false, value: 3}, - {label: "2.0 mA", disabled: false, value: 4}, - {label: "2.5 mA", disabled: false, value: 5}, - {label: "3.0 mA", disabled: false, value: 6}, - {label: "3.5 mA", disabled: false, value: 7},], - DriveStrength_val : String(props.ConfigurationFile["lpgbt"]['EPTX'+props.id+'CHNCNTR']["EPTX"+props.id+"DRIVESTRENGTH"][Number(props.lpGBTNum)-1]), - PreEmphasisMode : [ {label: "disabled", disabled: false, value: 0}, - {label: "disabled", disabled: false, value: 1}, - {label: "self timed", disabled: false, value: 2}, - {label: "clock timed", disabled: false, value: 3}], - PreEmphasisMode_val : String(props.ConfigurationFile["lpgbt"]['EPTX'+props.id+'CHNCNTR']["EPTX"+props.id+"PREEMPHASISMODE"][Number(props.lpGBTNum)-1]), - buttonLabel : "EPTX" + props.id + "enable_switch_MASTER", - isBox : Boolean(props.ConfigurationFile["lpgbt"]['EPTX'+props.id_reg+'ENABLE']["EPTX"+props.id+"ENABLE"][Number(props.lpGBTNum)-1]), - }; - - - this.toggleBox = checked => {const memory = this.state.isBox; - this.setState({isBox: checked}); - console.log(checked); - this.props.sendSetting('EPTX'+props.id_reg+'Enable','EPTX'+props.id+'Enable', checked ? '1' : '0').catch((err) => {console.log(err); this.setState({ isBox: memory });}); - }; - - this.onChange_PreEmph = (PreEmphasisStrength_val) => {const memory = this.state.PreEmphasisStrength_val; - this.setState({ PreEmphasisStrength_val }); - console.log(PreEmphasisStrength_val); - this.props.sendSetting('EPTX'+this.props.id+'ChnCntr','EPTX'+props.id+'PreEmphasisStrength', PreEmphasisStrength_val).catch((err) => {console.log(err); this.setState({ PreEmphasisStrength_val: memory });}); - }; - this.onChange_DriveStrength = (DriveStrength_val) => {const memory = this.state.DriveStrength_val; - this.setState({ DriveStrength_val }); - console.log(DriveStrength_val); - this.props.sendSetting('EPTX'+this.props.id+'ChnCntr','EPTX'+props.id+'DriveStrength', DriveStrength_val).catch((err) => {console.log(err); this.setState({ DriveStrength_val: memory });}); - }; - this.onChange_PreEmphasisMode = (PreEmphasisMode_val) => {const memory = this.state.PreEmphasisMode_val; - this.setState({ PreEmphasisMode_val }); - console.log(PreEmphasisMode_val); - this.props.sendSetting('EPTX'+this.props.id+'ChnCntr','EPTX'+props.id+'PreEmphasisMode', PreEmphasisMode_val).catch((err) => {console.log(err); this.setState({ PreEmphasisMode_val: memory });}); - }; - } - - render (){ - return( - - <React.Fragment> - - <Flex direction={{ default: 'column' }}> - - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}> - EPTX{this.props.id}ChnCntr</Text> - </TextContent> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Tooltip content={<div><div> register: EPTX{this.props.id_reg}Enable </div> <div> reg_field: EPTX{this.props.id}Enable </div></div>} > - <Switch isChecked={this.state.isBox} onChange={this.toggleBox} id={this.state.buttonLabel} name={this.state.buttonLabel} label="Enable"/> - </Tooltip > - </Bullseye> - </FlexItem> - - </Flex> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Tooltip content={<div><div> register: EPTX{this.props.id}ChnCntr </div> <div> reg_field: EPTX{this.props.id}PreEmphasisStrength </div></div>} > - <h4> EPTX{this.props.id}PreEmphasisStrength </h4> - </Tooltip> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNew id={this.props.id} items={this.state.PreEmphasisStrength} value={this.state.PreEmphasisStrength_val} onChange={this.onChange_PreEmph}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Tooltip content={<div><div> register: EPTX{this.props.id}ChnCntr </div> <div> reg_field: EPTX{this.props.id}DriveStrength </div></div>} > - <h4>EPTX{this.props.id}DriveStrength</h4> - </Tooltip> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNew id={this.props.id} items={this.state.DriveStrength} value={this.state.DriveStrength_val} onChange={this.onChange_DriveStrength}/> - </Bullseye> - </FlexItem> - - </Flex> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Tooltip content={<div><div> register: EPTX{this.props.id}ChnCntr </div> <div> reg_field: EPTX{this.props.id}PreEmphasisMode </div></div>} > - <h4> EPTX{this.props.id}PreEmphasisMode </h4> - </Tooltip> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNew id={this.props.id} items={this.state.PreEmphasisMode} value={this.state.PreEmphasisMode_val} onChange={this.onChange_PreEmphasisMode}/> - </Bullseye> - </FlexItem> - - </Flex> - - - - - </PanelMainBody> - </PanelMain> - </Panel> - </Flex> - </React.Fragment> - );}; -} - -export {Downlinks_master}; //, DownlinkEnable - diff --git a/ui/src/Controls/EPRXChnCntr.js b/ui/src/Controls/EPRXChnCntr.js deleted file mode 100644 index c81ae955167d50e79c0c49dea364fa38b925377c..0000000000000000000000000000000000000000 --- a/ui/src/Controls/EPRXChnCntr.js +++ /dev/null @@ -1,179 +0,0 @@ -import React from "react"; -import { - Checkbox, - Text, - TextContent, - TextVariants, - PanelMainBody, - PanelMain, - Panel, - Flex, - FlexItem, - Bullseye, -} from "@patternfly/react-core"; - -import { FormSelectInput2, FormSelectInputNewer } from "../Widgets/FormSelectInput"; -import { getPostBody, checkResponse } from '../utils/utility-functions' - -class EPRXChnCntr extends React.Component { - constructor(props) { - super(props); - let regName = 'EPRXEq10Control'; - if ((props.id == 2) || (props.id == 3)) { regName = 'EPRXEq32Control' - } else if (props.id == 4) { regName = 'EPRXEq54Control' }; - - this.state = { - buttonLabel : {first : "EPRX" + props.id + "0Invert", second : "EPRX" + props.id + "0Term", third : "EPRX"+ props.id + "0AcBias"}, - buttonLabelID : {first : "lpgbt" + props.lpGBTNum + "EPRX" + props.id + "0Invert", second : "lpgbt" + props.lpGBTNum + "EPRX" + props.id + "0Term", third : "lpgbt" + props.lpGBTNum + "EPRX"+ props.id + "0AcBias"}, - isBox1 : Boolean(props.ConfigurationFile["lpgbt"]['EPRX'+props.id+'0CHNCNTR']["EPRX"+props.id+"0INVERT"][Number(props.lpGBTNum)-1]), - isBox2 : Boolean(props.ConfigurationFile["lpgbt"]['EPRX'+props.id+'0CHNCNTR']["EPRX"+props.id+"0TERM"][Number(props.lpGBTNum)-1]), - isBox3 : Boolean(props.ConfigurationFile["lpgbt"]['EPRX'+props.id+'0CHNCNTR']["EPRX"+props.id+"0ACBIAS"][Number(props.lpGBTNum)-1]), - setIsBox : false, - Eq_val: String(props.ConfigurationFile["lpgbt"]['EPRX'+props.id+'0CHNCNTR']["EPRX"+props.id+"0PHASESELECT"][Number(props.lpGBTNum)-1]), - PS_value: String(2*props.ConfigurationFile["lpgbt"]['EPRX'+props.id+'0CHNCNTR']["EPRX"+props.id+"0EQ"][Number(props.lpGBTNum)-1] + props.ConfigurationFile["lpgbt"]['EPRXEQ'+String(Math.trunc((props.id)/2)*2+1)+String(Math.trunc((props.id)/2)*2)+'CONTROL']["EPRX"+props.id+"0EQ"][Number(props.lpGBTNum)-1]), - - phaseSelect : [ {value: "0"}, {value: "1"} ,{value:"2"},{value:"3"},{value:"4"},{value:"5"},{value:"6"},{value:"7"},{value:"8"},{value:"9"},{value:"10"},{value:"11"},{value:"12"},{value:"13"},{value:"14"},{value:"15"}], - - Eq : [ - { label: 'Select one', disabled: true, value: 'Select one'}, - { label: "N/A", disabled: false, value: '0'}, - { label: "300 MHz or 4.9 dB", disabled: false, value: '1'}, - { label: "125 MHz or 7.8 dB", disabled: false, value: '2'}, - { label: "70MHz or 10.7 dB", disabled: false, value: '3'}, - ], - }; - this.toggleBox1 = checked => { - const memory = this.state.isBox1; - this.setState({ - isBox1: checked - }); - console.log(checked); - this.props.sendSetting('EPRX'+this.props.id+'0ChnCntr',this.state.buttonLabel.first, checked ? "1" : "0").catch((err) => {console.log(err); this.setState({ isBox1: memory });}); - }; - this.toggleBox2 = checked => { - const memory = this.state.isBox2; - this.setState({ - isBox2: checked - }); - console.log(checked); - this.props.sendSetting('EPRX'+this.props.id+'0ChnCntr',this.state.buttonLabel.second, checked ? "1" : "0").catch((err) => {console.log(err); this.setState({ isBox2: memory });}); - }; - this.toggleBox3 = checked => { - const memory = this.state.isBox3; - this.setState({ - isBox3: checked - }); - console.log(checked); - this.props.sendSetting('EPRX'+this.props.id+'0ChnCntr',this.state.buttonLabel.third, checked ? "1" : "0").catch((err) => {console.log(err); this.setState({ isBox3: memory });});; - }; - - this.onChange_Eq = (Eq_val) => { const memory = this.state.Eq_val; - this.setState({ Eq_val }); - console.log(Eq_val); - console.log(memory); - this.sendSettingEQ(Eq_val).catch((err) => {console.log(err); this.setState({ Eq_val: memory });});//EPRXEq10Control for bit [0], EPRX00ChnCntr for bit [1] - }; - - this.onChange_PS = (PS_value) => {const memory = this.state.PS_value; - this.setState({ PS_value }); - console.log(PS_value); - this.props.sendSetting('EPRX'+this.props.id+'0ChnCntr','EPRX'+props.id+'0PhaseSelect', PS_value).catch((err) => {console.log(err); this.setState({ PS_value: memory });}); - }; - - this.sendSettingEQ = (newValue) => { - let regName = 'EPRXEq10Control'; - if ((props.id == 2) || (props.id == 3)) { regName = 'EPRXEq32Control' - } else if (props.id == 4) { regName = 'EPRXEq54Control' }; - - const body = { - device: 'lpgbt' + props.lpGBTNum, - registerName1: 'EPRX' + props.id + '0ChnCntr', - registerName0: regName, - settingName: 'EPRX' + props.id + '0Eq', - newValue: newValue, - }; - console.log(body); - return fetch(`${this.props.backendUrl}/sendRegisterEQ`, getPostBody(body)).then((response) => checkResponse(response)).then((data) => {console.log(data)}); - }; - - } - //<PanelHeader> - render() { - return ( - <React.Fragment> - - <Flex direction={{ default: 'column' }}> - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>EPRX{this.props.id}0ChnCntr</Text> - </TextContent> - </Bullseye> - - <Flex> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>EPRX{this.props.id}0PhaseSelect</h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInput2 id={this.props.id} items={this.state.phaseSelect} value={this.state.PS_value} onChange={this.onChange_PS}/> - </Bullseye> - </FlexItem> - - </Flex> - <Flex> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.buttonLabel.first} isChecked={this.state.isBox1} onChange={this.toggleBox1} id={this.state.buttonLabelID.first} name={this.state.buttonLabel.first}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.buttonLabel.third} isChecked={this.state.isBox3} onChange={this.toggleBox3} id={this.state.buttonLabelID.third} name={this.state.buttonLabel.third}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.buttonLabel.second} isChecked={this.state.isBox2} onChange={this.toggleBox2} id={this.state.buttonLabelID.second} name={this.state.buttonLabel.second}/> - </Bullseye> - </FlexItem> - - </Flex> - - <Flex> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>EPRX{this.props.id}0Eq</h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNewer id={this.props.id} items={this.state.Eq} value={this.state.Eq_val} onChange={this.onChange_Eq}/> - </Bullseye> - </FlexItem> - - </Flex> - - - </PanelMainBody> - </PanelMain> - </Panel> - </Flex> - - </React.Fragment> - ); - } -} - -export {EPRXChnCntr}; diff --git a/ui/src/Controls/EPRXControl.js b/ui/src/Controls/EPRXControl.js deleted file mode 100644 index 318f497eb0a68333bdae97d7dc808dd0c00f47d4..0000000000000000000000000000000000000000 --- a/ui/src/Controls/EPRXControl.js +++ /dev/null @@ -1,132 +0,0 @@ -import React from "react"; -import { - Checkbox, - Text, - TextContent, - TextVariants, - PanelMainBody, - PanelMain, - Panel, - Flex, - FlexItem, - Bullseye, -} from "@patternfly/react-core"; - -import { FormSelectInputNewer } from "../Widgets/FormSelectInput"; -//import { getPostBody, checkResponse } from '../utils/utility-functions' - - -class EPRXControl extends React.Component { - constructor(props) { - super(props); - this.state = { - buttonLabel : "lpGBT" + props.lpGBTNum + " (gr:" + props.id + " ch:0)", - isBox : Boolean(props.ConfigurationFile["lpgbt"]['EPRX'+props.id+'CONTROL']["EPRX"+props.id+"0ENABLE"][Number(props.lpGBTNum)-1]), - setIsBox : false, - dataRate_val: String(props.ConfigurationFile["lpgbt"]['EPRX'+props.id+'CONTROL']["EPRX"+props.id+"DATARATE"][Number(props.lpGBTNum)-1]), - trackMode_val: String(props.ConfigurationFile["lpgbt"]['EPRX'+props.id+'CONTROL']["EPRX"+props.id+"TRACKMODE"][Number(props.lpGBTNum)-1]), - - dataRates : [ - { label: 'Select one', disabled: true, value: "Select one"}, - { label: "disabled", disabled: false, value: "0"}, - { label: "320 Mbps", disabled: false, value: "1"}, - { label: "640 Mbps", disabled: false, value: "2"}, - { label: "1280 Mbps", disabled: false, value: "3"} - ], - - trackMode : [ - { label: 'Select one', disabled: true, value: "Select one"}, - { label: "Fixed phase", disabled: false, value: "0"}, - { label: "Initial training", disabled: false, value: "1"}, - { label: "CPT", disabled: false, value: "2"}, - { label: "CPT with inital phase", disabled: false, value: "3"}, - ], - }; - - this.toggleBox = checked => { const memory = this.state.isBox; - this.setState({ isBox: checked }); - this.props.sendSetting('EPRX'+this.props.id+'Control','EPRX'+props.id+'0Enable', checked ? "1" : "0").catch((err) => {console.log(err); this.setState({ isBox: memory })}); - }; - - this.onChange_dataRate = (dataRate_val) => {const memory = this.state.dataRate_val; - this.setState({ dataRate_val }); - console.log(dataRate_val); - //console.log(Boolean(props.ConfigurationFile["lpgbt"]['EPRX'+props.id+'CONTROL']["EPRX"+props.id+"0ENABLE"][Number(props.lpGBTNum)-1])); - this.props.sendSetting('EPRX'+this.props.id+'Control','EPRX'+props.id+'DataRate', dataRate_val).catch((err) => {console.log(err); this.setState({ dataRate_val: memory })}); - }; - this.onChange_trackMode = (trackMode_val) => {const memory = this.state.trackMode_val; - this.setState({ trackMode_val }); console.log(trackMode_val); - this.props.sendSetting('EPRX'+this.props.id+'Control','EPRX'+this.props.id+'TrackMode', trackMode_val).catch((err) => {console.log(err); this.setState({ trackMode_val: memory })}); - }; - - - } - - render() { - return ( - <React.Fragment> - <Flex direction={{ default: 'column' }}> - - <Panel variant="bordered"> - - <PanelMain> - <PanelMainBody> - - - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>EPRX{this.props.id}Control</Text> - </TextContent> - </Bullseye> - - <Flex> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.buttonLabel} isChecked={this.state.isBox} onChange={this.toggleBox} id={this.state.buttonLabel} name={this.state.buttonLabel}/> - </Bullseye> - </FlexItem> - - </Flex> - - <Flex> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>EPRX{this.props.id}DataRate</h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNewer id={this.props.id} items={this.state.dataRates} value={this.state.dataRate_val} onChange={this.onChange_dataRate}/> - </Bullseye> - </FlexItem> - - </Flex> - <Flex> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>EPRX{this.props.id}TrackMode</h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNewer id={this.props.id} items={this.state.trackMode} value={this.state.trackMode_val} onChange={this.onChange_trackMode}/> - </Bullseye> - </FlexItem> - </Flex> - - </PanelMainBody> - </PanelMain> - </Panel> - </Flex> - </React.Fragment> ); - } - } - - - - -export { EPRXControl}; diff --git a/ui/src/Controls/EPRXDllConfig.js b/ui/src/Controls/EPRXDllConfig.js deleted file mode 100644 index f4fa294dffde002b133cfc2046dd9e59fb73f17c..0000000000000000000000000000000000000000 --- a/ui/src/Controls/EPRXDllConfig.js +++ /dev/null @@ -1,163 +0,0 @@ -import React from "react"; -import { - Checkbox, - Text, - TextContent, - TextVariants, - PanelMainBody, - PanelMain, - Panel, - Flex, - FlexItem, - Bullseye, -} from "@patternfly/react-core"; - -import { FormSelectInputNewer } from "../Widgets/FormSelectInput"; - -class EPRXDllConfig extends React.Component { - constructor(props) { - super(props); - this.state = { - isBox1 : Boolean(props.ConfigurationFile["lpgbt"]['EPRXDLLCONFIG']["EPRXDLLFSMCLKALWAYSON"][Number(props.lpGBTNum)-1]), - isBox2 : Boolean(props.ConfigurationFile["lpgbt"]['EPRXDLLCONFIG']["EPRXDLLCOARSELOCKDETECTION"][Number(props.lpGBTNum)-1]), - isBox3 : Boolean(props.ConfigurationFile["lpgbt"]['EPRXDLLCONFIG']["EPRXENABLEREINIT"][Number(props.lpGBTNum)-1]), - isBox4 : Boolean(props.ConfigurationFile["lpgbt"]['EPRXDLLCONFIG']["EPRXDATAGATINGDISABLE"][Number(props.lpGBTNum)-1]), - Current_val : String(props.ConfigurationFile["lpgbt"]['EPRXDLLCONFIG']['EPRXDLLCURRENT'][Number(props.lpGBTNum)-1]), - Count_val : String(props.ConfigurationFile["lpgbt"]['EPRXDLLCONFIG']['EPRXDLLCONFIRMCOUNT'][Number(props.lpGBTNum)-1]), - Current : [ - { label: '1uA', disabled: false, value: '0'}, - { label: "2uA", disabled: false, value: '1'}, - { label: '4uA', disabled: false, value: '2'}, - { label: "8uA", disabled: false, value: '3'},], - Count : [ - { label: '1', disabled: false, value: '0'}, - { label: "4", disabled: false, value: '1'}, - { label: '16', disabled: false, value: '2'}, - { label: "31", disabled: false, value: '3'}, - ], - buttonLabel : {first : "EPRXDLLFSMClkAlwaysOn", second : "EPRXDLLCoarseLockDetection", third : "EPRXEnableReInit", fourth : "EPRXDataGatingDisable"}, - }; - - this.toggleBox1 = checked => { - const memory = this.state.isBox1; - this.setState({isBox1: checked}); - console.log(checked); - this.props.sendSetting('EPRXDllConfig', this.state.buttonLabel.first, checked ? "1" : "0").catch((err) => {console.log(err); this.setState({ isBox1: memory });}); - }; - - this.toggleBox2 = checked => { - const memory = this.state.isBox2; - this.setState({isBox2: checked}); - console.log(checked); - this.props.sendSetting('EPRXDllConfig', this.state.buttonLabel.second, checked ? "1" : "0").catch((err) => {console.log(err); this.setState({ isBox2: memory });}); - }; - - this.toggleBox3 = checked => { - const memory = this.state.isBox3; - this.setState({isBox3: checked}); - console.log(checked); - this.props.sendSetting('EPRXDllConfig', this.state.buttonLabel.third, checked ? "1" : "0").catch((err) => {console.log(err); this.setState({ isBox3: memory });}); - }; - - this.toggleBox4 = checked => { - const memory = this.state.isBox4; - this.setState({isBox4: checked}); - console.log(checked); - this.props.sendSetting('EPRXDllConfig', this.state.buttonLabel.fourth, checked ? "1" : "0").catch((err) => {console.log(err); this.setState({ isBox4: memory });}); - }; - - this.onChange_Current = (Current_val) => { const memory = this.state.Current_val; - this.setState({ Current_val }); - console.log(Current_val); - this.props.sendSetting('EPRXDllConfig','EPRXDllCurrent', Current_val).catch((err) => {console.log(err); this.setState({ Current_val: memory });}); - }; - - this.onChange_Count = (Count_val) => { const memory = this.state.Count_val; - this.setState({ Count_val }); - console.log(Count_val); - this.props.sendSetting('EPRXDllConfig','EPRXDllConfirmCount', Count_val).catch((err) => {console.log(err); this.setState({ Count_val: memory });}); - }; - - }; - - -render() { - return ( - <React.Fragment> - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Flex direction={{ default: 'column' }}> - - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>EPRXDllConfig</Text> - </TextContent> - </Bullseye> - - <Flex> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4> EPRXDllCurrent </h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNewer id={this.props.id} items={this.state.Current} value={this.state.Current_val} onChange={this.onChange_Current}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h5> EPRXDllConfirmCount </h5> - </Bullseye> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNewer id={this.props.id} items={this.state.Count} value={this.state.Count_val} onChange={this.onChange_Count}/> - </Bullseye> - </FlexItem> - - </Flex> - - - <Flex> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.buttonLabel.first} isChecked={this.state.isBox1} onChange={this.toggleBox1} id={this.state.buttonLabel.first} name={this.state.buttonLabel.first}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.buttonLabel.second} isChecked={this.state.isBox2} onChange={this.toggleBox2} id={this.state.buttonLabel.second} name={this.state.buttonLabel.second}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.buttonLabel.third} isChecked={this.state.isBox3} onChange={this.toggleBox3} id={this.state.buttonLabel.third} name={this.state.buttonLabel.third}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.buttonLabel.fourth} isChecked={this.state.isBox4} onChange={this.toggleBox4} id={this.state.buttonLabel.fourth} name={this.state.buttonLabel.fourth}/> - </Bullseye> - </FlexItem> - - </Flex> - - </Flex> - - </PanelMainBody> - </PanelMain> - </Panel> - </React.Fragment> -)};} - -export {EPRXDllConfig}; diff --git a/ui/src/Controls/MinConfig.js b/ui/src/Controls/MinConfig.js deleted file mode 100644 index eaf384920fdee55aa0445e4016f7d9ba228c6938..0000000000000000000000000000000000000000 --- a/ui/src/Controls/MinConfig.js +++ /dev/null @@ -1,369 +0,0 @@ -import React from "react"; -import { - Button, - TextInput, - PanelMainBody, - PanelMain, - Panel, - Bullseye, - Flex, - FlexItem, - Checkbox, - Switch -} from "@patternfly/react-core"; -import { getPostBody, checkResponse } from '../utils/utility-functions' -import { FormSelectInput } from "../Widgets/FormSelectInput"; -import {MyContext} from '../SimpleTabs/MyContext'; - - - -class MinConfig extends React.Component { - constructor(props) { - super(props); - this.state = { - isLoading: false, - validConfig: 'success', Variant: "primary", - - pathToJson : "/itk_demo_optoboard/optoboard_felix/configs/00000000_test_v1.json", - - switchState : false, - CheckBox_lpgbt1: true, - CheckBox_lpgbt2: true, - CheckBox_lpgbt3: true, - CheckBox_lpgbt4: true, - CheckBox_gbcr1: true, - CheckBox_gbcr2: true, - CheckBox_gbcr3: true, - CheckBox_gbcr4: true, - - inDBCheckBox: false, inDBCheckBoxLabel: "Fetch configuration from ConfigDB", inDBCheckBoxLabelID: "Fetch configuration from ConfigDB", - configDB: "http://localhost:5000", - configDBAvailable: 'warning' - }; - - this.handleTextInputChange = (event) => { - - this.setState({pathToJson : event}); - - let HandleWrongSerial = (dataObj) => { - if (dataObj==1) { this.setState({ validConfig : 'success'}); this.setState({ Variant : "primary" }); - } else { this.setState({validConfig : 'error'}) ; this.setState({ Variant : "danger" }) } - }; - - const requestData = { - path: event, - inDB: this.state.inDBCheckBox, - CONFIGDB_ADDRESS: this.state.configDB - } - console.log(requestData) - fetch(`${this.props.backendUrl}/checkAvailableDatasetInDB`, getPostBody(requestData)).then( - (response) => checkResponse(response)).then((data) => {console.log(data); HandleWrongSerial(data)}); - - }; - - this.configure = () => { - if (this.state.Variant == 'primary'){ - console.log("Starting configuration of the Optoboard!") - let body={} - if (this.state.switchState) { - body = { - config_path: this.state.pathToJson, - activeLpgbt: (this.state.CheckBox_lpgbt1 ? "1":"0") + (this.state.CheckBox_lpgbt2 ? "1":"0") + (this.state.CheckBox_lpgbt3 ? "1":"0") + (this.state.CheckBox_lpgbt4 ? "1":"0"), - activeGbcr: (this.state.CheckBox_gbcr1 ? "1":"0") + (this.state.CheckBox_gbcr2 ? "1":"0") + (this.state.CheckBox_gbcr3 ? "1":"0") + (this.state.CheckBox_gbcr4 ? "1":"0"), - loadFromConfigDB: this.state.inDBCheckBox, - } - } else { - body = { - config_path: this.state.pathToJson, - activeLpgbt: "None", - activeGbcr: "None", - loadFromConfigDB: this.state.inDBCheckBox, - } - }; - this.setState({ - isLoading: true - }); - console.log(body); - - fetch(`${this.props.backendUrl}/configure`, getPostBody(body)).then( - (response) => checkResponse(response)).then((data) => {console.log(data); this.setState({isLoading: false});}); - //if (data == "Optoboard configuration completed") { EnableI2C(); DataSet(this.state.pathToJson, this.state.vtrxVersionValue, this.state.inDBCheckBox) }; - //});.catch(err => {this.setState({isLoading: false});}); - }; - - }; - -/* this.minimal_config = (EnableI2C, DataSet) => { - if (this.state.Variant == 'primary'){ - console.log("Starting configuration of the Optoboard!") - let body={} - if (this.state.switchState) { - body = { - config_path: this.state.pathToJson, - activeLpgbt: (this.state.CheckBox_lpgbt1 ? "1":"0") + (this.state.CheckBox_lpgbt2 ? "1":"0") + (this.state.CheckBox_lpgbt3 ? "1":"0") + (this.state.CheckBox_lpgbt4 ? "1":"0"), - activeGbcr: (this.state.CheckBox_gbcr1 ? "1":"0") + (this.state.CheckBox_gbcr2 ? "1":"0") + (this.state.CheckBox_gbcr3 ? "1":"0") + (this.state.CheckBox_gbcr4 ? "1":"0"), - loadFromConfigDB: this.state.inDBCheckBox, - } - } else { - body = { - config_path: this.state.pathToJson, - activeLpgbt: "None", - activeGbcr: "None", - loadFromConfigDB: this.state.inDBCheckBox, - } - }; - this.setState({ - isLoading: true - }); - console.log(body); - - fetch(`${this.props.backendUrl}/configure`, getPostBody(body)).then( - response => {console.log(response)}).then( - data => {console.log(data); console.log("so far"); - this.setState({isLoading: false}); - if (data == "Optoboard configuration completed") { EnableI2C(); DataSet(this.state.pathToJson, this.state.vtrxVersionValue, this.state.inDBCheckBox) }; - }).catch(err => {this.setState({isLoading: false});}); - }; - - }; -*/ - this.onError = (err) => { - console.log("There was an Error:"); - console.log(err.message); - }; - -/* this.toggleBoxDebug = checked => { - this.setState({ - debugCheckisBox: checked - }); - console.log(checked); - }; -*/ - this.SwitchChange = checked => { - this.setState({ - switchState: checked - }); - } - - this.toggleBox_lpgbt1 = checked => { - this.setState({ - CheckBox_lpgbt1: checked - }); - console.log(checked); - }; - this.toggleBox_lpgbt2 = checked => { - this.setState({ - CheckBox_lpgbt2: checked - }); - console.log(checked); - }; - this.toggleBox_lpgbt3 = checked => { - this.setState({ - CheckBox_lpgbt3: checked - }); - console.log(checked); - }; - this.toggleBox_lpgbt4 = checked => { - this.setState({ - CheckBox_lpgbt4: checked - }); - console.log(checked); - }; - - this.toggleBox_gbcr1 = checked => { - this.setState({ - CheckBox_gbcr1: checked - }); - console.log(checked); - }; - this.toggleBox_gbcr2 = checked => { - this.setState({ - CheckBox_gbcr2: checked - }); - console.log(checked); - }; - this.toggleBox_gbcr3 = checked => { - this.setState({ - CheckBox_gbcr3: checked - }); - console.log(checked); - }; - this.toggleBox_gbcr4 = checked => { - this.setState({ - CheckBox_gbcr4: checked - }); - console.log(checked); - }; - - this.onChange_ConfigurationDB = (ConfigurationDB) => { - this.setState({ ConfigurationDB }); - fetch(`${this.props.backendUrl}/configDbUnavailable_wrapper`, getPostBody({CONFIGDB_ADDRESS: ConfigurationDB})).then( - (response) => checkResponse(response)).then( - (data) => {console.log(data); - if (data) {this.setState({configDBAvailable : 'error'}); this.setState({ Variant : "danger" }) - } else {this.setState({configDBAvailable : 'success'}); this.setState({ Variant : "primary" });} - }); - } - this.toggleBoxlineLocal = checked => { - this.setState({ - inDBCheckBox: checked - }); - console.log(checked); - - fetch(`${this.props.backendUrl}/configDbUnavailable_wrapper`, getPostBody({CONFIGDB_ADDRESS: this.state.configDB})).then( - (response) => checkResponse(response)).then((data) => {console.log(data); - if (checked) { if (data) {this.setState({configDBAvailable : 'error'}); this.setState({ Variant : "danger" }) - } else {this.setState({configDBAvailable : 'success'}); this.setState({ Variant : "primary" });} - } else { if (this.state.validConfig == 'success') {this.setState({ Variant : "primary" });}} - }); - - }; - -/* this.onChange = (vtrxVersionValue) => { this.setState({ vtrxVersionValue }) - console.log(vtrxVersionValue) - }; -*/ - - - }; - - -/* - - <MyContext.Consumer> - {({isI2C_On_Check, fetchDataSet}) => ( - - )} - </MyContext.Consumer> - -*/ - - render (){ - let stringLPGBT = (this.state.switchState) ? <h4>lpgbt to configure</h4> : <h4 style={{color:"grey"}}>lpgbt to configure</h4> - let stringGBCR = (this.state.switchState) ? <h4> gbcr to configure</h4> : <h4 style={{color:"grey"}}> gbcr to configure</h4> - return ( - <React.Fragment> - - <Flex direction={{ default: 'column' }}> - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - - <Bullseye> - <Button - spinnerAriaValueText={this.state.isLoading ? 'Loading' : undefined} - isLoading={this.state.isLoading} - id="readCharacteristics" - variant={this.state.Variant} - onClick={(event) => { - this.configure(); - }} - > - {this.state.isLoading ? "Configuring the Optoboard" : "Optoboard Quick Start" } - </Button> - </Bullseye> - - - <Flex> - <FlexItem flex={{ default: 'flex_5'}}> - <h3>Manual selection of Optoboard ASICS</h3> - </FlexItem> - <FlexItem flex={{ default: 'flex_1'}}> - <Switch - id="no-label-switch-off" - aria-label="Message when on" - //labelOff="Message when off" - isChecked={this.state.switchState} - onChange={this.SwitchChange} - //isReversed - /> - </FlexItem> - </Flex> - - <Bullseye> - <Flex> - <FlexItem flex={{ default: 'flex_4'}}> - {stringLPGBT} - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={""} isChecked={this.state.CheckBox_lpgbt1} onChange={this.toggleBox_lpgbt1} id={"lpgbt_config_1"} name={"lpgbt_config_1"} isDisabled={!this.state.switchState}/> - <Checkbox label={""} isChecked={this.state.CheckBox_lpgbt2} onChange={this.toggleBox_lpgbt2} id={"lpgbt_config_2"} name={"lpgbt_config_2"} isDisabled={!this.state.switchState}/> - <Checkbox label={""} isChecked={this.state.CheckBox_lpgbt3} onChange={this.toggleBox_lpgbt3} id={"lpgbt_config_3"} name={"lpgbt_config_3"} isDisabled={!this.state.switchState}/> - <Checkbox label={""} isChecked={this.state.CheckBox_lpgbt4} onChange={this.toggleBox_lpgbt4} id={"lpgbt_config_4"} name={"lpgbt_config_4"} isDisabled={!this.state.switchState}/> - </Bullseye> - </FlexItem> - </Flex> - </Bullseye> - - <Bullseye> - <Flex> - <FlexItem flex={{ default: 'flex_4'}}> - {stringGBCR} - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={""} isChecked={this.state.CheckBox_gbcr1} onChange={this.toggleBox_gbcr1} id={"gbcr_config_1"} name={"gbcr_config_1"} isDisabled={!this.state.switchState}/> - <Checkbox label={""} isChecked={this.state.CheckBox_gbcr2} onChange={this.toggleBox_gbcr2} id={"gbcr_config_2"} name={"gbcr_config_2"} isDisabled={!this.state.switchState}/> - <Checkbox label={""} isChecked={this.state.CheckBox_gbcr3} onChange={this.toggleBox_gbcr3} id={"gbcr_config_3"} name={"gbcr_config_3"} isDisabled={!this.state.switchState}/> - <Checkbox label={""} isChecked={this.state.CheckBox_gbcr4} onChange={this.toggleBox_gbcr4} id={"gbcr_config_4"} name={"gbcr_config_4"} isDisabled={!this.state.switchState}/> - </Bullseye> - </FlexItem> - </Flex> - </Bullseye> - - <Flex> - <FlexItem FlexItem flex={{ default: 'flex_3' }}> - <Bullseye> - <TextInput - id="config_minimal" - name="read_input" - value={this.state.pathToJson} - onChange={this.handleTextInputChange} - validated={this.state.validConfig} - /> - </Bullseye> - </FlexItem> - </Flex> - - <Bullseye> - <Flex> - <FlexItem flex={{ default: 'flex_2' }}> - <Bullseye> - <Checkbox label={this.state.inDBCheckBoxLabel} isChecked={this.state.inDBCheckBox} onChange={this.toggleBoxlineLocal} id={this.state.inDBCheckBoxLabelID} name={this.state.inDBCheckBoxLabel}/> - </Bullseye> - </FlexItem> - </Flex> - </Bullseye> - - <Flex> - <FlexItem FlexItem flex={{ default: 'flex_3' }}> - <Bullseye> - <h4> ConfigDB address </h4> - </Bullseye> - </FlexItem> - <FlexItem FlexItem flex={{ default: 'flex_3' }}> - <Bullseye> - <TextInput - id="config_minimal" - name="read_input" - value={this.state.configDB} - onChange={this.handleTextInputChange} - validated={this.state.configDBAvailable} - isDisabled={!this.state.inDBCheckBox} - /> - </Bullseye> - </FlexItem> - </Flex> - - </PanelMainBody> - </PanelMain> - </Panel> - </Flex> - - </React.Fragment> -);}; -} - -export {MinConfig}; \ No newline at end of file diff --git a/ui/src/Controls/OptoStatus.js b/ui/src/Controls/OptoStatus.js deleted file mode 100644 index 80c11ff03068037c057afcedd31cecae819df7c4..0000000000000000000000000000000000000000 --- a/ui/src/Controls/OptoStatus.js +++ /dev/null @@ -1,137 +0,0 @@ -import React, { useState, useEffect } from "react"; -import { - Button, - TextInput, - PanelMainBody, - PanelMain, - Panel, - Bullseye, - Flex, - FlexItem, - Checkbox, - Switch, - Icon -} from "@patternfly/react-core"; -import { getPostBody, checkResponse } from '../utils/utility-functions' -import { FormSelectInput } from "../Widgets/FormSelectInput"; -import {MyContext} from '../SimpleTabs/MyContext'; -import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; -import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon'; - - -export function OptoStatus() { - const [lpgbt1Status, setlpgbt1Status] = useState(0); - const [lpgbt2Status, setlpgbt2Status] = useState(0); - const [lpgbt3Status, setlpgbt3Status] = useState(0); - const [lpgbt4Status, setlpgbt4Status] = useState(0); - const [isLoading, setisLoading] = useState(false); - - const Status1 = (lpgbt1Status === 1) ? - <Icon status="success"> - <CheckCircleIcon /> - </Icon> : - <Icon status="danger"> - <ExclamationCircleIcon /> - </Icon>; - const Status2 = (lpgbt2Status === 1) ? - <Icon status="success"> - <CheckCircleIcon /> - </Icon> : - <Icon status="danger"> - <ExclamationCircleIcon /> - </Icon>; - const Status3 = (lpgbt3Status === 1) ? - <Icon status="success"> - <CheckCircleIcon /> - </Icon> : - <Icon status="danger"> - <ExclamationCircleIcon /> - </Icon>; - const Status4 = (lpgbt4Status === 1) ? - <Icon status="success"> - <CheckCircleIcon /> - </Icon> : - <Icon status="danger"> - <ExclamationCircleIcon /> - </Icon>; - - const HealthCheck = () => { - setlpgbt1Status(1); setlpgbt2Status(1); setlpgbt3Status(1); setlpgbt4Status(1); - }; - - - useEffect(() => { - const Status1 = (lpgbt1Status === 1) ? - <Icon status="success"> - <CheckCircleIcon /> - </Icon> : - <Icon status="danger"> - <ExclamationCircleIcon /> - </Icon>; - const Status2 = (lpgbt2Status === 1) ? - <Icon status="success"> - <CheckCircleIcon /> - </Icon> : - <Icon status="danger"> - <ExclamationCircleIcon /> - </Icon>; - const Status3 = (lpgbt3Status === 1) ? - <Icon status="success"> - <CheckCircleIcon /> - </Icon> : - <Icon status="danger"> - <ExclamationCircleIcon /> - </Icon>; - const Status4 = (lpgbt4Status === 1) ? - <Icon status="success"> - <CheckCircleIcon /> - </Icon> : - <Icon status="danger"> - <ExclamationCircleIcon /> - </Icon>; - } - ); - - return( - <React.Fragment> - - <Flex direction={{ default: 'column' }}> - <Panel variant="raised"> - <PanelMain> - <PanelMainBody> - - - <Bullseye> - <Button - spinnerAriaValueText={isLoading ? 'Loading' : undefined} - isLoading={isLoading} - id="readstatus" - variant={"primary"} - onClick={(event) => HealthCheck()} - > - {isLoading ? "Reading..." : "Read Status" } - </Button> - </Bullseye> - - <Bullseye> - <Flex> - <FlexItem> - <h3>lpGBT status</h3> - </FlexItem> - <FlexItem> - <Bullseye> - {Status1}{Status2}{Status3}{Status4} - </Bullseye> - </FlexItem> - </Flex> - </Bullseye> - - - </PanelMainBody> - </PanelMain> - </Panel> - </Flex> - - </React.Fragment> - ) -}; \ No newline at end of file diff --git a/ui/src/Controls/QuickCommands.js b/ui/src/Controls/QuickCommands.js deleted file mode 100644 index 46e8f99bf7afb39a284b6ff73247f3d4b2e6bde3..0000000000000000000000000000000000000000 --- a/ui/src/Controls/QuickCommands.js +++ /dev/null @@ -1,296 +0,0 @@ -import React from "react"; -import { - Button, - Text, - TextInput, - TextContent, - TextVariants, - PanelMainBody, - PanelMain, - Panel, - Flex, - FlexItem, - Bullseye, - Tooltip, - ValidatedOptions, - Modal, - ModalVariant -} from "@patternfly/react-core"; - -import { getPostBody, checkResponse } from '../utils/utility-functions' -import { FormSelectInputNew } from "../Widgets/FormSelectInput"; -import { SaveIcon } from '@patternfly/react-icons/dist/esm/icons/save-icon' -import { MyContext } from '../SimpleTabs/MyContext'; - -class QuickCommandsSlaves extends React.Component { - - render (){ - return( - <React.Fragment> - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Start </Text> - </TextContent> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Button id="start_slave" variant="primary"> - Start - </Button> - </FlexItem> - </Flex> - - </PanelMainBody> - </PanelMain> - </Panel> - </React.Fragment> -);}; -} - - - - -class QuickCommands extends React.Component { - constructor(props) { - super(props); - this.state = { - isModalOpen : false, - } - this.SendCommand = () => { - /*const requestData = { - fice_G: this.props.fice_g_val, - fice_d: this.props.fice_d_val, - fice_i: this.props.fice_i_val, - fice_I: this.props.fice_I, - optoboard_serial: this.props.serial, - optoboard_version: this.props.version, - i2c_master: this.props.i2c_master_val, - components: "lpGBT_master", - reg_name: "start_registers_lpGBT1" - } - console.log(requestData);*/ - //, getPostBody(requestData) - fetch(`${this.props.backendUrl}/send_commands_wrapper`).then((response) => response.json()).then((data) => {console.log(data);} - ); - } - - this.Set_i2c = (EnableI2C) => { - const body = {} - fetch(`${this.props.backendUrl}/set_I2C_settings`, getPostBody(body)).then((response) => checkResponse(response)).then((data) => {console.log(data); if (data=="I2C configuration completed") {EnableI2C()}} - ).catch(err => {console.log(err)}); - }; - - // this.testCelery = () => { - // console.log("Start celery test") - // fetch(`${this.props.backendUrl}/testCelery_wrapper`, getPostBody({})).then((response) => response.json()).then((data) => {console.log(data);} - // ); - // }; - // <Button onClick={() => {this.testCelery()}}> CELERY </Button> - - this.handleModalToggleLaunch = (booleanValidSerial) => { - (booleanValidSerial == 'success') ? ( this.setState(({isModalOpen}) => ({ isModalOpen : false })) ) : ( this.setState(({isModalOpen}) => ({ isModalOpen : true })) ) - }; - - this.handleModalToggleOpen = () => { - this.setState(({isModalOpen}) => ({ isModalOpen : true })) - }; - - this.HandleWrongSerial = (dataBool) => { - if (dataBool) { this.setState({ validSerial : 'success'}); this.setState({ ButtonVariant : "primary" }) - } else { this.setState({validSerial : 'error'}) ; this.setState({ ButtonVariant : "danger" }) } - }; - }; - -/* - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>Start-up</h4> - </Bullseye> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Switch isChecked={this.props.isSwitched} onChange={this.props.switchBox} onClick={() => this.SendCommand()} id={this.props.switchLabel} name={this.props.switchLabel} /> - </Bullseye> - </FlexItem> - </Flex> -*/ - -/* - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>fice -g</h4> - </Bullseye> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNew id="fice_g_i2c_master_form" items={this.props.fice_g} value={this.props.fice_g_val} onChange={this.props.onChange_fice_g}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>fice -i</h4> - </Bullseye> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNew id="fice_i_i2c_master_form" items={this.props.fice_i} value={this.props.fice_i_val} onChange={this.props.onChange_fice_i}/> - </Bullseye> - </FlexItem> - </Flex> - - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>fice -d</h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNew id="fice_d_i2c_master_form" items={this.props.fice_d} value={this.props.fice_d_val} onChange={this.props.onChange_fice_d}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>fice -I</h4> - </Bullseye> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextInput id="fice_I_i2c_master_form" name="fice_I_i2c_master_form" value={this.props.fice_I} onChange={this.props.handleTextAddress}/> - </Bullseye> - </FlexItem> - </Flex> -*/ - - render (){ - - return( - - <React.Fragment> - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>General </Text> - </TextContent> - </Bullseye> - </FlexItem> - - </Flex> - - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_2' }}> - <Bullseye> - <h4>Serial number</h4> - </Bullseye> - </FlexItem> - <FlexItem flex={{ default: 'flex_2' }}> - <Bullseye> - <MyContext.Consumer> - {({OptoSerialContext, handleModalToggleOpen}) => ( - <Button key="close" variant='tertiary' onClick={handleModalToggleOpen}> - {OptoSerialContext} - </Button> - )} - </MyContext.Consumer> - - </Bullseye> - </FlexItem> - </Flex> - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>I2C settings</h4> - </Bullseye> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - - <MyContext.Consumer> - {({isI2C_On_Check}) => ( - <Button id="set_i2cButton" variant="primary" onClick={() => {this.Set_i2c(isI2C_On_Check);}}> - Set - </Button> - )} - </MyContext.Consumer> - - </Bullseye> - </FlexItem> - </Flex> - - </PanelMainBody> - </PanelMain> - </Panel> - </React.Fragment> - );}; -} - -export {QuickCommands, QuickCommandsSlaves}; - -/* - - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Tooltip content={<div>Save current configuration</div>}> - <Button id="saveconfig_i2c" variant="secondary"> - {<SaveIcon/>} - </Button> - </Tooltip> - </Bullseye> - </FlexItem> - -*/ - -/* - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - - <FlexItem flex={{ default: 'flex_3' }}> - <Bullseye> - <h4>Optoboard version</h4> - </Bullseye> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <MyContext.Consumer> - {({optoVersion}) => ( - <h4> {optoVersion} </h4> - )} - </MyContext.Consumer> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_2' }}> - <Bullseye> - <h4>I2C master</h4> - </Bullseye> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNew id="i2c_master_form" items={this.props.i2c_master} value={this.props.i2c_master_val} onChange={this.props.onChange_i2c_master}/> - </Bullseye> - </FlexItem> - </Flex> - -*/ diff --git a/ui/src/Controls/WriteRead.js b/ui/src/Controls/WriteRead.js deleted file mode 100644 index 649392a62244f9487b0327f6abd10f62e1ff9f79..0000000000000000000000000000000000000000 --- a/ui/src/Controls/WriteRead.js +++ /dev/null @@ -1,406 +0,0 @@ -import React from "react"; -import { - Button, - Checkbox, - InputGroup, - InputGroupText, - Dropdown, - DropdownToggle, - DropdownItem, - FormSelect, - FormSelectOption, - FormSelectOptionGroup, - Text, - TextInput, - TextContent, - TextVariants, - Form, - FormGroup, - PanelMainBody, - PanelMain, - Panel, - PanelHeader, - SidebarContent, - Sidebar, - Flex, - FlexItem, - Grid, - GridItem, - Bullseye, -} from "@patternfly/react-core"; -import { getPostBody, checkResponse } from '../utils/utility-functions' - - -class WriteRead extends React.Component { - constructor(props) { - super(props); - this.state = { - value_read : "", - reg_write : "", - value_write : "", - read_back_read: "-_-", - read_back_write: "-_-", - }; - this.handleTextInputChange = value_read => { - this.setState({ value_read }); - }; - this.handleTextInputChange2 = reg_write => { - this.setState({ reg_write }); - }; - this.handleTextInputChange3 = value_write => { - this.setState({ value_write }); - }; - this.handleReadBack = data => { - this.setState({...this.state, read_back_read : data}); - }; - this.handleWriteReadBack = data => { - this.setState({...this.state, read_back_write : data}); - }; - this.read_device = (reg_address) => { - //var re = /[0-9A-Fa-f]{6}/g; - const requestData = { - //fice_G: this.props.fice_g, - //fice_d: this.props.fice_d, - //fice_i: this.props.fice_i, - //fice_I: this.props.fice_I, - //optoboard_serial: this.props.serial, - register: reg_address, - device: this.props.device, - //isMaster: this.props.isMaster, - //i2c_master_val: this.props.i2c_master_val, - } - - console.log(requestData) - fetch(`${this.props.backendUrl}/sendReadRequest`, getPostBody(requestData)).then((response) => checkResponse(response)).then((data) => {console.log(data); this.handleReadBack(data)} - ).catch(err => {console.log(err)}); - }; - this.write_device = (reg_address,new_reg_value) => { - const requestData = { -/* fice_G: this.props.fice_g, - fice_d: this.props.fice_d, - fice_i: this.props.fice_i, - fice_I: this.props.fice_I, - optoboard_serial: this.props.serial, - reg_addr: reg_address, - isMaster: this.props.isMaster, - i2c_master_val: this.props.i2c_master_val,*/ - device: this.props.device, - register: reg_address, - newValue: new_reg_value, - } - - console.log(requestData) - fetch(`${this.props.backendUrl}/sendWriteRequest`, getPostBody(requestData)).then((response) => checkResponse(response)).then((data) => {console.log(data); this.handleWriteReadBack(data)} - ).catch(err => {console.log(err)}); - }; - }; - - render (){ - const VariableReadBack = "hex_value" - return( - <React.Fragment> - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Grid> - - <Bullseye> - <GridItem span={7}> - <Bullseye> - <Button id="read_reg_send_command" variant="primary" onClick={() => this.read_device(this.state.value_read)}> - <h3> Read register </h3> - </Button> - </Bullseye> - </GridItem> - </Bullseye> - - <GridItem span={6}> - <Bullseye> - <h4>Address (hex)</h4> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <TextInput id="read_input" name="read_input" value={this.state.value_read} onChange={this.handleTextInputChange}/> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <h4>Read back value:</h4> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h5}>{this.state.read_back_read}</Text> - </TextContent> - </Bullseye> - </GridItem> - - </Grid> - - </PanelMainBody> - </PanelMain> - </Panel> - - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Grid> - - <Bullseye> - <GridItem span={8} rowSpan={1}> - <Bullseye> - <Button id="write_pri_send_command" variant="primary" onClick={() => this.write_device(this.state.reg_write, this.state.value_write)}> - <h3> Write register </h3> - </Button> - </Bullseye> - </GridItem> - </Bullseye> - - <GridItem span={6}> - <Bullseye> - <h4>Address</h4> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <TextInput id="write_address" name="write_address" value={this.state.reg_write} onChange={this.handleTextInputChange2}/> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <h4>Value (hex)</h4> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <TextInput id="write_value" name="write_value" value={this.state.value_write} onChange={this.handleTextInputChange3}/> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <h4>Read back value</h4> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h5}>{this.state.read_back_write}</Text> - </TextContent> - </Bullseye> - </GridItem> - </Grid> - - </PanelMainBody> - </PanelMain> - </Panel> - </React.Fragment> -);}; -} - - - -class WriteReadHorizontal extends React.Component { - constructor(props) { - super(props); - this.state = { - value_read : "", - reg_write : "", - value_write : "", - read_back_read: "-_-", - read_back_write: "-_-", - }; - this.handleTextInputChange = value_read => { - this.setState({ value_read }); - }; - this.handleTextInputChange2 = reg_write => { - this.setState({ reg_write }); - }; - this.handleTextInputChange3 = value_write => { - this.setState({ value_write }); - }; - this.handleReadBack = data => { - this.setState({...this.state, read_back_read : data}); - }; - this.handleWriteReadBack = data => { - this.setState({...this.state, read_back_write : data}); - }; - this.read_device = (reg_address) => { - //var re = /[0-9A-Fa-f]{6}/g; - const requestData = { - //fice_G: this.props.fice_g, - //fice_d: this.props.fice_d, - //fice_i: this.props.fice_i, - //fice_I: this.props.fice_I, - //optoboard_serial: this.props.serial, - register: reg_address, - device: this.props.device, - //isMaster: this.props.isMaster, - //i2c_master_val: this.props.i2c_master_val, - } - - console.log(requestData) - fetch(`${this.props.backendUrl}/sendReadRequest`, getPostBody(requestData)).then((response) => checkResponse(response)).then((data) => {console.log(data); this.handleReadBack(data)} - ).catch(err => {console.log(err)}); - }; - this.write_device = (reg_address,new_reg_value) => { - const requestData = { -/* fice_G: this.props.fice_g, - fice_d: this.props.fice_d, - fice_i: this.props.fice_i, - fice_I: this.props.fice_I, - optoboard_serial: this.props.serial, - reg_addr: reg_address, - isMaster: this.props.isMaster, - i2c_master_val: this.props.i2c_master_val,*/ - device: this.props.device, - register: reg_address, - newValue: new_reg_value, - } - - console.log(requestData) - fetch(`${this.props.backendUrl}/sendWriteRequest`, getPostBody(requestData)).then((response) => checkResponse(response)).then((data) => {console.log(data); this.handleWriteReadBack(data)} - ).catch(err => {console.log(err)}); - }; - }; - - render (){ - const VariableReadBack = "hex_value" - return( - <React.Fragment> - - <Flex> - <FlexItem flex={{ default: 'flex_1' }}> - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Bullseye> - <Flex> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Button id="read_reg_send_command" variant="primary" onClick={() => this.read_device(this.state.value_read)}> - <h3> Read register </h3> - </Button> - </Bullseye> - </FlexItem> - </Flex> - </Bullseye> - - <Flex> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>Address </h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextInput id="read_input" name="read_input" value={this.state.value_read} onChange={this.handleTextInputChange}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_2' }}> - <Bullseye> - <h4>Read back value:</h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h5}>{this.state.read_back_read}</Text> - </TextContent> - </Bullseye> - </FlexItem> - - </Flex> - - </PanelMainBody> - </PanelMain> - </Panel> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Bullseye> - <Flex> - <Bullseye> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Button id="write_pri_send_command" variant="primary" onClick={() => this.write_device(this.state.reg_write, this.state.value_write)}> - <h3> Write register </h3> - </Button> - </Bullseye> - </FlexItem> - </Bullseye> - </Flex> - </Bullseye> - - <Flex> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>Address </h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextInput id="write_address" name="write_address" value={this.state.reg_write} onChange={this.handleTextInputChange2}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>Value </h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextInput id="write_value" name="write_value" value={this.state.value_write} onChange={this.handleTextInputChange3}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_2' }}> - <Bullseye> - <h4>Read back value</h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h5}>{this.state.read_back_write}</Text> - </TextContent> - </Bullseye> - </FlexItem> - </Flex> - - </PanelMainBody> - </PanelMain> - </Panel> - </FlexItem> - - </Flex> - </React.Fragment> -);}; -} - -export {WriteRead, WriteReadHorizontal}; diff --git a/ui/src/Controls/WriteRead4User.js b/ui/src/Controls/WriteRead4User.js deleted file mode 100644 index d8b1e38e6fa36b27c513533d50450ca23dd93cdc..0000000000000000000000000000000000000000 --- a/ui/src/Controls/WriteRead4User.js +++ /dev/null @@ -1,442 +0,0 @@ -import React from "react"; -import { - Button, - Checkbox, - InputGroup, - InputGroupText, - Dropdown, - DropdownToggle, - DropdownItem, - FormSelect, - FormSelectOption, - FormSelectOptionGroup, - Text, - TextInput, - TextContent, - TextVariants, - Form, - FormGroup, - PanelMainBody, - PanelMain, - Panel, - PanelHeader, - SidebarContent, - Sidebar, - Flex, - FlexItem, - Grid, - GridItem, - Bullseye, - Tooltip, -} from "@patternfly/react-core"; - -import { getPostBody, checkResponse } from '../utils/utility-functions' -import { FormSelectInputNewer } from "../Widgets/FormSelectInput"; - - -class WriteRead4User extends React.Component { - constructor(props) { - super(props); - this.state = { - - device_val : 0, - device : [ - { label: 'lpgbt1', disabled: false, value: '0'}, - { label: 'lpgbt2', disabled: false, value: '1'}, - { label: 'lpgbt3', disabled: false, value: '2'}, - { label: 'lpgbt4', disabled: false, value: '3'}, - { label: 'gbcr1', disabled: false, value: '4'}, - { label: 'gbcr2', disabled: false, value: '5'}, - { label: 'gbcr3', disabled: false, value: '6'}, - { label: 'gbcr4', disabled: false, value: '7'}, - ], - - value_read : "", - reg_write : "", - value_write : "", - read_back_read: "", - read_back_write: "", - }; - - this.onChange_device = (device_val) => { - this.setState({ device_val : device_val }); - console.log(device_val); - }; - - this.handleTextInputChange = value_read => { - this.setState({ value_read }); - }; - this.handleTextInputChange2 = reg_write => { - this.setState({ reg_write }); - }; - this.handleTextInputChange3 = value_write => { - this.setState({ value_write }); - }; - this.handleReadBack = data => { - this.setState({...this.state, read_back_read : data}); - }; - this.handleWriteReadBack = data => { - this.setState({...this.state, read_back_write : data}); - }; - this.read_device = (reg_address) => { - //var re = /[0-9A-Fa-f]{6}/g; - const requestData = { - register: reg_address, - device: this.state.device[this.state.device_val].label, - } - - console.log(requestData) - fetch(`${this.props.backendUrl}/sendReadRequest`, getPostBody(requestData)).then((response) => checkResponse(response)).then((data) => {console.log(data); this.handleReadBack(data)} - ).catch(err => {console.log(err)}); - }; - this.write_device = (reg_address,new_reg_value) => { - const requestData = { - device: this.state.device[this.state.device_val].label, - register: reg_address, - newValue: new_reg_value, - } - - console.log(requestData) - fetch(`${this.props.backendUrl}/sendWriteRequest`, getPostBody(requestData)).then((response) => checkResponse(response)).then((data) => {console.log(data); this.handleWriteReadBack(data)} - ).catch(err => {console.log(err)}); - }; - }; - - - render (){ - - return( - <React.Fragment> - - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Grid> - <Bullseye> - <GridItem span={7}> - <Bullseye> - <h4> Select the device: </h4> - </Bullseye> - </GridItem> - - <GridItem span={5}> - <Bullseye> - <FormSelectInputNewer id={"selectDeviceSimplePanelRead"} items={this.state.device} value={this.state.device_val} onChange={this.onChange_device}/> - </Bullseye> - </GridItem> - </Bullseye> - </Grid> - - </PanelMainBody> - </PanelMain> - </Panel> - - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Grid> - - <Bullseye> - <GridItem span={8}> - <Bullseye> - <Tooltip content={ <div>Use rom register for testing. In lpgbt v1 the return has to be 166. </div> }> - <Button id="read_reg_send_command" variant="primary" onClick={() => this.read_device(this.state.value_read)}> - <h3> Read register </h3> - </Button> - </Tooltip> - </Bullseye> - </GridItem> - </Bullseye> - - - <GridItem span={6}> - <Bullseye> - <h4>Address (hex)</h4> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <TextInput id="read_input" name="read_input" value={this.state.value_read} onChange={this.handleTextInputChange}/> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <h4>Read back value:</h4> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h5}>{this.state.read_back_read}</Text> - </TextContent> - </Bullseye> - </GridItem> - - </Grid> - - </PanelMainBody> - </PanelMain> - </Panel> - - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Grid> - - <Bullseye> - <GridItem span={8} rowSpan={1}> - <Bullseye> - <Button id="write_pri_send_command" variant="primary" onClick={() => this.write_device(this.state.reg_write, this.state.value_write)}> - <h3> Write register </h3> - </Button> - </Bullseye> - </GridItem> - </Bullseye> - - <GridItem span={6}> - <Bullseye> - <h4>Address</h4> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <TextInput id="write_address" name="write_address" value={this.state.reg_write} onChange={this.handleTextInputChange2}/> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <h4>Value (hex)</h4> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <TextInput id="write_value" name="write_value" value={this.state.value_write} onChange={this.handleTextInputChange3}/> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <h4>Read back value</h4> - </Bullseye> - </GridItem> - - <GridItem span={6}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h5}>{this.state.read_back_write}</Text> - </TextContent> - </Bullseye> - </GridItem> - </Grid> - - </PanelMainBody> - </PanelMain> - </Panel> - </React.Fragment> -);}; -} - - - -class WriteReadHorizontal extends React.Component { - constructor(props) { - super(props); - this.state = { - value_read : "", - reg_write : "", - value_write : "", - read_back_read: "-_-", - read_back_write: "-_-", - }; - this.handleTextInputChange = value_read => { - this.setState({ value_read }); - }; - this.handleTextInputChange2 = reg_write => { - this.setState({ reg_write }); - }; - this.handleTextInputChange3 = value_write => { - this.setState({ value_write }); - }; - this.handleReadBack = data => { - this.setState({...this.state, read_back_read : data}); - }; - this.handleWriteReadBack = data => { - this.setState({...this.state, read_back_write : data}); - }; - this.read_device = (reg_address) => { - //var re = /[0-9A-Fa-f]{6}/g; - const requestData = { - //fice_G: this.props.fice_g, - //fice_d: this.props.fice_d, - //fice_i: this.props.fice_i, - //fice_I: this.props.fice_I, - //optoboard_serial: this.props.serial, - register: reg_address, - device: this.props.device, - //isMaster: this.props.isMaster, - //i2c_master_val: this.props.i2c_master_val, - } - - console.log(requestData) - fetch(`${this.props.backendUrl}/sendReadRequest`, getPostBody(requestData)).then((response) => checkResponse(response)).then((data) => {console.log(data); this.handleReadBack(data)} - ).catch(err => {console.log(err)}); - }; - this.write_device = (reg_address,new_reg_value) => { - const requestData = { -/* fice_G: this.props.fice_g, - fice_d: this.props.fice_d, - fice_i: this.props.fice_i, - fice_I: this.props.fice_I, - optoboard_serial: this.props.serial, - reg_addr: reg_address, - isMaster: this.props.isMaster, - i2c_master_val: this.props.i2c_master_val,*/ - device: this.props.device, - register: reg_address, - newValue: new_reg_value, - } - - console.log(requestData) - fetch(`${this.props.backendUrl}/sendWriteRequest`, getPostBody(requestData)).then((response) => checkResponse(response)).then((data) => {console.log(data); this.handleWriteReadBack(data)} - ).catch(err => {console.log(err)}); - }; - }; - - render (){ - const VariableReadBack = "hex_value" - return( - <React.Fragment> - - <Flex> - <FlexItem flex={{ default: 'flex_1' }}> - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Bullseye> - <Flex> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Button id="read_reg_send_command" variant="primary" onClick={() => this.read_device(this.state.value_read)}> - <h3> Read register </h3> - </Button> - </Bullseye> - </FlexItem> - </Flex> - </Bullseye> - - <Flex> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>Address </h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextInput id="read_input" name="read_input" value={this.state.value_read} onChange={this.handleTextInputChange}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_2' }}> - <Bullseye> - <h4>Read back value:</h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h5}>{this.state.read_back_read}</Text> - </TextContent> - </Bullseye> - </FlexItem> - - </Flex> - - </PanelMainBody> - </PanelMain> - </Panel> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Bullseye> - <Flex> - <Bullseye> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Button id="write_pri_send_command" variant="primary" onClick={() => this.write_device(this.state.reg_write, this.state.value_write)}> - <h3> Write register </h3> - </Button> - </Bullseye> - </FlexItem> - </Bullseye> - </Flex> - </Bullseye> - - <Flex> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>Address </h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextInput id="write_address" name="write_address" value={this.state.reg_write} onChange={this.handleTextInputChange2}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>Value </h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextInput id="write_value" name="write_value" value={this.state.value_write} onChange={this.handleTextInputChange3}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_2' }}> - <Bullseye> - <h4>Read back value</h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h5}>{this.state.read_back_write}</Text> - </TextContent> - </Bullseye> - </FlexItem> - </Flex> - - </PanelMainBody> - </PanelMain> - </Panel> - </FlexItem> - - </Flex> - </React.Fragment> -);}; -} - -export {WriteRead4User, WriteReadHorizontal}; diff --git a/ui/src/Controls/WriteReadBox.js b/ui/src/Controls/WriteReadBox.js deleted file mode 100644 index dd5349410cca056e61614f9e625ac1b95e451b79..0000000000000000000000000000000000000000 --- a/ui/src/Controls/WriteReadBox.js +++ /dev/null @@ -1,220 +0,0 @@ -import React, { useState, useEffect } from "react"; -import { - Button, - Checkbox, - InputGroup, - InputGroupText, - Dropdown, - DropdownToggle, - DropdownItem, - FormSelect, - FormSelectOption, - FormSelectOptionGroup, - Text, - TextInput, - TextContent, - TextVariants, - Form, - FormGroup, - PanelMainBody, - PanelMain, - Panel, - PanelHeader, - SidebarContent, - Sidebar, - Flex, - FlexItem, - Grid, - GridItem, - Bullseye, - Tooltip, -} from "@patternfly/react-core"; - -import { getPostBody, checkResponse } from '../utils/utility-functions' -import { FormSelectInputNewer } from "../Widgets/FormSelectInput"; - -function WriteReadBox(){ - const [device_val, setdevice_val] = useState(0); - const device = [ - { label: 'lpgbt1', disabled: false, value: '0'}, - { label: 'lpgbt2', disabled: false, value: '1'}, - { label: 'lpgbt3', disabled: false, value: '2'}, - { label: 'lpgbt4', disabled: false, value: '3'}, - { label: 'gbcr1', disabled: false, value: '4'}, - { label: 'gbcr2', disabled: false, value: '5'}, - { label: 'gbcr3', disabled: false, value: '6'}, - { label: 'gbcr4', disabled: false, value: '7'}, - ]; - const [value_read, setvalue_read] = useState(""); - const [reg_write, setreg_write] = useState(""); - const [value_write, setvalue_write] = useState(""); - const [read_back_read, setread_back_read] = useState(""); - const [read_back_write, setread_back_write] = useState(""); - - const read_device = (reg_address) => { - //var re = /[0-9A-Fa-f]{6}/g; - const requestData = { - register: reg_address, - device: device[device_val].label, - } - fetch(`${this.props.backendUrl}/sendReadRequest`, getPostBody(requestData)).then((response) => checkResponse(response)).then((data) => {console.log(data); this.handleReadBack(data)} - ).catch(err => {console.log(err)}); - }; - const write_device = (reg_address,new_reg_value) => { - const requestData = { - device: device[device_val].label, - register: reg_address, - newValue: new_reg_value, - } - fetch(`${this.props.backendUrl}/sendWriteRequest`, getPostBody(requestData)).then((response) => checkResponse(response)).then((data) => {console.log(data); this.handleWriteReadBack(data)} - ).catch(err => {console.log(err)}); - }; - - return( - <React.Fragment> - - <Panel variant="raised"> - <PanelMain> - <PanelMainBody> - - <Bullseye> - <Flex> - <Bullseye> - <FlexItem> - <Bullseye> - <h4> Select the device: </h4> - </Bullseye> - </FlexItem> - - <FlexItem> - <Bullseye> - <FormSelectInputNewer id={"selectDeviceSimplePanelRead"} items={device} value={device_val} onChange={x => setdevice_val(x)}/> - </Bullseye> - </FlexItem> - </Bullseye> - </Flex> - </Bullseye> - - </PanelMainBody> - </PanelMain> - </Panel> - - <Panel variant="raised"> - <PanelMain> - <PanelMainBody> - - <Bullseye> - <Flex> - - <Bullseye> - <FlexItem> - <Bullseye> - <Tooltip content={ <div>Use rom register for testing. In lpgbt v1 the return has to be 166. </div> }> - <Button id="read_reg_send_command" variant="primary" onClick={() => read_device(value_read)}> - <h3> Read register </h3> - </Button> - </Tooltip> - </Bullseye> - </FlexItem> - </Bullseye> - - <FlexItem> - <Bullseye> - <h4>Read back: {read_back_read}</h4> - </Bullseye> - </FlexItem> - - </Flex> - </Bullseye> - <Bullseye> - <Flex> - <FlexItem> - <Bullseye> - <h4>Address (hex)</h4> - </Bullseye> - </FlexItem> - - <FlexItem> - <Bullseye> - <TextInput id="read_input" name="read_input" value={value_read} onChange={x => setvalue_read(x)}/> - </Bullseye> - </FlexItem> - - - </Flex> - </Bullseye> - - </PanelMainBody> - </PanelMain> - </Panel> - - <Panel variant="raised"> - <PanelMain> - <PanelMainBody> - - <Bullseye> - <Flex> - - <Bullseye> - <FlexItem> - <Bullseye> - <Button id="write_pri_send_command" variant="primary" onClick={() => write_device(reg_write, value_write)}> - <h3> Write register </h3> - </Button> - </Bullseye> - </FlexItem> - </Bullseye> - - <FlexItem> - <Bullseye> - <h4>Read back: {read_back_write}</h4> - </Bullseye> - </FlexItem> - - </Flex> - </Bullseye> - <Bullseye> - <Flex> - <FlexItem> - <Bullseye> - <h4>Address</h4> - </Bullseye> - </FlexItem> - - <FlexItem> - <Bullseye> - <TextInput id="write_address" name="write_address" value={reg_write} onChange={x => setreg_write(x)}/> - </Bullseye> - </FlexItem> - - </Flex> - </Bullseye> - <Bullseye> - <Flex> - - <FlexItem> - <Bullseye> - <h4>Value (hex)</h4> - </Bullseye> - </FlexItem> - - <FlexItem> - <Bullseye> - <TextInput id="write_value" name="write_value" value={value_write} onChange={x => setvalue_write(x)}/> - </Bullseye> - </FlexItem> - - </Flex> - </Bullseye> - - </PanelMainBody> - </PanelMain> - </Panel> - </React.Fragment> -) -}; - -export {WriteReadBox}; - - - diff --git a/ui/src/Controls/Characteristics_lpGBT.js b/ui/src/OptoboardTools/Characteristics_lpGBT.js similarity index 100% rename from ui/src/Controls/Characteristics_lpGBT.js rename to ui/src/OptoboardTools/Characteristics_lpGBT.js diff --git a/ui/src/OptoboardTools/Config.js b/ui/src/OptoboardTools/Config.js new file mode 100644 index 0000000000000000000000000000000000000000..49b41e2d6fdf66e1707d24f9e3b9f67b51a7fe01 --- /dev/null +++ b/ui/src/OptoboardTools/Config.js @@ -0,0 +1,238 @@ +import React, { useState, useEffect } from "react"; +import { + Button, + PanelMainBody, + PanelMain, + Panel, + Bullseye, + Flex, + FlexItem, + Checkbox, + Switch, +} from "@patternfly/react-core"; +import { getPostBody, checkResponse } from "../utils/utility-functions"; + +function Config({ url, optoboardPosition, optoComponents }) { + const [isLoading, setisLoading] = useState(false); + const [switchState, setswitchState] = useState(false); + const [CheckBox_lpgbt1, toggleBox_lpgbt1] = useState( + optoComponents.lpgbt1 ? true : null + ); + const [CheckBox_lpgbt2, toggleBox_lpgbt2] = useState( + optoComponents.lpgbt2 ? true : null + ); + const [CheckBox_lpgbt3, toggleBox_lpgbt3] = useState( + optoComponents.lpgbt3 ? true : null + ); + const [CheckBox_lpgbt4, toggleBox_lpgbt4] = useState( + optoComponents.lpgbt4 ? true : null + ); + const [CheckBox_gbcr1, toggleBox_gbcr1] = useState( + optoComponents.gbcr1 ? true : null + ); + const [CheckBox_gbcr2, toggleBox_gbcr2] = useState( + optoComponents.gbcr2 ? true : null + ); + const [CheckBox_gbcr3, toggleBox_gbcr3] = useState( + optoComponents.gbcr3 ? true : null + ); + const [CheckBox_gbcr4, toggleBox_gbcr4] = useState( + optoComponents.gbcr4 ? true : null + ); + const [buttonVariant, setbuttonVariant] = useState("primary"); + + const configure = () => { + let body = {}; + if (switchState) { + body = { + optoboardPosition: optoboardPosition, + activeLpgbt: + (CheckBox_lpgbt1 ? "1" : "0") + + (CheckBox_lpgbt2 ? "1" : "0") + + (CheckBox_lpgbt3 ? "1" : "0") + + (CheckBox_lpgbt4 ? "1" : "0"), + activeGbcr: + (CheckBox_gbcr1 ? "1" : "0") + + (CheckBox_gbcr2 ? "1" : "0") + + (CheckBox_gbcr3 ? "1" : "0") + + (CheckBox_gbcr4 ? "1" : "0"), + }; + } else { + body = { + optoboardPosition: optoboardPosition, + activeLpgbt: "None", + activeGbcr: "None", + }; + } + setisLoading(true); + console.log("Starting configuration of the Optoboard!"); + console.log(body); + + fetch(`${url}/configure`, getPostBody(body)) + .then((response) => checkResponse(response)) + .then((data) => { + console.log(data); + setisLoading(false); + if (data === "Optoboard configuration failed") { + setbuttonVariant("danger"); + } else { + setbuttonVariant("primary"); + } + }) + .catch((err) => { + console.log(err); + }) + .finally(() => { + setisLoading(false); + }); + //if (data == "Optoboard configuration completed") { EnableI2C(); DataSet(this.state.pathToJson, this.state.vtrxVersionValue, this.state.inDBCheckBox) }; + //});.catch(err => {this.setState({isLoading: false});}); + }; + const stringLPGBT = <h4 style={{ color: "grey" }}>lpgbt to configure</h4>; + const stringGBCR = <h4 style={{ color: "grey" }}> gbcr to configure</h4>; + + useEffect(() => { + const stringLPGBT = switchState ? ( + <h4>lpgbt to configure</h4> + ) : ( + <h4 style={{ color: "grey" }}>lpgbt to configure</h4> + ); + const stringGBCR = switchState ? ( + <h4> gbcr to configure</h4> + ) : ( + <h4 style={{ color: "grey" }}> gbcr to configure</h4> + ); + }, [switchState]); + + return ( + <React.Fragment> + <Panel variant=""> + <PanelMain> + <Bullseye> + <Button + spinnerAriaValueText={isLoading ? "Loading" : undefined} + isLoading={isLoading} + id="readCharacteristics" + variant={buttonVariant} + onClick={(event) => { + configure(); + }} + > + {isLoading ? "Configuring..." : "Configure"} + </Button> + </Bullseye> + + <Bullseye> + <Flex> + <FlexItem> + <Bullseye> + <h3>Manual selection</h3> + </Bullseye> + </FlexItem> + <FlexItem> + <Switch + id="no-label-switch-off" + aria-label="Message when on" + //labelOff="Message when off" + isChecked={switchState} + onChange={() => setswitchState(!switchState)} + //isReversed + /> + </FlexItem> + </Flex> + </Bullseye> + + <Bullseye> + <Flex> + <FlexItem>{stringLPGBT}</FlexItem> + <FlexItem> + <Bullseye> + <Checkbox + label={""} + isChecked={CheckBox_lpgbt1} + onChange={() => { + toggleBox_lpgbt1(!CheckBox_lpgbt1); + }} + id={"lpgbt_config_1"} + name={"lpgbt_config_1"} + isDisabled={!(switchState && optoComponents.lpgbt1)} + /> + <Checkbox + label={""} + isChecked={CheckBox_lpgbt2} + onChange={() => { + toggleBox_lpgbt2(!CheckBox_lpgbt2); + }} + id={"lpgbt_config_2"} + name={"lpgbt_config_2"} + isDisabled={!(switchState && optoComponents.lpgbt2)} + /> + <Checkbox + label={""} + isChecked={CheckBox_lpgbt3} + onChange={() => toggleBox_lpgbt3(!CheckBox_lpgbt3)} + id={"lpgbt_config_3"} + name={"lpgbt_config_3"} + isDisabled={!(switchState && optoComponents.lpgbt3)} + /> + <Checkbox + label={""} + isChecked={CheckBox_lpgbt4} + onChange={() => toggleBox_lpgbt4(!CheckBox_lpgbt4)} + id={"lpgbt_config_4"} + name={"lpgbt_config_4"} + isDisabled={!(switchState && optoComponents.lpgbt4)} + /> + </Bullseye> + </FlexItem> + </Flex> + </Bullseye> + + <Bullseye> + <Flex> + <FlexItem>{stringGBCR}</FlexItem> + <FlexItem> + <Bullseye> + <Checkbox + label={""} + isChecked={CheckBox_gbcr1} + onChange={() => toggleBox_gbcr1(!CheckBox_gbcr1)} + id={"gbcr_config_1"} + name={"gbcr_config_1"} + isDisabled={!(switchState && optoComponents.gbcr1)} + /> + <Checkbox + label={""} + isChecked={CheckBox_gbcr2} + onChange={() => toggleBox_gbcr2(!CheckBox_gbcr2)} + id={"gbcr_config_2"} + name={"gbcr_config_2"} + isDisabled={!(switchState && optoComponents.gbcr2)} + /> + <Checkbox + label={""} + isChecked={CheckBox_gbcr3} + onChange={() => toggleBox_gbcr3(!CheckBox_gbcr3)} + id={"gbcr_config_3"} + name={"gbcr_config_3"} + isDisabled={!(switchState && optoComponents.gbcr3)} + /> + <Checkbox + label={""} + isChecked={CheckBox_gbcr4} + onChange={() => toggleBox_gbcr4(!CheckBox_gbcr4)} + id={"gbcr_config_4"} + name={"gbcr_config_4"} + isDisabled={!(switchState && optoComponents.gbcr4)} + /> + </Bullseye> + </FlexItem> + </Flex> + </Bullseye> + </PanelMain> + </Panel> + </React.Fragment> + ); +} + +export { Config }; diff --git a/ui/src/OptoboardTools/OptoStatus.js b/ui/src/OptoboardTools/OptoStatus.js new file mode 100644 index 0000000000000000000000000000000000000000..0fad0799f599fd7bbbfbdd60c0d588bd4d97ca6c --- /dev/null +++ b/ui/src/OptoboardTools/OptoStatus.js @@ -0,0 +1,141 @@ +import React, { useState, useEffect } from "react"; +import { + Button, + TextInput, + PanelMainBody, + PanelMain, + Panel, + Bullseye, + Flex, + FlexItem, + Checkbox, + Switch, + Icon, +} from "@patternfly/react-core"; +import { getPostBody, checkResponse } from "../utils/utility-functions"; +import ExclamationCircleIcon from "@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon"; +import CheckCircleIcon from "@patternfly/react-icons/dist/esm/icons/check-circle-icon"; +import BanIcon from "@patternfly/react-icons/dist/esm/icons/ban-icon"; + +export function OptoStatus({ url, optoboardPosition, optoComponents }) { + const [isLoading, setisLoading] = useState(false); + + const [Status1, setStatus1] = useState( + <Icon status={optoComponents.lpgbt1 ? "info" : ""}> + <BanIcon /> + </Icon> + ); + const [Status2, setStatus2] = useState( + <Icon status={optoComponents.lpgbt2 ? "info" : ""}> + <BanIcon /> + </Icon> + ); + const [Status3, setStatus3] = useState( + <Icon status={optoComponents.lpgbt3 ? "info" : ""}> + <BanIcon /> + </Icon> + ); + const [Status4, setStatus4] = useState( + <Icon status={optoComponents.lpgbt4 ? "info" : ""}> + <BanIcon /> + </Icon> + ); + + const StatusCheck = () => { + const requestData = { + optoboardPosition: optoboardPosition, + }; + fetch(`${url}/statuscheck`, getPostBody(requestData)) + .then((response) => checkResponse(response)) + .then((data) => { + console.log(data); + setStatus1( + data.lpgbt1 === 1 ? ( + <Icon status="success"> + <CheckCircleIcon /> + </Icon> + ) : ( + <Icon status="danger"> + <ExclamationCircleIcon /> + </Icon> + ) + ); + setStatus2( + data.lpgbt2 === 1 ? ( + <Icon status="success"> + <CheckCircleIcon /> + </Icon> + ) : ( + <Icon status="danger"> + <ExclamationCircleIcon /> + </Icon> + ) + ); + setStatus3( + data.lpgbt3 === 1 ? ( + <Icon status="success"> + <CheckCircleIcon /> + </Icon> + ) : ( + <Icon status="danger"> + <ExclamationCircleIcon /> + </Icon> + ) + ); + setStatus4( + data.lpgbt4 === 1 ? ( + <Icon status="success"> + <CheckCircleIcon /> + </Icon> + ) : ( + <Icon status="danger"> + <ExclamationCircleIcon /> + </Icon> + ) + ); + }) + .catch((err) => { + console.log(err); + }); + }; + + return ( + <React.Fragment> + <Flex direction={{ default: "column" }}> + <Panel variant=""> + <PanelMain> + <PanelMainBody> + <Bullseye> + <Button + spinnerAriaValueText={isLoading ? "Loading" : undefined} + isLoading={isLoading} + id="readstatus" + variant={"primary"} + onClick={(event) => StatusCheck()} + > + {isLoading ? "Reading..." : "Read Status"} + </Button> + </Bullseye> + + <Bullseye> + <Flex> + <FlexItem> + <h3>lpGBT status</h3> + </FlexItem> + <FlexItem> + <Bullseye> + {Status1} + {Status2} + {Status3} + {Status4} + </Bullseye> + </FlexItem> + </Flex> + </Bullseye> + </PanelMainBody> + </PanelMain> + </Panel> + </Flex> + </React.Fragment> + ); +} diff --git a/ui/src/Controls/TestPatterns.js b/ui/src/OptoboardTools/TestPatterns.js similarity index 100% rename from ui/src/Controls/TestPatterns.js rename to ui/src/OptoboardTools/TestPatterns.js diff --git a/ui/src/Controls/TestPatternsSlave.js b/ui/src/OptoboardTools/TestPatternsSlave.js similarity index 100% rename from ui/src/Controls/TestPatternsSlave.js rename to ui/src/OptoboardTools/TestPatternsSlave.js diff --git a/ui/src/OptoboardTools/WriteReadBox.js b/ui/src/OptoboardTools/WriteReadBox.js new file mode 100644 index 0000000000000000000000000000000000000000..a25d26df730727ae8868bf77a356a882c6430f3c --- /dev/null +++ b/ui/src/OptoboardTools/WriteReadBox.js @@ -0,0 +1,621 @@ +import React, { useState, useEffect } from "react"; +import { + Button, + TextInput, + PanelMainBody, + PanelMain, + Panel, + Flex, + FlexItem, + Bullseye, + Tooltip, + Select, + SelectOption, + SelectVariant, + FormSelect, + FormSelectOption, +} from "@patternfly/react-core"; + +import { getPostBody, checkResponse } from "../utils/utility-functions"; +import { Registers } from "../Config/Registers"; + +export function WriteReadBox({ + url, + optoboardPosition, + optoComponents, + vtrxVersion, +}) { + const [device_val, setdevice_val] = useState("lpgbt1"); + const device = [ + { + label: "lpgbt1", + disabled: optoComponents.lpgbt1 ? false : true, + value: "lpgbt1", + }, + { + label: "lpgbt2", + disabled: optoComponents.lpgbt2 ? false : true, + value: "lpgbt2", + }, + { + label: "lpgbt3", + disabled: optoComponents.lpgbt3 ? false : true, + value: "lpgbt3", + }, + { + label: "lpgbt4", + disabled: optoComponents.lpgbt4 ? false : true, + value: "lpgbt4", + }, + { + label: "gbcr1", + disabled: optoComponents.gbcr1 ? false : true, + value: "gbcr1", + }, + { + label: "gbcr2", + disabled: optoComponents.gbcr2 ? false : true, + value: "gbcr2", + }, + { + label: "gbcr3", + disabled: optoComponents.gbcr3 ? false : true, + value: "gbcr3", + }, + { + label: "gbcr4", + disabled: optoComponents.gbcr4 ? false : true, + value: "gbcr4", + }, + { label: "vtrx", disabled: false, value: "vtrx" }, + ]; + const [isBERTing, setisBERTing] = useState(false); + const [channel, setchannel] = useState(0); + const [meastime, setmeastime] = useState(12); + const [buttonVariantBERT, setbuttonVariantBERT] = useState("primary"); + const [berLimit, setberLimit] = useState(""); + + const channels = [...Array(6).keys()].map((x) => { + return { label: x, disabled: false, value: x }; + }); + const meastimes = [...Array(16).keys()].map((x) => { + return { label: x, disabled: false, value: x }; + }); + + const berTest = () => { + //var re = /[0-9A-Fa-f]{6}/g; + const requestData = { + optoboardPosition: optoboardPosition, + meastime: meastime, + channel: channel, + device: device_val, + }; + setisBERTing(true); + setberLimit(""); + setbuttonVariantBERT("primary"); + fetch(`${url}/BERT_wrapper`, getPostBody(requestData)) + .then((response) => checkResponse(response)) + .then((data) => { + console.log(data); + setberLimit(data.BER_limit); + }) + .catch((err) => { + setbuttonVariantBERT("danger"); + console.log(err); + }) + .finally(setisBERTing(false)); + }; + + // functions to read a register from the Optoboard + + const [reg_read, setreg_read] = useState(""); + const [read_back_read, setread_back_read] = useState(""); + const [isOpenRead, setisOpenRead] = useState(false); + + const onSelectRead = (event, select, isPlaceholder) => { + if (isPlaceholder) { + clearSelectionRead(); + } else { + setreg_read(select); + setisOpenRead(false); + console.log("selected:", select); + } + }; + + const clearSelectionRead = () => { + console.log("cancel input/selection"); + setreg_read(""); + setisOpenRead(false); + }; + + // function to implement the filter of the registers + const [optionsRead, setoptionsRead] = useState([]); + + const customFilterRead = (_, value) => { + if (!value) { + return optionsRead; + } + const input = new RegExp(value, "i"); + return optionsRead.filter((child) => input.test(child.props.value)); + }; + + const read_device = (reg_address) => { + //var re = /[0-9A-Fa-f]{6}/g; + const requestData = { + optoboardPosition: optoboardPosition, + register: reg_address, + device: device_val, + }; + fetch(`${url}/sendReadRequest`, getPostBody(requestData)) + .then((response) => checkResponse(response)) + .then((data) => { + console.log(data); + if (data !== -1) { + setbuttonVariantRead("primary"); + setread_back_read(data); + } else { + setbuttonVariantRead("warning"); + } + }) + .catch((err) => { + console.log(err); + }); + }; + + // functions to write a register on the Optoboard + + const [reg_write, setreg_write] = useState(""); + const [value_write, setvalue_write] = useState(""); + const [read_back_write, setread_back_write] = useState(""); + const [isOpenWrite, setisOpenWrite] = useState(false); + const [isOpenValue, setisOpenValue] = useState(false); + + const [buttonVariantRead, setbuttonVariantRead] = useState("primary"); + const [buttonVariantWrite, setbuttonVariantWrite] = useState("primary"); + + const onSelectWrite = (event, select, isPlaceholder) => { + if (isPlaceholder) { + clearSelectionWrite(); + } else { + setreg_write(select); + setisOpenWrite(false); + console.log("selected:", select); + let x = []; + let selectArray = select.split(" "); + // console.log("selected:", select.split(" ").length); + + let keyRegValue = ""; + + if (device_val.includes("lpgbt")) { + keyRegValue = + "lpgbt" + (optoComponents.lpgbt_v ? "v1" : "v0") + "Write"; + } else if (device_val.includes("gbcr")) { + keyRegValue = "gbcr" + (optoComponents.gbcr_v == 2 ? "v2" : "v3"); + } else if (device_val.includes("vtrx")) { + keyRegValue = "vtrx" + (vtrxVersion == "1.2" ? "v12" : "v13"); + } + + if (selectArray.length == 1) { + for ( + var i = Registers[keyRegValue][select]["values"][0]; + i <= Registers[keyRegValue][select]["values"][1]; + i++ + ) { + x.push(<SelectOption key={i} value={i} />); + } + } else if (selectArray.length == 2) { + let subRegObj = Registers[keyRegValue][selectArray[0]][ + "subregisters" + ].filter((sreg) => Object.keys(sreg) == selectArray[1]); + if (subRegObj.length == 1) { + subRegObj = subRegObj[0]; + for ( + var i = subRegObj[selectArray[1]][0]; + i <= subRegObj[selectArray[1]][1]; + i++ + ) { + x.push(<SelectOption key={i} value={i} />); + } + } + } + setoptionsValue(x); + } + }; + + const clearSelectionWrite = () => { + console.log("cancel input/selection"); + setreg_write(""); + setisOpenWrite(false); + setoptionsValue([]); + }; + + // function to implement the filter of the registers + + const [optionsWrite, setoptionsWrite] = useState([]); + + const customFilterWrite = (_, value) => { + if (!value) { + return optionsWrite; + } + const input = new RegExp(value, "i"); + return optionsWrite.filter((child) => input.test(child.props.value)); + }; + + const onSelectValue = (event, select, isPlaceholder) => { + if (isPlaceholder) { + clearSelectionValue(); + } else { + setvalue_write(select); + setisOpenValue(false); + console.log("selected:", select); + } + }; + + const clearSelectionValue = () => { + console.log("cancel input/selection"); + setvalue_write(""); + setisOpenValue(false); + }; + + // function to implement the filter of the values to write + + const [optionsValue, setoptionsValue] = useState([]); + + const customFilterValue = (_, value) => { + if (!value) { + return optionsValue; + } + const input = new RegExp(value, "i"); + return optionsValue.filter((child) => input.test(child.props.value)); + }; + + const write_device = (reg_address, new_reg_value) => { + const requestData = { + optoboardPosition: optoboardPosition, + device: device_val, + register: reg_address, + newValue: new_reg_value, + }; + fetch(`${url}/sendWriteRequest`, getPostBody(requestData)) + .then((response) => checkResponse(response)) + .then((data) => { + console.log(data); + if (data !== -1) { + setbuttonVariantWrite("primary"); + setread_back_write(data); + } else { + setbuttonVariantWrite("warning"); + } + }) + .catch((err) => { + console.log(err); + }); + }; + + useEffect(() => { + const optionsChange = () => { + setoptionsRead([]); + setoptionsWrite([]); + let keyRegRead = "", + keyRegWrite = ""; + + if (device_val.includes("lpgbt")) { + keyRegRead = "lpgbt" + (optoComponents.lpgbt_v ? "v1" : "v0") + "Read"; + keyRegWrite = + "lpgbt" + (optoComponents.lpgbt_v ? "v1" : "v0") + "Write"; + } else if (device_val.includes("gbcr")) { + keyRegRead = "gbcr" + (optoComponents.gbcr_v == 2 ? "v2" : "v3"); + keyRegWrite = "gbcr" + (optoComponents.gbcr_v == 2 ? "v2" : "v3"); + } else if (device_val.includes("vtrx")) { + keyRegRead = "vtrx" + (vtrxVersion == "1.2" ? "v12" : "v13"); + keyRegWrite = "vtrx" + (vtrxVersion == "1.2" ? "v12" : "v13"); + } + + let x = []; + Object.keys(Registers[keyRegRead]).map((register, index) => { + x.push(<SelectOption key={register} value={register} />); + Registers[keyRegRead][register]["subregisters"].map((subreg) => { + x.push( + <SelectOption + key={register + " " + Object.keys(subreg)[0]} + value={register + " " + Object.keys(subreg)[0]} + /> + ); + }); + }); + + let y = []; + Object.keys(Registers[keyRegWrite]).map((register, index) => { + y.push(<SelectOption key={register} value={register} />); + Registers[keyRegWrite][register]["subregisters"].map((subreg) => { + y.push( + <SelectOption + key={register + " " + Object.keys(subreg)[0]} + value={register + " " + Object.keys(subreg)[0]} + /> + ); + }); + }); + + setoptionsRead(x); + setoptionsWrite(y); + }; + + optionsChange(); + }, [device_val]); + + return ( + <React.Fragment> + <Panel> + <PanelMain> + <Bullseye> + <Flex> + <Bullseye> + <FlexItem> + <Bullseye> + <h4> Select device: </h4> + </Bullseye> + </FlexItem> + + <FlexItem> + <Bullseye> + <FormSelect + id={"selectDeviceSimplePanelRead"} + value={device_val} + items={device} + onChange={(x) => setdevice_val(x)} + > + {device.map((option, index) => ( + <FormSelectOption + isDisabled={option.disabled} + key={index} + value={option.value} + label={option.label} + /> + ))} + </FormSelect> + </Bullseye> + </FlexItem> + </Bullseye> + </Flex> + </Bullseye> + </PanelMain> + </Panel> + + <Panel> + <PanelMain> + <PanelMainBody> + <Bullseye> + <Flex> + <Bullseye> + <FlexItem> + <Bullseye> + <Tooltip + content={ + <div> + Use rom register for testing. In lpgbt v1 the return + has to be 166.{" "} + </div> + } + > + <Button + id="read_reg_send_command" + variant={buttonVariantRead} + onClick={() => read_device(reg_read)} + > + <h3> Read register </h3> + </Button> + </Tooltip> + </Bullseye> + </FlexItem> + </Bullseye> + + <FlexItem> + <Bullseye> + <h4>Read back: {read_back_read}</h4> + </Bullseye> + </FlexItem> + </Flex> + </Bullseye> + <Bullseye> + <Flex> + <FlexItem> + <Select + maxHeight={300} + variant={SelectVariant.typeahead} + direction={"down"} + typeAheadAriaLabel="Select a register" + onToggle={() => setisOpenRead(!isOpenRead)} + onTypeaheadInputChanged={(value) => setreg_read(value)} + onSelect={onSelectRead} + onClear={clearSelectionRead} + onFilter={customFilterRead} + selections={reg_read} + isOpen={isOpenRead} + aria-labelledby={"typeahead-select-id-2"} + placeholderText="Select a register" + noResultsFoundText={"No results found"} + > + {optionsRead} + </Select> + </FlexItem> + </Flex> + </Bullseye> + </PanelMainBody> + </PanelMain> + </Panel> + + <Panel> + <PanelMain> + <Bullseye> + <Flex> + <Bullseye> + <FlexItem> + <Bullseye> + <Button + id="write_pri_send_command" + variant={buttonVariantWrite} + onClick={() => write_device(reg_write, value_write)} + > + <h3> Write register </h3> + </Button> + </Bullseye> + </FlexItem> + </Bullseye> + + <FlexItem> + <Bullseye> + <h4>Read back: {read_back_write}</h4> + </Bullseye> + </FlexItem> + </Flex> + </Bullseye> + <Bullseye> + <Flex> + <FlexItem> + <Bullseye> + <Select + maxHeight={300} + variant={SelectVariant.typeahead} + direction={"down"} + typeAheadAriaLabel="Select a register write" + onToggle={() => setisOpenWrite(!isOpenWrite)} + onTypeaheadInputChanged={(value) => { + setreg_write(value); + setoptionsValue([]); + }} + onSelect={onSelectWrite} + onClear={clearSelectionWrite} + onFilter={customFilterWrite} + selections={reg_write} + isOpen={isOpenWrite} + aria-labelledby={"typeahead-select-id-2-write"} + placeholderText="Select a register" + noResultsFoundText={"No results found"} + > + {optionsWrite} + </Select> + </Bullseye> + </FlexItem> + </Flex> + </Bullseye> + <Bullseye> + <Flex> + {/* <FlexItem> + <Bullseye> + <h4>Value</h4> + </Bullseye> + </FlexItem> */} + + <FlexItem> + <Bullseye> + <Select + maxHeight={300} + variant={SelectVariant.typeahead} + direction={"down"} + typeAheadAriaLabel="Value to be written" + onToggle={() => setisOpenValue(!isOpenValue)} + onTypeaheadInputChanged={(value) => setvalue_write(value)} + onSelect={onSelectValue} + onClear={clearSelectionValue} + onFilter={customFilterValue} + selections={value_write} + isOpen={isOpenValue} + aria-labelledby={"typeahead-select-id-2-valuetowrite"} + placeholderText="Value to be written" + noResultsFoundText={"Range not available for this register"} + > + {optionsValue} + </Select> + {/* <TextInput + id="write_value" + name="write_value" + value={value_write} + onChange={(x) => setvalue_write(x)} + /> */} + </Bullseye> + </FlexItem> + </Flex> + </Bullseye> + </PanelMain> + </Panel> + + <Panel> + <PanelMain> + <PanelMainBody> + <Flex> + <FlexItem> + <Button + spinnerAriaValueText={isBERTing ? "Loading" : undefined} + isLoading={isBERTing} + id="berTest" + variant={buttonVariantBERT} + onClick={(event) => { + berTest(); + }} + > + {isBERTing ? "Doing BERT..." : "Perform BERT"} + </Button> + </FlexItem> + <FlexItem> + <Bullseye> + <h4>BER limit: {berLimit}</h4> + </Bullseye> + </FlexItem> + </Flex> + <Flex> + <FlexItem> + <Bullseye> + <h4>Uplink</h4> + </Bullseye> + </FlexItem> + <FlexItem> + <Bullseye> + <FormSelect + id={"selectChannelBert"} + value={channel} + items={channels} + onChange={(x) => setchannel(x)} + > + {channels.map((option, index) => ( + <FormSelectOption + isDisabled={option.disabled} + key={index} + value={option.value} + label={option.label} + /> + ))} + </FormSelect> + </Bullseye> + </FlexItem> + <FlexItem> + <Bullseye> + <h4>Meas Time</h4> + </Bullseye> + </FlexItem> + <FlexItem> + <Bullseye> + <FormSelect + id={"selectChannelBert"} + value={meastime} + items={meastimes} + onChange={(x) => setmeastime(x)} + > + {meastimes.map((option, index) => ( + <FormSelectOption + isDisabled={option.disabled} + key={index} + value={option.value} + label={option.label} + /> + ))} + </FormSelect> + </Bullseye> + </FlexItem> + </Flex> + </PanelMainBody> + </PanelMain> + </Panel> + </React.Fragment> + ); +} diff --git a/ui/src/SimpleTabs/Configurations.js b/ui/src/SimpleTabs/Configurations.js deleted file mode 100644 index 9428981cfeae889f369ab9a7d798fbca336a6853..0000000000000000000000000000000000000000 --- a/ui/src/SimpleTabs/Configurations.js +++ /dev/null @@ -1,34 +0,0 @@ - -const Configurations = { - - "Basic": [ - {"serialNumber": "00000000", "Position": "OB0", "vtrxVersion": "1.3", "flx_G": "0", "flx_d": "0", - "withoutFelixcore": false, "ConfigurationPath": '/itk_demo_optoboard/optoboard_felix/configs/00000000_test_v1.json', "inDBCheckBox": false, - "ConfigurationDB": "http://localhost:5000", "debugCheckBox": false, "testmode": false} - ], - "SR1": [ - {"serialNumber": "00000000", "Position": "OB0", "vtrxVersion": "1.3", "flx_G": "0", "flx_d": "0", - "withoutFelixcore": false, "ConfigurationPath": '/itk_demo_optoboard/optoboard_felix/configs/00000000_test_v1.json', "inDBCheckBox": false, - "ConfigurationDB": "http://localhost:5000", "debugCheckBox": false, "testmode": false}, - {"serialNumber": "01000000", "Position": "OB1", "vtrxVersion": "1.3", "flx_G": "0", "flx_d": "0", - "withoutFelixcore": false, "ConfigurationPath": '/itk_demo_optoboard/optoboard_felix/configs/00000000_test_v1.json', "inDBCheckBox": false, - "ConfigurationDB": "http://localhost:5000", "debugCheckBox": false, "testmode": false}, - {"serialNumber": "02000000", "Position": "OB2", "vtrxVersion": "1.3", "flx_G": "0", "flx_d": "0", - "withoutFelixcore": false, "ConfigurationPath": '/itk_demo_optoboard/optoboard_felix/configs/00000000_test_v1.json', "inDBCheckBox": false, - "ConfigurationDB": "http://localhost:5000", "debugCheckBox": false, "testmode": false}, - {"serialNumber": "03000000", "Position": "OB3", "vtrxVersion": "1.3", "flx_G": "0", "flx_d": "0", - "withoutFelixcore": false, "ConfigurationPath": '/itk_demo_optoboard/optoboard_felix/configs/00000000_test_v1.json', "inDBCheckBox": false, - "ConfigurationDB": "http://localhost:5000", "debugCheckBox": false, "testmode": false}, - {"serialNumber": "04000000", "Position": "OB4", "vtrxVersion": "1.3", "flx_G": "0", "flx_d": "0", - "withoutFelixcore": false, "ConfigurationPath": '/itk_demo_optoboard/optoboard_felix/configs/00000000_test_v1.json', "inDBCheckBox": false, - "ConfigurationDB": "http://localhost:5000", "debugCheckBox": false, "testmode": false}, - {"serialNumber": "05000000", "Position": "OB5", "vtrxVersion": "1.3", "flx_G": "0", "flx_d": "0", - "withoutFelixcore": false, "ConfigurationPath": '/itk_demo_optoboard/optoboard_felix/configs/00000000_test_v1.json', "inDBCheckBox": false, - "ConfigurationDB": "http://localhost:5000", "debugCheckBox": false, "testmode": false}, - {"serialNumber": "06000000", "Position": "OB6", "vtrxVersion": "1.3", "flx_G": "0", "flx_d": "0", - "withoutFelixcore": false, "ConfigurationPath": '/itk_demo_optoboard/optoboard_felix/configs/00000000_test_v1.json', "inDBCheckBox": false, - "ConfigurationDB": "http://localhost:5000", "debugCheckBox": false, "testmode": false} - ] - } - -export { Configurations }; diff --git a/ui/src/SimpleTabs/DevelPanel.js b/ui/src/SimpleTabs/DevelPanel.js deleted file mode 100644 index 79118655eaa630363bfc40cf815ac667cec00fbf..0000000000000000000000000000000000000000 --- a/ui/src/SimpleTabs/DevelPanel.js +++ /dev/null @@ -1,72 +0,0 @@ -import React, { useState, useEffect } from "react"; -import { - Checkbox, - Skeleton, - Tab, - Tabs, - TabTitleText, - Text, - TextContent, - TextVariants, - Grid, - GridItem, - PageSection, - Page,Bullseye,TextInput, Panel, PanelHeader, Button, Modal, ModalVariant, ValidatedOptions, - Switch, - } from "@patternfly/react-core"; - - import {CommonlpGBT, MasterlpGBT, Placeholder} from "../SimpleTabs/lpGBT_pannel"; - import {ELinks} from "../SimpleTabs/eLinks"; - import { GBCRpannel } from "../SimpleTabs/GBCR"; - import { getPostBody, checkResponse } from '../utils/utility-functions' - import { MyContext, isI2C_On, OptoSerialContext, myFileCon } from '../SimpleTabs/MyContext'; - - import { FormSelectInputNewer } from "../Widgets/FormSelectInput"; - import { SimplePanel } from '../SimpleTabs/SimplePanel'; - - import { LoggingViewer } from '@itk-demo-sw/components'; - import { useLoggingViewer } from '@itk-demo-sw/hooks'; - -export function DevelPanel({url, OpenDevel, setOpenDevel}){ - - const ConfigurationFile = myFileCon; - const [activeTabKey, setactivaTabKey] = useState(0); - const tabs = [ - {tabName : "lpGBT1 (master)", content : <MasterlpGBT lpGBTNum={"1"} deviceAddress={"0x074"} backendUrl={url} isI2C_On_Check={true} ConfigurationFile={ConfigurationFile}/>}, - {tabName :"ePortClk", content: <ELinks backendUrl={url} ConfigurationFile={ConfigurationFile}/>}, - {tabName :"GBCR1", content: <GBCRpannel GBCRnum={"1"} backendUrl={url} ConfigurationFile={ConfigurationFile}/>}, - {tabName :"lpGBT2 (slave)", content: <CommonlpGBT lpGBTNum={"2"} deviceAddress={"0x075"} backendUrl={url} ConfigurationFile={ConfigurationFile}/>}, - {tabName :"GBCR2", content: <GBCRpannel GBCRnum={"2"} backendUrl={url} ConfigurationFile={ConfigurationFile}/>}, - {tabName :"lpGBT3 (slave)", content: <CommonlpGBT lpGBTNum={"3"} deviceAddress={"0x076"} backendUrl={url} ConfigurationFile={ConfigurationFile}/>}, - {tabName :"GBCR3", content: <GBCRpannel GBCRnum={"3"} backendUrl={url} ConfigurationFile={ConfigurationFile}/>}, - {tabName :"lpGBT4 (slave)", content: <CommonlpGBT lpGBTNum={"4"} deviceAddress={"0x077"} backendUrl={url} ConfigurationFile={ConfigurationFile}/>}, - {tabName :"GBCR4", content: <GBCRpannel GBCRnum={"4"} backendUrl={url} ConfigurationFile={ConfigurationFile}/>}, - {tabName :"VTRX", content: <Placeholder />}, - ]; - - - return( - - <Modal - width="90%" - title="Advanced commands" - isOpen={OpenDevel} - showClose = {true} - onClose={() => setOpenDevel(!OpenDevel)} - actions={[ - <Button key="cancel" variant="link" onClick={() => {setOpenDevel(!OpenDevel)}}> - Cancel - </Button>, - ]} - > - <Tabs activeKey={activeTabKey} onSelect={(event, tabIndex) => {setactivaTabKey(tabIndex)}} isBox={true}> - {tabs.map((tab, index) => ( - <Tab eventKey={index} title={<TabTitleText>{tab.tabName}</TabTitleText>}> - {tab.content} - </Tab> - ))} - </Tabs> - </Modal> - - ) -}; diff --git a/ui/src/SimpleTabs/GBCR.js b/ui/src/SimpleTabs/GBCR.js deleted file mode 100644 index d59675bd714d718e258447a816bbf061e726e387..0000000000000000000000000000000000000000 --- a/ui/src/SimpleTabs/GBCR.js +++ /dev/null @@ -1,843 +0,0 @@ -import React from "react"; -import { - Button, - Checkbox, - InputGroup, - InputGroupText, - FormSelect, - FormSelectOption, - FormSelectOptionGroup, - Text, - TextInput, - TextContent, - TextVariants, - Form, - FormGroup, - PanelMainBody, - PanelMain, - Panel, - PanelHeader, - Grid, - GridItem, - Bullseye, - PageSection, - Page, - Flex, FlexItem, -} from "@patternfly/react-core"; - -import { FormSelectInput, FormSelectInputNew } from "../Widgets/FormSelectInput"; -import {WriteReadHorizontal} from "../Controls/WriteRead"; -import { getPostBody, checkResponse } from '../utils/utility-functions'; - - - -class GBCRpannel extends React.Component { - constructor(props) { - super(props); - this.state = { - device : 'gbcr' + props.GBCRnum, - EQ_ATT : [ - { value: '0', disabled: false}, - { value: "1", disabled: false}, - { value: "2", disabled: false}, - { value: "3", disabled: false},], - CML_AmplSel : [ - { value: '0', disabled: false}, - { value: "1", disabled: false}, - { value: "2", disabled: false}, - { value: "3", disabled: false}, - { value: "4", disabled: false}, - { value: "5", disabled: false}, - { value: "6", disabled: false}, - { value: "7", disabled: false},], - MF_EQ : [ {value: "0", disabled: false}, - {value: "1", disabled: false}, - {value: "2", disabled: false}, - {value: "3", disabled: false}, - {value: "4", disabled: false}, - {value: "5", disabled: false}, - {value: "6", disabled: false}, - {value: "7", disabled: false}, - {value: "8", disabled: false}, - {value: "9", disabled: false}, - {value: "10", disabled: false}, - {value: "11", disabled: false}, - {value: "12", disabled: false}, - {value: "13", disabled: false}, - {value: "14", disabled: false}, - {value: "15", disabled: false},], - HF_EQ : [ {value: "0", disabled: false}, - {value: "1", disabled: false}, - {value: "2", disabled: false}, - {value: "3", disabled: false}, - {value: "4", disabled: false}, - {value: "5", disabled: false}, - {value: "6", disabled: false}, - {value: "7", disabled: false}, - {value: "8", disabled: false}, - {value: "9", disabled: false}, - {value: "10", disabled: false}, - {value: "11", disabled: false}, - {value: "12", disabled: false}, - {value: "13", disabled: false}, - {value: "14", disabled: false}, - {value: "15", disabled: false},], - }; - - this.sendSetting = (registerName,settingName,newValue) => { - const body = { - device: 'gbcr' + props.GBCRnum, - registerName: registerName, - settingName: settingName, - newValue: newValue, - //EPRX0Enable: 'EPRX0'+this.props.id+'Enable' - //: this.state.isBox, - //EPRX0DataRate: this.state.dataRate_val, - //EPRX0TrackMode: this.state.trackMode_val, - }; - console.log(body); - return fetch(`${this.props.backendUrl}/sendRegister`, getPostBody(body)).then((response) => checkResponse(response)).then((data) => {console.log(data)}); - }; - - }; - - render() { - return ( - - <React.Fragment> - <Page> - <PageSection> - - - <Flex direction={{ default: 'column' }}> - <Bullseye> - <WriteReadHorizontal backendUrl={this.props.backendUrl} device={'gbcr' + this.props.GBCRnum}/> - </Bullseye> - - <Flex> - - <FlexItem flex={{ default: 'flex_4' }}> - - <Panel variant="bordered"> - <PanelHeader> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Uplink</Text> - </TextContent> - </Bullseye> - </PanelHeader> - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_1' }}> - {[1,2].map((num) => (<Pannel1 ConfigurationFile={this.props.ConfigurationFile} GBCRnum={this.props.GBCRnum} sendSetting={this.sendSetting} id1="aqwes" id2="aqwes11" id3="Changeme1" id4="Changeme2" device={this.state.device} widgetNum={num} choices1={this.state.EQ_ATT} choices2={this.state.CML_AmplSel} choices4={this.state.MF_EQ} choices3={this.state.HF_EQ}/>))} - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - {[3,4].map((num) => (<Pannel1 ConfigurationFile={this.props.ConfigurationFile} GBCRnum={this.props.GBCRnum} sendSetting={this.sendSetting} id1="aqwes" id2="aqwes11" id3="Changeme1" id4="Changeme2" device={this.state.device} widgetNum={num} choices1={this.state.EQ_ATT} choices2={this.state.CML_AmplSel} choices4={this.state.MF_EQ} choices3={this.state.HF_EQ}/>))} - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - {[5,6].map((num) => (<Pannel1 ConfigurationFile={this.props.ConfigurationFile} GBCRnum={this.props.GBCRnum} sendSetting={this.sendSetting} id1="aqwes" id2="aqwes11" id3="Changeme1" id4="Changeme2" device={this.state.device} widgetNum={num} choices1={this.state.EQ_ATT} choices2={this.state.CML_AmplSel} choices4={this.state.MF_EQ} choices3={this.state.HF_EQ}/>))} - </FlexItem> - </Flex> - - </Panel> - </FlexItem> - - <FlexItem flex={{ default: 'flex_2' }}> - - <Panel variant="bordered"> - <PanelHeader> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Downlink</Text> - </TextContent> - </Bullseye> - </PanelHeader> - - {[1,2].map((num) => (<Pannel2 ConfigurationFile={this.props.ConfigurationFile} GBCRnum={this.props.GBCRnum} sendSetting={this.sendSetting} id1="aqwes" id2="aqwes11" device={this.state.device} widgetNum={num} choices1={this.state.EQ_ATT} choices2={this.state.CML_AmplSel} />))} - - </Panel> - </FlexItem> - - <FlexItem flex={{ default: 'flex_2' }}> - - <Panel variant="bordered"> - <PanelHeader> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Phase Shifter + LVDS Rx&Tx - </Text> - </TextContent> - </Bullseye> - </PanelHeader> - - {<Pannel3 ConfigurationFile={this.props.ConfigurationFile} GBCRnum={this.props.GBCRnum} sendSetting={this.sendSetting} backendUrl={this.props.backendUrl} device={this.state.device} id1="ascsa" choices1={this.state.MF_EQ} choices2={this.state.EQ_ATT}/>} - - </Panel> - - </FlexItem> - - </Flex> - </Flex> - - </PageSection> - </Page> - </React.Fragment> - -);}; -} - - - - - -class Pannel3 extends React.Component { - constructor(props) { - super(props); - this.state = { - checkName1: "dllEnable", checkName1ID: "dllEnable" + props.device, isBox1: Boolean(props.ConfigurationFile["gbcr"]["PHASESHIFTER0"]["DLLENABLE"][Number(props.GBCRnum)-1]), - checkName2: "dllCapReset", checkName2ID: "dllCapReset" + props.device, isBox2: Boolean(props.ConfigurationFile["gbcr"]["PHASESHIFTER0"]["DLLCAPRESET"][Number(props.GBCRnum)-1]), - - checkName3: "dllForceDown", checkName3ID: "dllForceDown" + props.device, isBox3: Boolean(props.ConfigurationFile["gbcr"]["PHASESHIFTER1"]["DLLFORCEDOWN"][Number(props.GBCRnum)-1]), - - checkName10: "Rx_en", checkName10ID: "Rx_en" + props.device, isBox10: Boolean(props.ConfigurationFile["gbcr"]["LVDSRXTX"]["RXEN"][Number(props.GBCRnum)-1]), - checkName11: "Rx_setCM", checkName11ID: "Rx_setCM" + props.device, isBox11: Boolean(props.ConfigurationFile["gbcr"]["LVDSRXTX"]["RXSETCM"][Number(props.GBCRnum)-1]), - - checkName12: "Rx_enableTermination", checkName12ID: "Rx_enableTermination" + props.device, isBox12: Boolean(props.ConfigurationFile["gbcr"]["LVDSRXTX"]["RXENTERMINATION"][Number(props.GBCRnum)-1]), - checkName13: "RxinvData", checkName13ID: "Rx_invData" + props.device, isBox13: Boolean(props.ConfigurationFile["gbcr"]["LVDSRXTX"]["RXINVDATA"][Number(props.GBCRnum)-1]), - checkName14: "disTx", checkName14ID: "disTx" + props.device, isBox14: Boolean(props.ConfigurationFile["gbcr"]["LVDSRXTX"]["DISTX"][Number(props.GBCRnum)-1]), - - dllChargePumpCurrent_val: String(props.ConfigurationFile["gbcr"]["PHASESHIFTER1"]["DLLCHARGEPUMPCURRENT"][Number(props.GBCRnum)-1]), - }; - - this.toggleBox1 = checked => {const memory = this.state.isBox1; - this.setState({isBox1: checked}); - this.props.sendSetting("PHASESHIFTER0",this.state.checkName1, checked ? "1" : "0").catch(err => {this.setState({isBox1 : memory})}); - }; - this.toggleBox2 = checked => {const memory = this.state.isBox2; - this.setState({isBox2: checked}); - this.props.sendSetting("PHASESHIFTER0",this.state.checkName2, checked ? "1" : "0").catch(err => {this.setState({isBox2 : memory})}); - }; - this.toggleBox3 = checked => {const memory = this.state.isBox3; - this.setState({isBox3: checked}); - this.props.sendSetting("PHASESHIFTER1",this.state.checkName3, checked ? "1" : "0").catch(err => {this.setState({isBox3 : memory})}); - }; - this.toggleBox10 = checked => {const memory = this.state.isBox10; - this.setState({isBox10: checked}); - this.props.sendSetting("LVDSRXTX", "Rxen", checked ? "1" : "0").catch(err => {this.setState({isBox10 : memory})}); - }; - this.toggleBox11 = checked => {const memory = this.state.isBox11; - this.setState({isBox11: checked}); - this.props.sendSetting("LVDSRXTX", "RxsetCM", checked ? "1" : "0").catch(err => {this.setState({isBox11 : memory})}); - }; - this.toggleBox12 = checked => {const memory = this.state.isBox12; - this.setState({isBox12: checked}); - this.props.sendSetting("LVDSRXTX", "RxenTermination", checked ? "1" : "0").catch(err => {this.setState({isBox12 : memory})}); - }; - this.toggleBox13 = checked => {const memory = this.state.isBox13; - this.setState({isBox13: checked}); - this.props.sendSetting("LVDSRXTX", "RxinvData", checked ? "1" : "0").catch(err => {this.setState({isBox13 : memory})}); - }; - this.toggleBox14 = checked => {const memory = this.state.isBox14; - this.setState({isBox14: checked}); - this.props.sendSetting("LVDSRXTX", this.state.checkName14, checked ? "1" : "0").catch(err => {this.setState({isBox14 : memory})}); - }; - - this.onChange_form1 = (dllChargePumpCurrent_val) => {const memory = this.state.dllChargePumpCurrent_val; - this.setState({ dllChargePumpCurrent_val }); - console.log(dllChargePumpCurrent_val); - this.props.sendSetting("PHASESHIFTER1",'dllChargePumpCurrent', dllChargePumpCurrent_val).catch(err => {this.setState({dllChargePumpCurrent_val : memory})}); - }; - - }; - - render() { - - return( - <React.Fragment> - - <Panel variant="bordered"> - <PanelMainBody> - <PanelMain> - - - - <Flex direction={{ default: 'column' }}> - - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Phase Shifter 15</Text> - </TextContent> - </Bullseye> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.checkName1} isChecked={this.state.isBox1} onChange={this.toggleBox1} id={this.state.checkName1ID} name={this.state.checkName1ID}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.checkName2} isChecked={this.state.isBox2} onChange={this.toggleBox2} id={this.state.checkName2ID} name={this.state.checkName2ID}/> - </Bullseye> - </FlexItem> - </Flex> - - </Flex> - - </PanelMain> - </PanelMainBody> - </Panel> - - - - <Panel variant="bordered"> - <PanelMainBody> - <PanelMain> - - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Phase Shifter 16</Text> - </TextContent> - </Bullseye> - - - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.checkName3} isChecked={this.state.isBox3} onChange={this.toggleBox3} id={this.state.checkName3ID} name={this.state.checkName3ID}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>dllChargePumpCurrent </h4> - </Bullseye> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNew id={this.props.id1} items={this.props.choices1} value={this.state.dllChargePumpCurrent_val} onChange={this.onChange_form1}/> - </Bullseye> - </FlexItem> - - </Flex> - - - </PanelMain> - </PanelMainBody> - </Panel> - - <Panel variant="bordered"> - <PanelMainBody> - <PanelMain> - - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Phase Shifter 17</Text> - </TextContent> - </Bullseye> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - - <FlexItem flex={{ default: 'flex_1' }}> - {<HelperPannel3 sendSetting={this.props.sendSetting} ConfigurationFile={this.props.ConfigurationFile} GBCRnum={this.props.GBCRnum} backendUrl={this.props.backendUrl} id="aqwsazxs" choice={this.props.choices1} regName="PHASESHIFTER2" formName="DLLCLOCKDELAYCH6"/>} - </FlexItem> - - </Flex> - - </PanelMain> - </PanelMainBody> - </Panel> - - - <Panel variant="bordered"> - <PanelMainBody> - <PanelMain> - - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Phase Shifter 18</Text> - </TextContent> - </Bullseye> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - <FlexItem flex={{ default: 'flex_1' }}> - {<HelperPannel3 sendSetting={this.props.sendSetting} ConfigurationFile={this.props.ConfigurationFile} GBCRnum={this.props.GBCRnum} backendUrl={this.props.backendUrl} id="aqwsazxs" choice={this.props.choices1} regName="PHASESHIFTER3" formName="DLLCLOCKDELAYCH5"/>} - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - {<HelperPannel3 sendSetting={this.props.sendSetting} ConfigurationFile={this.props.ConfigurationFile} GBCRnum={this.props.GBCRnum} backendUrl={this.props.backendUrl} id="aqwsazxs" choice={this.props.choices1} regName="PHASESHIFTER3" formName="DLLCLOCKDELAYCH4"/>} - </FlexItem> - </Flex> - - </PanelMain> - </PanelMainBody> - </Panel> - - <Panel variant="bordered"> - <PanelMainBody> - <PanelMain> - - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Phase Shifter 19</Text> - </TextContent> - </Bullseye> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - - <FlexItem flex={{ default: 'flex_1' }}> - {<HelperPannel3 sendSetting={this.props.sendSetting} ConfigurationFile={this.props.ConfigurationFile} GBCRnum={this.props.GBCRnum} backendUrl={this.props.backendUrl} id="aqwsazxs" choice={this.props.choices1} regName="PHASESHIFTER4" formName="DLLCLOCKDELAYCH7"/>} - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - {<HelperPannel3 sendSetting={this.props.sendSetting} ConfigurationFile={this.props.ConfigurationFile} GBCRnum={this.props.GBCRnum} backendUrl={this.props.backendUrl} id="aqwsazxs" choice={this.props.choices1} regName="PHASESHIFTER4" formName="DLLCLOCKDELAYCH6"/>} - </FlexItem> - - </Flex> - - </PanelMain> - </PanelMainBody> - </Panel> - - - <Panel variant="bordered"> - <PanelMainBody> - <PanelMain> - - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Phase Shifter 1a</Text> - </TextContent> - </Bullseye> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - - <FlexItem flex={{ default: 'flex_1' }}> - {<HelperPannel3 sendSetting={this.props.sendSetting} ConfigurationFile={this.props.ConfigurationFile} GBCRnum={this.props.GBCRnum} backendUrl={this.props.backendUrl} id="aqwsazxs" choice={this.props.choices1} regName="PHASESHIFTER5" formName="DLLCLOCKDELAYCH1"/>} - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - {<HelperPannel3 sendSetting={this.props.sendSetting} ConfigurationFile={this.props.ConfigurationFile} GBCRnum={this.props.GBCRnum} backendUrl={this.props.backendUrl} id="aqwsazxs" choice={this.props.choices1} regName="PHASESHIFTER5" formName="DLLCLOCKDELAYCHTEST"/>} - </FlexItem> - - </Flex> - - </PanelMain> - </PanelMainBody> - </Panel> - - - <Panel variant="bordered"> - <PanelMainBody> - <PanelMain> - - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>LVDS_RxandTx_1b</Text> - </TextContent> - </Bullseye> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.checkName10} isChecked={this.state.isBox10} onChange={this.toggleBox10} id={this.state.checkName10ID} name={this.state.checkName10ID}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.checkName11} isChecked={this.state.isBox11} onChange={this.toggleBox11} id={this.state.checkName11ID} name={this.state.checkName11ID}/> - </Bullseye> - </FlexItem> - - </Flex> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.checkName12} isChecked={this.state.isBox12} onChange={this.toggleBox12} id={this.state.checkName12ID} name={this.state.checkName12ID}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.checkName13} isChecked={this.state.isBox13} onChange={this.toggleBox13} id={this.state.checkName13ID} name={this.state.checkName13ID}/> - </Bullseye> - </FlexItem> - </Flex> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - <FlexItem flex={{ default: 'flex_1' }}> - {<HelperPannel3 sendSetting={this.props.sendSetting} ConfigurationFile={this.props.ConfigurationFile} GBCRnum={this.props.GBCRnum} backendUrl={this.props.backendUrl} id="aqwsazxs" choice={this.props.choices2} regName="LVDSRXTX" formName="RXEQ"/>} - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.checkName14} isChecked={this.state.isBox14} onChange={this.toggleBox14} id={this.state.checkName14ID} name={this.state.checkName14ID}/> - </Bullseye> - </FlexItem> - </Flex> - - - </PanelMain> - </PanelMainBody> - </Panel> - - </React.Fragment> - );}; -} - - -class HelperPannel3 extends React.Component { - constructor(props) { - super(props); - this.state = { - valueX: String(props.ConfigurationFile["gbcr"][props.regName][props.formName][Number(props.GBCRnum)-1]), - } - this.onChange_form = (valueX) => {const memory = this.state.valueX; - this.setState({ valueX }); - console.log(valueX); - this.props.sendSetting(this.props.regName,this.props.formName, valueX).catch(err => {this.setState({valueX : memory})}); - }; - }; - - render (){ - return( - <React.Fragment> - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>{this.props.formName}</h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNew id={this.props.id} items={this.props.choice} value={this.state.valueX} onChange={this.onChange_form}/> - </Bullseye> - </FlexItem> - - </Flex> - - </React.Fragment> - )}; -} - - - -class Pannel2 extends React.Component { - constructor(props) { - super(props); - this.state = { - form1Name: "TX" + props.widgetNum + "DL_ATT", - form1Val: String(props.ConfigurationFile["gbcr"]["CH" + props.widgetNum + "DOWNLINK0"]["TX" + props.widgetNum + "DLATT"][Number(props.GBCRnum)-1]), - - form2Name: "TX" + props.widgetNum + "DL_SR", - form2Val: String(props.ConfigurationFile["gbcr"]["CH" + props.widgetNum + "DOWNLINK0"]["TX" + props.widgetNum + "DLSR"][Number(props.GBCRnum)-1]), - - checkName1: "Tx" + props.widgetNum + "disDL_Emp", checkName1ID: "Tx" + props.widgetNum + "disDL_Emp" + props.device, - isBox1: Boolean(props.ConfigurationFile["gbcr"]["CH" + props.widgetNum + "DOWNLINK0"]["TX" + props.widgetNum + "DISDLEMP"][Number(props.GBCRnum)-1]), - - checkName2: "Tx" + props.widgetNum + "disDL_Bias", checkName2ID: "Tx" + props.widgetNum + "disDL_Bias" + props.device, - isBox2: Boolean(props.ConfigurationFile["gbcr"]["CH" + props.widgetNum + "DOWNLINK1"]["TX" + props.widgetNum + "DISDLBIAS"][Number(props.GBCRnum)-1]), - - checkName3: "Tx" + props.widgetNum + "disDL_LPF_Bias", checkName3ID: "Tx" + props.widgetNum + "disDL_LPF_Bias" + props.device, - isBox3: Boolean(props.ConfigurationFile["gbcr"]["CH" + props.widgetNum + "DOWNLINK1"]["TX" + props.widgetNum + "DISDLLPFBIAS"][Number(props.GBCRnum)-1]), - }; - - this.toggleBox1 = checked => {const memory = this.state.isBox1; - this.setState({isBox1: checked}); - this.props.sendSetting("CH" + props.widgetNum + "DOWNLINK0","Tx" + props.widgetNum + "disDLEmp", checked ? "1" : "0").catch(err => {this.setState({isBox1 : memory})}); - }; - this.toggleBox2 = checked => {const memory = this.state.isBox2; - this.setState({isBox2: checked}); - this.props.sendSetting("CH" + props.widgetNum + "DOWNLINK1","Tx" + props.widgetNum + "disDLBias", checked ? "1" : "0").catch(err => {this.setState({isBox2 : memory})}); - }; - this.toggleBox3 = checked => {const memory = this.state.isBox3; - this.setState({isBox3: checked}); - this.props.sendSetting("CH" + props.widgetNum + "DOWNLINK1","Tx" + props.widgetNum + "disDLLPFBias", checked ? "1" : "0").catch(err => {this.setState({isBox3 : memory})}); - }; - - this.onChange_form1 = (form1Val) => {const memory = this.state.form1Val; - this.setState({ form1Val }); - console.log(form1Val); - this.props.sendSetting("CH" + props.widgetNum + "DOWNLINK0","TX" + props.widgetNum + "DLATT", form1Val).catch(err => {this.setState({form1Val : memory})}); - }; - this.onChange_form2 = (form2Val) => {const memory = this.state.form2Val; - this.setState({ form2Val }); - console.log(form2Val); - this.props.sendSetting("CH" + props.widgetNum + "DOWNLINK0","TX" + props.widgetNum + "DLSR", form2Val).catch(err => {this.setState({form2Val : memory})}); - }; - }; - - render(){ - - return( - <React.Fragment> - - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Downlink Ch{this.props.widgetNum}</Text> - </TextContent> - </Bullseye> - - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - - <FlexItem flex={{ default: 'flex_1' }}> - <h4>{this.state.form1Name}</h4> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <FormSelectInputNew id={this.props.id1} items={this.props.choices1} value={this.state.form1Val} onChange={this.onChange_form1}/> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <h4>{this.state.form2Name}</h4> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <FormSelectInputNew id={this.props.id2} items={this.props.choices2} value={this.state.form2Val} onChange={this.onChange_form2}/> - </FlexItem> - - - </Flex> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.checkName1} isChecked={this.state.isBox1} onChange={this.toggleBox1} id={this.state.checkName1ID} name={this.state.checkName1ID}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.checkName2} isChecked={this.state.isBox2} onChange={this.toggleBox2} id={this.state.checkName2ID} name={this.state.checkName2ID}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.checkName3} isChecked={this.state.isBox3} onChange={this.toggleBox3} id={this.state.checkName3ID} name={this.state.checkName3ID}/> - </Bullseye> - </FlexItem> - - </Flex> - - </PanelMainBody> - </PanelMain> - </Panel> - </React.Fragment> -);}; -} - - - - -class Pannel1 extends React.Component { - constructor(props) { - super(props); - this.state = { - isBox: Boolean(props.ConfigurationFile["gbcr"]["CH" + props.widgetNum + "UPLINK0"]["CH" + props.widgetNum + "DISEQLF"][Number(props.GBCRnum)-1]), - checkName: "ch" + props.widgetNum + "dis_EQ_LF", - checkNameID: "ch" + props.widgetNum + "dis_EQ_LF" + props.device, - - form1Name: "ch" + props.widgetNum + "EQ_ATT", - form2Name: "ch" + props.widgetNum + "CML_AmplSel", - form3Name: "ch" + props.widgetNum + "CTLE_HFSR", - form4Name: "ch" + props.widgetNum + "CTLE_MFSR", - form1NameID: "ch" + props.widgetNum + "EQ_ATT" + props.device, - form2NameID: "ch" + props.widgetNum + "CML_AmplSel" + props.device, - form3NameID: "ch" + props.widgetNum + "CTLE_HFSR" + props.device, - form4NameID: "ch" + props.widgetNum + "CTLE_MFSR" + props.device, - - checkName2: "ch" + props.widgetNum + "Dis", - checkName2ID: "ch" + props.widgetNum + "Dis" + props.device, - isBox2: Boolean(props.ConfigurationFile["gbcr"]["CH" + props.widgetNum + "UPLINK2"]["CH" + props.widgetNum + "DIS"][Number(props.GBCRnum)-1]), - - checkName3: "ch" + props.widgetNum + "disDFF", - checkName3ID: "ch" + props.widgetNum + "disDFF" + props.device, - isBox3: Boolean(props.ConfigurationFile["gbcr"]["CH" + props.widgetNum + "UPLINK2"]["CH" + props.widgetNum + "DISDFF"][Number(props.GBCRnum)-1]), - - checkName4: "ch" + props.widgetNum + "disLPF", - checkName4ID: "ch" + props.widgetNum + "disLPF" + props.device, - isBox4: Boolean(props.ConfigurationFile["gbcr"]["CH" + props.widgetNum + "UPLINK2"]["CH" + props.widgetNum + "DISLPF"][Number(props.GBCRnum)-1]), - - EQ_ATT_val: String(props.ConfigurationFile["gbcr"]["CH" + props.widgetNum + "UPLINK0"]["CH" + props.widgetNum + "EQATT"][Number(props.GBCRnum)-1]), - CML_AmplSel_val: String(props.ConfigurationFile["gbcr"]["CH" + props.widgetNum + "UPLINK0"]["CH" + props.widgetNum + "CMLAMPLSEL"][Number(props.GBCRnum)-1]), - HF_EQ_val: String(props.ConfigurationFile["gbcr"]["CH" + props.widgetNum + "UPLINK1"]["CH" + props.widgetNum + "CTLEHFSR"][Number(props.GBCRnum)-1]), - MF_EQ_val: String(props.ConfigurationFile["gbcr"]["CH" + props.widgetNum + "UPLINK1"]["CH" + props.widgetNum + "CTLEMFSR"][Number(props.GBCRnum)-1]), - }; - - this.toggleBox = checked => { const memory = this.state.isBox; - this.setState({isBox: checked}); - this.props.sendSetting("CH" + props.widgetNum + "UPLINK0","ch" + props.widgetNum + "disEQLF", checked ? "1" : "0").catch(err => {this.setState({isBox : memory})}); - }; - - this.toggleBox2 = checked => { const memory = this.state.isBox2; - this.setState({isBox2: checked}); - this.props.sendSetting("CH" + props.widgetNum + "UPLINK2","ch" + props.widgetNum + "Dis", checked ? "1" : "0").catch(err => {this.setState({isBox2 : memory})}); - }; - - this.toggleBox3 = checked => { const memory = this.state.isBox3; - this.setState({isBox3: checked}); - this.props.sendSetting("CH" + props.widgetNum + "UPLINK2","ch" + props.widgetNum + "disDFF", checked ? "1" : "0").catch(err => {this.setState({isBox3 : memory})}); - }; - - this.toggleBox4 = checked => { const memory = this.state.isBox4; - this.setState({isBox4: checked}); - this.props.sendSetting("CH" + props.widgetNum + "UPLINK2","ch" + props.widgetNum + "disLPF", checked ? "1" : "0").catch(err => {this.setState({isBox4 : memory})}); - }; - - this.onChange_EQ_ATT = (EQ_ATT_val) => {const memory = this.state.EQ_ATT_val; - this.setState({ EQ_ATT_val }); - console.log(EQ_ATT_val); - this.props.sendSetting("CH" + props.widgetNum + "UPLINK0","ch" + props.widgetNum + "EQATT", EQ_ATT_val).catch(err => {this.setState({EQ_ATT_val : memory})}); - }; - this.onChange_CML_AmplSel_val = (CML_AmplSel_val) => {const memory = this.state.CML_AmplSel_val; - this.setState({ CML_AmplSel_val }); - console.log(CML_AmplSel_val); - this.props.sendSetting("CH" + props.widgetNum + "UPLINK0","ch" + props.widgetNum + "CMLAmplSel", CML_AmplSel_val).catch(err => {this.setState({CML_AmplSel_val : memory})}); - }; - this.onChange_CTLE_HFSR = (HF_EQ_val) => {const memory = this.state.HF_EQ_val; - this.setState({ HF_EQ_val }); - console.log(HF_EQ_val); - this.props.sendSetting("CH" + props.widgetNum + "UPLINK1","ch" + props.widgetNum + "CTLEHFSR", HF_EQ_val).catch(err => {this.setState({HF_EQ_val : memory})}); - }; - this.onChange_CTLE_MFSR = (MF_EQ_val) => {const memory = this.state.MF_EQ_val; - this.setState({ MF_EQ_val }); - console.log(MF_EQ_val); - this.props.sendSetting("CH" + props.widgetNum + "UPLINK1","ch" + props.widgetNum + "CTLEMFSR", MF_EQ_val).catch(err => {this.setState({MF_EQ_val : memory})}); - }; - }; - - render(){ - return( - - <React.Fragment> - - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - - <Flex direction={{ default: 'column' }}> - - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Uplink Ch{this.props.widgetNum}</Text> - </TextContent> - </Bullseye> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.checkName} isChecked={this.state.isBox} onChange={this.toggleBox} id={this.state.checkNameID} name={this.state.checkNameID}/> - </Bullseye> - </FlexItem> - - </Flex> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>{this.state.form1Name}</h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNew id={this.props.id1} items={this.props.choices1} value={this.state.EQ_ATT_val} onChange={this.onChange_EQ_ATT}/> - </Bullseye> - </FlexItem> - - </Flex> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>{this.state.form2Name}</h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNew id={this.props.id2} items={this.props.choices2} value={this.state.CML_AmplSel_val} onChange={this.onChange_CML_AmplSel_val}/> - </Bullseye> - </FlexItem> - - </Flex> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>{this.state.form3Name}</h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNew id={this.props.id3} items={this.props.choices3} value={this.state.HF_EQ_val} onChange={this.onChange_CTLE_HFSR}/> - </Bullseye> - </FlexItem> - - </Flex> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <h4>{this.state.form4Name}</h4> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNew id={this.props.id4} items={this.props.choices4} value={this.state.MF_EQ_val} onChange={this.onChange_CTLE_MFSR}/> - </Bullseye> - </FlexItem> - </Flex> - - <Flex justifyContent={{ default: 'justifyContentFlexCenter' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.checkName2} isChecked={this.state.isBox2} onChange={this.toggleBox2} id={this.state.checkName2ID} name={this.state.checkName2ID}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.checkName3} isChecked={this.state.isBox3} onChange={this.toggleBox3} id={this.state.checkName3ID} name={this.state.checkName3ID}/> - </Bullseye> - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <Checkbox label={this.state.checkName4} isChecked={this.state.isBox4} onChange={this.toggleBox4} id={this.state.checkName4ID} name={this.state.checkName4ID}/> - </Bullseye> - </FlexItem> - </Flex> - </Flex> - - </PanelMainBody> - </PanelMain> - </Panel> - </React.Fragment> - );}; -}; - -export { GBCRpannel }; diff --git a/ui/src/SimpleTabs/MyContext.js b/ui/src/SimpleTabs/MyContext.js deleted file mode 100644 index 660b4dd494381a5670af5d00b9c615b70ed424eb..0000000000000000000000000000000000000000 --- a/ui/src/SimpleTabs/MyContext.js +++ /dev/null @@ -1,20 +0,0 @@ -import React from "react"; -import myFile from '../Config/00000000_test_v1.json'; - -export const isI2C_On = false -export const OptoSerialContext = "00000000" -export const myFileCon = myFile -export const MyContext = React.createContext({ isI2C_On: isI2C_On, - isI2C_On_Check : () => {}, - OptoSerialContext: OptoSerialContext, - handleModalToggleOpen : () => {}, - optoVersion : "", - lpgbtVersion : "", - fetchDataSet : () => {}, - myFileConfig : myFileCon, - }) - -export const MyContextTestPattern = React.createContext({ isI2C_On: isI2C_On, - - }) - diff --git a/ui/src/SimpleTabs/OptoboardList.js b/ui/src/SimpleTabs/OptoboardList.js deleted file mode 100644 index 25c6dad7b66f18f71df60c93b39384db316c4b02..0000000000000000000000000000000000000000 --- a/ui/src/SimpleTabs/OptoboardList.js +++ /dev/null @@ -1,433 +0,0 @@ -import React, { useState, useEffect } from "react"; -import { SimpleList, SimpleListItem } from '@patternfly/react-core'; -import { WriteReadBox } from "../Controls/WriteReadBox"; -import { Config } from "../Controls/Config"; -import {Configurations} from '../SimpleTabs/Configurations'; -import {OptoStatus} from '../Controls/OptoStatus'; -import {DevelPanel} from "../SimpleTabs/DevelPanel"; - -import { - Bullseye, - Button, - Flex, - FlexItem, - Modal, - ModalVariant, - Text, - TextContent, - TextVariants, - Tooltip, - TextInput, - Panel, - PanelMain, - PanelMainBody, - PanelHeader, - Page, - PageSection, - Switch, - FormSelect, - FormSelectOption, - Checkbox, - Icon, - Drawer, - DrawerPanelContent, - DrawerContent, - DrawerContentBody, - DrawerHead, - DrawerActions, - DrawerCloseButton, -} from '@patternfly/react-core' -import { - CheckedTextInput, - ConfigSelection, - IntegerInput, - TypeaheadSelectInput -} from '@itk-demo-sw/components' -import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon'; -import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; - -import { getPostBody, checkResponse } from '../utils/utility-functions' - - -const TextInputBasic2 = () => { - const [value3, setValue3] = useState('10000000'); - return <TextInput value={value3} type="text" onChange={x => setValue3(x)} aria-label="text input example" />; -}; - -const items = [ - <SimpleListItem key="item1" isActive> - List item 1 - </SimpleListItem>, - <SimpleListItem key="item2" component="a" href="#"> - List item 2 - </SimpleListItem>, - <SimpleListItem key="item3"> - List item 3 - </SimpleListItem> -]; - -const print= ( -<SimpleList aria-label="Simple List Example"> - {items} -</SimpleList> -) - -const TextInputBasic = () => { - const [value1, setValue1] = useState('00000000'); - return <TextInput value={value1} type="text" onChange={value => setValue1(value)} aria-label="text input example" />; -}; - - - -/*-----------------------------------------------------------------------------------*/ - -export function OptoboardList(url) { - const [optoList, setoptoList] = useState(Configurations["SR1"]); - const [isOpen, setisOpen] = useState(false); - const [OpenDevel, setOpenDevel] = useState(false); - const [modify, setmodify] = useState(false); - const [currentOpto, setcurrentOpto] = useState({"serialNumber": "00000000", "Position": "OB0", "vtrxVersion": "1.3", "flx_G": "0", "flx_d": "0", - "withoutFelixcore": false, "ConfigurationPath": '/itk_demo_optoboard/optoboard_felix/configs/00000000_test_v1.json', "inDBCheckBox": false, - "ConfigurationDB": "http://localhost:5000", "debugCheckBox": false, "testmode": false}); - const ConfigurationOptions = [{value: "Load Configuration", label: "Load Configuration", disabled: true}] - for (var key in Configurations) { - ConfigurationOptions.push({value: key, label: key, disabled:false}); - } - const [DefaultConfig, setDefaultConfig] = useState("SR1"); - - /* - url, optoList, setoptoList, isOpen, setisOpen, modify, setmodify, currentOpto, setcurrentOpto - const AddOptoboardModal = AddOptoboard(url, optoList, setoptoList, isOpen, setisOpen, modify, setmodify, currentOpto, setcurrentOpto); - */ -/* -<AddOptoboard url={url} optoList={optoList} setoptoList={setoptoList} isOpen={isOpen} setisOpen={setisOpen} modify={modify} setmodify={setmodify} currentOpto={currentOpto} setcurrentOpto={setcurrentOpto}/> -*/ - -function AddOptoboard({url, optoList, setoptoList, isOpen, setisOpen, modify, setmodify, currentOpto, setcurrentOpto}) { - const [Serial, setSerial] = useState(modify ? currentOpto["serialNumber"] : "00000000"); - const [Position, setPosition] = useState(modify ? currentOpto["Position"] : "OB1"); - const [vtrx, setVtrx] = useState(modify ? currentOpto["vtrxVersion"] : "1.3"); - const vtrxOptions = [{value: "1.2", label: "1.2", disabled: false},{value: "1.3", label: "1.3", disabled:false}] - const [flx_G, setflx_G] = useState(modify ? currentOpto["flx_G"] : "0"); - const [flx_d, setflx_d] = useState(modify ? currentOpto["flx_d"] : "0"); - const [withoutFelixcore, setwithoutFelixcore] = useState(modify ? currentOpto["withoutFelixcore"] : false); - const [ConfigurationPath, setConfigurationPath] = useState(modify ? currentOpto["ConfigurationPath"] : '/itk_demo_optoboard/optoboard_felix/configs/00000000_test_v1.json'); - const [validConfigPath, validConfigPathChange] = useState("success"); - const [inDBCheckBox, setinDBCheckBox] = useState(modify ? currentOpto["inDBCheckBox"] : false); - const [configDBAvailable, setconfigDBAvailable] = useState("warning"); - const [ConfigurationDB, setConfigurationDB] = useState(modify ? currentOpto["ConfigurationDB"] : "http://localhost:5000"); - const [debugCheckBox, setdebugCheckBox] = useState(modify ? currentOpto["debugCheckBox"] : false); - const [testmode, SwitchTestModeChange] = useState(modify ? currentOpto["testmode"] : false); - const [ButtonVariant, setButtonVariant] = useState("primary"); - - - - const addToList = (x) => { - let tempArr = optoList; - tempArr.push(x); - setoptoList(tempArr); - }; - - const deleteItem = (index) => { - /*still need to be adjusted*/ - let temp = optoList.filter((item, i) => i !== index); - setoptoList(temp); - }; - - /*modify this function to account for when the serial or path to file are not valid*/ - const onClickAdd = () => { - setisOpen(!isOpen); - let uniquePosition = true; - for (var x of optoList) { - if (x["Position"]===Position){ - uniquePosition = false; - } - } - if ((Serial !== "") && (uniquePosition)) { - addToList({"serialNumber": Serial, "Position": Position, "vtrxVersion": vtrx, "flx_G": flx_G, "flx_d": flx_d, - "withoutFelixcore": withoutFelixcore, "ConfigurationPath": ConfigurationPath, "inDBCheckBox": inDBCheckBox, - "ConfigurationDB": ConfigurationDB, "debugCheckBox": debugCheckBox, "testmode": testmode}); - console.log(optoList); - setSerial("") - } - }; - - const onChangeConfigurationPath = (x) => { - setConfigurationPath(x) - fetch(`${url}/checkAvailableDatasetInDB`, getPostBody({path: x, inDB: inDBCheckBox, CONFIGDB_ADDRESS: ConfigurationDB})).then( - (response) => checkResponse(response)).then( - (data) => {console.log(data); - if (data===1) {validConfigPathChange('success'); setButtonVariant("primary") - } else {validConfigPathChange('error'); setButtonVariant("danger") } - }); - }; - - const onChangeConfigurationDB = (newname) => { - setConfigurationDB(newname); - fetch(`${url}/configDbUnavailable_wrapper`, getPostBody({CONFIGDB_ADDRESS: newname})).then( - (response) => checkResponse(response)).then( - (data) => {console.log(data); - if (data) {setconfigDBAvailable('error'); setButtonVariant("danger") - } else {setconfigDBAvailable('success'); setButtonVariant("primary")} - }); - }; - - return( - <React.Fragment> - <Modal - variant={ModalVariant.medium} - title="Initialize the Optoboard" - isOpen={isOpen} - showClose = {true} - onClose={() => setisOpen(!isOpen)} - actions={[ - <Button key="close" variant={ButtonVariant} onClick={onClickAdd}> - Add Optoboard to your setup - </Button>, - <Button key="cancel" variant="link" onClick={() => {setisOpen(!isOpen); setmodify(false)}}> - Cancel - </Button>, - ]} - > - <Flex> - <FlexItem flex={{ default: 'flex_1' }}> - <TextContent> - <Text component={TextVariants.h3}>Serial Number</Text> - </TextContent> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextInput id="optoserial" name="Optoboard Serial Number" value={Serial} type="text" onChange={X => setSerial(X)} aria-label="text input example" /> - </Bullseye> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <TextContent> - <Text component={TextVariants.h3}>Position</Text> - </TextContent> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextInput id="position" name="position" value={Position} type="text" onChange={X => setPosition(X)} aria-label="text input example" /> - </Bullseye> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Vtrx</Text> - </TextContent> - </Bullseye> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelect value={vtrx} onChange={X => setVtrx(X)} aria-label="FormSelect Input"> - {vtrxOptions.map((option, index) => ( - <FormSelectOption isDisabled={option.disabled} key={index} value={option.value} label={option.label} /> - ))} - </FormSelect> - </Bullseye> - </FlexItem> - </Flex> - <Flex> - <FlexItem flex={{ default: 'flex_1' }} > - <TextContent> - <Text component={TextVariants.h3}>flx_G</Text> - </TextContent> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <TextInput id="flx_G_id" name="flx_G" value={flx_G} onChange={x => setflx_G(x)}/> - </FlexItem> - <FlexItem flex={{ default: "flex_1" }}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>flx_d</Text> - </TextContent> - </Bullseye> - </FlexItem> - <FlexItem flex={{ default: "flex_1" }}> - <Bullseye> - <TextInput id="flx_d" name="flx_d" value={flx_d} onChange={x => setflx_d(x)}/> - </Bullseye> - </FlexItem> - <FlexItem flex={{ default: "flex_2" }}> - <Bullseye> - <Checkbox label={"without felixcore"} isChecked={withoutFelixcore} onChange={() => setwithoutFelixcore(!withoutFelixcore)} id={"without felixcore"} name={"without felixcore"}/> - </Bullseye> - </FlexItem> - </Flex> - <Flex> - <FlexItem flex={{ default: "flex_1" }}> - <TextContent> - <Text component={TextVariants.h3}>Configuration File</Text> - </TextContent> - </FlexItem> - <FlexItem flex={{ default: "flex_1" }}> - <TextInput id="ConfFile" name="ConfFile" value={ConfigurationPath} onChange={onChangeConfigurationPath} validated={validConfigPath}/> - </FlexItem> - <FlexItem flex={{ default: "flex_1" }}> - <Checkbox label={"Search in ConfigDB"} isChecked={inDBCheckBox} onChange={() => setinDBCheckBox(!inDBCheckBox)} id={"Search in the database"} name={"Search in the database"}/> - </FlexItem> - </Flex> - <Flex> - <FlexItem flex={{ default: "flex_2" }}> - <TextContent> - <Text component={TextVariants.h3}>ConfigDB</Text> - </TextContent> - </FlexItem> - <FlexItem flex={{ default: "flex_2" }}> - <TextInput id="ConfigDB" name="ConfigDB" value={ConfigurationDB} onChange={onChangeConfigurationDB} isDisabled={inDBCheckBox ? false : true} validated={configDBAvailable}/> - </FlexItem> - <FlexItem flex={{ default: "flex_1" }}> - <Checkbox label={"debug"} isChecked={debugCheckBox} onChange={() => setdebugCheckBox(!debugCheckBox)} id={"debug"} name={"debug"}/> - </FlexItem> - <FlexItem flex={{ default: "flex_1"}}> - <Checkbox id="test_mod" label="test mode" isChecked={testmode} onChange={() => SwitchTestModeChange(!testmode)} /> - </FlexItem> - </Flex> - </Modal> - </React.Fragment> - ); -}; - - const example =( - <Panel variant="bordered"> - <PanelMain> - <PanelMainBody> - <Flex key={'scan config flex'}> - <FlexItem key={'scan config title item'}> - <TextContent - style={{ width: '250px' }} - key={'scan config title textcon'} - > - <Text - component="h3" - key={'scan config title text'} - > - {'Scan Config'} - </Text> - </TextContent> - </FlexItem> - <FlexItem key={'test1'}> - <TextInputBasic /> - </FlexItem> - <FlexItem key={'test2'}> - <TextInputBasic2 /> - </FlexItem> - <FlexItem key={'print'}> - {print} - </FlexItem> - </Flex> - </PanelMainBody> - </PanelMain> - </Panel> - ); - -/* useEffect(() => {console.log(currentOpto); - const AddOptoboardModal = AddOptoboard(url, optoList, setoptoList, isOpen, setisOpen, modify, setmodify, currentOpto, setcurrentOpto); - })*/ - return ( - <React.Fragment> - <AddOptoboard url={url} optoList={optoList} setoptoList={setoptoList} isOpen={isOpen} setisOpen={setisOpen} modify={modify} setmodify={setmodify} currentOpto={currentOpto} setcurrentOpto={setcurrentOpto}/> - <DevelPanel url={url} OpenDevel={OpenDevel} setOpenDevel={setOpenDevel} /> - <Page> - <PageSection> - <Panel> - <PanelMain> - <PanelMainBody> - <Flex> - <FlexItem key={'add optoboard'}> - <Button variant="primary" isLarge onClick={() => {setisOpen(!isOpen); setmodify(false)}}> - <h3> Add Optoboard </h3> - </Button> - </FlexItem> - <FlexItem key={'add configuration'}> - <Button variant="secondary" isLarge onClick={() => setisOpen(!isOpen)}> - <h3> Add Configuration </h3> - </Button> - </FlexItem> - <FlexItem> - <FormSelect value={DefaultConfig} onChange={X => {setDefaultConfig(X); setoptoList(Configurations[X])}} aria-label="FormSelect Input"> - {ConfigurationOptions.map((option, index) => ( - <FormSelectOption isDisabled={option.disabled} key={index} value={option.value} label={option.label} /> - ))} - </FormSelect> - </FlexItem> - </Flex> - </PanelMainBody> - </PanelMain> - </Panel> - - <Panel> - <PanelMain> - <PanelMainBody> - <Flex > - {optoList.map((opto, index) => { - return ( - <Panel> - <PanelMain> - <PanelMainBody> - <FlexItem > - <Panel variant="raised"> - <PanelMain> - <PanelMainBody> - <Flex> - <FlexItem flex={{ default: 'flex_1' }}> - <TextContent> - <Text component={TextVariants.h3}>{opto.Position}</Text> - </TextContent> - </FlexItem> - <FlexItem align={{ defautl: "alignRight"}}> - <Tooltip content={"Enable advanced mode"}> - <Button aria-label="modify" variant="plain" id="tt-ref" onClick={() => {setOpenDevel(!OpenDevel)}}> - <Icon> - <PlusCircleIcon/> - </Icon> - </Button> - </Tooltip> - <Tooltip content={ - <div> - <h4>Serial Number: {opto.serialNumber} Vtrx: {opto.vtrxVersion} </h4> - <h4>testmode: {opto.testmode.toString()} Debug: {opto.debugCheckBox.toString()}</h4> - <h4>flx_G: {opto.flx_G} flx_d: {opto.flx_d} woflxcore: {opto.withoutFelixcore.toString()} </h4> - <h4>inConfigDB: {opto.inDBCheckBox.toString()} Configuration File: {opto.ConfigurationPath}</h4> - <h4>ConfigDB: {opto.ConfigurationDB} </h4> - </div> - }> - <Button aria-label="drawer" variant="plain" id="tt-ref" - onClick={() => {setcurrentOpto(opto); setmodify(true); setisOpen(true);}}> - <Icon> - <CogIcon/> - </Icon> - </Button> - </Tooltip> - </FlexItem> - </Flex> - <Flex> - <FlexItem > - <WriteReadBox backendUrl={url}/> - </FlexItem> - <FlexItem> - <Config backendUrl={url}/> - <OptoStatus backendUrl={url}/> - </FlexItem> - </Flex> - </PanelMainBody> - </PanelMain> - </Panel> - </FlexItem> - </PanelMainBody> - </PanelMain> - </Panel> - ); - }) - } - </Flex> - - </PanelMainBody> - </PanelMain> - </Panel> - </PageSection> - </Page> - </React.Fragment> - ); - -}; \ No newline at end of file diff --git a/ui/src/SimpleTabs/SimplePanel.js b/ui/src/SimpleTabs/SimplePanel.js deleted file mode 100644 index c1b5fd51aaae37638e6da25481c7b0617541c51a..0000000000000000000000000000000000000000 --- a/ui/src/SimpleTabs/SimplePanel.js +++ /dev/null @@ -1,69 +0,0 @@ -import React from "react"; - -import { QuickCommands, QuickCommandsSlaves } from "../Controls/QuickCommands"; -import { WriteRead4User } from "../Controls/WriteRead4User"; -import { MinConfig } from "../Controls/MinConfig"; - -import { - Checkbox, - Skeleton, - Tab, - Tabs, - TabTitleText, - Text, - TextContent, - TextVariants, - Grid, - GridItem, - PageSection, - Page,Bullseye,TextInput, Panel, PanelHeader, Button, Flex, FlexItem, Tooltip, Modal,ModalVariant, - PanelMainBody, PanelMain, PanelBody -} from "@patternfly/react-core"; - - -import { getPostBody, checkResponse } from '../utils/utility-functions' - - - -class SimplePanel extends React.Component { - constructor(props) { - super(props); - - - }; - - render() { - return( - - <React.Fragment> - <Page> - <PageSection> - - <Flex> - - <FlexItem flex={{ default: 'flex_2' }}> - - <QuickCommands backendUrl={this.props.backendUrl} /> - - </FlexItem> - - <FlexItem flex={{ default: 'flex_2' }}> - - <WriteRead4User backendUrl={this.props.backendUrl}/> - - </FlexItem> - - <FlexItem flex={{ default: 'flex_2' }}> - - <MinConfig backendUrl={this.props.backendUrl}/> - - </FlexItem> - - </Flex> - </PageSection> - </Page> - </React.Fragment> - );}; - }; - -export { SimplePanel }; \ No newline at end of file diff --git a/ui/src/SimpleTabs/SimpleTabs.js b/ui/src/SimpleTabs/SimpleTabs.js deleted file mode 100644 index 4eef3cbe414679fc5b39e912033692c577b4b1d2..0000000000000000000000000000000000000000 --- a/ui/src/SimpleTabs/SimpleTabs.js +++ /dev/null @@ -1,361 +0,0 @@ -import React, { useState, useEffect } from "react"; - -import { - Checkbox, - Skeleton, - Tab, - Tabs, - TabTitleText, - Text, - TextContent, - TextVariants, - Grid, - GridItem, - PageSection, - Page,Bullseye,TextInput, Panel, PanelHeader, Button, Modal, ModalVariant, ValidatedOptions, - Switch, -} from "@patternfly/react-core"; - -import {CommonlpGBT, MasterlpGBT, Placeholder} from "../SimpleTabs/lpGBT_pannel"; -import {ELinks} from "../SimpleTabs/eLinks"; -import { GBCRpannel } from "../SimpleTabs/GBCR"; -import { getPostBody, checkResponse } from '../utils/utility-functions' -import { MyContext, isI2C_On, OptoSerialContext, myFileCon } from '../SimpleTabs/MyContext'; - -import { FormSelectInputNewer } from "../Widgets/FormSelectInput"; -import { SimplePanel } from '../SimpleTabs/SimplePanel'; - -import { LoggingViewer } from '@itk-demo-sw/components'; -import { useLoggingViewer } from '@itk-demo-sw/hooks'; - - -function SimpleTabs(props) { - - const [activeTabKey, handleTabClick] = useState(0); - const [vtrx_v_val, onChange_vtrx_v] = useState(0); - const [flx_G, onChange_flx_G] = useState(0); - const [flx_d, onChange_flx_d] = useState(0); - const [withoutFelixcore, onChange_withoutFelixcore] = useState(false); - const [CheckisBox_debug, toggleBox_debug] = useState(false); - const [developermode, SwitchChange] = useState(false); - const [testmode, SwitchTestModeChange] = useState(); - const [isModalOpen, handleModalToggleOpen] = useState(); - const [isI2C_On, isI2C_On_Checked] = useState(isI2C_On); - const [optoVersion, optoVersionChange] = useState(""); - const [lpgbtVersion, lpgbtVersionChange] = useState(""); - const [validSerial, validSerialChange] = useState("success"); - const [ButtonVariant, ButtonVariantChange] = useState("primary"); - const [optoSerial, optoSerialChange] = useState(OptoSerialContext); - const [activeGbcr, activeGbcrChange] = useState("0000"); - const [activeLpgbt, activeLpgbtChange] = useState("0000"); - const [CheckisBox, CheckisBoxChange] = useState(false); - const [validConfigPath, validConfigPathChange] = useState("success"); - const [configDBAvailable, configDBAvailableChange] = useState("warning"); - const [ConfigurationDB, ConfigurationDBChange] = useState("http://localhost:5000"); - const [ConfigurationPath, ConfigurationPathChange] = useState('/itk_demo_optoboard/optoboard_felix/configs/00000000_test_v1.json'); - - const CheckbuttonLabel = "Check in the database"; - const ConfigurationFile = myFileCon; - const vtrx_v = [ {label: "1.2", disabled: false, value: 0}, - {label: "1.3", disabled: false, value: 1}]; - - const isI2C_On_Check = () => { - isI2C_On_Checked(true); - console.log("Enabling I2C bus!!"); - }; - - const fetchDataSet = (name, vtrx_v, inDB) => { - const requestData = { - name: name, - vtrx_v: vtrx_v, - inDB: inDB ? 1 : 0, - } - fetch(`${props.backendUrl}/config_file_provider`, getPostBody(requestData)).then((response) => checkResponse(response)).then((data) => { this.setState({ ConfigurationFile : JSON.parse(data)}); console.log(JSON.parse(data)); }); - }; - - const onChange_ConfigurationDB = (newname) => { - ConfigurationDBChange(newname); - fetch(`${this.props.backendUrl}/configDbUnavailable_wrapper`, getPostBody({CONFIGDB_ADDRESS: newname})).then( - (response) => checkResponse(response)).then( - (data) => {console.log(data); - if (data) {configDBAvailableChange('error'); ButtonVariantChange("danger") - } else {configDBAvailableChange('success'); ButtonVariantChange("primary")} - }); - }; - - const toggleBox = (checked) => { - CheckisBoxChange(checked); - if (checked) {onChange_ConfigurationDB(ConfigurationDB); - } else {if ((validSerial == 'success') && (validConfigPath == 'success')) {ButtonVariantChange("primary")} } - }; - - const onChange_ConfigurationPath = (newConfigurationPath) => { - ConfigurationPathChange(newConfigurationPath) - fetch(`${this.props.backendUrl}/checkAvailableDatasetInDB`, getPostBody({path: newConfigurationPath, inDB: CheckisBox, CONFIGDB_ADDRESS: ConfigurationDB})).then( - (response) => checkResponse(response)).then( - (data) => {console.log(data); - if (data==1) {validConfigPathChange('success'); ButtonVariantChange("primary") - } else {validConfigPathChange('error'); ButtonVariantChange("danger") } - }); - }; - -return ( - <p>You clicked 55 times</p> - ); - -/* - const handleModalToggleLaunch = () => { - optoSerChanger(optoSerial); - (ButtonVariant == 'primary') ? ( handleModalToggleOpen(false) ) : ( handleModalToggleOpen(true) ); - }; - - - - const optoSerChanger = (optoSerial) => { - optoSerialChange(optoSerial) - - let HandleWrongSerial = (dataObj) => { - let dataBool = dataObj['boolSerial'] - if (dataBool) { validSerialChange('success'); ButtonVariantChange("primary"); lpgbtVersionChange(dataObj['lpgbt_v']); optoVersionChange(dataObj['optoboard_version']); this.setState({ activeLpgbt : dataObj['activeLpgbt']}); this.setState({ activeGbcr : dataObj['activeGbcr']}); - } else { validSerialChange('error'); ButtonVariantChange("danger") } - }; - - const requestData = { - optoserial: optoSerial, - config_path: this.state.ConfigurationPath, - vtrx_v : this.state.vtrx_v_val==0 ? "1.2" : "1.3", - flx_G : this.state.flx_G, - flx_d : this.state.flx_d, - woflxcore : this.state.withoutFelixcore, - configInDB: this.state.CheckisBox, - CONFIGDB_ADDRESS: ConfigurationDB, - debug: this.state.CheckisBox_debug, - testmode: this.state.testmode - } - console.log(requestData); - fetch(`${this.props.backendUrl}/initializeOptoboard`, getPostBody(requestData)).then((response) => checkResponse(response)).then((data) => {console.log(data); HandleWrongSerial(data)}); - }; - - let tabsWithSlaves = [ - {tabName : "lpGBT1 (master)", content : <MasterlpGBT lpGBTNum={"1"} deviceAddress={"0x074"} backendUrl={this.props.backendUrl} isI2C_On_Check={this.isI2C_On_Check} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"ePortClk", content: <ELinks backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"GBCR1", content: <GBCRpannel GBCRnum={"1"} backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"lpGBT2 (slave)", content: <CommonlpGBT lpGBTNum={"2"} deviceAddress={"0x075"} backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"GBCR2", content: <GBCRpannel GBCRnum={"2"} backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"lpGBT3 (slave)", content: <CommonlpGBT lpGBTNum={"3"} deviceAddress={"0x076"} backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"GBCR3", content: <GBCRpannel GBCRnum={"3"} backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"lpGBT4 (slave)", content: <CommonlpGBT lpGBTNum={"4"} deviceAddress={"0x077"} backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"GBCR4", content: <GBCRpannel GBCRnum={"4"} backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"VTRX", content: <Placeholder />}, - {tabName :"LpGTB1 direct", content: <Placeholder />}, - {tabName :"LpGTB2 direct", content: <Placeholder />}, - {tabName :"LpGTB3 direct", content: <Placeholder />}, - {tabName :"LpGTB4 direct", content: <Placeholder />}, - {tabName :"Test outputs", content: <Placeholder />}, - ]; - - let tabsMaster = [ - {tabName : "lpGBT1 (master)", content : <MasterlpGBT lpGBTNum={"1"} deviceAddress={"0x074"} backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - ]; - - let tabs = this.state.isI2C_On ? tabsWithSlaves : tabsMaster; - - let myContextVar = { isI2C_On : this.state.isI2C_On, - isI2C_On_Check : this.isI2C_On_Check, - OptoSerialContext : optoSerial, - handleModalToggleOpen : this.handleModalToggleOpen, - optoVersion : optoVersion, - lpgbtVersion : lpgbtVersion, - fetchDataSet : this.fetchDataSet, - myFileConfig : this.state.ConfigurationFile, - }; - - - let enable = this.state.CheckisBox ? 0 : 1; - - let OptoGUI_debug = this.state.developermode ? <Tabs activeKey={this.state.activeTabKey} onSelect={this.handleTabClick} isBox={this.state.isBox}> - {tabs.map((tab, index) => ( - <Tab eventKey={index} title={<TabTitleText>{tab.tabName}</TabTitleText>}> - {tab.content} - </Tab> - ))} - </Tabs> : <SimplePanel backendUrl={this.props.backendUrl}/> -*/ -} - -/*}; - -################################################ -*/ - - -/* -return ( - <React.Fragment> - - <MyContext.Provider value={myContextVar}> - - <Modal - variant={ModalVariant.medium} - title="Initialize the Optoboard" - isOpen={this.state.isModalOpen} - showClose = {false} - actions={[ - <Button key="close" variant={ButtonVariant} onClick={this.handleModalToggleLaunch}> - Launch Optoboard GUI - </Button>, - <Switch id={"test_mode"} label="test mode" isChecked={this.state.testmode} onChange={this.SwitchTestModeChange} - isReversed - />, - ]} - > - <Grid hasGutter> - <GridItem span={3}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Serial Number</Text> - </TextContent> - </Bullseye> - </GridItem> - <GridItem span={3}> - <TextInput id="optoserial" name="Optoboard Serial Number" value={optoSerial} onChange={this.optoSerChanger} validated={validSerial}/> - </GridItem> - <GridItem span={3}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Vtrx</Text> - </TextContent> - </Bullseye> - </GridItem> - <GridItem span={3}> - <FormSelectInputNewer id={'vtrx_v_id'} items={vtrx_v} value={vtrx_v_val} onChange={this.onChange_vtrx_v}/> - </GridItem> - - <GridItem span={2}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>flx_G</Text> - </TextContent> - </Bullseye> - </GridItem> - <GridItem span={2}> - <TextInput id="flx_G_id" name="flx_G" value={this.state.flx_G} onChange={this.onChange_flx_G}/> - </GridItem> - <GridItem span={2}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>flx_d</Text> - </TextContent> - </Bullseye> - </GridItem> - <GridItem span={2}> - <TextInput id="flx_d" name="flx_d" value={this.state.flx_d} onChange={this.onChange_flx_d}/> - </GridItem> - <GridItem span={4}> - <Bullseye> - <Checkbox label={"without felixcore"} isChecked={this.state.withoutFelixcore} onChange={this.onChange_withoutFelixcore} id={"without felixcore"} name={"without felixcore"}/> - </Bullseye> - </GridItem> - - <GridItem span={3}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Configuration File</Text> - </TextContent> - </Bullseye> - </GridItem> - <GridItem span={6}> - <TextInput id="ConfFile" name="ConfFile" value={ConfigurationPath} onChange={this.onChange_ConfigurationPath} validated={validConfigPath}/> - </GridItem> - <GridItem span={3}> - <Checkbox label={this.state.CheckbuttonLabel} isChecked={this.state.CheckisBox} onChange={this.toggleBox} id={this.state.CheckbuttonLabel} name={this.state.CheckbuttonLabel}/> - </GridItem> - - <GridItem span={3}> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>Configuration DB</Text> - </TextContent> - </Bullseye> - </GridItem> - <GridItem span={5}> - <TextInput id="Configuration DB" name="Configuration DB" value={ConfigurationDB} onChange={this.onChange_ConfigurationDB} isDisabled={enable} validated={configDBAvailable}/> - </GridItem> - <GridItem span={2}> - <Checkbox label={"debug"} isChecked={this.state.CheckisBox_debug} onChange={this.toggleBox_debug} id={"debug"} name={"debug"}/> - </GridItem> - <GridItem span={2}> - <Checkbox id="developer_mode" - label="developer mode" - isChecked={this.state.developermode} - onChange={this.SwitchChange} /> - </GridItem> - </Grid> - </Modal> - - {OptoGUI_debug} - - </MyContext.Provider> - - - </React.Fragment> -); -}; - -*/ -/* -class TabsAlternative extends React.Component { - constructor(props) { - super(props); - this.state = { - isBox : true, - activeTabKey : 0, - }; - - this.handleTabClick = (event, tabIndex) => { - this.setState({ - activeTabKey: tabIndex - }); - }; - } - - render() { - - let tabsWithSlaves = [ - {tabName : "lpGBT1 (master)", content : <MasterlpGBT lpGBTNum={"1"} deviceAddress={"0x074"} backendUrl={this.props.backendUrl} isI2C_On_Check={this.isI2C_On_Check} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"ePortClk", content: <ELinks backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"GBCR1", content: <GBCRpannel GBCRnum={"1"} backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"lpGBT2 (slave)", content: <CommonlpGBT lpGBTNum={"2"} deviceAddress={"0x075"} backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"GBCR2", content: <GBCRpannel GBCRnum={"2"} backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"lpGBT3 (slave)", content: <CommonlpGBT lpGBTNum={"3"} deviceAddress={"0x076"} backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"GBCR3", content: <GBCRpannel GBCRnum={"3"} backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"lpGBT4 (slave)", content: <CommonlpGBT lpGBTNum={"4"} deviceAddress={"0x077"} backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"GBCR4", content: <GBCRpannel GBCRnum={"4"} backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - {tabName :"VTRX", content: <Placeholder />}, - {tabName :"LpGTB1 direct", content: <Placeholder />}, - {tabName :"LpGTB2 direct", content: <Placeholder />}, - {tabName :"LpGTB3 direct", content: <Placeholder />}, - {tabName :"LpGTB4 direct", content: <Placeholder />}, - {tabName :"Test outputs", content: <Placeholder />}, - ]; - - let tabsMaster = [ - {tabName : "lpGBT1 (master)", content : <MasterlpGBT lpGBTNum={"1"} deviceAddress={"0x074"} backendUrl={this.props.backendUrl} ConfigurationFile={this.state.ConfigurationFile}/>}, - ]; - - let tabs = this.state.isI2C_On ? tabsWithSlaves : tabsMaster; - - return( - <React.Fragment> - <Tabs activeKey={this.state.activeTabKey} onSelect={this.handleTabClick} isBox={this.state.isBox}> - {tabs.map((tab, index) => ( - <Tab eventKey={index} title={<TabTitleText>{tab.tabName}</TabTitleText>}> - {tab.content} - </Tab> - ))} - </Tabs> - </React.Fragment> - )}; - }; -*/ -export { SimpleTabs }; diff --git a/ui/src/SimpleTabs/eLinks.js b/ui/src/SimpleTabs/eLinks.js deleted file mode 100644 index cd6642e6d6d0af3a48812a04a2a81e006182caef..0000000000000000000000000000000000000000 --- a/ui/src/SimpleTabs/eLinks.js +++ /dev/null @@ -1,388 +0,0 @@ -import React from "react"; -import { - Button, - Checkbox, - InputGroup, - InputGroupText, - FormSelect, - FormSelectOption, - FormSelectOptionGroup, - Text, - TextInput, - TextContent, - TextVariants, - Form, - FormGroup, - PanelMainBody, - PanelMain, - Panel, - PanelHeader, - Grid, - GridItem, - Bullseye, - PageSection, - Page, - Flex, - FlexItem, -} from "@patternfly/react-core"; - -import { FormSelectInput, FormSelectInputNewer } from "../Widgets/FormSelectInput"; -import { getPostBody, checkResponse } from '../utils/utility-functions' - - -class ELinks extends React.Component { - constructor(props) { - super(props); - this.state = { - DriveStrength : [ { label: '0.0 mA', disabled: false, value: '0'}, - { label: '1.0 mA', disabled: false, value: '1'}, - { label: '1.5 mA', disabled: false, value: '2'}, - { label: '2.0 mA', disabled: false, value: '3'}, - { label: '2.5 mA', disabled: false, value: '4'}, - { label: '3.0 mA', disabled: false, value: '5'}, - { label: '3.5 mA', disabled: false, value: '6'}, - { label: '4.0 mA', disabled: false, value: '7'}], - //DriveStrength_valOne: '0', DriveStrength_valTwo: '0', DriveStrength_valThree: '0', DriveStrength_valFour: '0', DriveStrength_valFive: '0', DriveStrength_valSix: '0', DriveStrength_valSeven: '0', - Freq : [{ label: 'disabled', disabled: false, value: '0'}, - { label: '40', disabled: false, value: '1'}, - { label: '80', disabled: false, value: '2'}, - { label: '160', disabled: false, value: '3'}, - { label: '320', disabled: false, value: '4'}, - { label: '640', disabled: false, value: '5'}, - { label: '1280', disabled: false, value: '6'}, - { label: 'EDIN62 loopback', disabled: false, value: '7'}], - //Freq_val: { one: '0', two: '0', three: '0', four: '0', five: '0', six: '0', seven: '0'}, - PreEmphasisStrength : [ { label: '0.0 mA', disabled: false, value: '0'}, - { label: '1.0 mA', disabled: false, value: '1'}, - { label: '1.5 mA', disabled: false, value: '2'}, - { label: '2.0 mA', disabled: false, value: '3'}, - { label: '2.5 mA', disabled: false, value: '4'}, - { label: '3.0 mA', disabled: false, value: '5'}, - { label: '3.5 mA', disabled: false, value: '6'}, - { label: '4.0 mA', disabled: false, value: '7'}], - //PreEmphasisStrength_val: { one: '0', two: '0', three: '0', four: '0', five: '0', six: '0', seven: '0'}, - PreEmphasisMode : [ { label: 'disabled', disabled: false, value: '0'}, - { label: 'disabled', disabled: false, value: '1'}, - { label: 'self timed', disabled: false, value: '2'}, - { label: 'clock timed', disabled: false, value: '3'}], - //PreEmphasisMode_val: { one: '0', two: '0', three: '0', four: '0', five: '0', six: '0', seven: '0'}, - PreEmphasisWidth : [{ label: '120', disabled: false, value: '0'}, - { label: '240', disabled: false, value: '1'}, - { label: '360', disabled: false, value: '2'}, - { label: '480', disabled: false, value: '3'}, - { label: '600', disabled: false, value: '4'}, - { label: '720', disabled: false, value: '5'}, - { label: '840', disabled: false, value: '6'}, - { label: '960', disabled: false, value: '7'},], - //PreEmphasisWidth_val: { one: '0', two: '0', three: '0', four: '0', five: '0', six: '0', seven: '0'}, - }; - - this.sendSetting = (device,registerName,settingName,newValue) => { - const body = { - device: device, - registerName: registerName, - settingName: settingName, - newValue: newValue, - //EPRX0Enable: 'EPRX0'+this.props.id+'Enable' - //: this.state.isBox, - //EPRX0DataRate: this.state.dataRate_val, - //EPRX0TrackMode: this.state.trackMode_val, - }; - console.log(body); - return fetch(`${this.props.backendUrl}/sendRegister`, getPostBody(body)).then((response) => checkResponse(response)).then((data) => {console.log(data)}); - }; - - }; - - render() { - return ( - - <React.Fragment> - <Page> - <PageSection> - - - <Flex direction={{ default: 'column' }}> - <Bullseye> - <Button id="inputDropdownButton15" variant="primary"> - Configure all registers as below - </Button> - </Bullseye> - - <Panel variant="bordered"> - <PanelHeader> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>from lpGBT1</Text> - </TextContent> - </Bullseye> - </PanelHeader> - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_1' }}> - - {<HelperELinks EPCLK="2" toChip="(to lpGBT2)" id="changeME" sendSetting={this.sendSetting} device="lpgbt1" - DriveStrength={this.state.DriveStrength} - Freq={this.state.Freq} - PreEmphasisStrength={this.state.PreEmphasisStrength} - PreEmphasisMode={this.state.PreEmphasisMode} - PreEmphasisWidth={this.state.PreEmphasisWidth} - ConfigurationFile={this.props.ConfigurationFile} />} - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - {<HelperELinks EPCLK="26" toChip="(to lpGBT3)" id="changeME" sendSetting={this.sendSetting} device="lpgbt1" - DriveStrength={this.state.DriveStrength} - Freq={this.state.Freq} - PreEmphasisStrength={this.state.PreEmphasisStrength} - PreEmphasisMode={this.state.PreEmphasisMode} - PreEmphasisWidth={this.state.PreEmphasisWidth} - ConfigurationFile={this.props.ConfigurationFile} />} - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - {<HelperELinks EPCLK="19" toChip="(to lpGBT4)" id="changeME" sendSetting={this.sendSetting} device="lpgbt1" - DriveStrength={this.state.DriveStrength} - Freq={this.state.Freq} - PreEmphasisStrength={this.state.PreEmphasisStrength} - PreEmphasisMode={this.state.PreEmphasisMode} - PreEmphasisWidth={this.state.PreEmphasisWidth} - ConfigurationFile={this.props.ConfigurationFile} />} - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - {<HelperELinks EPCLK="5" toChip="(to GBCR1)" id="changeME" sendSetting={this.sendSetting} device="lpgbt1" - DriveStrength={this.state.DriveStrength} - Freq={this.state.Freq} - PreEmphasisStrength={this.state.PreEmphasisStrength} - PreEmphasisMode={this.state.PreEmphasisMode} - PreEmphasisWidth={this.state.PreEmphasisWidth} - ConfigurationFile={this.props.ConfigurationFile} />} - </FlexItem> - - </Flex> - - </Panel> - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - - <FlexItem flex={{ default: 'flex_1' }}> - - <Panel variant="bordered"> - <PanelHeader> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}> - from lpGBT2 - </Text> - </TextContent> - </Bullseye> - </PanelHeader> - - {<HelperELinks EPCLK="5" toChip="(to GBCR2)" id="changeME" sendSetting={this.sendSetting} device="lpgbt2" - DriveStrength={this.state.DriveStrength} - Freq={this.state.Freq} - PreEmphasisStrength={this.state.PreEmphasisStrength} - PreEmphasisMode={this.state.PreEmphasisMode} - PreEmphasisWidth={this.state.PreEmphasisWidth} - ConfigurationFile={this.props.ConfigurationFile} />} - - </Panel> - - </FlexItem> - - <FlexItem flex={{ default: 'flex_1' }}> - - <Panel variant="bordered"> - <PanelHeader> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}> - from lpGBT3 - </Text> - </TextContent> - </Bullseye> - </PanelHeader> - - {<HelperELinks EPCLK="5" toChip="(to GBCR3)" id="changeME" sendSetting={this.sendSetting} device="lpgbt3" - DriveStrength={this.state.DriveStrength} - Freq={this.state.Freq} - PreEmphasisStrength={this.state.PreEmphasisStrength} - PreEmphasisMode={this.state.PreEmphasisMode} - PreEmphasisWidth={this.state.PreEmphasisWidth} - ConfigurationFile={this.props.ConfigurationFile} />} - - </Panel> - - </FlexItem> - - - <FlexItem flex={{ default: 'flex_1' }}> - - <Panel variant="bordered"> - <PanelHeader> - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}>from lpGBT4</Text> - </TextContent> - </Bullseye> - </PanelHeader> - - - {<HelperELinks EPCLK="5" toChip="(to GBCR4)" id="changeME" sendSetting={this.sendSetting} device="lpgbt4" - DriveStrength={this.state.DriveStrength} - Freq={this.state.Freq} - PreEmphasisStrength={this.state.PreEmphasisStrength} - PreEmphasisMode={this.state.PreEmphasisMode} - PreEmphasisWidth={this.state.PreEmphasisWidth} - ConfigurationFile={this.props.ConfigurationFile} />} - - </Panel> - - </FlexItem> - - </Flex> - </Flex> - - </PageSection> - </Page> - </React.Fragment> - -);}; -}; - - - - - -class HelperELinks extends React.Component { - constructor(props) { - super(props); - this.state = { - isBox : false, - checkLabel: 'EPCLK'+props.EPCLK+'Invert', checkLabelID: 'EPCLK'+this.props.EPCLK+'Invert' + props.device, - checkLabel_reg: "EPCLK" + props.EPCLK + "CHNCNTRH", checkLabel_regID: "EPCLK" + props.EPCLK + "ChnCntrH" + props.device, - pannelLabel: "EPCLK" + props.EPCLK + "ChnCntr" + props.toChip, - DriveStrength_val: String(props.ConfigurationFile["lpgbt"]["EPCLK" + props.EPCLK + "CHNCNTRH"]['EPCLK'+props.EPCLK+'DRIVESTRENGTH'][Number(props.device[5])-1]), - Freq_val: String(props.ConfigurationFile["lpgbt"]["EPCLK" + props.EPCLK + "CHNCNTRH"]['EPCLK'+props.EPCLK+'FREQ'][Number(props.device[5])-1]), - PreEmphasisStrength_val: String(props.ConfigurationFile["lpgbt"]['EPCLK'+props.EPCLK+'CHNCNTRL']['EPCLK'+props.EPCLK+'PREEMPHASISSTRENGTH'][Number(props.device[5])-1]), - PreEmphasisMode_val: String(props.ConfigurationFile["lpgbt"]['EPCLK'+props.EPCLK+'CHNCNTRL']['EPCLK'+props.EPCLK+'PREEMPHASISMODE'][Number(props.device[5])-1]), - PreEmphasisWidth_val: String(props.ConfigurationFile["lpgbt"]['EPCLK'+props.EPCLK+'CHNCNTRL']['EPCLK'+props.EPCLK+'PREEMPHASISWIDTH'][Number(props.device[5])-1]), - }; - - this.toggleBox = checked => { const memory = this.state.isBox; - this.setState({isBox : checked}); - this.props.sendSetting(this.props.device, this.state.checkLabel_reg, this.state.checkLabel, checked ? "1" : "0").catch(err => {this.setState({isBox : memory});}); - }; - - this.onChange_DriveStrength = (DriveStrength_val) => {const memory = this.state.DriveStrength_val; - this.setState({ DriveStrength_val }); - console.log(DriveStrength_val); - this.props.sendSetting(this.props.device, this.state.checkLabel_reg,'EPCLK'+this.props.EPCLK+'DriveStrength', DriveStrength_val).catch(err => {this.setState({ DriveStrength_val : memory});}); - }; - this.onChange_Freq = (Freq_val) => { const memory = this.state.Freq_val; - this.setState({ Freq_val }); - this.props.sendSetting(this.props.device, this.state.checkLabel_reg,'EPCLK'+this.props.EPCLK+'Freq', Freq_val).catch(err => {this.setState({ Freq_val : memory});}); - }; - this.onChange_PreEmphasisStrength = (PreEmphasisStrength_val) => { - const memory = this.state.PreEmphasisStrength_val; - this.setState({ PreEmphasisStrength_val }); - this.props.sendSetting(this.props.device, 'EPCLK'+this.props.EPCLK+'ChnCntrL','EPCLK'+this.props.EPCLK+'PreEmphasisStrength', PreEmphasisStrength_val).catch(err => {this.setState({ PreEmphasisStrength_val : memory});}); - }; - this.onChange_PreEmphasisMode = (PreEmphasisMode_val) => { - const memory = this.state.PreEmphasisMode_val; - this.setState({ PreEmphasisMode_val }); - this.props.sendSetting(this.props.device, 'EPCLK'+this.props.EPCLK+'ChnCntrL','EPCLK'+this.props.EPCLK+'PreEmphasisMode', PreEmphasisMode_val).catch(err => {this.setState({ PreEmphasisMode_val : memory});}); - }; - this.onChange_PreEmphasisWidth = (PreEmphasisWidth_val) => { - const memory = this.state.PreEmphasisWidth_val; - this.setState({ PreEmphasisWidth_val }); - this.props.sendSetting(this.props.device, 'EPCLK'+this.props.EPCLK+'ChnCntrL','EPCLK'+this.props.EPCLK+'PreEmphasisWidth', PreEmphasisWidth_val).catch(err => {this.setState({ PreEmphasisWidth_val : memory});}); - }; - }; - - render() { - return ( - - <React.Fragment> - <Panel variant="bordered"> - <PanelMainBody> - <PanelMain> - - - <Bullseye> - <TextContent> - <Text component={TextVariants.h3}> {this.state.pannelLabel} </Text> - </TextContent> - </Bullseye> - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <Checkbox label={this.state.checkLabel} isChecked={this.state.isBox} onChange={this.toggleBox} id={this.state.checkLabelID} name={this.state.checkLabelID}/> - </FlexItem> - </Flex> - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <h4> EPCLK{this.props.EPCLK}DriveStrength </h4> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNewer id={this.props.id} items={this.props.DriveStrength} value={this.state.DriveStrength_val} onChange={this.onChange_DriveStrength}/> - </Bullseye> - </FlexItem> - </Flex> - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <h4> EPCLK{this.props.EPCLK}Freq </h4> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNewer id={this.props.id} items={this.props.Freq} value={this.state.Freq_val} onChange={this.onChange_Freq}/> - </Bullseye> - </FlexItem> - </Flex> - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <h4> EPCLK{this.props.EPCLK}PreEmphasisStrength </h4> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNewer id={this.props.id} items={this.props.PreEmphasisStrength} value={this.state.PreEmphasisStrength_val} onChange={this.onChange_PreEmphasisStrength}/> - </Bullseye> - </FlexItem> - </Flex> - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <h4> EPCLK{this.props.EPCLK}PreEmphasisMode </h4> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNewer id={this.props.id} items={this.props.PreEmphasisMode} value={this.state.PreEmphasisMode_val} onChange={this.onChange_PreEmphasisMode}/> - </Bullseye> - </FlexItem> - </Flex> - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_1' }}> - <h4> EPCLK{this.props.EPCLK}PreEmphasisWidth </h4> - </FlexItem> - <FlexItem flex={{ default: 'flex_1' }}> - <Bullseye> - <FormSelectInputNewer id={this.props.id} items={this.props.PreEmphasisWidth} value={this.state.PreEmphasisWidth_val} onChange={this.onChange_PreEmphasisWidth}/> - </Bullseye> - </FlexItem> - </Flex> - - - </PanelMain> - </PanelMainBody> - </Panel> - </React.Fragment> - );}; -} - -export { ELinks }; diff --git a/ui/src/SimpleTabs/lpGBT_pannel.js b/ui/src/SimpleTabs/lpGBT_pannel.js deleted file mode 100644 index 483d2724e9f0b8c2c8c91158d3df921ee8f3dc03..0000000000000000000000000000000000000000 --- a/ui/src/SimpleTabs/lpGBT_pannel.js +++ /dev/null @@ -1,273 +0,0 @@ -import React from "react"; -import { - Checkbox, - Skeleton, - Tab, - Tabs, - TabTitleText, - Text, - TextContent, - TextVariants, - Grid, - GridItem, - PageSection, - Page,Bullseye,TextInput, Panel, PanelHeader, Button, Flex, FlexItem, Tooltip, Modal,ModalVariant, - } from "@patternfly/react-core"; - -import { getPostBody, checkResponse } from '../utils/utility-functions' - -import { EPRXControl } from "../Controls/EPRXControl"; -import { QuickCommands, QuickCommandsSlaves } from "../Controls/QuickCommands"; -import { EPRXChnCntr } from "../Controls/EPRXChnCntr"; -import { WriteRead } from "../Controls/WriteRead"; -import { Characteristics_lpGBT } from "../Controls/Characteristics_lpGBT"; -import { Downlinks_master } from "../Controls/Downlinks_master"; //, DownlinkEnable -import { EPRXDllConfig } from "../Controls/EPRXDllConfig"; -import { TestPatterns } from "../Controls/TestPatterns"; -import { TestPatternsSlave } from "../Controls/TestPatternsSlave"; -import { MinConfig } from "../Controls/MinConfig"; -import { MyContext } from '../SimpleTabs/MyContext'; - -//<DownlinkEnable /> -//<Characteristics_lpGBT backendUrl={this.props.backendUrl} device={'lpgbt' + this.props.lpGBTNum} /> -class MasterlpGBT extends React.Component { - constructor(props) { - super(props); - - this.state = { - i2c_master : [{value: "0", disabled: false},{value: "1", disabled: false},{value: "2", disabled: false}], - fice_g : [{value:"0", disabled: false}, {value:"1", disabled: false}, {value:"2", disabled: false}, {value:"3", disabled: false}], - fice_i : [{value:"0", disabled: false}, {value:"1", disabled: false}, {value:"2", disabled: false}, {value:"3", disabled: false}], - fice_d : [{value:"0", disabled: false}, {value:"1", disabled: false}, {value:"2", disabled: false}, {value:"3", disabled: false}], - fice_I : "0x074", - isSwitched : false, switchLabel: "i2c_start", - serial: "08000000", version: "2", - fice_g_val: "0", fice_i_val: "0", fice_d_val: "0", i2c_master_val: "0", - }; - this.switchBox = checked => {if (this.state.isSwitched==false) {this.setState({isSwitched: checked});}}; - this.handleTextAddress = fice_I => {this.setState({ fice_I });}; - this.handleTextInputChange = serial => {this.setState({ serial });}; - this.handleTextVersion = version => {this.setState({ version });}; - this.onChange_fice_g = (fice_g_val, event) => {this.setState({ fice_g_val });}; - this.onChange_fice_i = (fice_i_val, event) => {this.setState({ fice_i_val });}; - this.onChange_fice_d = (fice_d_val, event) => {this.setState({ fice_d_val });}; - this.onChange_i2c_master = (i2c_master_val, event) => {this.setState({ i2c_master_val });}; - - this.sendSetting = (registerName,settingName,newValue) => { - const body = { - device: 'lpgbt' + props.lpGBTNum, - registerName: registerName, - settingName: settingName, - newValue: newValue, - }; - console.log(body); - return fetch(`${this.props.backendUrl}/sendRegister`, getPostBody(body)).then((response) => checkResponse(response)).then((data) => {console.log(data)}); - }; - - }; - - - - render (){ - return( - - <React.Fragment> - - <Page> - <PageSection> - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_2' }}> - - <QuickCommands backendUrl={this.props.backendUrl} - serial={this.state.serial} i2c_master={this.state.i2c_master} version={this.state.version} - fice_g={this.state.fice_g} fice_i={this.state.fice_i} fice_I={this.state.fice_I} fice_d={this.state.fice_d} - handleTextInputChange={this.handleTextInputChange} handleTextAddress={this.handleTextAddress} handleTextVersion={this.handleTextVersion} onChange_i2c_master={this.onChange_i2c_master} - isSwitched={this.state.isSwitched} switchLabel={this.state.switchLabel} switchBox={this.switchBox} - onChange_fice_g={this.onChange_fice_g} onChange_fice_i={this.onChange_fice_i} onChange_fice_d={this.onChange_fice_d} - fice_g_val={this.state.fice_g_val} fice_i_val={this.state.fice_i_val} fice_d_val={this.state.fice_d_val} - i2c_master_val={this.state.i2c_master_val}/> - - <WriteRead backendUrl={this.props.backendUrl} device={'lpgbt' + this.props.lpGBTNum} - fice_g={this.state.fice_g_val} fice_i={this.state.fice_i_val} fice_d={this.state.fice_d_val} fice_I={this.state.fice_I} - serial={this.state.serial} i2c_master_val={this.state.i2c_master_val} isMaster="true"/> - - - <Characteristics_lpGBT backendUrl={this.props.backendUrl} device={'lpgbt' + this.props.lpGBTNum} /> - - <MinConfig backendUrl={this.props.backendUrl}/> - - </FlexItem> - - <FlexItem flex={{ default: 'flex_4' }}> - <Panel variant="bordered"> - - <PanelHeader> - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_4' }}> - <Bullseye> - <TextContent > - <Text component={TextVariants.h3}>Uplink settings</Text> - </TextContent> - </Bullseye> - </FlexItem> - </Flex> - </PanelHeader> - - <Flex spaceItems={{default: 'spaceItemsNone'}}> - <FlexItem flex={{ default: 'flex_4' }}> - <TestPatterns sendSetting={this.sendSetting} backendUrl={this.props.backendUrl} device={'lpgbt' + this.props.lpGBTNum} lpGBTNum={this.props.lpGBTNum} ConfigurationFile={this.props.ConfigurationFile}/> - </FlexItem> - </Flex> - - <Flex spaceItems={{ default: 'spaceItemsNone' }}> - <FlexItem flex={{ default: 'flex_3' }}> - {[0,1,2,3,4,5].map((num) => ( - <EPRXControl id={num} sendSetting={this.sendSetting} backendUrl={this.props.backendUrl} lpGBTNum={this.props.lpGBTNum} ConfigurationFile={this.props.ConfigurationFile}/> - ))} - </FlexItem> - <FlexItem flex={{ default: 'flex_4' }}> - {[0,1,2,3,4,5].map((num) => ( - <EPRXChnCntr id={num} sendSetting={this.sendSetting} backendUrl={this.props.backendUrl} lpGBTNum={this.props.lpGBTNum} ConfigurationFile={this.props.ConfigurationFile}/> - ))} - </FlexItem> - </Flex> - </Panel> - - <EPRXDllConfig id={"CHANGE"} lpGBTNum={this.props.lpGBTNum} sendSetting={this.sendSetting} backendUrl={this.props.backendUrl} ConfigurationFile={this.props.ConfigurationFile}/> - </FlexItem> - - <FlexItem flex={{ default: 'flex_2' }}> - <Panel variant="bordered"> - <PanelHeader> - <Bullseye> - <TextContent > - <Text component={TextVariants.h3}>Configure downlink pre-emphasis settings </Text> - </TextContent> - </Bullseye> - </PanelHeader> - {[{id: "00", id_reg: '10'},{id: "02", id_reg: '10'},{id: "10", id_reg: '10'},{id: "12", id_reg: '10'}, - {id: "20", id_reg: '32'},{id: "22", id_reg: '32'},{id: "30", id_reg: '32'},{id: "32", id_reg: '32'}].map((num) => ( - <Downlinks_master id={num.id} id_reg={num.id_reg} sendSetting={this.sendSetting} backendUrl={this.props.backendUrl} lpGBTNum={this.props.lpGBTNum} ConfigurationFile={this.props.ConfigurationFile}/>))} - </Panel> - </FlexItem> - - </Flex> - - </PageSection> - </Page> - </React.Fragment> - -);}; -} - - -class CommonlpGBT extends React.Component { - constructor(props) { - super(props); - - this.state = { - isModalOpen:false, - } - - - this.sendSetting = (registerName,settingName,newValue) => { - const body = { - device: 'lpgbt' + props.lpGBTNum, - registerName: registerName, - settingName: settingName, - newValue: newValue, - }; - console.log(body); - return fetch(`${this.props.backendUrl}/sendRegister`, getPostBody(body)).then((response) => checkResponse(response)).then((data) => {console.log(data)}); - }; - - }; - -//<QuickCommandsSlaves /> -//<Characteristics_lpGBT backendUrl={this.props.backendUrl} device={'lpgbt' + this.props.lpGBTNum}/> - render (){ - return( - - <React.Fragment> - <Page> - <PageSection> - - <Flex> - - <FlexItem flex={{ default: 'flex_2' }}> - - <WriteRead backendUrl={this.props.backendUrl} device={'lpgbt' + this.props.lpGBTNum}/> - - - <FlexItem flex={{ default: 'flex_1' }}> - <TestPatternsSlave sendSetting={this.sendSetting} backendUrl={this.props.backendUrl} lpGBTNum={this.props.lpGBTNum} sendSettingTESTPATTERN={this.sendSettingTESTPATTERN}/> - </FlexItem> - - <Characteristics_lpGBT backendUrl={this.props.backendUrl} device={'lpgbt' + this.props.lpGBTNum}/> - - </FlexItem> - - - <FlexItem flex={{ default: 'flex_4' }}> - <Flex> - <FlexItem flex={{ default: 'flex_2' }}> - {[1,2,3,4,5].map((num) => ( - <EPRXControl id={num} sendSetting={this.sendSetting} backendUrl={this.props.backendUrl} lpGBTNum={this.props.lpGBTNum} ConfigurationFile={this.props.ConfigurationFile}/> - ))} - </FlexItem> - - <FlexItem flex={{ default: 'flex_2' }}> - {[1,2,3,4,5].map((num) => ( - <EPRXChnCntr id={num} sendSetting={this.sendSetting} backendUrl={this.props.backendUrl} lpGBTNum={this.props.lpGBTNum} ConfigurationFile={this.props.ConfigurationFile}/> - ))} - </FlexItem> - </Flex> - - </FlexItem> - - - </Flex> - - </PageSection> - </Page> - </React.Fragment> -);}; -} - -class Placeholder extends React.Component { - constructor(props) { - super(props); - }; - render (){ - return( - <React.Fragment> - <Page> - <PageSection> - - <Grid hasGutter> - - <GridItem span={2}> - {[1,2,3,4,5].map((num) => ( - <TextContent> - <Text component={TextVariants.h3}>EPRX Control</Text> - </TextContent> - ))} - </GridItem> - - <GridItem span={3}> - {[1,2,3,4,5].map((num) => ( - <TextContent> - <Text component={TextVariants.h3}>EPRX Control</Text> - </TextContent> - ))} - </GridItem> - - </Grid> - </PageSection> - </Page> - </React.Fragment> -);};} - - -export {MasterlpGBT, CommonlpGBT, Placeholder}; - diff --git a/ui/src/UI_architecture/OptoboardGUI.js b/ui/src/UI_architecture/OptoboardGUI.js new file mode 100644 index 0000000000000000000000000000000000000000..9ddf0e146f9ca420d07db8cfe37f24b355a621ec --- /dev/null +++ b/ui/src/UI_architecture/OptoboardGUI.js @@ -0,0 +1,460 @@ +import React, { useState, useEffect } from "react"; +// import { defaultConfig, Configurations } from "../Config/Configurations"; +import { OptoboardList } from "./OptoboardList"; + +import { + Bullseye, + Button, + Flex, + FlexItem, + Modal, + ModalVariant, + Text, + TextContent, + TextVariants, + Panel, + PanelMain, + PanelMainBody, + Page, + FormSelect, + FormSelectOption, + NotificationDrawer, + NotificationDrawerHeader, + NotificationDrawerBody, + NotificationDrawerList, + NotificationDrawerListItem, + NotificationDrawerListItemBody, + NotificationDrawerListItemHeader, + TextInput, + Spinner, +} from "@patternfly/react-core"; +import { CodeEditor, Language } from "@patternfly/react-code-editor"; + +// import { LogViewer } from "@patternfly/react-log-viewer"; + +import { getPostBody, checkResponse } from "../utils/utility-functions"; + +export function OptoboardGUI({ url }) { + const [DefaultConfig, setDefaultConfig] = useState(""); + const [Configurations, setConfigurations] = useState({}); + const [DefaultConfigChange, setDefaultConfigChange] = useState( + "Add New Configuration" + ); + const [isOpenConfig, setisOpenConfig] = useState(false); + const [isNotDrawerOpen, setisNotDrawerOpen] = useState(false); + const [newConfigName, setnewConfigName] = useState(""); + const [newDefault, setnewDefault] = useState("Choose Configuration"); + const [modalText, setmodalText] = useState(""); + + const [ConfigurationOptions, setConfigurationOptions] = useState([]); + + const [ConfigurationOptions2Change, setConfigurationOptions2Change] = + useState([]); + + const [loadingConfig, setloadingConfig] = useState(true); + const [optoConfigResult, setoptoConfigResult] = useState("primary"); + const [configureAllStatus, setconfigureAllStatus] = useState("primary"); + const [isConfiguring, setisConfiguring] = useState(false); + + function getConfigGUI() { + setloadingConfig(true); + fetch(`${url}/getOptoGUIConf`) + .then((response) => checkResponse(response)) + .then((data) => { + setDefaultConfig(data.defaultConfig); + setConfigurations(data.optoGUIConf); + setloadingConfig(false); + console.log("getOptoGUIConf in useeffect"); + console.log(DefaultConfig); + }) + .catch((err) => { + console.log(err); + }); + } + + useEffect(() => { + getConfigGUI(); + }, []); + + function editConfig(confKey, newConfiguration) { + console.log({ confKey: confKey, newConfiguration: newConfiguration }); + fetch( + `${url}/modifyOptoGUIConf`, + getPostBody({ confKey: confKey, newConfiguration: newConfiguration }) + ) + .then((response) => checkResponse(response)) + .then((data) => { + console.log(data); + // setisOpenConfig(false); + getConfigGUI(); + }) + .catch((err) => { + console.log(err); + }); + } + + useEffect(() => { + setDefaultConfig(DefaultConfig); + let X = []; + let Y = []; + for (var key in Configurations) { + X.push({ value: key, label: key, disabled: false }); + Y.push({ + value: key, + label: key, + disabled: false, + }); + } + setConfigurationOptions([ + ...[ + { + value: "Choose Configuration", + label: "Choose Configuration", + disabled: true, + }, + ], + ...X, + ]); + setConfigurationOptions2Change([ + ...[ + { + value: "Add New Configuration", + label: "Add New Configuration", + disabled: false, + }, + ], + ...Y, + ]); + }, [Configurations]); + + useEffect(() => { + const interval = setInterval(() => { + console.log("Periodic effect"); + fetch(`${url}/health`) + .then((response) => checkResponse(response)) + .then((data) => { + console.log(data); + }) + .catch((err) => { + console.log(err); + }); + }, 200000); + return () => { + clearInterval(interval); + }; + }, []); + + useEffect(() => { + DefaultConfigChange == "Add New Configuration" + ? setmodalText("") + : setmodalText( + JSON.stringify(Configurations[DefaultConfigChange], null, 2) + ); + }, [DefaultConfigChange]); + + const notificationDrawer = ( + <NotificationDrawer> + <NotificationDrawerHeader> </NotificationDrawerHeader> + <NotificationDrawerBody> + <NotificationDrawerList> + <NotificationDrawerListItem variant="info"> + <NotificationDrawerListItemHeader + variant="info" + title="Unread info notification title" + srTitle="Info notification:" + ></NotificationDrawerListItemHeader> + <NotificationDrawerListItemBody timestamp="5 minutes ago"> + This is an info notification description. + </NotificationDrawerListItemBody> + </NotificationDrawerListItem> + </NotificationDrawerList> + </NotificationDrawerBody> + </NotificationDrawer> + ); + + if (loadingConfig) { + return ( + <React.Fragment> + <Page> + <Panel> + <PanelMain> + <PanelMainBody> + <TextContent> + <Text component={TextVariants.h1}>Optoboard GUI</Text> + </TextContent> + </PanelMainBody> + </PanelMain> + </Panel> + <Panel> + <PanelMain> + <PanelMainBody> + <Flex> + <FlexItem key={"optoInListLoad"}> + <Bullseye> + <Spinner + isSVG + diameter="120px" + aria-label="spinnerforloadingconfig" + /> + </Bullseye> + </FlexItem> + </Flex> + </PanelMainBody> + </PanelMain> + </Panel> + </Page> + </React.Fragment> + ); + } else { + return ( + <React.Fragment> + <Page + notificationDrawer={notificationDrawer} + isNotificationDrawerExpanded={isNotDrawerOpen} + > + <Panel> + <PanelMain> + <PanelMainBody> + <TextContent> + <Text component={TextVariants.h1}>Optoboard GUI</Text> + </TextContent> + </PanelMainBody> + </PanelMain> + </Panel> + <Panel> + <PanelMain> + <PanelMainBody> + <Flex> + <FlexItem key={"configureAll"}> + <Button + spinnerAriaValueText={ + isConfiguring ? "ConfiguringAll" : undefined + } + isLoading={isConfiguring} + variant={configureAllStatus} + onClick={() => { + setisConfiguring(true); + fetch(`${url}/configureAll`) + .then((response) => checkResponse(response)) + .then((data) => { + console.log(data); + if (data == "Configuration failed") { + setconfigureAllStatus("danger"); + } else { + setconfigureAllStatus("primary"); + } + }) + .catch((err) => { + console.log(err); + }) + .finally(() => { + setisConfiguring(false); + }); + }} + > + <h3> Configure all Optoboards </h3> + </Button> + </FlexItem> + <FlexItem key={"add_configuration"}> + <Button + variant="secondary" + onClick={() => setisOpenConfig(!isOpenConfig)} + > + <h3> Add GUI Configuration </h3> + </Button> + </FlexItem> + <FlexItem> + <FormSelect + value={DefaultConfig} + onChange={(X) => { + setDefaultConfig(X); + }} + aria-label="FormSelect Input" + > + {ConfigurationOptions.map((option, index) => ( + <FormSelectOption + isDisabled={option.disabled} + key={index} + value={option.value} + label={option.label} + /> + ))} + </FormSelect> + </FlexItem> + <FlexItem key={"add configuration"}> + <Button + variant="link" + onClick={() => { + fetch(`${url}/health`) + .then((response) => checkResponse(response)) + .then((data) => { + console.log(data); + }) + .catch((err) => { + console.log(err); + }); + }} + > + <h3> Health </h3> + </Button> + </FlexItem> + </Flex> + </PanelMainBody> + </PanelMain> + </Panel> + <Panel> + <PanelMain> + <PanelMainBody> + <Flex> + <OptoboardList + url={url} + DefaultConfig={DefaultConfig} + Configurations={Configurations} + /> + </Flex> + </PanelMainBody> + </PanelMain> + </Panel> + </Page> + + {/* <LogViewer + hasLineNumbers={false} + height={300} + data={data.data} + theme="dark" + header={<Banner>5019 lines</Banner>} + /> */} + + <Modal + variant={ModalVariant.large} + bodyAriaLabel="Scrollable modal content" + aria-label="modal for config input" + tabIndex={0} + isOpen={isOpenConfig} + title={"Edit GUI Configuration"} + onClose={() => { + setisOpenConfig(false); + }} + > + <Panel> + <PanelMain> + <PanelMainBody> + <Panel> + <PanelMain> + <PanelMainBody> + <Flex> + <FlexItem> + <h2> Select default configuration </h2> + </FlexItem> + <FlexItem> + <FormSelect + value={newDefault} + onChange={(X) => { + setnewDefault(X); + }} + aria-label="FormSelect change default configuration" + > + {ConfigurationOptions.map((option, index) => ( + <FormSelectOption + isDisabled={option.disabled} + key={index} + value={option.value} + label={option.label} + /> + ))} + </FormSelect> + </FlexItem> + <FlexItem> + <Button + key="confirm1" + variant="primary" + onClick={() => { + if (newDefault !== "Choose Configuration") { + editConfig("defaultConfig", newDefault); + } + }} + > + Confirm + </Button> + </FlexItem> + </Flex> + </PanelMainBody> + </PanelMain> + </Panel> + + <Panel> + <PanelMain> + <PanelMainBody> + <Flex> + <FlexItem> + <FormSelect + value={DefaultConfigChange} + onChange={(X) => { + setDefaultConfigChange(X); + }} + aria-label="FormSelect Input" + > + {ConfigurationOptions2Change.map( + (option, index) => ( + <FormSelectOption + isDisabled={option.disabled} + key={index} + value={option.value} + label={option.label} + /> + ) + )} + </FormSelect> + </FlexItem> + <FlexItem> + <TextInput + value={newConfigName} + type="text" + aria-label="disabled text input example" + onChange={(value) => { + setnewConfigName(value); + }} + isDisabled={ + DefaultConfigChange == "Add New Configuration" + ? false + : true + } + /> + </FlexItem> + <FlexItem> + <Button + key="confirm2" + variant={optoConfigResult} + onClick={() => { + editConfig( + DefaultConfigChange == "Add New Configuration" + ? newConfigName + : DefaultConfigChange, + modalText + ); + }} + > + Confirm + </Button> + </FlexItem> + </Flex> + </PanelMainBody> + </PanelMain> + </Panel> + </PanelMainBody> + </PanelMain> + </Panel> + <CodeEditor + code={modalText} + isDarkTheme={false} + isLineNumbersVisible={true} + language={Language.javascript} + onChange={(value) => setmodalText(value)} + aria-label="text area vertical resize example" + height="400px" + /> + </Modal> + </React.Fragment> + ); + } +} diff --git a/ui/src/UI_architecture/OptoboardList.js b/ui/src/UI_architecture/OptoboardList.js new file mode 100644 index 0000000000000000000000000000000000000000..fe3ac943a4db6c0251ebc62e3c9cc5459283de93 --- /dev/null +++ b/ui/src/UI_architecture/OptoboardList.js @@ -0,0 +1,172 @@ +import React, { useState, useEffect } from "react"; +import { WriteReadBox } from "../OptoboardTools/WriteReadBox"; +import { Config } from "../OptoboardTools/Config"; +import { OptoStatus } from "../OptoboardTools/OptoStatus"; + +import { + Bullseye, + Button, + Flex, + FlexItem, + Text, + TextContent, + TextVariants, + Tooltip, + Panel, + PanelMain, + PanelMainBody, + Icon, + Spinner, +} from "@patternfly/react-core"; + +import CogIcon from "@patternfly/react-icons/dist/esm/icons/cog-icon"; +import PlusCircleIcon from "@patternfly/react-icons/dist/esm/icons/plus-circle-icon"; +import InfoCircleIcon from "@patternfly/react-icons/dist/esm/icons/info-circle-icon"; + +import { getPostBody, checkResponse } from "../utils/utility-functions"; + +export function OptoboardList({ url, DefaultConfig, Configurations }) { + const [optoList, setoptoList] = useState({}); + const [optoListInfo, setoptoListInfo] = useState({}); + const [loadingData, setloadingData] = useState(true); + const [isDrawerExpanded, setisDrawerExpanded] = useState(false); + + useEffect(() => { + setloadingData(true); + console.log("Asking for data!"); + fetch( + `${url}/sendOptoList`, + getPostBody({ optoList: Configurations[DefaultConfig] }) + ) + .then((response) => checkResponse(response)) + .then((data) => { + setoptoListInfo(data); + setoptoList(Configurations[DefaultConfig]); + console.log(DefaultConfig + " from function useEffect"); + setloadingData(false); + }) + .catch((err) => { + console.log(err); + }); + }, [DefaultConfig]); + + if (loadingData) { + return ( + <FlexItem key={"optoInListLoad"}> + <Bullseye> + <Spinner + isSVG + diameter="120px" + aria-label="spinner for loading data" + /> + </Bullseye> + </FlexItem> + ); + } else { + return optoList.map((opto, index) => { + return ( + <FlexItem key={index + "optoInList"}> + <Panel variant="bordered"> + <PanelMain> + <PanelMainBody> + <Flex> + <FlexItem flex={{ default: "flex_1" }}> + <TextContent> + <Text component={TextVariants.h3}>{opto.Position}</Text> + </TextContent> + </FlexItem> + <FlexItem align={{ defautl: "alignRight" }}> + {/* <Tooltip content={"Display additional functions"}> + <Button + aria-label="modify" + variant="plain" + id={"tt-ref" + index} + onClick={() => { + setisDrawerExpanded(!isDrawerExpanded); + }} + > + <Icon> + <PlusCircleIcon /> + </Icon> + </Button> + </Tooltip> */} + <Tooltip + entryDelay={150} + exitDelay={200} + content={ + <div> + <h4> + Serial Number: {opto.serialNumber} / Vtrx:{" "} + {opto.vtrxVersion}{" "} + </h4> + <h4> + testmode: {opto.testmode.toString()} / debug:{" "} + {opto.debugCheckBox.toString()} / test:{" "} + {opto.testmode.toString()} + </h4> + <h4> + flx_G: {opto.flx_G} / flx_d: {opto.flx_d} / + woflxcore: {opto.withoutFelixcore.toString()}{" "} + </h4> + <h4>inConfigDB: {opto.inDBCheckBox.toString()}</h4> + <h4>Configuration File: {opto.ConfigurationPath}</h4> + <h4> + inDBCheckBox: {opto.inDBCheckBox} / ConfigDB:{" "} + {opto.ConfigurationDB}{" "} + </h4> + </div> + } + > + <Button aria-label="drawer" variant="plain" id="tt-ref2"> + <Icon> + <InfoCircleIcon /> + </Icon> + </Button> + </Tooltip> + </FlexItem> + </Flex> + {/* <Drawer + isExpanded={isDrawerExpanded} + isInline={false} + position="right" + > + <DrawerContent + panelContent={ + <DrawerPanelContent> + <DrawerHead>ascas</DrawerHead> + </DrawerPanelContent> + } + > + <DrawerContentBody></DrawerContentBody> + </DrawerContent> + </Drawer> */} + <Flex> + <FlexItem> + <WriteReadBox + url={url} + optoboardPosition={opto.Position} + optoComponents={optoListInfo[opto.Position].components} + vtrxVersion={opto.vtrxVersion} + /> + </FlexItem> + <FlexItem> + <Config + url={url} + optoboardPosition={opto.Position} + optoComponents={optoListInfo[opto.Position].components} + /> + <OptoStatus + url={url} + optoboardPosition={opto.Position} + optoComponents={optoListInfo[opto.Position].components} + /> + </FlexItem> + </Flex> + </PanelMainBody> + </PanelMain> + </Panel> + </FlexItem> + ); + }); + } +} diff --git a/ui/src/Widgets/FormSelectInput.js b/ui/src/Widgets/FormSelectInput.js deleted file mode 100644 index 508f704b7b299efc794cf53395900319e39d689b..0000000000000000000000000000000000000000 --- a/ui/src/Widgets/FormSelectInput.js +++ /dev/null @@ -1,89 +0,0 @@ -import React from "react"; -import { - FormSelect, - FormSelectOption, -} from "@patternfly/react-core"; - - -class FormSelectInput extends React.Component { - constructor(props) { - super(props); - this.state = { - value: '' - }; - this.onChange = this.onChange.bind(this); - } - - onChange(value, event) { - this.setState({ value }); - }; - - render() { - return ( - <FormSelect value={this.state.value} onChange={this.onChange} aria-label="FormSelect Input"> - {this.props.items.map((option, index) => ( - <FormSelectOption isDisabled={option.disabled} key={index} value={option.value} label={option.value} /> - ))} - </FormSelect> - ); - } -} - -export {FormSelectInput}; - - -class FormSelectInput2 extends React.Component { - constructor(props) { - super(props); - }; - - render() { - return ( - <FormSelect value={this.props.value} onChange={this.props.onChange} aria-label="FormSelect Input"> - {this.props.items.map((option, index) => ( - <FormSelectOption isDisabled={option.disabled} key={index} value={option.value} label={option.value} /> - ))} - </FormSelect> - ); - } -} - -export {FormSelectInput2}; - - -class FormSelectInputNew extends React.Component { - constructor(props) { - super(props); - } - - render() { - return ( - <FormSelect value={this.props.value} onChange={this.props.onChange} aria-label="FormSelect Input"> - {this.props.items.map((option, index) => ( - <FormSelectOption isDisabled={option.disabled} key={index} value={option.value} label={option.value} /> - ))} - </FormSelect> - ); - } -} - -export {FormSelectInputNew}; - -//class for form which requires the onChange function to be passed as argument + has label != value -class FormSelectInputNewer extends React.Component { - constructor(props) { - super(props); - } - - render() { - return ( - <FormSelect value={this.props.value} onChange={this.props.onChange} aria-label="FormSelect Input"> - {this.props.items.map((option, index) => ( - <FormSelectOption isDisabled={option.disabled} key={index} value={option.value} label={option.label} /> - ))} - </FormSelect> - ); - } -} - -export {FormSelectInputNewer}; \ No newline at end of file diff --git a/ui/src/Widgets/LabelledDropdown.js b/ui/src/Widgets/LabelledDropdown.js deleted file mode 100644 index 22555d0755b464760697cdd29de1c60abfe12513..0000000000000000000000000000000000000000 --- a/ui/src/Widgets/LabelledDropdown.js +++ /dev/null @@ -1,73 +0,0 @@ -import React from "react"; -import { - Button, - Checkbox, - InputGroup, - InputGroupText, - Dropdown, - DropdownToggle, - DropdownItem, - FormSelect, - FormSelectOption, - FormSelectOptionGroup, - Text, - TextInput, - TextContent, - TextVariants, - Form, - FormGroup, - PanelMainBody, - PanelMain, - Panel, - PanelHeader, - SidebarContent, - Sidebar, - Flex, - FlexItem, - Grid, - GridItem, - Bullseye, -} from "@patternfly/react-core"; - - -class LabelledDropdown extends React.Component { - constructor(props) { - super(props); - this.state = { - isOpen : false, setIsOpen : false, - selected : null, setSelected : null, - }; - - this.onToggle = () => { - setIsOpen(!isOpen); - }; - this.onSelect = (isOpen, selected) => { - setIsOpen(isOpen); - setSelected(selected); - }; - } - - render (){ - const dataRates = props.items; - return ( - <React.Fragment> - <InputGroupText>{props.label}</InputGroupText> - <Dropdown - onSelect={onSelect} - toggle={ - <DropdownToggle onToggle={onToggle}> - {selected ? selected : "EPRXDataRate"} - </DropdownToggle> - } - isOpen={isOpen} - dropdownItems={dataRates.map((item, index) => ( - <DropdownItem key="opt-{index}" value="{item}" component="button"> - {item} - </DropdownItem> - ))} - /> - </React.Fragment> - );}; -}; - -export {LabelledDropdown}; diff --git a/ui/src/index.tsx b/ui/src/index.tsx index 5c43935e2ce8692395c5a7b72126b3ef853dc4f0..c1d1a348fb134f5143e64cc2ec5c227ce3f3829d 100644 --- a/ui/src/index.tsx +++ b/ui/src/index.tsx @@ -1,27 +1,15 @@ -import React from "react"; import ReactDOM from "react-dom"; import "@patternfly/react-core/dist/styles/base.css"; -import { - Page, - PageSection, - TextContent, - Text, - TextVariants, -} from "@patternfly/react-core"; -import { OptoboardList } from "./SimpleTabs/OptoboardList"; +import { OptoboardGUI } from "./UI_architecture/OptoboardGUI"; +// the url provided in the ReactDOM is used inside the gui for the fetch commands ReactDOM.render( - <Page> - <PageSection> - <TextContent> - <Text component={TextVariants.h1}>Optoboard GUI</Text> - </TextContent> - <OptoboardList backendUrl="/optoboard/api" /> - </PageSection> - </Page>, + <OptoboardGUI url="/optoboard/api" />, document.getElementById("root") //document.getElementById("root") as HTMLElement ); - // <SimpleTabs backendUrl="http://localhost:5009" /> \ No newline at end of file +// /optoboard/api +// http://localhost:5009/optoboard/api +// <SimpleTabs backendUrl="http://localhost:5009" />