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);
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
=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
=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