This configuration provides a library for detecting if there is an active connection on the other side of a UART.
The principles of operation are as follows:
If the mote detects that USB is present, it sends a connection request to the UART. If it receives a connection response, UartDetectC.Detect signals the connected() event to signal that there is an active connection available. If no response is received but the mote is still connected to USB, it peroidically requests the connection to try to reestablish it.
Once a connection is established, the PC provides the mote with a connection timeout. If the node does not receive a keep alive message within the timeout period, it severs the connection and returns to the request polling state.
If the USB port is disconnected, polling ceases, the mote does not use the UART port, and users are notified by Detect.disconnected().
Two interfaces are provided: (1) interface Detect as Connection provides the full connection semantics with handshake (2) UartPresenceC provides interface Detect as Presence notification when the node is plugged in Connection is a subset of the events provided by Presence