Home

Here

image

Contents

1. 1413 Bsiyou 3 Suls3 eweu c3 L 3ouejsu Hsng H and voneinwis L a Busy edA RR mE 11 Bunga eureu 4 jose 3 uone nuiis hueuodwoo Qareinwis d aouejsu g1ueuoduio H uone nuiis uone nuiis 5 uonjugep uoniuyep d uoniugep L 10 o asno 11 Busa ed amp amp m T 1 11 Buns eureu swa woni uonoeuuoj 11 1413 ozisiayng E o snq 1 1J0u13 ezisiojnq amp Vd eouejsupiod El sng uonoeuuoo L sng jueuoduioo eouejsupueuodwogms H aoue sujueuodwogMH E jueuodwoo juauodwoo 4 uon 11 Bunga edA E L1 Suns3 eureu E 11 BuuiS3 eureu amp epoN fF outed eourjsujjuauodwiog El yuguodwoo apou Quonenwisuur a Wewfordgp 11 Bunga eweu E jueuikojdeg 11 juowAojdep uap Busy aweu c3 ed eBessey A mo ul abessow suoniugegeBesseyw El Bsw L suoniugopobessoeui dm suonluyagebessow LO u niuyep Josues B soyenjoy 11 Buuis3 eureu amp uoniugequod H uod L jueuoduioo L uonuyep L asnos uonisueJ jueuoduio2AS 1 11 ueejooga jeniui amp od 11 Busa eweu amp aris epu uojeuioiny E jueuno as L uoyewoyne jueuoduioo 4 74 uoniugegiueuoduio E Bulga eureu E uoniugopjueuoduioo d
2. In terms of a UML component diagram 6 ARCHITECTURE 28 Deployment t initializeSimubation el Identifier String A HardwareComponentinstance Portinstance 1 Figure 26 UML diagram of deployment editor 6 1 1 Deployment classes The following describes the classes of the deployment model followed by a description of how the implementation is intended Deployment class A Deployment is an aggregation of four sets of objects of the types e component ComponentInstance e node Node e connection Connection e bus Bus A Deployment object represents an actual deployment of embedded components The Deployment has a name to ease reference when making more instances of the same Deployment To initialize a simulation of a given Deployment the initSimulation method is provided ComponentInstance abstract class The ComponentInstance represents a concrete embedded component in a given deployment A ComponentInstance consists of a set of PortInstances to enable communication with other deployed ComponentInstances 6 ARCHITECTURE 29 A ComponentInstance is associated with a ComponentDefinition since no ComponentIn stance can exist without being in a Deployment Because several ComponentInstances of same type can occur in the same Deployment a unique name enables reference to a specific ComponentInstance Since the ComponentInstance is abstract any embedded component must be rep
3. then send the message to the destination port Else send the message over the bus associated with the connection Elaboration Valid message Is a message of a type that fits the particular port Lost messages If a message cannot be received for any reason e g full buffer it should be dropped Figure 5 Sketch of simulation algorithmn d Randomized method of changing states in sensors and thereby cause a reaction by the complete embedded system So the simulation can run without user input and possible try sensor input combinations the developer would not have thought off 3 4 Dashboard The dashboard is the part of the software system where the simulation is visualized The dashboard has two main user groups the developers and the end user The developer could use the dashboard for debugging the embedded system The end user could use the dashboard to present the embedded system or be presented an example of the embedded system using the dashboard 3 4 1 Functional requirements 1 The dashboard shall use a simulation as an underlying model 2 The dashboard shall have a graphical user interface GUI 3 The dashboard should include illustrations for each component type 4 The dashboard should allow the user to activate deactivate sensors 5 The dashboard should have different detail modes a All details This mode gives the developer access to all information given by the simulation and t
4. 1 It is intended to ensure documentation quality by emposing the measures listed below http www kurser dtu dk presentation aspx menulanguage dk amp coursecode 02161 5 http www kurser dtu dk presentation aspx menulanguage dk amp coursecode 02162 3 4 NON FUNCTIONAL REQUIREMENTS 14 a b c Every document shall be approved by the delivery leader as well as the team leader Any part of a document are produced by at least two persons thus trying to decrease the amount of typical errors as well as improving the creative process Each delivery is reviewed after feedback and appropriate measures are taken and documented so that errors are caught as early as possible in the development 2 It is intended to ensure quality of the implementation by emposing the measures listed below a A quality manager is appointed to enforce that the policies for the data reposi tory are upheld These policies should be able to reduce the amount of untested and or non working code which is committed as well as preventing that no bi nary code files are committed All implementations are done in pairs of developers The intention of this is to decrease the number of typical errors that often follows when using new technology The implementation is divided into a number of milestones which number is yet to be determined After each milestone the quality of the implementation is reviewed and decisions for possible improvements
5. components can only select hardware definitions and software components can only select software definitions When a new type has been selected the component creates instances of all the ports specified in the definition see Figure 17 5 3 6 How do I insert a bus into the deployment diagram Left click on Bus in the palette Point the cursor to the place in the deployment diagram where you want to place the bus and left click again Now you have to specify a name for the new bus This name should be unique within a deployment 5 USER INTERFACE 22 Id Draper deployment_diagram 23 N EFI a Palette gt Ist Zoom h 25 Note y gt HW1 gt Connection No type defined 4 Node Bus lt gt SWComponentins 4 HwWComponentin 4 BusAssociation Nodel Actuator Wiper Sensor RainSensor Sensor Switch Figure 17 Change component definition 5 3 7 How do I associate a component with a bus Left click on the bus association item in the palette If the component is a hardware component drag a connection from the hardware component to the bus If the component is a software component drag a connection from the node containing the component to the bus 5 3 8 How do I insert a connection between ports Inside a component ports are represented as squares Left click on the Connection in the palette Click and hold down the mouse button as you drag the conne
6. do I change the buffer size of a bus Mark the bus in the deployment diagram for which you want to change the buffer size Now look in the Properties window and find Buffer size Here you can specify the Value you wish see Figure 19 5 3 16 How do I change the buffer size of a port Mark the port in the deployment diagram for which you want to change the buffer size Now look in the Properties window and find Buffer size Here you can specify the Value you wish 5 3 17 How do I change the source or target port of a connection Select the line in the Editor representing the connection Now drag the end of the con nection you want to change to the port you want it changed to 5 USER INTERFACE 24 ld Draper deployment_diagram x a id WiperControl deployment_diagram Node1 19 BUS 4 0 1 gt SW1 WiperController 0 switch 4 0 rainsensor 0 wipe amp gt 1 mni 2 Problems Javadoc Declaration C Properties x1 4 Bus BUS Connection L Name 13 BUS Node Figure 19 Change buffer size 5 3 18 How do I rename a component ECU bus or connection This can be done in two ways e Either you change the label in the Editor e Or you mark the component and then changes the name in the Properties window 2 Problems Javadoc Declaration C Properties E E _ oO SW Component Instance Another Core Property Value Appearance on Name
7. l l l l l l I l l l l l l l I l l View interactions between components recorded froma F i l l l l I l I l I l l I l l l l l l I l l Component Interaction Create Edit O Component definition simulation Developer lt lt includes gt gt Deployment Dashboard Editor Create Edit Deployment diagram Developer view E End user view End User Figure 3 Overall use case diagram The complete software system is developed by four teams and the responsibilities for this team is the deployment editor and the simulator Thus only use cases referring to the subsystem deployment editor has been made to cover the responsibility of this teams s part of the project The simulator has no direct user interactions and thus no use cases exists Other use cases can be found in the appropriate project teams requirements specifications The purpose of sections 3 1 3 5 are to provide a detailed description of the software system This includes stipulating the requirements for the subsystems 3 SYSTEM FEATURES 8 3 1 Component editor The component editor is a graphical tool which enables the user to define and edit com ponent types through a drag and drop interface The behavior of a component is based on an automaton which is created within the component editor The component editor has the following requirements
8. of the interaction with the actor of the software A description of the different parts will be provided in the following sections These will describe the function of the part and what the actor shall be able to do A description of how the different actions are done is given in Section 5 3 http www eclipse org Seminar Paper on Eclipse by Bo Puggaard Hansen and Mikael Andersen 5 USER INTERFACE 16 Figure 6 Overview of the Deployment Editor 5 2 1 Project Explorer The Project Explorer will be implemented as a view and will function as an overview of the project and all its associated files are shown Not just files for the Deployment Editor are shown but all the Components and Component Diagrams are listed too By selecting a file the program should determine which type of file we are dealing with and open the editor associated with the certain type See Figure 7 Ele Leek Tm nem CL PST Et Inkiezen ha a b WiperControl deployment_diagram rere ici Sot LLL Ln Figure 7 An example on how the Project Explorer could look like in our project In our final implementation it would be nice to have different icons depending on which type of file we are dealing with This would make it easier to recognize the different parts of our project 5 USER INTERFACE 17 5 2 2 Resource Editor As the name says this will be an editor Here you will see a graphical representation of the Deployment Diagram and t
9. 3 The example in Figure 2 illustrates how the software system could be used to develop and test an embedded system in this case how wipers could turn on based on rain sensors 2 OVERALL DESCRIPTION Component editor ambines components Deployment editor Create components Simulates a deployment Simulator visualize Manipulate visualize Manipulate a simulation a simulation Dashboard Interaction editar Figure 1 Association between the subsystems The actor creates components The actor combines the The actor uses the dashboard in the component editor components in the deployment to simulate the embedded editor system Figure 2 Illustration of how the software system could be used 3 SYSTEM FEATURES 7 3 System features The primary use of the software as mentioned in section 2 is to develop a model for an embedded system either for testing or presentation or both This primary use can be explained by use cases for each of the subsystems in the software system An overview of the use cases can be seen in Figure 3 The figure illustrates the top level use cases of all the different sub systems as well as the association between the actors and the system Simulator Simulate Deployment d c l Record Simulation WE oon lt lt includep gt gt Editor Editor l
10. 3 1 1 Functional requirements 1 A component shall be one of either a Software component A component capable of evaluating input messages through a program and based on this create one or more output messages b Actuator A component capable of carrying out a physical task triggered by input messages c Sensor A component capable of detecting a specific physical property and send a message based on this property 2 component shall have a unique name 3 A component shall be able to have an arbitrary number of ports attached A component must be able to communicate with other components In order not to restrict the possibilities of the components the number of ports must not be limited a A port shall have a unique name within the component Helps the user identify the purpose of a port b Each port shall have an input buffer with capacity changable trough the de ployment editor by a developer Enables the definition of a port to limit the number of buffered messages c Components shall be able to send and receive messages through ports attached to the component Communication is based on messages delivered from one port to another port i Each port shall have a finite set of message types it is allowed to send and a finite set of message types it is allowed to receive Enables compatibility check between ports ii message shall be defined by a text string 4 The intern
11. Glossary 35 Appendix 36 A Use cases 36 Al Insert component lt lt nom a es dat 2 4 ber del eeh Eo Re Seed 36 Ade Insert DUS x dau di a dBA Ad EE dd iE Aes 37 As a BOE us uode daneen xg Re ae a ara E E boue EC XO ERU 38 A 4 Insert connection 39 A 5 Initialize simulation A 6 Delete component ECU connection B UML class diagram Complete 1 INTRODUCTION 4 1 Introduction This report documents the requirements of the software system which is being developed in 02162 Software engineering 2 The software system is intended to improve the development of embedded systems by supplying developers with a CASE Computer Aided Software Engineering tool for de signing modeling and simulating embedded systems This is done by allowing the developer to create and visualize the embedded system and test it by running a simulation of the embedded system design This could reduce cost for a company that designs and produces embedded systems As an example the system could be used in the automotive industry to design and test the many embedded systems existing in automobiles today Likewise the system could also be used in aeronautics or generally in the transportation manufacturer industry 1 1 Conventions The priority of the requirements specified in section 3 and 4 will be indicated by keyword shall should and would be nice e Shall Requirements that must be implemented as a minimum resources must be allocate
12. Mad Type tance Figure 20 Edit name of in the Propertiy window 5 3 19 How do I undo redo a change In the toolbar there are located buttons for undoing and redoing the latest changes Alter natively these keyboard shortcuts can be used Undo Ctrl Z and Redo Ctrl Y see Figure 21 5 3 20 How do I save a deployment diagram Press the Save in the toolbar 5 3 21 How do I load a deployment diagram In the Project Explorer find the deployment diagram file you wish to open and double click on it The Editor Properties and Overview should now open 5 USER INTERFACE 25 E Java WiperSystem Draper deployment diagram Eclipse P of Gut Cim Tx B cov Ctrl C Bn Paste Clty Delete Delete aim Select All ChTEA E l Find Replace CtrF Add Bookmark Add Task o Wiper componentdefinition o WiperControl deployment m as Figure 21 Undo changes 5 3 22 How do I initialize a simulation from a deployment Left click on the deployment diagram file in the project explorer and click on the Initialize Sim button see Figure 22 E 12 WiperSystem Y Draper deployment id Draper deployment_diagram dj RainSensor componentdefinition po N Switch componentdefinition con o Wiper componentdefinition WiperControl deployment d wiperControl deployment diagram M9 WiperControl simulation Y WiperController componentdefinition LA WiperControlMe
13. Technological University of Denmark DTU Informatics and Mathematical Modelling IMM System Specification Revised 02162 Software Engineering 2 December 21 2007 Group 1 participants Mathias Holm Andersen s052761 Jonas Hansen s052905 Bo Puggaard Hansen s050759 Martin Ancher M ller s052718 Anders Pedersen s052690 Michael Sgrensen s052683 Thomas Lyngby Vestergaard s052551 Peter Wind s052425 c mma c i Contents 1 Introduction 4 LIL Conventions gt ren se de oe ek ee cem SO Ins set eap d an lo ey ha ALTE aeg AS 4 12 AUEN Gh LX E hod a Um A aa ds hora e dede EUR 4 2 Overall description 5 3 System features 7 dl Component editor Arae SO ous ROS eG ue doe Beet eed Ak wed 8 oo Deployment SUWO gt pora canto Ss ql Bee Bok Ae he xi aa 9 3 05 IMMUNO IIA 10 Oi Daho inbe maa eeen ae GS Be uh voe ex pem dia 11 3 9 Interaction editor a es Ambassade hb ROSES BH 12 4 Non functional requirements 13 4 1 Implementation constrains 2222s es 13 Aon Document atO x ee dy aen AR Hette a Ei de dcc RUE we Eee id 13 kor WOM os ets sas Gen a tw B ed Beke e ee ee 13 5 User interface 15 dell Technolo Es x stans de m mob esther d E 5o d REIR SUN ds 15 Deo ARD Sob acest echas eb Ruhe OPE UM e ae o E Y 15 wo 805000000199 AAA 19 6 Architecture 27 0 1 Deployment model sve 2x dde Bende de BORE es om Sek as PS 27 0 2 Deployment editor 2 aar eode WS EA na ae a Ee ea 30 005 SOD ae ar sete o A l2 1 ee Ge ah a ae te E 31 7
14. The Bus has a name for identification since a Deployment can have several Busses 6 1 2 Deployment implementation The following will describe what parts of the implementation will be handled by EMF GMF and manual implementation Structure All classes in the above section will be generated by EMF All data to rep resent the structure of the model will be present when generation is done Volatile methods and attributes EMF will leave all volatile methods as stubs for the development team to implement The last paragraph for each of the classes in the above section decribe volatile methods or attributes which will have to be implemented by hand 6 2 Deployment editor The GUI part of the editor is described in detail in the 5 The following describes in more details more specific parts of the customization of the generated editor 6 ARCHITECTURE 31 An Deployment definition L Simulation Deployment Bus definition p S aa ComponentRTInstance simulate name String reset type String Rergetanco seb tus d LL 1 BusRTinstance name String noMsg Integer d l Componentinstance definitioh connection RETA gt 1 gt _ PortRTInstance ConnectionRTInstance 1 Component source out io eo Definition pum A l target in current destpqrt State buffer o ie af MessageRTinstance message
15. a MessageRT Instance and a single reference destport to a PortRT Instance The reference destport is the PortRT Instance which the MessageRT Instance is to be delivered to in a simulation step 6 3 7 MessageRT Instance class A MessageRTInstance is intended to be a run time instance of a MessageType from the messagedefinition package therefore it has a single reference type to the MessageType MessageRT Instance has a volatile attribute name that retrieves the name of the Mes sage Type which MessageRT Instance is a run time instance of 6 3 8 Consequences of using the EMF technology The Simulation only consists of a model which other components use to simulate a deploy ment The model is created as an Ecore model and with the help of the code generator of EMF the model code is generated automatically What remains to be implemented is volatile attributes and methods The following volatile attributes need to be implemented e ComponentRTInstance name e ComponentRTInstance type e PortRTInstance type e PortRTInstance noMsg e Dusk I Instance name e BusRTInstance noMsg e MessageRTInstance name The following methods need to be implemented e Simulation simulate e Simulation reset EMF provides a persistence layer which can store data through XMI as default other serializations can be implemented To ensure that a simulation is correctly stored it is important to have proper containmen
16. al behavior of a component shall be defined using an automaton Com ponent behavior is easily defined using an automaton a Transitions shall be triggered either by i n incomming message ii spurious trigger which automatically changes the state of a component wihtout any input b A Transition shall be able to cause the component to send multiple messages Enables a component to communicate a change of state through one or more ports c An automaton shall have an initial state By definition am automaton must have an initial state d An automaton shall be able to be non deterministic if several transitions are possible 5 It shall be possible to store and change the defined components for future use 3 SYSTEM FEATURES 9 3 2 Deployment editor The deployment editor is the part of the software system where deployment diagrams are created A deployment diagram combines components created in the component editor and thereby modeling an embedded system for which a simulation can be initialized As an example this could be an automotive embedded system which starts and stops the wipers of a car depending on whether it rains or not Such a system would consist of a number of components like rain sensors software components and wiper actuators 3 2 1 Functional requirements l 10 11 A developer shall be able to design a complex embedded system trough a graphi cal editor by combining component
17. am 5 rainsensc Beene Format 5 switch Filters E Show Properties View y 5 Properties Figure 12 Right click menu 5 3 Handbook The hand book is intended to present the product software from the actors point of view It has been made in the way of a tutorial This means that it describes how to solve a number of the most important tasks in the application in a step by step way supplied with screen shots so that the actor can follow the tutorial while working hands on the application 5 3 1 How do I create a new deployment diagram Right click on the project in the Project Explorer and select New gt Other see Figure 13 A wizard will now appear Select CASETool gt CASETool Deployment Diagram group 1 and press Next See Figure 14 Now specify the Parent Folder and File Name and press Finish See Figure 15 An empty deployment diagram with your chosen name will now be shown in the editor 5 3 2 How do I insert a Node ECU into the deployment diagram Left click on Node in the Palette Point the cursor to the place in the deployment diagram where you want to place the node and left click again Now you have to specify a name for the new Node This name should be unique within a deployment see Figure 16 5 USER INTERFACE 20 L1 di Wipercontrol deployment_diagram 2 rearWiper Wiper i 1 e Figure 13 Right click menu Figure 14 Wizard step 1 New CASETool D
18. are discussed and if necessary implemented A testing manager is appointed to develop a number of rules which all tests should comply with and he will try to enforce that these rules are upheld An optimal test strategy should be developed for maximizing the numbers of discovered errors before the software is released The general test strategy will at least consists of an acceptance test combined with continuous unit testing of manually implemented methods during the development It is the intentio that all manually implemented code regarding the model will have a statement coverage of 100 The commenting of all manually implemented Java code shall use the javadoc standard http java sun com j2se javadoc 5 USER INTERFACE 15 5 User interface The following section will describe the different parts which the Deployment Editor s graphical user interface GUI consists of and how this should look like Furthermore it will be described how to solve important tasks within this GUI As mentioned earlier the Deployment Editor is used for designing an embedded system This shall of course be as straight forward as possible to do and our tool should eliminate much of the errors which could occur when developing this embedded system Therefore it is important that the GUI will be thought through and made easy and simple to use To make sure that the software system is easy to use it a usability test should be made however this wil
19. ction from one port to another If the two ports are compatible a connection is created As long as the connection is not associated with a bus it is shown with a red color Palette gt Select Nodel HWI Zoom Switch Note WiperController 1 illac 0 switchOut 4 0 swij 0 wiper 0 4 rainsensor Figure 18 Insert a connection 5 USER INTERFACE 23 5 3 9 How do I associate a connection with a bus Left click on a connection and change the bus property in the properties view If no busses are shown in the list it is because the components of the ports are not associated with a common bus 5 3 10 How do I move an object in the deployment diagram This is done by dragging the object to the place where you wish put it 5 3 11 How do I delete a Node ECU Mark the Node in the deployment diagram and press Delete Deleting a Node will also result in deletion of the software components inside the Node and their connections 5 3 12 How do I delete an actuator sensor or software component Mark the actuator or sensor in the deployment diagram and press delete Deleting an actuator sensor or software component will also result in deletion of all the connections related to this component 5 3 13 How do I delete a bus Mark the bus in the deployment diagram and press Delete 5 3 14 How do I delete a connection Mark the connection in the deployment diagram and press Delete 5 3 15 How
20. d to these requirements e Should Requirements that adds to the software systems functionality but not required for it to work if possible resource should be allocated e Would be nice Requirements which are considered ideas and will be imple mented if sufficient resources exists alternativly they could be done in later versions of the software These words will be emphasized using bold format It is only when this format is used that the keywords have the meanings indicated above All classes from the domain will be presented in ztalic 1 2 Audience The intended readers of this document are persons afiliated with companys that develop embedded systems 2 OVERALL DESCRIPTION 5 2 Overall description The overall description contains a brief introduction to the software systems and the subsystems it consists of identification of the actors and description on how the software system works The actors of the software system has been indentified as e Developer An actor who is involved in every part of the development process of the embedded system Example An engineer employed at a company that produces embedded systems for cars e End user An actor to whom the final embedded system is presented or an actor who presents embedded systems for others Example A car manufacturer interested in buying the embedded system developed by a developer or salespersonal from the devloping company Within the scope of
21. ed 5 2 4 Diagram Overview This is implemented as a view and does not have an actually function If the Deployment Diagram reaches a size greater than the editor frame the overview will show a box sym bolising what part of the diagram is visible and a miniature image of the entire diagram By dragging the box the view in the diagram frame will be moved accordingly See Figure 10 Grouine D BPE Figure 10 An Example of the Diagram Overview 5 2 5 Toolbar The toolbar is the place where all the general functions are placed This includes com mands like creating saving and loading We have also chosen to put the undo redo functions and things like starting the simulator from a given deployment diagram See Figure 11 File Edit Diagram Mavigate Search Project Run Window Help i 15 0 9 G6 8 9 o Hr err Tahoma MIE B I A 95 8 Be og Ze Figure 11 The toolbar could look like this 5 USER INTERFACE 19 5 2 6 Right click menu This is not shown on figure 6 If an item in the diagram has relevant options these can be placed in a menu which is accessable by right clicking the item This could be the option to delete the item or start some action for which the properties pane is not suited Content of the menu will therefore be depending on the type of component is selected see Figure 12 FEUL 1 controller c Riiie WiperController File 1 wiper Edit JE Delete fram Diagr
22. efore it has a single reference definition to the Connection The Connection which the ConnectionRT Instance is a run time instance of has references source and target These references indicate the two ports which the ConnectionRTIn stance is a connection between 6 3 5 PortRTInstance class A PortRT Instance is intended to be a run time instance of a PortInstance therefore it has a single reference definition to the PortInstance A PortRT Instance is contained within a ComponentRT Instance and is represented by the single reference component The PortInstance which the PortRT Instance is a run time instance of has two multiplicity many references in and out to Connection RT Instances These references indicate all the ingoing and outgoing connections attached to the PortRT Instance The PortRT Instance is a container for a set of MessageRT Instances This containment represents the buffer of the PortRT Instance PortRT Instance has two volatile attributes e name Retrieves the name of the PortInstance which the PortRT Instance is a run time instance of e noMsg Retrieves the number of MessageRT Instances in the buffer of the PortRTIn stance In practice this is done by counting the number of MessageRT Instances in the set buffer 6 ARCHITECTURE 34 6 3 6 MsgContainer class A MsgContainer is intended to be a used in the buffer of a bus BusRTInstance It contains a single reference message to
23. erence definition to the ComponentInstance and a single ref erence simulation to the Simulation in which it is contained The ComponentRTInstance is a container for a set of PortRT Instances for the same reason as the containment between Componentinstance and PortInstance in deployment A reference current to State in the componentdefinition package is used to keep track of the state in which the ComponentRTInstance is ComponentRT Instance has two volatile attributes e name Retrieves the name of the ComponentInstance which the ComponentRTIn stance is a run time instance of e type Retrieves the type of the ComponentInstance which the ComponentRTIn stance is a run time instance of 6 ARCHITECTURE 33 6 3 3 BusRT Instance class A BusRT Instance is intended to be a run time instance of a Bus it has a single reference definition to the Bus and a single reference simulation to the Simulation in which it is contained The BusRT Instance is a container for a set of MsgContainers so that the BusRT Instance is able to represent the concept of a buffer with its messages BusRT Instance has two volatile attributes e name Retrieves the name of the Bus which the BusRT Instance is a run time instance of e noMsg Retrieves the number of MsgContainers from the buffer of the BusRTIn stance 6 3 4 ConnectionRT Instance class A ConnectionRT Instance is intended to be a run time instance of a Connection ther
24. fer size of the bus different from the default value 3 The developer selects the bus which should have changed its buffer size The developer sets the buffer size of the bus Thesystem sets the buffer size of the selected bus to the selected value in the model of the deployment diagram 1 Attaching a connecting to the bus 3 The developer selects the bus AAA The developer chooses the connection which The system attaches the connection to the should be attached to the bus from a list bus and removes previous bus attachments 37 A USE CASES A 3 Insert ECU Title Insert ECU Purpose This use case describes how to insert an ECU into a deployment diagram Actor 1 A developer Trigger preconditions The plug in is installed started and ready to use A deployment diagram must be provided 1 The developer selects an ECU from a list DO 2 The developer inserts the ECU into the The system created and inserts the ECU into deployment diagram the model of the deployment diagram Postcondition An ECU has been inserted into the deployment diagram 38 A USE CASES 39 A 4 Insert connection Insert Connection This use case describes how to insert a connection into a deployment diagram mae 0 preconditions The plug in is installed started and ready to use A deployment diagram must be provided At least one component with a port and one bus has to be inserted into the diagram list The devel
25. ge A EA ia ai eS A p Message Definition MessageType 1 7 m Figure 27 UML diagram describing the simulator Port placement Since a PortInstance is the boundary for communication between Componentinstances a PortInstance should be graphically placed on the edge of its con taining ComponentInstance This will be done using a custom LayoutEditPolicy in the ComponentInstance which will enforce the position of contained PortInstances 6 3 Simulation The intention of this section is in details to describe how the simulator will be repre sented and implemented in the final software system The section will not describe the requirements and functionalities of the simulator as these have already been covered in section 3 3 The simulator unlike the other parts of the software only contains a single component which is the simulation model This model consists of all the classes needed to simulate a deployment in run time and it provides an interface which other components can use to get access and manipulate with simulation data As an example the dashboard relies heavily on this interface to be able to visualize a simulation The complete UML class diagram of the simulator can be seen in Figure 27 and each of the classes will be covered in the following subsections A general note on almost all the classes are that they are run time instances of the objects in the deployment model Thus there are many similari
26. he ability to set any state of any component as desired including deleting and adding specific messages from busses b Low detail Only allows the user to switch states of sensors and see states of actuators 6 It would be nice if the dashboard included animations for actuators as opposed to static illustrations Animations makes it easier to see that the actuators are in motion 3 SYSTEM FEATURES 12 7 The dashboard should be able to change illustrations for component types e g if a given illustration or animation gives a better understanding of the component in a specific situation it would be nice to be able to change one or more from within the dashboard 3 5 Interaction editor The interaction editor is a part of the software system where the interactions between components are illustrated The interactions can either be recorded from a simulation or entered manually Only the interactions described in the deployment will be allowed to be entered manually This could for example be used by a developer to see how the components interact in order to track down errors 3 5 1 Functional requirements 1 The interaction editor shall be able to create an interaction diagram based on either a The interactions recorded in a simulation Will be useful for getting a quick overview of the recorded simulation b The interactions specified manually So the developer has better control over what the diagram shows Fo
27. he actor shall be able to select the different components which are inserted in the diagram See Figure 8 id WiperControl deployment_diagram ch E TE Palette gt rearWiper Ty Select Wiper auxbus 5 Zoom 1 wiperIn Note ECU1 lt Connection controller s i ode frontWiper AA pla enlace Bus i Wiper 1 wiper gt SWComponentIns 1 wiperin 4 HW ComponentIn 5 rainsensor gt BusAssociation 5 switch rainsensor RainSensor 1 rainsensorPort switch Switch 1 switchOut 4 vial mainbus 5 Figure 8 An example of a resource editor The Resource Editor is split into two parts The left and right side on the sketch above The left area is where the graphical representation of the Deployment Diagram is shown The actor shall be able to select component and move it around using the drag and drop technique and more generally viewing the diagram and manipulate it When moving components which has one or more ports associated the port will automatically be moved together with the component The right area Called Palette on the figure contains two things Tools and list of the component types to insert both represented as buttons The tools is used by the actor to manipulate the graphical representation of the Deployment Diagram This includes zooming selecting or a marquee function
28. iagram Create CASETool Diagram Select file that will contain diagram model Figure 15 Wizard step 2 5 USER INTERFACE 21 d Draper deployment diagram 3 E Tom Palette gt Is Select Zoom 2 Note y Connection 4 Node Bus lt gt SWComponentins 4 HWComponentin 4 BusAssociation Nodel Figure 16 Insertion of a Node 5 3 3 How do I insert a hardware component into the deployment diagram Left click on Hardware Component in the palette Point the cursor to the place in the deployment diagram where you want to place the hardware component and left click again Now you have option to specify a name for the hardware componet This name should be unique wihtin a deployment 5 3 4 How do I insert a software component into the deployment diagram A software component should be placed inside a Node Left click on Software Component in the palette Point the cursor to the Node in the deployment diagram that you want to place the software component inside and left click again Now you have to specify a name for the new software component This name should be unique wihtin a deployment 5 3 5 How do I specify which component definition a component is an in stance of Left click on a component in the editor In the properties view is located a property called definition Change this property to the desired component definition Hardware
29. interface to the other component Packages above the components gives an identication of where the component belongs in the software system Deployment Dashboard Component Editor Deployment Editor Dashboard Interaction Editor ad Component Interface Deployment Interface d Interaction Interface Component Model O Deployment Model Ei Simulation Model O Dashboard Model Interaction Editor Model az Ld SEA Ll Component Interface Deployment Interface Component Interaction Definition Editor Figure 25 Overall component diagram The description of the architechture is divided into three subsections e Deployment model A detailed description of the model e Deployment editor n extension of the chapter on the graphical user interface 5 e Simulation A detailed description of the Simulation The sections regarding the deployment model and the simulation contains and explains a subset of the complete UML class diagram The complete UML class diagram in a whole can be seen in Appendix B 6 1 Deployment model Each section will describe in more technical terms how this component works For each class in the components there will be a describtion of What does the class represent How is the component associated to other classes in the deployment e What attributes does the class have What overall methods must the class have Figure 26 shows the classes in the deployment model and their associations
30. l go under the nice to have category 5 1 Technologies The GUI shall be implemented as an Eclipse Plugin which gives us access to all the functionality in Eclipse Details on Eclipse Plugins are referred to the Seminar Paper on Eclipse The different parts of the Deployment Editor will be implemented in different ways which all are part of an Eclipse perspective which are listed below e Editor Used for resource editing and creation Will be explained in section 5 2 2 Resource Editor e View Elements that are used primarily for showing static information relating to the current editor resource See Section 5 2 1 5 2 3 5 2 4 Project Explorer Resource Properties Diagram Overview e Dialog Like a pop up window where you can set the properties of the plug in be havior or edit the properties of a resource See Section 5 3 Handbook for examples e Wizard Opens in a pop up window as well A sequence of pages which have to be filled out correctly before the actor can go on Used when creating or editing resources Examples are shown in the handbook Section 5 3 Handbook for exam ples 5 2 GUI parts This section will cover the different parts in the Deployment Editor and describe the func tion of each The Deployment Editor consists of five main parts which are shown in Figure 6 The Project Explorer Resource Editor and the Resource Properties are the three most important areas because those areas are responsible for most
31. m the domain model has been inserted where relevant a detailed description of the domain model is in Section 6 3 2 It would be nice if the simulation supports the following operations a Record all simulated steps To allow the user to view the history of the simulation b Go back and forth stepwise in a recorded simulation For example if the components at some point get into inconsistent states the user will want to find the exact step where the inconsistency occurred c Manual method of changing states in sensors and thereby cause a reaction by the complete embedded system Lets the user test different scenarios for the embedde system 3 SYSTEM FEATURES 11 Simulation algorithm Foreach bus BusRTInstance send top most message in buffer to destination port Foreach component ComponentRTInstance get the outgoing transitions of the current state Foreach transition in random order ifthe transition needs a trigger MsgPortPair check if the given port has the specified message as the top most message in the port buffer ste p Ifthe port does not have the specified message then skip to check the next transition Foreach outgoing messagePortPair MsgPortPair Create a message MessageRTInstance which hasthe current component as source and the message specified in the messagePortPair as type Foreach ingoing and outgoing connection of the port ftheconnectionis inside an ECU is not connected to a bus
32. nnec tion This is not needed if the Connection is between two PortInstances within one Node A Connection has no internal variables A Connection can be identified by it s source and target PortInstance 6 ARCHITECTURE 30 PortInstance class The PortInstance represents the socket in which the Connection is plugged into the ComponentInstance The PortInstance has associtation to e in A set of ingoing Connections from which it can receive messages out A set ot outgoing Connections to which messages can be sent e component The ComponentInstance the PortInstance is embedded on A PortIn stance is a part of a ComponentInstance definition The PortDefinition describing the type of the PortInstance The PortInstance has a buffersize that limits the amount of messages which can wait in the buffer without risk of loosing messages The PortInstance has a type that refers to a PortDefinition Bus class The Bus represents an embedded buffer which handles the transportation of messages A Bus has associations to e node A set of Nodes for which the Bus can transport messages e deployment The Deployment which the Bus is a part of e connection The set of Connections which can utilize the buffer of the Bus e component A set of ComponentInstances because the Bus has to know where to send messages The Bus has a buffersize to limit the amount of messages the Bus can contain before a risk of loosing messages is present
33. nt Title Insert component Purpose This use case describes how to insert a component into a deployment diagram Actor 1 A developer Treger A preconditions The plug in is installed started and ready to use A deployment diagram must be provided One or more component definitions should exist Action Actor 1 The developer selects a component to insert from a list of possible components The component can either be an actuator a sensor or a software component 2 The developer inserts the selected The system inserts the component into the component into the deployment diagram deployment diagram Postcondition A component has been inserted Alternative and or exceptional course of events A Insertion of a Software Component outside of an ECU The developer inserts a software component lf the developer tries to insert a software into the deployment diagram outside of an component outside of an ECU a warning is ECU shown and the software component is not inserted A USE CASES A 2 Insert bus EN preconditions The plug in is installed started and ready to use A deployment diagram must be provided 1 The developer selects a bus to insert from a list 2 The developer inserts the bus into the The system creates and inserts the bus into deployment diagram the model of the deployment diagram Postcondition A bus has been inserted Alternative and or exceptional course of events A Setting the buf
34. oper inserts the connection The system prompts the developer to select between two ports of components could be LU bus the connection should be attached two ports of the component The developer selects which bus the The system creates the connection and connection should be attached to inserts it between the two ports Postcondition A connection has been inserted between two ports of two components Alternative and or Exceptional course of events A AConnection is inserted between two incompatible ports list The developer inserts the connection If the developer tries to connect two between two ports of two components incompatible ports he is shown a warning and the connection is not created In this context incompatible means that the set of acceptable messages from the target port of the connections contains all the possible messages from the source port of the connection B AConnection is inserted between two port of two components located inside the same ECU The developer inserts the connection The system inserts the connection between between two ports of two components the two ports without prompting the located inside the same ECU developer for which bus the connection should be attached to It is not required that two components inside the same ECU connect trough a bus A USE CASES A 5 Initialize simulation Title Initialize simulation This use case describes how to initialize a simulation of a deploymen
35. ports Dashboard A dashboard is a visualization of a how a deployment would act in an actual embedded system and it allows the actor to manipulate with the deployment Deployment Editor A deployment diagram combines components created in the com ponent editor and thereby modeling an embedded system for which a simulation can be initialized ECU Electronic Computational Unit Sometimes also referred to as a CPU The com ponent that is able to perform calculations at hardware level Embedded System An embedded system is a special purpose computer system designed to perform one or a few dedicated functions often on hardware level Interaction Editor To observe interactions between components in a deployment the developers can use the interaction editor Port Components communicate with other components trough attached ports A port can have an arbitrary number of connections to other ports Sensor A component capable of detecting a specific physical property and send a message based on this property Simulator The simulator contains an algorithm which simulates the message flow be tween components and based on these messages the states of the components are changed as specified in their respective automaton Software Component A component capable of evaluating input messages through a program and based on this create one or more output messages A USE CASES 36 A Use cases A 1 Insert compone
36. r example modifying a diagram to illustrate a point 2 It would be nice to have the option to export the diagram to another format For example a picture format 4 NON FUNCTIONAL REQUIREMENTS 13 4 Non functional requirements To clearify requirements not related to the actual programming of the software system a number of requirement are identified in the following subsections 4 1 Implementation constrains The software shall be implemented as a plug in to the Eclipse framework using Eclipse build in features eg PDE SWT and JFace It is required that it is based on the following three technologies e EMF Eclipse Modeling Framework v 2 3 0 e GEF Graphical Editing Framework v 3 2 101 e GMF Graphical Modeling Framework v 2 0 1 4 2 Documentation The development shall be documented by meeting the following deliveries e Requirements specification by week 41 e System specification by week 44 e Prototype by week 46 e Prototype integration by week 48 e Final software delivery by week 51 including Test documentation Revised system specification User manual The deliveries should all comply with the specific demands of each delivery as practiced in Software Engineering 1 and Software Engineering 2 at DTU 4 3 Quality The quality insurance procedures of this project will be limited to two main areas e The insurance of quality in documentation e The insurance of quality of implementation
37. resented either as a HZWComponentInstance or a SWComponentInstance HW ComponentInstance class The HWComponentInstance represents a type of em bedded component which will be either a sensor or an actuator To enable communication to other devices the HWComponent is associated to a a number of Busses SWComponentInstance class The SWComponentlnstance represents a type of em bedded component on a Node capable of doing some computation based on input mes sages A SWComponentInstance cannot exist without being part of a Node The Node delivers the ability to execute computations Node class A Node represents an embedded source of computational power A Node has associations to e A Deployment since no Node can exist without being a part of a Deployment e A set of SWComponentInstances for which the Node supply computations e A set of Busses to enable the Node to communicate with other parts of the Deploy ment Every Node has a unique name to identify it from eventual other Nodes in the Deployment Connection class The Connection resembles an embedded connection A Connection can enable two Port nstances to exchange data A Connection has associations to e A Deployment which has the Connection since a Connection is a part of the De ployment e A source and a target PortInstance which can send and recieve messages trough this connection e An optional Bus which will act as a buffer for the flow of data through the Co
38. run on hardware and it is this hardware that is simulated by the ECU b A sensor or an actuator shall never exist within an ECU Sensors and actu ators do not use computational power It shall be possible to start a simulation on a deployment directly from the editor It should be possible to use drag and drop in the graphical editor to combine components It should be possible to undo redo operations made by the user in the graphical editor 3 SYSTEM FEATURES 10 12 It would be nice to be able to change the graphical appearance of components in the editor To make it easier for a developer to identify the purpose of components 3 2 2 Use cases The uses of the deployment editor is summed up in the use case diagram in Figure 4 Deployment diagnam Deployment Editor Simulation ah Developer bd Insert Edit Elements Components Figure 4 Deployment editor Use case diagram Each of the different use cases are described details in Appendix A 3 3 Simulator The simulator is the part of the software system where the embedded system is simu lated It simulates a deployment created in the deployment editor and it does not have a graphical interface but rely on the dashboard and interaction editor for visualization 3 3 1 Functional requirements 1 A simulation shall be able to Simulate a step forward in time A step is defined in the simulation algorithm which can be seen in Figure 5 Concepts fro
39. s using connections and busses The use of a graphical editor is intended to improve the general usability of the software Components in a deployment shall be instances of components designed in the com ponent editor Components in a deployment shall have port instances mathing the ports defined in the component definition An ECU Electronic Computational Unit shall act as a container for software com ponents A software component can be seen as a computer program and needs a host to be executed on A connection shall connect two compatible ports Two ports are compatible if the set of acceptable messages for the sending port 1s included in the set of acceptable messages for the receiving port A connection shall be attached to a bus if the connection is not between two ports within the same ECU In an embedded system busses enable communication be tween different physical devices A bus shall have a buffer A buffer represents a buffers memory a A user shall be able to determine the size of the buffer when the bus is inserted or edited It should be possible to test an embedded system with variable buffer size The developer should be able to deal with bottlenecks by supplying larger buffers There shall apply some constraints to the combination of components ECUs con nections and busses a A software component shall only exist within an ECU A software component needs to be
40. ssages messagedefinitions Initialise Figure 22 Initialize a simulation 5 3 23 How do I start a simulation of a deployment Left click on the simulation file in the project explorer and click on the Sim widget button see Figure 23 The widget opens and consists of a set of buttons which controls the simulation see Figure 24 5 USER INTERFACE 26 13 WiperSystem P 4 Draper deployment Adi Draper deployment diagram TA RainSensor componentdefinition My Switch componentdefinition Wiper componentdefinition B WiperControl deployment Md WiperControl deployment diagram lg WiperControl simulation WiperController componentdefinition L WiperControlMessages messagedefinitions Figure 23 Start the simulation widget el M Simulation Widget Group 1 it time bet t Play Pause Stop cave alt time between s Rud 5000 Figure 24 Simulation widget 6 ARCHITECTURE 27 6 Architecture The architecture is an overview of the components in the software The architecture is first described from a high level perspective with all the components of the software and their interfaces Each component will then be described in detail The architecture of the software system can be seen as eight cooperating components The eight components and their interfaces can be seen in Figure 25 The interfaces between elements have been given the name of the component that gives the
41. t We 0000000 preconditions The plug in is installed started and ready to use A deployment diagram must be provided The developer chooses to run a simulation The system executes the simulation algorithm as described in the System feature Simulation section Postcondition The simulation has been initialized 40 A USE CASES 41 A 6 Delete component ECU connection Treger A preconditions The plug in is installed started and ready to use A deployment diagram must be provided The component ECU or connection targeted for deletion must exist 2 The developer selects the component ECU or The system removes the selected component connection and deletes it ECU or connection and performs a cleanup based on the type deleted e Component All connections referring to the component is deleted if the components is attached to an ECU this reference is removed ECU All components within the ECU is deleted Connection All references to connection is removed Postcondition The selected component ECU or connection is deleted B UML CLASS DIAGRAM COMPLETE B UML class diagram Complete 42 43 B UML CLASS DIAGRAM COMPLETE unsa eweu m souejsurLHoBesSoN E abessau 1 uje uog psw A Jen L uodisep E L ul 19618 EK 39ue sul Lyuoyosuuog Y e gt Fua swou fe ino asnos 11 Bumszg edh amp uod uonoeuuoo j BOUEISUILHHOd El jueuoduioo
42. t references between the objects In the Simulation all objects are directly or indirectly contained in the S mulation object and it is therefore only necessary to store the Simulation object to ensure that the complete simulation is stored 7 GLOSSARY 35 7 Glossary Actuator A component capable of carrying out a physical task triggered by input mes sages Automaton Losely following definition from Introduction to Automata Theory Lan guages and Computation John E Hopcroft Rajeev Motwani Jefrey D Ullman Third Edition Addison Wesley 2007 In our case an automaton is an I O finite state machine Bus A bus bidirectional universal switch is a hardware device that transfers data between components CASE tool Computer aided software engineering Tool The tools that are concerned with analysis and design and with using design information to create parts or all of the software product that are most frequently thought of as CASE tools Compatability In regards to ports Two ports are compatible if the set of acceptable messages for the sending port is included in the set of acceptable messages for the receiving port Component A component can either be a Actuator a Sensor or a Software Component Component Editor The component editor 1s a graphical tool which enables the user to define and edit component types through a drag and drop interface Connection A connection between two
43. this project an embedded system consists of a number of components which can be categorized in three types e Software component A component capable of evaluating input messages through a program and based on this create one or more output messages e Actuator A hardware component capable of carrying out a physical task triggered by input messages e Sensor A hardware component capable of detecting a specific physical property and sending messages based on this property Components can be combined using connections and a combination of components is called a deployment This software system allows developers to design model these components in a component editor and combine them in a deployment editor The deployment can then be tested using a dashboard which is a visualization of a how a deployment would act in an actual embedded system and it allows the actor to manipulate the deployment To interact with the simulation the developers can use the interaction editor Both the dashboard and the interaction editor are based on an underlying simulator The simulator contains an algorithm which simulates the message flow between components and based on these messages the states of the components are changed as specified in their respective automaton The different subsystems and their associations can be seen in Figure 1 The complete software system consisting of five subsystems will be explained in details in section
44. ties in the way classes are connected with references i e When two objects are connected in within the deployment they are also connected in the simulation 6 ARCHITECTURE 32 This section will in the end describe what benefits the development will gain from using the EMF technology when implementing the simulator 6 3 1 Simulation class A Simulation object is an instance of main class of the simulation The class has a single reference deployment to the Deployment class which it is intended to simulate The Simulation is a container for all the classes relevant for a simulation and is a direct container of the following e component A set of ComponentRTInstances e bus A set of BusRT Instances e connection A set of ConnectionRT Instances The intended purpose of the Simulation is to simulate a Deployment It contains the two methods e setDefinition Initializes the simulation and creates runtime instances of all in stances in the selected deployment e simulate Uses the simulation algorithm to simulate a step This simulation algorithm is defined by the sketch in Figure 5 on page 11 e reset Resets the Simulation by emptying all buffers in BusRTInstances and PortRTInstances and sets the current state of all ComponentsRT Instances to their initial state 6 3 2 ComponentRTInstance class A ComponentRT Instance is intended to be a run time instance of a ComponentInstance therefore it has a single ref
45. which allows the actor to select multiple elements in the editor at once As for the list of components these will be listed by looking at what is created in the Component Definition Editor The actor shall then be able to insert the listed components into the left area of the editor See Handbook Section 5 3 If it increases overview or usability sets of tools can be grouped in submenus of the palette 5 2 3 Resource Properties This will be implemented as a view The view is connected to the Resource Editor and the content will be different depending on what type of element is selected in the Resource Editor The main use of the Resource Properties is as the name says to edit the properties of the different components elements in the diagram An example below could occur if a bus has been selected See Figure 9 It shall then be possible for the actor to edit such information as above for each element in the Deployment Diagram Properties can be read only and in that case will only be there for information If properties change the structure of the Deployment the change will be shown in the diagram frame 5 USER INTERFACE 18 Problems Javadoc Declaration T Properties 52 Bus auxbus HW Component Instance rainsensor HW Component Instance fro amp Connection Connection Connection Connection 2 auxbus Node ECUI Figure 9 Sketch of how the Resource Properties could look like when a bus is select

Download Pdf Manuals

image

Related Search

Here heretic hereditary hereditary angioedema heredity hereditary meaning here movie hereinafter heretic definition heresy definition hereby here comes the sun hereditary movie here\u0027s johnny hereditary hemochromatosis heretic perfume here comes the guide hereafter here i am to worship lyrics heretic movie hereditary spherocytosis hereditary angioedema treatment hereditary hemorrhagic telangiectasia here to slay heredia costa rica hereditariedade

Related Contents

LOT 2013-120  MIDIEXCAVADORAS  2. SL BAR 640 RGBW LED Luminaire Dimensions  Das Home System für Ihr Pad  

Copyright © All rights reserved.
Failed to retrieve file