diff options
author | daniel <danieruru@gmail.com> | 2013-02-01 00:25:43 +0900 |
---|---|---|
committer | daniel <danieruru@gmail.com> | 2013-02-01 00:25:43 +0900 |
commit | 1f2c64beb20da6a635b2b5f610a6d747fadbfd7d (patch) | |
tree | 7baab2ada27471e2b50a9ccd6181626e368b318c /libvxi11client/perlbits/Client.pm | |
parent | 75765b3558571f86ecaab4d8767059be49936fc9 (diff) |
make the function descriptions look more perl
Diffstat (limited to 'libvxi11client/perlbits/Client.pm')
-rw-r--r-- | libvxi11client/perlbits/Client.pm | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/libvxi11client/perlbits/Client.pm b/libvxi11client/perlbits/Client.pm index 79f7029..1bbafc7 100644 --- a/libvxi11client/perlbits/Client.pm +++ b/libvxi11client/perlbits/Client.pm @@ -233,44 +233,44 @@ client that the instruments can connect to. =over -=item INT vxi_startinterruptserver(); +=item $retcode = 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. -=item INT vxi_stopinterruptserver(); +=item $retcode = vxi_stopinterruptserver(); Shutdown the local RPC server. -=item VXI11::Client vxi_open( address => STRING, [device => STRING] ); +=item $inst = vxi_open( address => STRING, [device => STRING] ); Open a link to an instrument. Use the returned instance to call the object methods below. -=item INT INST->vxi_close(); +=item $retcode = $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. -=item INT INST->vxi_lock([waitforlock => 'false']); +=item $retcode = $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, -=item INT INST->vxi_unlock(); +=item $retcode = $inst->vxi_unlock(); Unlock the instrument. Only makes sense if you are holding the lock. -=item INT INST->vxi_write(STRING data, [ len => -1, waitforlock => 0, end => 1 ]); +=item $retcode = $inst->vxi_write(data, [ len => -1, waitforlock => 0, end => 1 ]); Write data to the instrument. If the data is a terminated string you can pass -1 as the length to have it calculated for you. If the data is not terminated or for some reason you only want to write part of it you need to provide a length. You can wait for the lock to be freed by via waitforlock. -=item (INT bytes, STRING string, INT reason) INST->vxi_read([ bufferlen => 1024, waitforlock => 0, termchrset => 0, termchr => 0, autochomp => 1]); +=item ($bytes, $data, $reason) = $inst->vxi_read([ bufferlen => 1024, waitforlock => 0, termchrset => 0, termchr => 0, autochomp => 1]); Read some data from the instrument. The default parameters should be fine for most cases. If you need to read more than 1024 bytes you should pass @@ -280,25 +280,25 @@ not what was copied into the buffer. So if the number of bytes returned is larger than bufferlen the data is truncated. If autochomp is set the newline from the returned data will be automatically removed. -=item (INT ret, STRING dataout, INT dataoutlen) = vxi_docmd (INT cmd, [ datain => "", datainlen => -1, dataoutbufferlen => 256, waitforlock => 0, autochomp => 1]); +=item ($retcode, $dataout, $dataoutlen) = vxi_docmd (INT cmd, [ datain => "", 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. -=item INT INST->vxi_abort(); +=item $retcode = $inst->vxi_abort(); Abort an in-progress operation. -=item INT vxi_readstatusbyte([ waitforlock => 0 ]); +=item $retcode = $inst->vxi_readstatusbyte([ waitforlock => 0 ]); Read the instruments status byte. -=item INT INST->vxi_create_intr_chan(); +=item $retcode = $inst->vxi_create_intr_chan(); Creates an interrupt channel from the instrument to this client. This must be called after vxi_startinterruptserver. -=item INT INST->vxi_enable_srq(STRING handle); +=item $retcode = $inst->vxi_enable_srq(STRING handle); Tell the instrument to fire interrupts/service requests to the interrupt channel. Must be called after vxi_create_intr_chan(). @@ -306,18 +306,18 @@ You should give a unique channel handle for each instrument as you will need this to work out which device set an interrupt/service request. -=item INT INST->vxi_disable_srq(); +=item $retcode = $inst->vxi_disable_srq(); Tell the instrument that you don't want it to send interrupts/ service requests anymore. This does not destroy the interrupt channel. -=item INT INST->vxi_destroy_intr_chan(); +=item $retcode = $inst->vxi_destroy_intr_chan(); Tell the instrument to disconnect from the interrupt service that is running locally. This does not shut down the interrupt service. -=item STRING vxi_wait_for_interrupt([INT timeout => -1 | 0 | n]); +=item $handle = vxi_wait_for_interrupt([INT timeout => -1 | 0 | n]); Waits for an interrupt/service request to be received from a connected instrument. When an interrupt is caught the handle of the interrupt will @@ -326,19 +326,19 @@ You can pass a timeout in ms (the default is 250ms), or 0 to never block and only return interrupts that have already happened or -1 to block until an interrupt is caught (could block forever!). -=item INT INST->vxi_remote([waitforlock => 0]); +=item $retcode = $inst->vxi_remote([waitforlock => 0]); Lock out the instrument's display. -=item INT INST->vxi_local([waitforlock => 0]); +=item $retcode = $inst->vxi_local([waitforlock => 0]); Unlock the instrument's display. -=item INT INST->vxi_clear([waitforlock => 0]); +=item $retcode = $inst->vxi_clear([waitforlock => 0]); Clear the instruments's display. -=item INT INST->vxi_trigger([waitforlock => 0]); +=item $retcode = $inst->vxi_trigger([waitforlock => 0]); Trigger the instrument. |