APP_CONFIG Structure

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
APP_CONFIG Structure

Most of the stack-related application variables are stored in an APP_CONFIG structure. These include addresses, flags, and NBNS/SSID name strings. You will need to declare one of these structures (named "AppConfig") for your application and initialize it with the default values defined in TCPIPConfig.h. For example, you would set the bytes of the MyIPAddr field to the values of the MY_DEFAULT_IP_ADDR_BYTEn macros in TCPIPConfig.h. The InitAppConfig function in the file MainDemo.c of the TCPIP Demo App project demonstrates how to populate this structure completely. The full list of parameters in the APP_CONFIG structure is defined in the file StackTsk.h

At the beginning of most stack demonstration applications, the code will check an EEPROM to determine if it contains a valid image of an APP_CONFIG structure. If so, it will read the image and use it to populate the AppConfig instance in the demo project. Otherwise, it will load the application variables from your statically defined values and/or configure them based on application protocols (DHCP/AutoIP). This allows a board to retain its configured settings even if the application loses power.

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