Previous Topic

Next Topic

Book Contents

Book Index

Split

This example describes a pipe, which transforms a character-oriented data stream into a line-oriented data stream. The length of line is assumed to be 80 characters. The transformation inserts a line-feed character is inserted after every 80 transmitted characters. The pipe is the system under development in this MSC specification. The name of the system is 'Split'. External entities are the following:

The single scenario named 'Transfer' describes transmission of a sequence of characters. First, the sender initializes the connection as described in MSC Transfer_Init. Then the characters are transmitted one by one. Transmission of each character can progress according to one of two scenarios:

  1. If the character fits into the current line without exceeding its length it is simply passed to the receiver. This is described by sequental composition of MSCs Transfer_Read and Transfer_Char.
  2. If the character doesn't fit into the current line it becomes the first character in the next line. In this case an additional line-feed character is passed to the receiver before it. This is described by sequental composition of MSCs Transfer_Read and Transfer_Ins
  3. Finally, the transmission is terminated as shown in MSC Transfer_Done.

MSC Transfer_Read is the common part of scenarios 1 and 2. It ends with global condition 'send' where the choice between these two scenarios is made. This example uses variable declarations, message parameters and check conditions. An integer variable 'count' holds the number of characters in the current line. The choice between scenarios 1 and 2 is made depending on the value of this variable. Corresponding check conditions are located ot MSCs Transfer_Char and Transfer_Ins.

All source MSC PR files, Telelogic Tau diagrams and synthesized executable SDL model can be found in MSC to SDL installation directory in doc/examples/Split.

The behavior specified by this use case model may be represented by HMSC 'Split'.

Embedded JPEG 75%

Embedded JPEG 75%

Embedded JPEG 75%

Embedded JPEG 75%

Embedded JPEG 75%

Embedded JPEG 75%