| LIO_Receive | Function (ROM Call 0x58)

link.h

unsigned short LIO_Receive (LIO_CTX *file, unsigned short DevType, short skipmuch);

Receives a file from the link interface.

LIO_Receive is a high-level function which receives a file (a variable for example) through the link interface and fills the LIO_CTX structure pointed to by file accordingly. However, this function is not so easy for usage, because you need to interpret the file context structure pointed to by file manually after using this function, which is not a trivial task. If you want just to receive a variable through the link interface, function getcalc is much easier to use. The advantage of this routine is greater generality in comparing to getcalc (for example, it allows transfer even between incompatible TI models, if properly used; sorry, I don't know too much about it).
The parameter DevType determines the device type (see LIO_Send for the explanation about its meaning). It seems that it is possible to set DevType to zero (it probably means "receive from anything").
The parameter skipmuch is a boolean parameter (if it is non-zero, a lot of code in this function is skipped over). skipmuch has to do with the Silent Link mode (see OSCheckSilentLink). When receiving a file manually, the AMS calls LIO_Receive with a value of 0 for skipmuch; in Silent Link mode, LIO_Receive is called with a value of 1 once the header has been read, to transfer the file properly.
LIO_Receive returns zero if the operation was successful, else returns a non-zero value (this value describes the type of the error, but I am not sure about the concrete meaning of particular values).

Uses: LIO_RecvData, LIO_SendData, OSLinkClose, OSLinkReset, OSLinkTxQueueActive, HeapAlloc, HeapFree, HeapLock, HeapRealloc, HeapUnlock, cgetsn, Dialog, ER_catch, ER_success, HToESI, BatTooLowFlash, EM_abandon, FL_download, FL_getHardwareParmBlock, FL_getVerNum, memcpy, memset, sprintf, strcat, strncpy, AB_getGateArrayVersion, OSClearBreak, XR_stringPtr, gen_version, is_executable, LoadSymFromFindHandle, OO_GetAppAttr, ST_flags, TIOS_EV_getAppID, ClearUserDef, FolderCount, FolderDel, StrToTokN, SymCpy0, SymDel, SymDelTwin, SymFindFirst, SymFindFolderName, SymFindNext, ROM Call 0x418, ROM Call 0x424, ROM Call 0x428, ROM Call 0x4FD, ROM Call 0x4FE
Used by: getcalc, LIO_GetMultiple, OSLinkCmd