<description>Common Registers on allmost all endpoints</description>
<!-- this is just a very minimal version -->
-
- <register name="CommonStatus0" address="0000" purpose="status">
- <description>Common Status Register 0</description>
- <field name="Temperature" start="20" size="12" format="integer" unit="°C" scale=".0625" >
- <description>Board temperature</description>
- </field>
- </register>
+ <group name="StatusRegisters" address="0000">
+ <register name="CommonStatus0" address="0000" purpose="status">
+ <description>Common Status Register 0</description>
+ <field name="Temperature" start="20" size="12" format="integer" unit="°C" scale=".0625" >
+ <description>Board temperature</description>
+ </field>
+ </register>
+ </group>
</TrbNetEntity>
<!-- must contain either a uid map to setup the network
initially, or a trb directive. otherwise it's useless :)
-->
+ <xs:element ref="description" />
<xs:choice>
<xs:element ref="uidMap"/>
<xs:element ref="trb"/>
<?xml version="1.0" encoding="utf-8" ?>
<TrbNetSetup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="../schema/TrbNetSetup.xsd"
+ xsi:noNamespaceSchemaLocation="schema/TrbNetSetup.xsd"
creator="Andreas Neiser"
date="2013-06-30T16:11:56"
version="0.1"
>
+
+<description>A hypothetic TRB set-up that due to some strange coincidence exists in Mainz.</description>
+
<!-- The order of the trb elements is respected and their content is
evaluated after each one (if they specify a value). This is important if the resulting
changes to the TrbNet must happen in a certain way. -->
address, or sometimes it specifies the chain number of the
external PaDiWa frontend -->
-
+
<!-- this specifies the trbaddress from uid's, it can be omitted if
the TrbNet is already set-up -->
<uidMap>
# 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', 1) unless exists $n->{'start'};
+ PrintMessage($n, 'Fatal Error: "start" attribute is required', 0) unless exists $n->{'start'};
} else {
PrintMessage($n, 'Fatal Error: "address" attribute is required', 1) unless exists $n->{'address'};
}
my $doc = shift;
my $schemas = shift;
my $xsd_file = $doc->getDocumentElement->getAttribute('xsi:noNamespaceSchemaLocation');
+ # Strip filename from path to select proper schema
($xsd_file) = $xsd_file =~ m%.*/([^/]*)$%;
die "Schema $xsd_file not found to validate <$_>" unless defined $schemas->{$xsd_file};
$schemas->{$xsd_file}->validate($doc);