Home

Component Editor

image

Contents

1. Edit gt 3 Delete from Model Ta Select i og Arrange All Filters gt View gt Zoom F Load Resource Show Properties View roperties Remove from Context Ctri Alt Shift Down Start Simulation By Group 2 7 Start Simulation Grou i Problems Javadoc Declaration EJ Console 5 cot org eclipse m2m atl adt editor console ATL Console initiated gt Start Simulation Figure 22 Start Simulation by Group2 e Inthe Get Simulation Dialog provide a name for the simulation instance and select an algorithm from the drop down list Get Simulation Dialoq This dialog will help you get what you want Choose name group 4 sim Create new simulation Select algorithm Get existing simulation Select simulation E Figure 23 Select algorithm for the simulation e Interact with the simulation by clicking on the arrow icons next to the simulation instance and observe the states of the simulation s objects in the tree view Z H f Properties Group 4 Simulation View Sim Lar 4 Simulation Algorithm State Play Pause NextStep Speed Treeview of algorithms group 4 sim Simulation Algorithm STOPPED k mediui 4 Simulation 4 Component RT Instance P State sl b gt Port RT Instance b lt gt Port RT Instance b gt Attribute RT Instance 1 4 Component RT Instance P State s3 b lt gt Port RT Instance b gt Po
2. TECHNICAL UNIVERSITY OF DENMARK User Manual Component Definition Editor Group 4 05 12 2008 a E a oy Taha Slime s081738 Agata Balwierz s081172 Steinar Bjornsson s081007 Ali Demirsoy s080653 Kemal Baykal sO80654 Tudor Blanaru s083377 Mohamad Gasmi s081195 Martyna Sikorska s081329 Ulyana Tsyukh s080776 Table of Contents DRO CO ate E suan uu 3 DO O n uuu ms uuu SS u sum 3 SPD 821 08 gt mp unayna ee eee eee ee ee pustaqa 4 3 1 IEW O O T u ua nm u A u u S 4 3 2 COMPONENT definition diagr aii ull u NE 6 3 3 Pae UO enra E E E E E ET u uu un 8 3 4 S 2 ns E E SS UU S 5 8 3 5 KO s Oo Gelin 5 10 3 6 Poti o u ui uma aaa ss 12 3 7 Ton s Q eee bss cee E E E vote an E E S sss a sss sss 13 3 8 SENI lir unn E E 15 A DATO ss O iu A E E EA Oe Oe 16 4 1 High level overview Of the StepS esesssssessserssrrrssrrersreresrrsssrresrrersrrresrerssetresrrreseeessrerserresne 16 4 2 COMO ONENE DC Mav OM mersine EEE A A 16 4 3 FS CME aoa O esia EE 18 Written and corrected by Ali Demirsoy Taha Slime Tudor Blanaru Agata Balwierz Ulyana Tsyukh DTU Department of Informatics and Mathematical Modeling 1 Introduction This user manual provides information on using Component Definition Editor which is part of the CASE tool project The aim of the project is to provide developers with the ability to model and simulate embedded systems in a convenient and efficient way using this software The developer will be able create and visual
3. ber of parameters as in the message description 3 7 4 Assignments There can be zero one or more assignments Assignments are separated by coma and look like Assignment1 Assignmentz2 Assignment consists of NameOfAttribute arithmeticalExpression NameOfAttribute attribute that you want to assign value to arithmeticalExpression the specification is the same as in OutMessage 3 8 Saving diagram After all the steps you will be completed your component diagram you can safely save and exit The last appearance of the Component Definition will be as in the next figure id ComponentDef componentdefinition_diagram 3 lt Palette kaag si 53 port lt gt PortDefinition att1 gt O port inMsg port outMsg 1 att1 0 w 4 Transition att1 0D AttributeDefinition atti ae 2 lt gt sii Problems Javadoc Declaration Properties 5 E console E gt m Component Definition Core Property value Hardware iv False Rulers amp Grid i L Message Definitions Message Definitions Appearance Name Figure 21 Complete Component Definition diagram The specified Component Definition diagram can be used in the Deployment which is the next step in the developing of the CASE Tool system 4 Simulation algorithm The simulation algorithm provided as a plug in can be used by the Simulation Manager to simulate a deployment 4 1 High level overview of the steps The simulation algorithm consist
4. ce Set z a platform resource CASETOOL 20example MyMessages messagedefinitions gt Message Definitions gt Message Definition inMsg gt ae Message Definition outMsg Figure 15 Two message definitions are defined You can add parameters to each of the definitions by adding new child to these message definitions Figure 16 id ComponentDef componentdefinition_diagram Resource Set B Lo platform resource CASETOOL 20example MyMessages messagedefinitions Message Definitions gt Message Definition inMisg k Message Definition outMs New Child h Parameter Definition New Sibling b lt 2 Undo Set Ctrl z gt Redo New Parameter Definition Ctrl Figure 16 Add parameters to message definitions To use the created message definitions in your Component Definition diagram you should go back to the diagram right click o the canvas choose Load Resource and browse the MessageDefinition file Figure 17 MyMessages messagedefinitions Palette s a aw Navigate gt PortDefinition File State Edit Transition 3 Delete from Model gt AttributeDefinition xx Select o8 Arrange All Filters View Zoom Load Resource F Show Properties view Figure 17 Load MessageDefiniton files 3 6 Port definition Now we can create the port and attribute definitions Here we created a port definition named port and attribute named attr1 See figure 18 i
5. clipse Platform File Edit Source Refactor Navigate Search Project Run _ al i Ir i AO RSE E Figure 4 Empty project with the name CASETOOL example 3 2 Component definition diagram In order to create the Component Definition select CaseToolComponentDiagram which is part of the CASE Tool SE2 e08 folder Figure 5 You can name it ComponentDef Select a wizard Creates CASEToolComponent diagram Wizards type Filter text L General CASE Tool SE2 e08 Fi A Componentdefinition Model id Deployment Diagram IN Deployment Model LA Messagedefinitions Model A Simulation Model gt CVS gt Eclipse Modeling Framework a Ecore Tools T Ecore Diagram Wi Ecore Tools Project gt GMF Xpand Figure 5 Create new Component Diagram Java CASETOOL example ComponentDef componentdefinition_diagram Eclipse Platform File Edit Diagram Navigate Search Project Run Window Help Cis O Qe D Team Synchr 3 er SVN Reposito tS Resource Java F Package Explorer 3 fe Hierarchy gt O d ComponentDef componentdefinition_diagram 3 m AS e Y lt 2 Palette b Raag PortDefinition State E CASETOOL example IN ComponentDef componentdefinition id ComponentDef componentdefinition_diagram Transition gt AttributeDefinition B Problems Javadoc Declaration Properties 53 E console Component Definition C
6. d ComponentDef componentdefinition_diagram 3 A MyMessages messagedefinitions m Palette b 2 port gt amp s1 2 PortDefinition State Transition lt atti AttributeDefinition lt gt s3 Figure 18 Automaton Port and Attribute definitions We will use these message definitions by defining the ports in and out messages You can configure the port definition by opening its properties tab Figure 19 where you can add in and out message types Il 2 Problems Javadoc Declaration Properties 3 E console z o Port Definition port RR Property value In Message Definition inMsg Appearance Name port Out Message Definition outMsg Figure 19 Specify message definitions of port 3 7 Transition Now we are able to add our transitions in between attributes To create the transitions drag and drop the transition node between two states When you drop the node you will be asked to fill in the label Transition consists of one condition one incoming message zero one or many outgoing messages and assignments Condition InMessage OutMessages Assignments A valid example of a transition can be seen in Figure 20 sl s3 attl gt 0 portnhlsg port ouitilag 1yatt1 0 Figure 20 A valid example of transition label Where attr isthe attribute that we just specified P1 is parameter from port inMsg In this section the detailed specification of the Condition inMe
7. hat the simulation will send a message for a port for both the in and the out connections 4 2 6 Attributes Attribute definition default value is used for initializing the value of the attribute for the simulation Attribute names inside the same component definition should be unique because of the transition label parsing This is not validated and having duplicated attributes names may result in unexpected behavior of the simulation 4 2 7 Messages Message definitions contain the name of the message and a list of parameter definitions During the simulation these will be used to create run time instances of a message These message run time instances are sent through the ports between components of the simulation The value for each of the parameters of a message is evaluated based on the context of the message context meaning the component run time instance where the message exists at the time of evaluation Message definitions should have unique names especially when used in the same ports 4 3 Running a simulation The steps described below are to be followed when running a simulation for a deployment e Open the deployment diagram right click on it and select Start Simulation By Group 2 w zor l gt L l wk w S O H receiver componentdefinition_diagram sender componentdefinition_diagram id default deployment_diagram gt lt gt PingPlayer Add Navigate d File F
8. is selected applies when the incoming message specified in the transition label is found in the specified port of the component and when the condition specified in the label is satisfied The result of performing the transition can be either one or both of the following to actions messages are sent through the component ss ports and assignments are performed for component s attributes In case multiple transitions could be selected the algorithm will select the first one in the order in which the transitions were defined in the automaton 4 2 4 Ports Ports are used to hold in a buffer the incoming messages and for sending by providing a connection to the simulation algorithm to be used for finding the destination port the messages that the simulation creates as a result of a transition being performed A message is removed consumed from a port only in case a transition that had that message as the trigger was performed This could lead to a buffer overrun condition of a port in case the definition of the automaton for the component is not properly specified 4 2 5 Connections Connections are used by the simulation to determine inside which port s buffer a message should be transferred In case the connection is via a bus the actual delivery of the message will take 2 simulation steps because the message will first be moved into the buffer and then to the destination port Connections are not oriented connection meaning t
9. ize embedded systems and test them via simulations before using them in a real systems This document describes the correct way of using Component Definition Editor in order to choose the right tools to construct necessary components correctly The document contains the overview of the Component Definition Editor and a small tutorial that describes a step by step example on creating Component Definition 2 Overview The CASE Tool is created by integrating different plug ins The Component Definition Editor Figure 1 is a part of CASE tool system where a system developer is able to create new components for a system and specify their behavior It is provided as an Eclipse plug in and should be loaded together with other plug ins of the CASE tool Using Deployment Editor the developer instantiates previously defined components and specifies connections between them The Dashboard visualizes the behavior of the modeled system During the simulation one can change the state of different components and the system will react according to the behavior specified during component definition and deployment Palette gt amp gt PortDefinition gt State att1 gt O0 port inMsg port outMsg 1 att1 0 Transition att1 0 lt AttributeDefinition 2 Problems Javadoc B Declaration J Properties 23 E console o Sel Component Definition Core Property value i Buers amp Grid e ee a Definitions Appearance Na
10. me r F Figure 1 Component Definition editor 3 Step by Step Example Before we can create Component Definition all plug ins of the CASE tool should be loaded for example in the runtime environment 3 1 New project First create a new project from the Eclipse runtime environment select File then New and then Project Figure 2 Java Eclipse Platform File Edit Source Refactor Navigate Search Project Run Window Help TBS be O Bee eo V Package Explor 3 gt fg Hierarchy O ale y New d 28 Java Project Show In Alt Shift w gt ku GAE Copy Ctrl C H Package S gt Copy Qualified Name Class Paste Ctri v Interface Delete Delete G Enum Annotation a ty Import 9 Source Folder A bay Export 45 Java Working Set v amp Refresh FS CS Folder File Properties Alt Enter L f I Untitled Text File fon lt a lt s Figure 2 Create empty project Select the Project wizard Figure 3 and name project for example CASETOOL example New Project Select a wizard Create a new project resource Wizards amp General i i Faceted Project Sa I Project gt cvs amp Eclipse Modeling Framework amp Ecore Tools E Graphical Modeling Framework Java amp Plug in Development gt SVN E Examples Figure 3 Select Project wizard At the next figure you can see the project that was created Figure 4 Java E
11. name MyMessages Select a wizard Create a new Messagedefinitions model Wizards type Filter text H General CASE Tool SE2 e08 id CASEToolComponent Diagram IA Componentdefinition Model id Deployment Diagram IN Deployment Model 2 IN Simulation Model amp cvs Eclipse Modeling Framework gt Ecore Tools T Ecore Diagram EI Ecore Tools Project W GMF Xpand t i Figure 12 Create Message Definition In the next step you will be asked to choose the root element To create more than one message definition choose Message Definitions otherwise Message Definition Figure 13 Messagedefinitions Model Select a model object to create lt gt Model Object essage Definitions Message Definition Message Definitions Parameter Definition Figure 13 Choose root element After MessageDefinitions is chosen to add message definitions simply add a new child to root element and create one or more message definitions Figure 14 id ComponentDef componentdefinition_diagram a 5 Resource Set S platform fresource CASETOOL 20example MyMessages messagedefinitions gt New Child z Mess efinition Figure 14 Add Message Definition In this example we created two message definitions which are inMsg and outMsg as in Figure 15 id ComponentDef componentdefinition_diagram A MyMessages messagedefinitions gt Resour
12. ore Property Hardware Rulers amp Grid uiers amp Gri Message Definitions Appearance Name Figure 6 Newly created diagram with an automaton In the properties tab of this editor you should be able to specify what type of component you want to create In the following figure the attribute Hardware is set to false which means this is a Software Component Set it to true if you want to create Hardware component Figure 7 e Problems Javadoc Declaration Properties E console Component Definition Core Property value Hard ivi Fal Rulers amp Grid ae Message Definitions Appearance Name Figure 7 Properties tab of the Editor The new Component Definition Diagram contains an empty automaton where you specify component behavior using states and transitions between them 3 3 Palette Most of the parts of the Component Definition you can add using Palette Figure 8 It consists of PortDefinition Every component has one or more ports where messages can be send and or received e Attribute Definition Attribute is a Component variable It defines in some way the state of the component it has a name and initial value e State The states describe some position that the component is in The state can be changed by transition There can be many states but only one initial state has to be defined in properties tab of the state e Transition Every transition is a connection between
13. rt RT Instance b Attribute RT Instance 0 4 BusRT Instance bus Bus bus gt Figure 24 Simulation results
14. s of the following steps Parse the deployment and create all run time instances first discover the components and ports then busses and in the end the connections All this is done when a new instance of the simulation is created Simulate components this is the first sub step of one simulation step Simulate busses this is the 2 sub step of one simulation step 4 2 Components behavior This paragraph describes how each type of elements definition in a deployment like component definition port and message definition parameter and attribute definition and sub elements of a component definition like automaton state and transition behaves and or affects the simulation algorithm We will use the term element is simulated to refer to what happens with for the particular element when one step of the simulation is performed 4 2 1 Component definition A component is simulated by selecting the current state of the automaton and performing the first transition that apply that is the first transition for which the condition is evaluated to true and or the required incoming message exist on the required port 4 2 2 Automaton The automaton is used by the simulation to determine the initial state and set it as current when the run time component instances are created from the deployment and for getting the current state when simulating one step for a component 4 2 3 Transition A transition
15. ssage outMessage and Assignments is given Note if the label you have entered is incorrect you will see the error message 3 7 1 Condition Condition is a Boolean expression where the following notations can be used 1 Operators Table 1 Available operators Name of operator 2 Integer constant 3 Brackets and 4 Attributes first attribute has to be defined in component definition if it has a name att1 in the label you will use string att1 5 Parameters the names of parameters of the incoming message 6 Arithmetical expressions 3 7 2 InMessage In this part you can specify the port and which message can be received Example portl messagel 3 7 3 OutMessage In this part you specify which messages you can be sent There can be zero one or many Out Messages They should be separated by coma One OutMessage consists of NameOfPort NameOfMessage parameter1 parameter2 NameOfPort port where the message has to be sent NameOfMessage the message parameter1 parameter2 parameters for the message they are optional and are represented as arithmetic expressions that can contain the following notations 1 Arithmetic operators Table 1 2 Attributes 3 Parameters of in message look at condition 4 Brackets Example of that parameter par1l 12 34 6 Example of outMessage portl inMess1 parl 6 1 portl inMess2 a port3 inMess3 Note there have to be exactly the same num
16. two states It describes what condition can occur and what message should be received so that the component will move to another state When the component changes the state it can send several messages and make a few assignments to the attributes s Palette b RAAD PortDefinition State Transition AttributeDefinition Figure 8 Palette We will use the Palette to create these components in the next sections 3 4 State To add a new state to the diagram drag drop state from the palette in to the automaton and give them names as in the following figure Figure 9 id ComponentDef componentdefinition diagram Palette b h gt Q2AB s1 2 PortDefinition State Transition lt AttributeDefinition s3 Figure 9 Automaton with its states To change the name and specify the initial state click on the state and go to properties tab as in Figure 10 Then you can set initial to true Problems Javadoc B Declaration 1 Properties 83 E console LE State s1 Core Property value Appearance al PP Initial ive False Name w 51 Out Figure 10 Properties tab of s1 state After this property is saved the state s1 is defined as initial and has a special decoration Figure 11 Every automaton has to have one and only one initial state sl Figure 11 Initial state 3 5 Message definition To define a message definition create new Messagedefinitions Model See figure 12 with the

Download Pdf Manuals

image

Related Search

Related Contents

Silverstone SST-GD01B-R computer case  平成22年度 科学研究費補助金 執 行 要 領  Excalibur electronic SoundMaster FM Transmitter 144 User's Manual  詳細はこちらへ  Installation Instructions  ガイドボール GP  

Copyright © All rights reserved.
Failed to retrieve file