![Asentria Teleboss 850 Скачать руководство пользователя страница 171](http://html.mh-extra.com/html/asentria/teleboss-850/teleboss-850_user-manual_2981745171.webp)
TeleBoss 850 2.06.280_STD User Manual
Page 165
a_lib.SetDTR
Description
Sets the state of the DTR pin on the specified IO port. The port must be configured via the
'scripting.dtrcontrol.portenable' setting for DTR to be under scripting control.
Syntax
a_lib.SetDTR(port, state)
name: The name of the port (i.e. "com1", etc)
state: Value representing the desired state (0 = low, anything
else = high)
Returns
Returns 1 if successful, 'nil' if not.
Example
-- set DTR high on io3
a_lib.SetDTR("com3", true)
a_lib.TCPClose
Description
Closes a TCP connection that was opened previously using a_lib.TCPConnect().
Syntax
a_lib.TCPClose(handle)
handle: The handle obtained when the connection was established
Returns
None.
Example
-- connect to remote host using telnet port
handle = a_lib.TCPConnect("192.168.168.3", 23, 10, "telnet")
-- if connection successful
if handle ~= nil then
-- wait for a prompt
if a_lib.WaitForString(handle, "READY", 5000) ~= nil then
-- do some stuff...
end
-- close the connection
a_lib.TCPClose(handle)
end
Содержание Teleboss 850
Страница 6: ......