8def add_daphne_conf(oksfile:str, object_name:str, json_file:str, timeout_ms:int = 1500):
9 """Script to add a new DaphneConf object from a given json file"""
11 print(
"Adding file", json_file,
"to object", object_name)
15 with open(json_file,
'r')
as file:
18 schemafile=
'schema/appmodel/PDS.schema.xml'
22 def_channel = dal.DaphneV2Channel(
"daphne-v2-default-channel",
27 db.update_dal(def_channel)
29 def_adc = dal.DaphneV2ADC(
"daphne-v2-default-adc",
31 output_offset_binary=
True,
33 db.update_dal(def_adc)
35 def_pga = dal.DaphneV2PGA(
"daphne-v2-default-pga",
37 integrator_disable=
True,
39 db.update_dal(def_pga)
41 def_lna = dal.DaphneV2LNA(
"daphne-v2-default-lna",
43 integrator_disable=
True,
45 db.update_dal(def_lna)
47 def_afe = dal.DaphneV2AFE(
"daphne-v2-default-afe",
54 db.update_dal(def_afe)
56 def_board = dal.DaphneV2BoardConf(
"daphne-v2-default-board",
58 self_trigger_threshold=0,
59 default_channel=def_channel,
61 db.update_dal(def_board)
63 new_conf = dal.DaphneConf(object_name,
64 timeout_ms=timeout_ms,
66 default_v2_settings=def_board )
67 db.update_dal(new_conf)