## Read setup xml file
###############################
my @commands;
+my $boardsini;
my $parser = XML::LibXML->new(line_numbers => 1);
my $filename = $ARGV[0];
my $db = $parser->parse_file($filename);
foreach my $curctrl ($db->getDocumentElement->findnodes('controller')) {
print STDERR "Found controller id ".$curctrl->getAttribute('id')."\n" if $verbose;
+ $boardsini .= proto_boardsini($curctrl->getAttribute('name'),$curctrl->getAttribute('id'),$curctrl->getAttribute('address'));
foreach my $curchain ($curctrl->findnodes('chain')) {
print STDERR " Found chain id ".$curchain->getAttribute('id')."\n" if $verbose;
foreach my $cursensor ($curchain->findnodes('sensor')) {
}
+###############################
+## Write ini files
+###############################
+
+
+
###############################
## Do whatever has to be done
###############################
+###############################
+## Fill information to template ini files
+###############################
+sub proto_boardsini {
+ my ($name,$id,$addr) = @_;
+ $r = qq%
+[$name]
+chainsini=chains_board$id.ini
+FPGAtrbnetAddr=0x$addr
+CONFwaitstart_trbnetAddr=0xb007
+CONFtriginitseq_trbnetAddr=0xb003
+CONFtrigmapsstart_trbnetAddr=0xb00b
+CONFtrigmapsreset_trbnetAddr=0xb00a
+CONFtrigrunjtag_trbnetAddr=0xb00f
+CONFtrigwriteonce_trbnetAddr=0xb014
+%;
+ return $r;
+}
+
+
+
+
+
+
+
+
print "\n";
+__END__
+
=head1 NAME
startup.pl - Run the necessary steps to configure and start MAPS sensors.