viOpen(3)
HP-UX
NAME
viOpen − Opens a session to the specified device
SYNOPSIS
viOpen(ViSession sesn, ViRsrc rsrcName, ViAccessMode
accessMode, ViUInt32 timeout, ViPSession vi);
Description
This function opens a session to the specified device. It returns a session identifier that can be used to call any other functions to that device.
Parameters
sesn An input parameter. Resource Manager session (should always be the Default Resource Manager for VTL returned from viOpenDefaultRM).
rsrcName An input parameter. Unique symbolic name of a resource. (See the following tables.)
accessMode An input parametr. VI_NULL (Not used for VTL.)
timeout An input parameter. VI_NULL (Not used for VTL.)
vi An output parameter. Unique logical identifier reference to a session.
Address String Grammar for rsrcName:
VXI - VXI[board]::VXI_logical_address[::INSTR]
GPIB-VXI - GPIB-VXI[board]::VXI_logical_address[::INSTR]
GPIB - GPIB[board]::primary_address[::secondary_address][::INSTR]
Examples of Address Strings for rsrcName:
VXI0::1::INSTR - A VXI device at logical address 1 in
VXI interface VXI0.
GPIB-VXI::24::INSTR - A VXI device at logical address 9
in a GPIB-VXI controlled VXI system.
GPIB::1::0 - A GPIB device at primary address 1 and
secondary address 0 in GPIB interface 0.
Return Values
This is the functional return status. It returns either a completion code or an error code as follows.
VI_SUCCESS Session opened successfully.
VI_ERROR_INV_SESSION VI_ERROR_INV_OBJECT The given session or object reference is invalid (both are the same value).
VI_ERROR_NSUP_OPER The given sesn does not support this function. For VTL, this function is supported only by the Default Resource Manager session.
VI_ERROR_INV_RSRC_NAME Invalid resource reference specified. Parsing error.
VI_ERROR_INV_ACC_MODE Invalid access mode.
VI_ERROR_RSRC_NFOUND Insufficient location information or resource not present in the system.
VI_ERROR_ALLOC Insufficient system resources to open a session.
See Also
viClose
AUTHOR
viOpen was developed by HP
Hewlett-Packard Comapny — September 29, 1999