From 515917c2dcd1ae6da02ce4d87f15735b5cf4efa2 Mon Sep 17 00:00:00 2001 From: hadaq Date: Sun, 11 Mar 2012 15:32:22 +0000 Subject: [PATCH] corrected documentation, mt --- libtrbnet_perl/lib/HADES/TrbNet.pm | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/libtrbnet_perl/lib/HADES/TrbNet.pm b/libtrbnet_perl/lib/HADES/TrbNet.pm index 2378107..9118d17 100644 --- a/libtrbnet_perl/lib/HADES/TrbNet.pm +++ b/libtrbnet_perl/lib/HADES/TrbNet.pm @@ -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 -- 2.43.0