1.8.1.2 TCP/IP Management
The TCP/IP management application file (app_tcpip_management.c) configures the TCP/IP stack.
The state machine is implemented in the
APP_TCPIP_MANAGEMENT_Tasks()
function. The different states are:APP_TCPIP_MANAGEMENT_STATE_WAIT_TCPIP_READY
: TCP/IP stack status is checked and when it is ready, the net handle is get (G3ADPMAC) and IPv6 addresses are configured.- The
_APP_TCPIP_MANAGEMENT_SetIPv6Addresses()
function configures the TCP/IP stack:- Set link-local
address (LLA) defined by G3 specification, based on PAN ID and
Short Address, using
TCPIP_IPV6_UnicastAddressAdd()
function. - Set unique local
link address (ULA), based on PAN ID and Extended Address, using
TCPIP_IPV6_UnicastAddressAdd()
function. - Set PAN ID in
TCP/IP stack, using
TCPIP_IPV6_G3PLC_PanIdSet
function. This is important for the TCP/IP stack to recognize all G3 LLA as neighbors.
- Set link-local
address (LLA) defined by G3 specification, based on PAN ID and
Short Address, using
- If G3 Conformance test is
configured,
_APP_TCPIP_MANAGEMENT_SetConformance()
is called to add Conformance multi-cast addresses to IPv6 multi-cast listener list, usingTCPIP_IPV6_MulticastListenerAdd()
function.
- The
APP_TCPIP_MANAGEMENT_STATE_CONFIGURED
: TCP/IP stack is configured and there is nothing more to do. In FreeRTOS mode the task is suspended forever using a semaphore.APP_TCPIP_MANAGEMENT_STATE_ERROR
: There was an error during TCP/IP stack initialization.
There are another function that is called from G3 management application:
APP_TCPIP_MANAGEMENT_SetConformanceConfig()
: Configures the application for G3 Conformance certification tests (_APP_TCPIP_MANAGEMENT_SetConformance()
function).