[SDL Forum Society - Logo] Tutorial on SDL-88
Belina, Hogrefe (edits Reed)

3.4 Signals and data

Back Home Up Next

In 'State and transitions' the concepts of input (signal consumption) and output (signal sending) were introduced in connection with the transition. Signals in  'State and transitions' were only used for the initiation of a transition, but they can also be used to carry data values from one process to another. In this case, the output construct includes one or more data values. In the corresponding input construct variables are specified, which store the received data values. The types of the values sent in the output construct must be compatible with the types of parameters of the signal and the variables in the corresponding input construct. The ordering of the values sent together with a signal depends on the ordering of the parameter sorts in the signal definition. 

BLOCK b1

 

Figure 15: Signal with data
Note: Relevant pages from SDL-88 block and process diagrams.

With the signal A in figure 15 the values 5 and true are sent from process p1 to process p2. The process p2 owns variables v1 and v2 of type Integer and Boolean, respectively. When signal A is consumed by process p2, the value 5 is assigned to v1 and true is assigned to v2.

In the input and output constructs, the order of the data values and variables is important. If in the example of figure 15, v1 was of type Boolean and v2 of type Integer, the description would not be valid.

One or more variables may be omitted in the input construct. The corresponding received values are lost in this case. Similarly, one or more values may be omitted in an output construct, but the order of the remaining values and variables is important figure 16 shows some examples.

wpe11.gif (4503 bytes)

Figure 16: Examples of the omission of values and variables

Back Home Up Next

Contact the webmaster with questions or comments about this web site.
Copyright 1997-May, 2013 SDL Forum Society