]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
corrected documentation, mt
authorhadaq <hadaq>
Sun, 11 Mar 2012 15:32:22 +0000 (15:32 +0000)
committerhadaq <hadaq>
Sun, 11 Mar 2012 15:32:22 +0000 (15:32 +0000)
libtrbnet_perl/lib/HADES/TrbNet.pm

index 2378107da4478bb83a1c9dad0c927a1f28e087c4..9118d17197480b2a0f8296d0b5c1345cc56e45e7 100644 (file)
@@ -125,7 +125,8 @@ HADES::TrbNet - Perl extension for the libtrbnet library, also via RPC calls
  use strict;
  use HADES::TrbNet;
 
- my $connect_status = &trb_init_ports();
+trb_init_ports() or die trb_strerror();
+
  my @res; my $res; my $rh_res;
  # read from TrbNet
  $rh_res = trb_register_read(0x3,0xa0e3);
@@ -138,6 +139,11 @@ HADES::TrbNet - Perl extension for the libtrbnet library, also via RPC calls
     printf("0x%08x\n", $rh_res->{0x3});
  }
 
+# read 10 data words and write them into a hash
+
+my $rh_mem_read = trb_register_read_mem(0x2000, 0xa000, 0 , 10);
+
+my $rh_fifo_read = trb_register_read_mem(0x2000, 0xe000, 1 , 10);
 
 
  # write to TrbNet
@@ -150,7 +156,8 @@ HADES::TrbNet - Perl extension for the libtrbnet library, also via RPC calls
 =head1 DESCRIPTION
 
 This package imports the libtrbnet into perl as a shared library.
-
+A full description of the functions is given in 
+libtrbnet/trbnet.h
 
 =head2 EXPORT
 
@@ -158,9 +165,15 @@ None by default.
 
 =head2 Exportable functions
 
-    trb_rr
-    trb_wr
-
+       trb_errno 
+       trb_error 
+       trb_strerror : returns string of error
+       trb_init_ports : establishes connection to trbnetd
+       trb_register_read : reads register
+       trb_register_read_mem : reads an arrary of memory, or fifo
+       trb_register_write 
+       trb_read_uid : reads uids of trbnet endpoints
+       trb_nettrace
 
 =head1 SEE ALSO