Numeric Function
? tab(-10, AG_XFUNC); sbxname;", arg1, arg2,....argn"; chr(127);
input "",R
AG_XFUNC directs ATE to invoke an XFUNC (numeric function call) implemented as an SBX on the ATE client PC. As with any other XFUNC, the SBX returns to the caller a numeric value, which ATE then passes back to the application via the keyboard buffer.
Sbxname must be the name of an SBX (just the name, no device or extension), stored on the ATE client in the [7,6] directory. The SBX must be implemented as a function and is actually executed by ATE the same as would BASIC execute the statement XFUNC(sbxname,"arg1","arg2",...,"argn"). The SBX must return a numeric value, other than -1, which indicates that the SBX could not be called (not found).
The return value from the XFUNC call is plugged into the keyboard buffer, where it can be picked up as shown above, by an input statement or equivalent.
Note that the SBX may not perform any standard text mode input operations, as these would interfere with the telnet input. Instead, if input is needed, use AUI functions. (For example, MSGBOX, EVENTWAIT, etc.)
String Function
? tab(-10, AG_XFUNCS); sbxname;",arg1, arg2,....argn"; chr(127);
input "", R$
The function AG_XFUNCS (75) provides a means to execute an SBX under ATE control, mainly with the aim of enabling customizable ATE update routines.
Sbxname must be the name of an SBX (just the name, no device or extension), stored on the ATE client in the [7,6] directory. The SBX must be implemented as a function and is actually executed by ATE the same as would Basic execute the statement XFUNC$(sbxname,"arg1","arg2",...,"argn"). The SBX must return a string value, which is plugged into the keyboard buffer, where it can be picked up as shown above, by an input statement or equivalent. A carriage return is automatically appended.
Note that the SBX may not perform any standard text mode input operations, as these would interfere with the telnet input. Instead, if input is needed, use AUI functions. (For example, MSGBOX, EVENTWAIT, etc.)
Note that AG_XFUNCS is to AG_XFUNC as the underlying built-in function XFUNC$() is to XFUNC().The former deals with functions returning a string, while the latter deals with functions returning a numeric value. In both cases, if the specified SBX is not found the return value will be -1, although in the case of AG_XFUNCS, it will be a string representing -1, e.g. "-1", as opposed to the numeric value -1. The maximum return string length is 3K.
No Return Value
? tab(-10,AG_XFUNC2); sbxname; ",arg1,arg2,...argn"; chr(127);
The function AG_XFUNC@ (73) performs like AG_XFUNC or AG_XFUNCS except it returns nothing. This is needed in order to execute operations that have no return status; otherwise the caller will have to wait for it to time out.