CAF: Network state module¶
The network state module of the Common Application Framework (CAF) is responsible for broadcasting the events about current network state. The module provides different backends for available networks (like LTE or OpenThread).
You can enable network state module by selecting the
CONFIG_CAF_NET_STATE option in the configuration.
The module selects the backend based on the link layer enabled.
The module generates the
The event reports the current network state using
The following network states are available:
NET_STATE_DISABLED- Network interface is disabled.
NET_STATE_DISCONNECTED- Network interface is ready to connect but waiting for connection.
NET_STATE_CONNECTED- Network interface is connected.
NET_STATE_CONNECTED means that IP packets can be transmitted.
For example, in case of a Thread network, this means not only that the connection to the mesh network is established, but also that the Border Router is working and it is possible to transfer data.