fmc quick start guide - eclipse

20
FMC Quick Start Guide Contents 1 Create a new FMC Block Diagram ................................................................................................... 1 2 Agent and Channels......................................................................................................................... 4 2.1 Agent Types ............................................................................................................................. 6 2.2 Agent Shapes ........................................................................................................................... 7 2.3 Communication Channels ....................................................................................................... 8 3 Storage and Accesses .................................................................................................................... 11 3.1 Storage Shapes ...................................................................................................................... 12 3.2 Accesses................................................................................................................................. 12 4 Other FMC Elements ..................................................................................................................... 13 4.1 Structure Variance ................................................................................................................. 13 4.2 Common Features Area......................................................................................................... 14 5 Diagram Export .............................................................................................................................. 16 6 Advanced Topics ............................................................................................................................ 16 6.1 Styles ..................................................................................................................................... 16 6.2 Predefined Styles ................................................................................................................... 17 6.3 Anchor Behavior .................................................................................................................... 19 1 Create a new FMC Block Diagram Before creating new FMC Model and Diagram we need to have a project in our workspace (can be created via File > New > Project…). Right click on this project, click New > Otherto open the wizard selection dialog. Type FMCin the search box or scroll to FMC folder. Two FMC diagram creation wizards are available (see Figure 1-1): the “FMC Block Diagram” wizard and the “FMC Block Diagram + Modelwizard. Both wizards create an FMC diagram. Additionally, the latter creates an FMC model (i.e., the FMC elements and their relationships; no graphical information) that is automatically updated when you draw your FMC diagram. This model can be useful in subsequent development steps, e.g. as input model for code generation. Select the wizard of your choice and click Next.

Upload: others

Post on 31-May-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: FMC Quick Start Guide - Eclipse

FMC Quick Start Guide

Contents 1 Create a new FMC Block Diagram ................................................................................................... 1

2 Agent and Channels ......................................................................................................................... 4

2.1 Agent Types ............................................................................................................................. 6

2.2 Agent Shapes ........................................................................................................................... 7

2.3 Communication Channels ....................................................................................................... 8

3 Storage and Accesses .................................................................................................................... 11

3.1 Storage Shapes ...................................................................................................................... 12

3.2 Accesses ................................................................................................................................. 12

4 Other FMC Elements ..................................................................................................................... 13

4.1 Structure Variance ................................................................................................................. 13

4.2 Common Features Area ......................................................................................................... 14

5 Diagram Export .............................................................................................................................. 16

6 Advanced Topics ............................................................................................................................ 16

6.1 Styles ..................................................................................................................................... 16

6.2 Predefined Styles ................................................................................................................... 17

6.3 Anchor Behavior .................................................................................................................... 19

1 Create a new FMC Block Diagram Before creating new FMC Model and Diagram we need to have a project in our workspace (can be

created via File > New > Project…). Right click on this project, click New > Other… to open the

wizard selection dialog. Type “FMC” in the search box or scroll to FMC folder. Two FMC diagram

creation wizards are available (see Figure 1-1): the “FMC Block Diagram” wizard and the “FMC

Block Diagram + Model” wizard. Both wizards create an FMC diagram. Additionally, the latter

creates an FMC model (i.e., the FMC elements and their relationships; no graphical information) that

is automatically updated when you draw your FMC diagram. This model can be useful in subsequent

development steps, e.g. as input model for code generation. Select the wizard of your choice and click

Next.

Page 2: FMC Quick Start Guide - Eclipse

Figure 1-1 : Block Diagram + Model

You may rename the block diagram file in the File Name text box (Figure 1-2). The extension should

be blockdiag. The Grid Unit value can be from 0 – 100 click Finish.

Figure 1-2 : Block Diagram File Wizard

The block diagram will be loaded as shown below in Figure 1-3 with Palette and Properties view.

Page 3: FMC Quick Start Guide - Eclipse

Figure 1-3 : FMC Editor Window

In case the Properties view is not opened go to Windows Show View Other…. Scroll to

“General” or type “Properties” in the search box. Select the Properties view as shown in Figure 1-4.

Figure 1-4 : Properties View Selection

Let’s now start modelling a simple example system – an Http Web Server which clients can interact

with in different ways.

Page 4: FMC Quick Start Guide - Eclipse

2 Agent and Channels To create a client agent interacting with the system you need to drag and drop the Agent object from

the Palette to the block diagram editor canvas. Functionality associated to this object can be seen on

mouse hover on the object, as shown in Figure 2-1.

Figure 2-1 : Agent Functions on Mouse Hover

To rename the Agent object you can either double click on the title in the object, or update its Name

property in the Properties view (Figure 2-2). Properties related to any object can be seen in the

Properties view on selection of the corresponding object in the editor.

Page 5: FMC Quick Start Guide - Eclipse

Figure 2-2 : Rename Agent Object

Previously we have shown the single agent object which can interact with the system. It is also

possible to show multiple agents with one object; either by using the Dot object between two agents

or by setting its Multiplicity property to MANY as shown in Figure 2-3.

Page 6: FMC Quick Start Guide - Eclipse

Figure 2-3 : Agent Multiplicity

2.1 Agent Types There are two main types of agents: Agents and Human agents, as shown in Figure 2-4. To create

human agent, you can is either drag and drop the Agent object from palette and set its Human

property to true or directly drag and drop the Human Agent from the palette.

Figure 2-4 : Agent Types

Page 7: FMC Quick Start Guide - Eclipse

2.2 Agent Shapes There are three ways to represent an agent in a block diagram, as shown in Figure 2-5: in a default,

rectangular shape, in L shape and U shape. You may drag and drop the corresponding Agent object

from the palette or set the Shapestyle property of a default agent to L or U shape.

Figure 2-5 : Agent Shapes

Positioning and size related properties can be changed from Shape category in Properties view.

Agent Properties

Category Properties Description

Shape Width Height Common for all Agent shapes value can

be any positive integer from 0-999999. Location X Location Y

Angle Only for L and U shape Agents possible

values are 0, 90, 180 and 270.

Shapestyle Available for all agent types to change

the shape of agent possible values are

Default, U-Shape and L-Shape.

Size : Bottom Only available for L and U Shape agents

to change the size from different sides. Size : Right

Size : Left

Anchor visible Common for all agent objects to show

and enable the connection points to this

object (see Section 6.3) Anchor enabled

Apart the Angle property, the rotation of L and U shape agents can be modified by using Edit

Shape button in the functionality bar on mouse hover as also shown in Figure 2-5.

The settings provided as part of the Text Alignment tab in the Properties view can be used to align the

title of selected object to different positions (see Figure 2-6).

Page 8: FMC Quick Start Guide - Eclipse

Figure 2-6 : Text Alignment Property

Object Properties

Category Properties Value

Text Alignment Horizontal Orientation Possible values are CENTER, LEFT and RIGHT

Vertical Orientation Possible values are TOP, CENTER and BOTTOM

2.3 Communication Channels Objects can communicate with each other using three types of communication channels, depending on

the dataflow direction and type of the communication. You can either drag and drop required channel

from Palette or use the unidirectional communication channel button on mouse hover as shown in

Figure 2-7.

Page 9: FMC Quick Start Guide - Eclipse

Figure 2-7 : Communication Types

To insert a channel from the palette, first click on the required channel. Then go to the editor window,

click on the source channel and drag to the destination channel and release the mouse button.

Alternatively, you can drag and drop the unidirectional or request/response channel from the

functionality bar on mouse hover and after that can change its properties (see Figure 2-7).

Channel Properties

Category Properties Description

Model Channel Type Possible values are UNSPECIFIED, REQUEST,

RESPONSE, and REQUESTRESPONSE

Dataflow Direction Possible values are UNSPECIFIED, DEFAULT, and

OTHER (see Figure 2-8)

Name Title of the channel e.g. employees, history request.

Source Sender object for communication channel.

Target Destination object for communication channel

Connection Channel Location Value from 0 to 100 between source and destination

object.

Connection Type Auto Routing: automatically choose the path

between the selected channel anchors.

Manual Routing: drag the channel path to any

location (see Figure 2-9)

Note: If you select Channel Type then Dataflow Direction automatically will set to

UNSPECIFIED and vice versa. Both can be UNSPECIFIED at the same time.

Page 10: FMC Quick Start Guide - Eclipse

Figure 2-8 : Dataflow Direction Property Description

Figure 2-9 : Connection Property for Channels

A third way to create a new agent connected via communication channel is to drag the agent symbol

from the functionality bar of an existing agent to any place in the editor, as shown in Figure 2-10.

Page 11: FMC Quick Start Guide - Eclipse

Figure 2-10 : Create Agents using Function Bar

3 Storage and Accesses There are two ways to create a storage object connected with an agent; either drag and drop the storage

object from the palette window or drag the storage object from the functionality bar of the agent and

place anywhere in diagram editor (see Figure 3-1).

Figure 3-1 : Storage Object Creation

Page 12: FMC Quick Start Guide - Eclipse

3.1 Storage Shapes Like agents, you can also create storages with different shapes as shown in Figure 3-2.

Figure 3-2 : Storage Object Shapes

3.2 Accesses Agent objects can read or write to storage objects using three types of communication channels

(Figure 3-3). Access channels can be drawn from storage to agents either using the functionality bar of

both the agent and the storage, or just by clicking on the access channel symbols in the palette. After

selecting one of the access palette entries, go to the editor window, select the source object and then

select the destination object.

Figure 3-3 : Access Hierarchy and Access Shape Types

Note: It’s not possible to draw access channels for agent-to-agent or storage-to-storage object

communication. Access Connections can only be used between storage and agent objects.

See Figure 3-4 for accesses with different read and modify characteristics.

Page 13: FMC Quick Start Guide - Eclipse

Figure 3-4 : Access Types

4 Other FMC Elements

4.1 Structure Variance You can drag and drop the Structure Variance object from the palette and change its

properties, as shown in Figure 4-1.

Figure 4-1 : Structure Variance with Properties

Page 14: FMC Quick Start Guide - Eclipse

The structure variance area can contain system objects which are changing over time, as shown in

Figure 4-1. In our example, the dots connection is used to show the varying multiplicity of the child

server objects (see Figure 4-2).

Figure 4-2 : Dotted Connection for structure change

Figure 4-3 shows our example diagram including the accesses and channels of the newly created

structure variance elements.

Figure 4-3 : Additional diagram Properties

4.2 Common Features Area Common features areas can be used to group FMC elements, e.g., in our example scenario, all agents

and storages that are on server side. Common feature areas can be drag-and-dropped from the palette

window to the diagram editor as shown in Figure 4-4.

Page 15: FMC Quick Start Guide - Eclipse

Figure 4-4 : Common Features Area on Back of All Objects

Two properties that are also available for other FMC elements (e.g. agents and storages) can help with

the layout of overlapping elements: Bring to Front and Send to Back, both available via

context menu (see Figure 4-5).

Figure 4-5 : Bring to Front Property

Page 16: FMC Quick Start Guide - Eclipse

5 Diagram Export Now that you have completed our example diagram, you can use the export diagram feature to save

the full diagram in different image formats. Click on the export diagram menu entry (see Figure 4-3).

The Export Diagram dialog box will appear as shown in Figure 5-1. Select any image format you want

and can change other parameters as well like exporting the full diagram or only the selected object.

Figure 5-1 : Export Diagram dialog box

6 Advanced Topics

6.1 Styles Style properties are common for all objects. You can also design child objects with different styles to

emphasize on them or to express similarity e.g. with colors. Object which has some child objects can

also be hidden via hide (or unhide) button, as shown in Figure 6-1.

Page 17: FMC Quick Start Guide - Eclipse

Figure 6-1 : Style Property

Object Properties

Category Properties Description

Style Font Color Select any color from Color chooser box

for the title of object.

Font Type Select any font type for title/name.

Font Size Font size for title value can be from 8-72

Background Select any color from Color chooser box.

Bold To make the title/name of object thick.

Foreground Border color for the selected object.

Change Font for Children

Text Angle Angle value for object title values range

is 0, 90, 180, 270 and 360.

Transparency Value can be from 0-100

Italic Make title/name italic.

6.2 Predefined Styles Predefined styles are available only for pure FMC Block Diagrams (not in the diagram+model mode).

To add a new predefined style, select the object and create a new style as shown in Figure 6-2.

Page 18: FMC Quick Start Guide - Eclipse

Figure 6-2 : Predefined Styles

First of all type the new style name in the text box next to the Create New Style button; then

click this button. Afterwards change the style properties available on the Predefined Styles

tab.

Note: While working with predefined styles, make sure that Selected Style (i.e. the style that

can be currently modified) should not be “Shape” because the Shape style is the default style for all

newly created objects.

Predefined styles can be assigned to any type of objects; just go to Style property tab and select the

desired style from the Style drop down list as shown in Figure 6-3.

Page 19: FMC Quick Start Guide - Eclipse

Figure 6-3 : Apply a Predefined Style

6.3 Anchor Behavior Anchors can be enabled and can be made visible to facilitate positioning the start and end points of

channels and accesses (see Figure 6-4). The corresponding properties are associated with the diagram

object; to view and edit these properties click on the editor canvas.

Diagram Properties

Name Value Purpose

Anchor visible True or False Shows the connection points to

this object.

Anchor enabled True or False Enable the connection to this

object.

Page 20: FMC Quick Start Guide - Eclipse

Figure 6-4 : Agent With Visible Anchors