TFTPUploadFragmentedRAMFileToHost Function

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
TFTPUploadFragmentedRAMFileToHost Function
C
void TFTPUploadFragmentedRAMFileToHost(
    ROM BYTE * vRemoteHost, 
    ROM BYTE * vFilename, 
    TFTP_CHUNK_DESCRIPTOR * vFirstChunkDescriptor
);
Description

Uploads an random, potentially non-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()). 
vFirstChunkDescriptor 
Pointer to a static or global (persistent) array of TFTP_CHUNK_DESCRIPTOR structures describing what RAM memory addresses the file contents should be obtained from. The TFTP_CHUNK_DESCRIPTOR.vDataPointer field should be set to the memory address of the data to transmit, and the TFTP_CHUNK_DESCRIPTOR.wDataLength field should be set to the number of bytes to transmit from the given pointer. The TFTP_CHUNK_DESCRIPTOR array must be terminated by a dummy descriptor whos TFTP_CHUNK_DESCRIPTOR.vDataPointer pointer is set to NULL. Refer to the TFTPUploadRAMFileToHost() API for an example calling sequence since it merely a wrapper to this TFTPUploadFragmentedRAMFileToHost() function. 
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.