(tcp, term)
¶(tcp, readterm, writeterm)
¶Set terminator on a tcpserver object for ASCII string manipulation
tcp - tcpserver 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 tcpserver socket buffers
dev - connected tcpserver 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 (tcpserver)
¶field =
get (tcpserver, property)
¶Get the properties of tcpserver object.
tcpserver - instance of octave_tcpserver 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_tcpserver/set.
data =
read (obj)
¶data =
read (obj, size)
¶data =
read (obj, size, datatype)
¶Reads data from TCP instrument
obj is a TCP Server object.
size Number of values to read. (Default: NumBytesAvailable).
datatype datatype of data.
data data read.
set
(obj, property,value)
¶set
(obj, property,value,…)
¶Set the properties of tcpserver 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 tcpserver socket.
Set user data for the tcpserver socket.
Set the timeout value in seconds. Value of -1 means a blocking call.
None
See also: @octave_tcpserver/get.
tcpserver =
tcpserver (ipaddress, port)
¶tcpserver =
tcpserver (port)
¶tcpserver =
tcpserver (…, [propertyname, propertyvalue])
¶Open tcpserver interface.
ipaddress - the ip address of type String.
port - the port number to bind.
propname,propvalue - property name/value pairs.
Known input properties:
name value
Numeric timeout value or -1 to wait forever
User data value.
The tcpserver() shall return instance of octave_tcpserver class as the result tcpserver.
The tcpserver object has the following public properties:
boolean flag for when connected to a client (Readonly)
connected client port number (Readonly)
connected client address (Readonly)
name assigned to the tcpserver object
instrument type ’tcpserver’ (readonly)
server port number (Readonly)
server 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