Network Component  Version 7.11.0
MDK Middleware for IPv4 and IPv6 Networking
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
User Callback

Function to notify the user application about TFTP client events. More...

Functions

void netTFTPc_Notify (netTFTPc_Event event)
 Notify the user application when TFTP client operation ends. [user-provided]. More...
 

Description

Function to notify the user application about TFTP client events.

The success of a TFTP client operation can be notified to the user utilizing the netTFTPc_Notify function. It is part of the file TFTP_Client_UIF.c module. You need to adapt the function to the application's needs. To add the module to your project, simply right-click on the Source group, select Add New Item to Group, then click on User Code Template and scroll in the template files list until you find the TFTP Client User Interface template.

Function Documentation

void netTFTPc_Notify ( netTFTPc_Event  event)

Notify the user application when TFTP client operation ends. [user-provided].

Parameters
[in]eventTFTP client notification event as specified in netTFTPc_Event.
Returns
none.
Note
Network library calls this function to inform the user about events.

The callback function netTFTPc_Notify is called automatically when a TFTP event occurred and notifies the user application about the success of a TFTP client operation.

The argument event is a netTFTPc_Event signal:

Event Description
netTFTPc_EventSuccess The file has been successfully transferred
netTFTPc_EventTimeout TFTP Server response has timed out, and hence the TFTP client has aborted the operation
netTFTPc_EventAccessDenied File access on TFTP server is not allowed for a specified file
netTFTPc_EventFileNotFound The TFTP server was not able to find the specified file
netTFTPc_EventDiskFull The TFTP server has run out of disk space, file transfer is not possible
netTFTPc_EventLocalFileErrorLocal file read/write error
netTFTPc_EventError The TFTP client has encountered an error during file transfer process

Code Example

The following skeleton is available in the user code template file TFTP_Client_UIF.c. Customize it to the application's needs.

switch (event) {
// File operation successful
break;
// Timeout on file operation
break;
// File access not allowed
break;
// File not found
break;
// Disk full
break;
// Local file write error
break;
// Generic TFTP client error
break;
}
}