Series 2600B System SourceMeter® instrument Reference Manual Section 9: TSP command reference
2600BS-901-01 Rev. F/August 2021 9-405
tspnet.termination()
This function sets the device line termination sequence.
Usage
type = tspnet.termination(connectionID)
type = tspnet.termination(connectionID, termSequence)
An enumerated value indicating the termination type:
â–ª 1 or tspnet.TERM_LF
â–ª 4 or tspnet.TERM_CR
â–ª 2 or tspnet.TERM_CRLF
â–ª 3 or tspnet.TERM_LFCR
The connection ID returned from tspnet.connect()
Details
This function sets and gets the termination character sequence that is used to indicate the end of a
line for a TSP-Net connection.
Using the termSequence parameter sets the termination sequence. The present termination
sequence is always returned.
For the termSequence parameter, use the same values listed in the table above for type. There are
four possible combinations, all of which are made up of line feeds (LF or 0x10) and carriage returns
(CR or 0x13). For TSP-enabled devices, the default is tspnet.TERM_LF. For devices that are not
TSP-enabled, the default is tspnet.TERM_CRLF.
Example
deviceID = tspnet.connect("192.0.2.1")
if deviceID then
tspnet.termination(deviceID, tspnet.TERM_LF)
end
Sets termination type for IP address 192.0.2.1 to TERM_LF.
Also see
tspnet.connect() (on page 9-399)
tspnet.disconnect() (on page 9-400)