Chapter 2

Simple Transmission

2.1. Introduction

The examples presented in this chapter are intended to introduce the key features of UML that need to be used for protocol modeling. We start with a simple protocol, implementing an “echo” to a message received. We then add more and more features to this protocol in order to obtain a simplified full-duplex data sending protocol.

2.2. Echo

2.2.1. Requirement specification

This first example aims at modeling a simple protocol with the following characteristics:

– there are two communicating entities: client and server;

– the client sends a “Hello_req” message to the server, and the server answers with a “Hello_res” message;

– system ends.

Let us represent these requirements by using a communication diagram (see Figure 2.1).

Figure 2.1. A communication diagram for the Echo protocol

ch2-fig2.1.jpg

2.2.2. Analysis

2.2.2.1. Sequence diagram

First, let us create a simple sequence diagram representing the expected behavior in a chronological order. For this, we will use a sequence diagram1.

First, the client sends a Hello_req message to the server. On receipt, the server answers with a Hello_res message. The system then finishes. Figure 2.2 represents this expected behavior.

Figure 2.2. Sequence diagram for the Echo example

ch2-fig2.2.jpg

2.2.2.2. Concerned classes ...

Get Communicating Systems with UML 2: Modeling and Analysis of Network Protocols now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.