Loadable Function: tcp = tcp ()
Loadable Function: tcp = tcp (ipaddress)
Loadable Function: tcp = tcp (ipaddress, port)
Loadable Function: tcp = tcp (ipaddress, port, timeout)
Loadable Function: tcp = tcp (ipaddress, [propertyname, propertyvalue])
Loadable Function: tcp = tcp (ipaddress, port, [propertyname, propertyvalue])

Open tcp interface.

Inputs

ipaddress - the ip address of type String. If omitted defaults to ’127.0.0.1’.
port - the port number to connect. If omitted defaults to 23.
timeout - the interface timeout value. If omitted defaults to blocking call.
propname,propvalue - property name/value pairs.

Known input properties:

name

name value

timeout

Numeric timeout value or -1 to wait forever

Outputs

The tcp() shall return instance of octave_tcp class as the result tcp.

Properties

The tcp object has the following public properties:

name

name assigned to the tcp object

type

instrument type ’tcp’ (readonly)

localport

local port number (readonly)

remoteport

remote port number

remotehost

remote host

status

status of the object ’open’ or ’closed’ (readonly)

timeout

timeout value in seconds used for waiting for data

bytesavailable

number of bytes currently available to read (readonly)

Package: instrument-control