3.2 General

3.2.1 instrhelp

: instrhelp ()
: instrhelp (funcname)
: instrhelp (obj)

Display instrument help

Inputs

funcname - function to display help about.
obj - object to display help about.

If no input is provided, the function will display and overview of the package functionality.

Outputs

None

3.2.2 instrhwinfo

Function File: [list] = instrhwinfo ()
Function File: list = instrhwinfo (interface)

Query available hardware for instrument-control

When run without any input parameters, instrhwinfo will provide the toolbox information and a list of supported interfaces.

Inputs

interface is the instrument interface to query. When provided, instrhwinfo will provide information on the specified interface.

Currently only interface "serialport","i2c" and "spi" and is supported, which will provide a list of available serial ports or i2c ports.

Outputs

If an output variable is provided, the function will store the information to the variable, otherwise it will be displayed to the screen.

Example

 instrhwinfo
 scalar structure containing the fields:

    ToolboxVersion = 0.4.0
    ToolboxName = octave instrument control package
    SupportedInterfaces =
    {
      [1,1] = i2c
      [1,2] = parallel
      [1,3] = serialport
      [1,4] = tcp
      [1,5] = udp
      [1,6] = usbtmc
      [1,7] = vxi11
    }

3.2.3 resolvehost

Loadable Function: name = resolvehost (host)
Loadable Function: [name, address] = resolvehost (host)
Loadable Function: out = resolvehost (host, returntype)

Resolve a network host name or address to network name and address

Inputs

host - Host name or IP address string to resolve.
name - Resolved IP host name.
returntype - ’name’ to get host name, ’address’ to get IP address.

Outputs

name - Resolved IP host name.
address - Resolved IP host address.
out - host name if returntype is ’name’, ipaddress if returntype is ’address’

Example

%% get resolved ip name and address of www.gnu.org
[name, address] = resolvehost ('www.gnu.org');

%% get ip address of www.gnu.org
ipaddress = resolvehost ('www.gnu.org', 'address');

See also: tcp, udp.