TFTPUploadRAMFileToHost Function

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
TFTPUploadRAMFileToHost Function
C
void TFTPUploadRAMFileToHost(
    ROM BYTE * vRemoteHost, 
    ROM BYTE * vFilename, 
    BYTE * vData, 
    WORD wDataLength
);
Description

Uploads a contiguous array of RAM bytes as a file to a remote TFTP server.

Preconditions

None

Parameters
Parameters 
Description 
vRemoteHost 
ROM string of the remote TFTP server to upload to (ex: "www.myserver.com"). For device architectures that make no distinction between RAM and ROM pointers (PIC24, dsPIC and PIC32), this string must remain allocated and unmodified in RAM until the TFTP upload process completes (as indicated by TFTPGetUploadStatus()). 
vFilename 
ROM string of the remote file to create/overwrite (ex: "status.txt"). For device architectures that make no distinction between RAM and ROM pointers (PIC24, dsPIC and PIC32), this string must remain allocated and unmodified in RAM until the TFTP upload process completes (as indicated by TFTPGetUploadStatus()). 
vData 
Pointer to a RAM array of data to write to the file. 
wDataLength 
Number of bytes pointed to by vData. This will be the final file size of the uploaded file. Note that since this is defined as a WORD type, the maximum possible file size is 65535 bytes. For longer files, call the TFTPUploadFragmentedRAMFileToHost() function instead. 
Returns

None

Remarks

The DNS client module must be enabled to use this function. i.e. STACK_USE_DNS must be defined in TCPIPConfig.h. 

Call the TFTPGetUploadStatus() function to determine the status of the file upload. 

It is only possible to have one TFTP operation active at any given time. After starting a TFTP operation by calling TFTPUploadRAMFileToHost() or TFTPUploadFragmentedRAMFileToHost(), you must wait until TFTPGetUploadStatus() returns a completion status code (<=0) before calling any other TFTP API functions.

Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.