Chapter 11: Programming Amanda
119
S(port,[string],
[variable],
[termination],
[length],
[timeout])
Command that gives Amanda access to other computers via the serial ports. Amanda can
send a string to and/or receive a string from the remote computer. When receiving,
Amanda terminates the connection when the first of the following occurs:
•
Amanda receives the specified termination string
•
She receives the maximum number of characters
•
A timeout occurs
When sending, Amanda terminates the connection after the string is sent.
Before using this command, make sure the configuration settings for the physical serial
port have been defined.
port
The number for or a variable containing the number for the logical serial port (1,2,3,4)
mapped onto a physical COM port by the configuration option
serial_port1,
serial_port2
,
serial_port3,
or
serial_port4
.
string
Optional. A string or variable containing the characters to send to the specified serial
port. It can contain alphanumeric characters as wells as variables and the following
special characters:
\A
Attention, which is a bell sound (Ctrl+G)
\N
Newline (Ctrl+J)
\R
Return (Ctrl+M)
\T T
AB
(Ctrl+I)
\\
Backslash, the actual "\" character.
The default is to send no string to the serial port.
variable
Optional. The port or global variable that stores the response.
The default is not to store a response.
termination
Optional. A string or variable that defines the characters that, when read, stop Aman-
da from reading the serial port. This can use the same special characters as
string
. The
default is "\R\N", the carriage return/linefeed pair that usually end a line in a text file.
The terminating character, if any, does not become part of
variable
.
length
Optional. A number or a variable containing a number. Its absolute value defines the
maximum number of characters to receive over the serial port. The default is -143.
Use a positive value for
length
when you are receiving a packet of characters, you
know its exact size, and you want the command to fail if fewer characters are re-
ceived. Use a negative number otherwise.
timeout
Optional. A number or variable that defines the maximum time, in seconds, that
Amanda should wait for the first character and also between characters being received
on the serial port. The default is the setting for the configuration option
tmo_serial
.
Example:
S(2,%S3,%S4,,,50)
both sends and receives. The command uses COM port 2. %S3 stores the string to be
sent. %S4 stores the string that is received. Amanda waits a half second for the first
character and between characters.
S(2,%S3)
only sends. The command uses COM port 2. %S3 stores the string to be sent. This com-
mand has non-standard syntax. Because
all
the parameters after the string to be sent are
not being used, this command does not need the additional commas.
S(2,,%S4,,,50)
only receives. The command uses COM port 2. %S4 stores the string that is received.
Amanda waits a half second for the first character and between characters.
Failure:
Physical port not available
Logical port not configured properly
If a timeout stops Amanda from receiving information before the maximum number of
characters is received and the length is a positive number, Amanda considers the com-
mand a failure.
Alphabetical Token Reference (Continued)
Token Syntax
Description
Содержание [email protected] Version 3.xx
Страница 1: ...Installing AmAndA Work Place Version 3 xx Installer s Guide Edition 7 01...
Страница 4: ...iv Installing Amanda Work Place...
Страница 60: ...52 Installing Amanda Work Place...
Страница 68: ...60 Installing Amanda Work Place...
Страница 132: ...124 Installing Amanda Work Place...
Страница 150: ...142 Installing Amanda Work Place...
Страница 156: ...148 Installing Amanda Work Place...
Страница 194: ...186 Installing Amanda Work Place...
Страница 206: ...198Installing Amanda Work Place...