<external ref="PaDiWa" address="0002" />
</trb>
-
- <!-- An example how to execute a setting. In general, the entities
- are identified by their type and address (if specified) -->
- <trb address="0200">
- <broadcast address="fe48" />
- <entity ref="TDC">
- <!-- this field is a bitmask, so there's a converter to easily
- set single bits -->
- <field name="ChannelEnable">
- 0-15 => 1, <!-- enables channels 0-15 -->
- 34 => 1, <!-- enables channel 34 -->
- </field>
- </entity>
- </trb>
-
-
- <trb address="0200">
- <broadcast address="fe48" />
- <!-- this field is a bitmask, so there's a converter to easily
- set single bits -->
- <entity ref="TDC">
- <field name="ReadoutFSM">
- <enumItem value="0">Bla</enumItem>
- </field>
- <field name="ChannelEnable">
- 0-15 => 1, <!-- enables channels 0-15 -->
- 34 => 5, <!-- enables channel 34 -->
- </field>
- </entity>
- </trb>
-
<trb address="ffff">
- <entity ref="TrbNet">
+ <entity ref="TrbNet" />
</trb>
<trb address="fe48">
- <entity ref="TDC">
- <entity ref="RDO">
+ <entity ref="TDC" />
+ <entity ref="TrgRdo" />
</trb>
<trb address="fffe">
- <entity ref="HUB">
+ <entity ref="Hub" />
</trb>
-
-<!--
- <trb address="ff7f">
- <entity ref="GBE">
- </trb>
--->
-
-
-
+
</TrbNetSetup>
# and we can check some more required fields
foreach my $n ($entity->findnodes('//field | //register | //memory | //fifo | //group')) {
if ($n->nodeName eq 'field') {
- PrintMessage($n, 'Fatal Error: "start" attribute is required', 0) unless exists $n->{'start'};
+ PrintMessage($n, 'Fatal Error: "start" attribute is required', 1) unless $n->hasAttribute('start');
} else {
- PrintMessage($n, 'Fatal Error: "address" attribute is required', 1) unless exists $n->{'address'};
+ PrintMessage($n, 'Fatal Error: "address" attribute is required', 1) unless $n->hasAttribute('address');
}
}
}
PrintMessage($elem, "Merging entity item <$uniquename>") if $verbose;
PrintMessage($elem, "Before merge:\n".$e_node->toString(2)) if $verbose>2;
- # override the attributes (using nice tied hash functionality)
+ # override the attributes (using tied hash functionality, which
+ # sometimes does not work when reading?)
foreach my $attr (keys %$elem) {
next if $attr eq 'name';
- $e_node->setAttribute($attr, $elem->{$attr});
+ $e_node->setAttribute($attr, $elem->getAttribute($attr));
}
# appending all additional elements