What are Layers

This topic describes the concept of a Layer in the Communications Framework.

A Layer is a horizontal division of functionality in a stack.

A Layer matches the concept of the Layer in the seven-layer International Organization for Standardization's OSI Model. A Layer also matches the concept of the Layer in the five layer model used to describe TCP/IP.

A Layer can contain a single Communications Protocol. A Layer can also contain a number of related protocols collected into a single unit. TLS, TCP, IP, Ethernet are examples of the protocols.

The concept of a Layer allows device creators to have different implementations in a given Layer. When a data connection starts or when the environment changes, the best protocol can be selected.

The following diagram shows the concept. The diagram also shows the position of the Sockets Server Client APIs.

Figure: Layers in the Communications Framework

Although each Layer contains a different protocol, the Communications Framework allows separate protocols to make a single Layer. For example: NCP, LCP and HDLC together make the PPP protocol. TCP, UDP, ICMP, IP together make the TCP/IP group of protocols. Each of these groups of protocols can be put together into a single Layer.

The number of Layers only depends on the configuration of the Communications Stack. The top Layer has the Sockets Server. The bottom Layer has the drivers for the communication hardware . Each Layer interacts only with the Layer immediately above and the Layer immediately below.

The framework APIs that connect the protocols in each Layer are consistent across the Communications Framework. All protocols share a common method of communication that is independent of protocol behaviour. A common method of communication allows protocols to be stacked. The Communications Framework provides flexibility in the configuration of the protocol stacks for each device. The following diagram shows a number of protocols at each Layer.

Figure: Protocols arranged in Layers in the Communications Framework

Related concepts