Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Papyrus/UserGuide/ModelExecution/ActiveObjectController

< Papyrus‎ | UserGuide/ModelExecution
Revision as of 07:19, 25 September 2014 by Bruno.marques.cea.fr (Talk | contribs) (Model example)

Documentation under construction...

A Generic Controller for Active Objects

Introduction

Available since Papyrus 1.0, this component allows to control and to observe active objects behaviors and reactions easily.

EmptyControllerView.png

Model example

This tutorial is based on a simple executable model which imports the library. It consists in two active classes, with classifier behavior. The first active class has the other one as a property and it classifier behavior starts the ActiveObjectController and registers it property. The second one has a reception for a signal and it classifier behavior is waiting for that signal.

ClassDiagram.png

The behaviors associated with those classes are specified by activity diagrams.

ModelStructure.png

Importing the library

First of all, to use the library you need to import it. To do so, right click on the root object called model, then go to Import / Import Registered Package / Select ActiveObjectControllerModelLibrary.

Import Library.png

There are a lot of libraries in this window, so you can filter by name to get that easier.

LibrariesToImportWizard.png

Registering active objects

To observe the reaction of an active object, you need to register it in the controller. To do so, in the parent’s classifier behavior you need to send a Register signal with the active object as attribute. Before that, you should start the controller with a CallBehaviorAction that it behavior is on the library.

How to register classifierBehavior.png

Starting an execution

To start the execution, just follow the first tutorial on Moka. Cf 2.4.

But for the moment, there is a limit on the using. This framework works only with the PSCS and multithread execution engines, so you should make sure that one of them is selected.

Using the component

When the execution is started, the controller view is awake. Then, the active objects are on the objects list. When you select one of them, you’ll know if it has ports and which signals it could receive.

AwakeController.png

Moreover, you can show all signals containing in the model and try to use them. To do so, deselect the checkbox with “Hide signals without explicit receptions” label.

Hiding signals.png

If a signal has attributes, you could edit them only if they are primitives (Integer, Boolean, etc…). The editor will shows you if the value that you will have entered is correct.

WRONGTableEdition.png

If everything is ok, the controller allows you to send the signal.

SendButton.png

Observing system reactions

Under construction

ClassifierBehavior edge.png

FUMLConsoleWarning losting signals.png

Back to the top