5 - Declarations

5.1 - Process

A process is implicitly declared in the architecture of the system (Cf. "Architecture" on page 9) since the communication channels need to be connected.

Process symbol

A process has an initial number of instances at startup and a maximum number of instances. A process can also be an instance of a process class (Cf. "Object orientation" on page 57), in that case the name of the class follows the name of the instance after a colon.

The general syntax is:

<process instance name>[:<process class>][(<initial number of instances>, <maximum number of instances>)] [PRIO <priority>]

The priority is the one of the target RTOS.

Please note the stack size can be defined in the process or process class additional heading symbol as described in paragraph "Additional heading symbol" on page 31.

When a process is an instance of a process class the gates of the process class need to be connected in the architecture diagram. The names of the gates appear in the process symbol with a black circle representing the connection point.

Process class instance

The messages defined in the package going through the gates must be consistent with the messages listed in the architecture diagram where the process instance is defined.


5.2 - Procedure declaration

An SDL-RT procedure can be defined in any diagram: system, block, or process. It is usually not connected to the architecture but since it can output messages a channel can be connected to it for informational purpose.

Procedure declaration symbol

The declaration syntax is the same as a C function. A procedure definition can be done graphically with SDL-RT or textually in a standard C file.

5.2.1 SDL-RT defined procedure

If defined with SDL-RT the calling process context is implicitly given to the procedure. So if a message output is done, the message will be output from the process calling the procedure. That is why the message should be defined in one of the channels connected to the process instead of a channel connected to a procedure. To call such a procedure the procedure call symbol should be used.

5.2.2 C defined procedure

If defined in C language the process context is not present. To call such a procedure a standard C statement should be used in a action symbol.


5.3 - Messages

Messages are declared at any architecture level in the additional heading symbol. A message declaration may include the parameter type in C. The syntax is:

MESSAGE <message name> [(<parameter type>)] {,<message name> [(<parameter type>)]};

It is also possible to declare message lists to make the architecture view more synthetic. Such a declaration can be made at any architecture level in the additional heading symbol. The syntax is:

MESSAGE_LIST <message list name> = <message name> {,<message name>}*;

A message list can contain a message list, the included message list name is surrounded by parenthesis.


5.4 - Timers

There is no need to declare timers. They are self declared when used in a diagram.

5.5 - Semaphores

Semaphores can be declared at any architecture level. Since each RTOS has its own type of semaphores with specific options there will be no detailed description of the syntax. The general syntax in the declaration symbol is:

Semaphore declaration

It is important to note the semaphore is identified by its name.