HOPEX UML : HOPEX UML : The Class Diagram : Signals
   
Signals
 
Defining a Signal
Specifying Class Signals
Creating a sent or received signal
Signal properties
Signal parameters
Defining a Signal
A signal is a named event that can be explicitly invoked. Signals may have parameters. A signal can be sent to an object or a set of objects. It can be invoked as part of the participation of an actor in a use case.
A message can be sent or received by a class. It can also be sent by an operation after an exception.
Specifying Class Signals
Creating a sent or received signal
To specify what signals can be sent or received by a class:
1. Open the properties dialog box of a class.
2. Select the Complements tab.
3. In the menu tree presented, select sentSignal or receivedSignal then click the button.
4. Indicate the name of the signal and click OK.
Signal properties
To open the properties dialog box of a signal:
*In the properties dialog box of a class, in the Complements tab, right-click the signal and select Properties.
The Properties dialog box of the signal appears.
 
You can indicate for a signal:
Its Stereotype to specify its use:
Exception: an error signal is generated when an exception occurs during the execution of an operation.
Its Visibility related to the package:
Public: this is the default visibility. The signal is visible to any element outside the package.
Protected: the signal is visible to inherited elements or friends.
Private: the signal is visible to its class or to its friends.
*Friends of a class are the classes that are authorized to access its internals. It is possible to specify the friends of a class in the complements tab of the properties dialog box of the class.
The ExpressionType of the signal (see expression type)..
*The ExpressionType of a signal specifies the type of variable returned by the signal on its receipt by the addressee.
A signal can be a request to Vote sent to each active object, asking if it is possible to perform a specific action such as closing a Windows session.
A signal can be a general Broadcast to all active objects.
Signal parameters
The Parameters of the signal are specified in the Parameters tab of its Properties dialog box. You can specify:
The operation ExpressionType, eg. Example: Integer(5).
Its Default Value. Example: 0.
Its Direction: at input and/or output of the operation.
*A parameter is the specification of a variable, which can be modified, sent or returned. A parameter can specify a name, a type and a direction. Parameters are used for operations, messages and events.
*An argument is a specific value corresponding to a parameter.