summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libvxi11client/perlbits/Client.pm34
1 files changed, 21 insertions, 13 deletions
diff --git a/libvxi11client/perlbits/Client.pm b/libvxi11client/perlbits/Client.pm
index a9f56d7..a170c6c 100644
--- a/libvxi11client/perlbits/Client.pm
+++ b/libvxi11client/perlbits/Client.pm
@@ -232,27 +232,33 @@ client that the instruments can connect to.
=head2 USAGE
INT vxi_startinterruptserver();
+
Start the local RPC service for the instrument to connect to and deliver
interrupt/service requests to.
Make sure you have portmapper or rpcbind running and you aren't blocking
the ports it allocates.
INT vxi_stopinterruptserver();
+
Shutdown the local RPC server.
INT INST = vxi_open( address => STRING, [device => STRING] );
+
Open a link to an instrument. Use the returned instance to call
the object methods below.
INT INST->vxi_close();
+
Destroy the link to the insturment and destroy the local RPC client.
You must not use an instance created with vxi_open(); after calling this.
INT INST->vxi_lock([waitforlock => 'false'])
+
Lock the instrument. You can tell the instrument to try to wait for
the lock to become free and lock it via waitforlock,
INT INST->vxi_unlock();
+
Unlock the instrument. Only makes sense if you are holding the lock.
INT INST->vxi_write(STRING data, [ len => -1,
@@ -278,10 +284,10 @@ INT INST->vxi_write(STRING data, [ len => -1,
from the returned data will be automatically removed.
(INT ret, STRING dataout, INT dataoutlen) = vxi_docmd (INT cmd, [ datain => "",
- datainlen => -1,
- dataoutbufferlen => 256,
- waitforlock => 0,
- autochomp => 1]);
+ datainlen => -1,
+ dataoutbufferlen => 256,
+ waitforlock => 0,
+ autochomp => 1]);
Send a command to the instrument possibly with some data. The rules for write apply
to datain and the rules for read apply for dataout.
@@ -343,16 +349,18 @@ INT INST->vxi_trigger([waitforlock => 0]);
Trigger the instrument.
-Return codes work like this;
-1 - is a success
-0 - means the request failed locally, the state inside the client is
-incorrect, i.e. calling to enable interrupts before creating the channel
-or that the server couldn't be contacted
-< 0 - Any negative value is the negated VXI-11 error code from the server
+Return codes work like this:
+
+ 1 - is a success
+ 0 - means the request failed locally, the state inside the client is
+ incorrect, i.e. calling to enable interrupts before creating the channel
+ or that the server couldn't be contacted
+ < 0 - Any negative value is the negated VXI-11 error code from the server
+
+The only exceptions to this are the read and write methods:
-The only exceptions to this are the read and write methods
-0 - Error as above or zero bytes read/written
-> 0 - Number of bytes read/written
+ 0 - Error as above or zero bytes read/written
+ > 0 - Number of bytes read/written
=head1 SAMPLE SCRIPTS