(tcp, term)
¶(tcp, readterm, writeterm)
¶Set terminator on a tcpclient object for ASCII string manipulation
tcp - tcpclient object
term - terminal value for both read and write
readterm = terminal value type for read data
writeterm = terminal value for written data
The terminal can be either strings "cr", "lf" (default), "lf/cr" or an integer between 0 to 255.
None
See also: tcpport.
data =
flush (dev)
¶data =
flush (dev, "input")
¶data =
flush (dev, "output")
¶Flush the tcpclient socket buffers
dev - connected tcpclient device
If an additional parameter is provided of "input" or "output", then only the input or output buffer will be flushed
None
See also: serialport.
struct =
get (tcpclient)
¶field =
get (tcpclient, property)
¶Get the properties of tcpclient object.
tcpclient - instance of octave_tcpclient class.
property - name of property.
When property was specified, return the value of that property.
otherwise return the values of all properties as a structure.
See also: @octave_tcpclient/set.
set
(obj, property,value)
¶set
(obj, property,value,…)
¶Set the properties of tcpclient object.
If property is a cell so must be value, it sets the values of all matching properties.
The function also accepts property-value pairs.
Set the name for the tcpclient socket.
Set user data for the tcpclient socket.
Set the timeout value in seconds. Value of -1 means a blocking call.
None
See also: @octave_tcpclient/get.
tcpclient =
tcpclient (ipaddress, port)
¶tcpclient =
tcpclient (ipaddress, port, [propertyname, propertyvalue])
¶Open tcpclient interface.
ipaddress - the ip address of type String.
port - the port number to connect.
propname,propvalue - property name/value pairs.
Known input properties:
name value
Numeric timeout value or -1 to wait forever
Boolean to enable or disable the nagle algorithm for delay transfer.
User data value.
The tcpclient() shall return instance of octave_tcpclient class as the result tcpclient.
The tcpclient object has the following public properties:
name assigned to the tcpclient object
instrument type ’tcpclient’ (readonly)
remote port number (Readonly)
remote host address (Readonly)
status of the object ’open’ or ’closed’ (readonly)
timeout value in seconds used for waiting for data
number of bytes currently available to read (readonly)
number of bytes currently available to read (readonly)
Byte order for data (currently not used)
Terminator value used for string data (currently not used)
User data
Bool for whether transfer delay is enabled. (Read only)