Raritan Computer SX48 用户手册

下载
页码 172
148 D
OMINION 
SX
 
I
NSTALLATION AND 
O
PERATIONS 
M
ANUAL
 
ampreadsocket [socket_id length timeout] 
A non-blocking call: reads from the socket represented by the socket ID until either the length or timeout is 
reached.  Timeout is specified in microseconds; a timeout of zero indicates the socket will be polled and the 
results returned immediately. The command returns a buffer with the data read, and if the data available to 
read is less than the length requested, the command returns a buffer with the data read. If there is no data 
read or timeout occurs, the command returns an “OK” with an empty buffer. If the command fails or the 
arguments are invalid, the command will return an error with an error message. 
 
Command Return 
Messages 
0 (TCL_OK) 
No data read 
Actual data read 
Timeout occurred 
1 (TCL_ERROR) 
Command failed: "not enough memory" 
Command failed: "Invalid Socket Descriptor 
OR read socket failed" 
Arguments invalid: "wrong # args: should be 
ampreadsocket socketDescriptor messagelength 
timeout" 
Arguments invalid: "Invalid Socket Descriptor 
%s" 
Arguments invalid: "invalid length %s, only 
digits allowed" 
Arguments invalid: "invalid timeout %s, only 
digits allowed" 
 
 
Note:  Issue an ampclear command to clear old data before starting any new operations.   
  
ampgetmacaddress  
Returns the Ethernet MAC address of the unit.  
ampsetconfig datacom checkparity <value>  
Enables the parity bit if value is 1; disables the parity bit if value is 0. 
 
An administrator/operator user will not have write access in a console window when a TCL script is 
running and has executed amplock for that port. Issuing an F8 or “Get Write Access” will not result in 
getting writing access. 
 
In order for the administrator/operator user to get write access, one of the following methods must be used. 
1.  Administrator issues a Reset to the TCL interpreter by pressing the [Reset] button in the Script shell 
window. 
2.  Operator/Observers execute the [Reset] button in the script shell window if the TCL script running has 
the amppermission off command built into the script. 
3.  A TCL script may be designed to accept input from users (administrators and operator/observers if 
amppermission off has been performed by the script) and based on the input, may either exit the 
execution of the script or release the lock and wait for further input before getting the lock and 
continuing execution of the script. In this case, the Administrator/Operator must be aware of the inputs 
that may be sent to the running TCL script and type the appropriate word/number in the Script shell 
window to gain write access to the console and relinquish write access if appropriate.