Detailed Descriptions > MIAMEX

MIAMEX 177: Wrap ATE Command

Added June 2009

xcall MIAMEX, MX_AGWRAPPER, agcmd, parms, response {,timeout)

The MIAMEX function MX_AGWRAPPER (177) serves as a convenient wrapper for "raw" ATE commands that are otherwise invoked via a sequence like:

? TAB(-10,AGCMD);PARMS;chr(127);

input "",RESPONSE

 

Aside from simplifying the syntax, MX_AGWRAPPER provides some intelligence to deal with the problem of typeahead that may be "in the pipe" at the time the command was issued and thus get mixed into the response.

After an original timeout of two seconds, the ATE response timeout period is now automatically set to infinite (rather than the standard 5 seconds) for: AG_XFUNC, AG_XFUNCS, AG_FTP and AG_FTPSYNC. Previously, when these commands took longer than 5 seconds (which is quite common), MX_AGWRAPPER was timing out and returning a null response. To allow further fine-tuning of the timeout, an optional timeout parameter has been added:

The optional timeout parameter may specify the maximum wait (in ms) before MX_AGWRAPPER will return with no response.

History

2009 June, build 1159

Routine added to A-Shell.