Name

abc::command — run an arbitrary ABC command

Synopsis

abc::command command [result] [timeout]

DESCRIPTION

Sends command to ABC and waits for a prompt. No processing is done on the output obtained from ABC.

ARGUMENTS

string command (in)

The ABC command including eventual parameters. Passed to ABC without change.

array result (out)

Optional argument. If omitted, no information is returned. The following items are present:

string errorCode (out)

Error code. See RETURN CODES below. Also put to the errorCode global variable.

string rawOutput (out)

The unprocessed output of ABC, including the final prompt.

int promptNumber (out)

The number included in the final prompt. The ABC prompt has the "abc123> " form. The number indicates successive version of the network stored in ABC.

int cmdTime (out)

Time in milliseconds elapsed by the command.

int timeout (in)

Optional argument. If given, sets the timeout of Expect for this command. Othervise, the value of the timeout global variable applies.

RETURN CODES

The procedure returns an empty string. See abctcl(n) , abc::messages(n) for error reporting and error symbols. The following error symbols can occur:

Error Code: ABC_E_BUSY
Diagnostic: Prompt from the previous command has not been detected yet.
Error Code: ABC_E_EOF
Diagnostic: A premature end-of-file detected. Perhaps the ABC process crashed.
Error Code: ABC_E_TOUT
Diagnostic: Timeout expired before the prompt was detected.

SEE ALSO

abctcl.conf.tcl(5) , abctcl(n) , abc::messages(n)