12.1 Actors

12.1.1 Description

The actor is the basic structural building block for building systems with ROOM. An actor can be refined hierarchically and thus can be of arbitrarily large scope. Ports define the interface of an actor. An Actor can also have a behavior usually defined by a finite state machine.

12.1.2 Motivation

12.1.3 Notation


Table 12.1: Actor Class Notation



Element Graphical Notation Textual Notation



ActorClass PIC PIC



ActorRef PIC PIC




12.1.4 Details

Actor Classes, Actor References, Ports and Bindings

An ActorClass defines the type (or blueprint) of an actor. Hierarchies are built by ActorClasses that contain ActorReferences which have another ActorClass as type. The interface of an ActorClass is always defined by Ports. The ActorClass can also contain Attributes, Operations and a finite state machine.

External Ports define the external interface of an actor and are defined in the <em>Interface</em> section of the ActorClass.

Internal Ports define the internal interface of an actor and are defined in the <em>Structure</em> section of the ActorClass.

Bindings connect Ports inside an ActorClass.

Example:


Table 12.2: Actor Class Example



Graphical Notation Textual Notation



PIC PIC




Attributes

Attributes are part of the Structure of an ActorClass. They can be of a PrimitiveType or a DataClass.

Example:

PIC

Operations

Operations are part of the Behavior of an ActorClass. Arguments and return values can be of a PrimitiveType or a DataClass. DataClasses can be passed by value (implicit) or by reference (keyword ref).

Example:

PIC