9 eth_protocol = "udp", flx_mode = "fix_rate"):
10
11 schemafiles = [
12 "schema/confmodel/dunedaq.schema.xml",
13 "schema/appmodel/application.schema.xml",
14 "schema/appmodel/fdmodules.schema.xml",
15 "schema/appmodel/wiec.schema.xml",
16 ]
19 db.create_db(oksfile, schemafiles)
20
21 group_name = os.path.basename(oksfile).removesuffix(".data.xml")
22 groups = []
23 streams = []
24 senders = []
25 source_id = 0
26
27 for app in range(n_apps):
28 print (f"Generating {app=}")
29 for stream_no in range(n_streams):
30 print (f"Generating {stream_no=}")
31
32
33
34
35
36
37
38 if det_id in [2, 8, 9]:
39 geo_dal = dal.GeoId(
40 f"geioId-{source_id}",
41 detector_id=det_id,
42 crate_id=app+1,
43 slot_id=stream_no,
44 stream_id=1,
45 )
46 else:
47 geo_dal = dal.GeoId(
48 f"geioId-{source_id}",
49 detector_id=det_id,
50 crate_id=app+1,
51 slot_id=0,
52 stream_id=stream_no,
53 )
54 db.update_dal(geo_dal)
55 stream = dal.DetectorStream(
56 f"stream-{source_id}",
57 source_id=source_id,
58 geo_id=geo_dal,
59 )
60 db.update_dal(stream)
61 streams.append(stream)
62 db.commit()
63
64 sender_dal = dal.FakeDataSender(
65 f"sender-{source_id}",
66 contains=[stream]
67 )
68 db.update_dal(sender_dal)
69 senders.append(sender_dal)
70 db.commit()
71
72 source_id = source_id + 1
73
74 sender_set = dal.ResourceSetAND(f"senders-{app}", contains=senders)
75 db.update_dal(sender_set)
76
77 print(f"New nic adding nic with id nic-{app}")
78 nic_dal = dal.FakeDataReceiver(
79 f"ROInterface-{app}"
80 )
81 db.update_dal(nic_dal)
82 detconn_dal = dal.DetectorToDaqConnection(
83 f"det-conn-{app}",
84 contains=[nic_dal, sender_set])
85 db.update_dal(detconn_dal)
86 groups.append(detconn_dal)
87 senders = []
88
89 db.commit()
90
module(name, schema, other_dals=[], backend='oksconflibs', db=None)