1.9.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
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.