Designing Embedded Communications Software

Protocols define the common language used for communicating systems. Protocols form the core of the system function and can be defined at each layer in the OSI reference model. In a typical communications system, modules typically support these protocols. This chapter focuses on protocol implementation, including state machines, interfaces and management information.
Protocols can be defined via standard specifications from bodies such as the ITU-T, IETF, IEEE, ANSI, and so on. Protocols can also be proprietary and defined by a vendor for use in communicating with their own equipment. Proprietary protocols may be required in those cases in which the vendor feels that existing standards-based protocols are insufficient for their application or in cases in which the vendor believes that their proprietary protocol may give them a competitive advantage. In either case, protocols need to be defined in a specification. There are several protocol specification languages and tools such as Specification Description Language (SDL). Independent of the tool/language used, a protocol specification involves:
The architectural relationship of the communicating entities for example, a master slave mode, or peer-to-peer mode
A set of valid states for each of the communicating entities for example, initializing, active, or disconnected
A set of messages called Protocol Data Units (PDUs) used by the communicating entities
Timers used by the communicating entities and their values
Actions to be taken on receipt of various messages and events
The communicating entities defined in a protocol specification assume various modes based on the nature of the communication. The...