+++ /dev/null
-<?xml version="1.0"?>
-<TrbNet
- type="JtagController"
- offset="1000"
- >
-<group
- name
- addr
- width
- continuous="yes"
- >
-<register
- name="TriggerAllchainsInitSeq"
- address="0003"
- mode="w"
- type =""
- >
- <description>
-Start initialization sequence for all connected sensor chains
- </description>
-<field
- type="configuration"
- name="NU"
- start="16"
- size="4"
- defaultValue="0" >
- <description>Reserved, Not Used </description>
-</field>
-</register>
-</group>
-</TrbNet>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8" ?>
-<TrbNet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-xsi:noNamespaceSchemaLocation="TrbNetspec.xsd"
- name="JtagController"
- offset="1000"
- >
-<group
- name="JtagCommonControl"
- address="0000"
- size="21"
- function="config"
- continuous="true"
- >
-
- <register
- name="WaitBeforeStart"
- address="0007"
- mode="rw"
- function ="config"
- >
- <description>Wait time between write sequence and start signal.</description>
- <field
- type="config"
- name="WaitBeforeStart"
- start="0"
- size="20"
- defaultValue="0" >
- <description>The number of MAPS clock cycles to wait after last write before sending the start signal. </description>
- </field>
- </register>
-</group>
-
-</TrbNet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8" ?>
+<TrbNet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="TrbNet.xsd"
+ name="JtagController"
+ offset="1000"
+ >
+ <group
+ name="JtagCommonControl"
+ address="0000"
+ size="21"
+ function="config"
+ continuous="true"
+ >
+
+ <register
+ name="WaitBeforeStart"
+ address="0007"
+ mode="rw"
+ function ="config"
+ >
+ <description>Wait time between write sequence and start signal.</description>
+ <field
+ type="config"
+ name="WaitBeforeStart"
+ start="0"
+ size="20"
+ defaultValue="0" >
+ <description>The number of MAPS clock cycles to wait after last write before sending the start signal. </description>
+ </field>
+ </register>
+ </group>
+</TrbNet>
--- /dev/null
+#!/usr/bin/perl
+use strict;
+use warnings;
+
+use XML::LibXML;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin qw($RealBin);
+use Data::Dumper;
+
+# some default config options
+# and provide nice help documentation
+
+my $man = 0;
+my $help = 0;
+my $verbose = 0;
+my $db_dir = "$RealBin/database";
+
+GetOptions(
+ 'help|h' => \$help,
+ 'man' => \$man,
+ 'verbose|v+' => \$verbose
+ ) or pod2usage(2);
+pod2usage(1) if $help;
+pod2usage(-exitval => 0, -verbose => 2) if $man;
+
+print "Database: $db_dir\n" if $verbose;
+
+my $doc = XML::LibXML->new->parse_file("$db_dir/testing.xml");
+my $xmlschema = XML::LibXML::Schema->new( location => "$db_dir/TrbNet.xsd" );
+
+$xmlschema->validate($doc);
+
+__END__
+
+=head1 NAME
+
+xml-db.pl - Access the TRB XML Database
+
+=head1 SYNOPSIS
+
+xml-db.pl [options] [config file]
+
+ Options:
+ -h, --help brief help message
+ --xml-db_dir database directory
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<--help>
+
+Print a brief help message and exits.
+
+=item B<--db-dir>
+
+Set the database directory where the default XML files can be found.
+
+=back
+
+=head1 DESCRIPTION
+
+B<This program> provides basic access to the XML database describing
+the TRB registers.
+
+=cut