]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
added description to TrbNetSetup
authorJan Michel <j.michel@gsi.de>
Tue, 2 Jul 2013 09:44:42 +0000 (11:44 +0200)
committerJan Michel <j.michel@gsi.de>
Tue, 2 Jul 2013 09:44:42 +0000 (11:44 +0200)
xml-db/database/TrbNet.xml
xml-db/schema/TrbNetSetup.xsd
xml-db/setup/trb-setup-default.xml
xml-db/xml-db.pl

index 2c2f28bbef22972d1816f2f4e9d9c16a959520cf..eed0a4e06cee2c0511e36c88f9873f5608fd46d0 100644 (file)
@@ -7,12 +7,13 @@
   <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>
index 43ceac757621d144dfd21dcf8b43b33172c2bffe..c947792a064c19cd37d6124ac050e7c69b2b7b56 100644 (file)
@@ -8,6 +8,7 @@
         <!-- 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"/>
index eed3e988e8ae41767db03a9d50227ecc9a1e8d31..37e459e25e5e128eeda1063a0b8df67d15841d9e 100644 (file)
@@ -1,10 +1,13 @@
 <?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. -->
@@ -14,7 +17,7 @@
        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>
index 54af5870bb62b87806c6aa630faab8bd1cc70e4c..4822072d8514c7b88eaa4f52497c57a4f9b655c3 100755 (executable)
@@ -149,7 +149,7 @@ sub EvaluateTrbNode($$$) {
     # 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'};
       }
@@ -337,6 +337,7 @@ sub ValidateXML($$) {
   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);