Doug Abbott - Embedded Linux development using Eclipse

Здесь есть возможность читать онлайн «Doug Abbott - Embedded Linux development using Eclipse» весь текст электронной книги совершенно бесплатно (целиком полную версию без сокращений). В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Год выпуска: 2009, ISBN: 2009, Издательство: Elsevier, Жанр: Программирование, ОС и Сети, Программы, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

Embedded Linux development using Eclipse: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Embedded Linux development using Eclipse»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

• Details the Eclipse Integrated Development Environment (IDE) essential to streamlining your embedded development process
• Overview of the latest C/C++ Development toolkit
• Includes case studies of eclipse use including Monta Vista, LynuxWorks, and WindRiver

Embedded Linux development using Eclipse — читать онлайн бесплатно полную книгу (весь текст) целиком

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Embedded Linux development using Eclipse», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

○ Communication diagram

○ Interaction overview diagram

○ Sequence diagram

○ Timing diagram

Clearly then, the role of an Eclipse UML plug-in is to facilitate creating these diagrams and documenting the properties associated with them. UML is not tied to any specific programming language or software development methodology, although it is very much object-oriented and thus is a natural fit for Java and C++.

This chapter can only skim the surface of UML itself. The objective here is to show how a UML editor works in the context of Eclipse. The Resources section at the end of the chapter lists some resources for UML.

It should be noted that issues of modeling are also being addressed by the Eclipse organization itself through the Eclipse Modeling Framework project (EMF). EMF is described as a modeling framework and code generation facility for building tools and other applications based on a structured data model. For the time being anyway, EMF is primarily oriented toward Java programmers and so may not be particularly useful for embedded developers.

8.1.1 Installing Omondo EclipseUML

Eclipse.org does not itself have a complete UML plug-in. Instead, we’ll use a free plugin offered by Omondo, a UML tool vendor. EclipseUML Free Edition supports all UML 2.1 diagrams and is a good package for exploring what UML is all about.

The EclipseUML download page is: http://www.eclipsedownload.com/download_free_eclipse_3.3.html. There are three distributions available. For our purposes, the correct one is the EclipseUML Free Installer for Windows and Linux. It’s a jar file. Download it to your workstation.

Make sure Eclipse is not running, and in a shell window execute: [11] Be aware, of course, that the file name may change.

java –jar eclipseUML_E330_2007_freeEdition_3.3.0.v20071210.jar

This brings up an installation dialog. The first step is to select a language and click OK. Click Nextto exit the welcome screen. The next screen is a little confusing in its description of system requirements. It says that three Eclipse plug-ins are required for EclipseUML and implies that one of them, Graphical Editor Framework, is included. In fact, all three of the required plug-ins are included.

Click Nextand accept the license terms. The next screen shows your Eclipse installation path. Click Nextagain. This brings up the configuration screen of Figure 8.1. Leave all six items checked. Click Nextand the installation begins. The installer creates an uninstall script should you wish to remove EclipseUML later.

Figure 81 EclipseUML configuration screen To confirm that the installation - фото 119

Figure 8.1: EclipseUML configuration screen.

To confirm that the installation succeeded, select Window→Preferences. UML should show up in the left-hand navigation panel.

8.1.2 UML Example

Our example for working with UML is a classic embedded control application: an elevator. The problem is to implement the logic required to move the elevator between floors in response to user requests [12] The example was derived from this web page: http://www.geocities.com/siliconvalley/network/1582/uml-example.htm/. . The elevator operates as follows:

• Each elevator has a set of m buttons, one for each floor. These illuminate when pressed and cause the elevator to move to the corresponding floor. The illumination is canceled when the elevator reaches the corresponding floor.

• Each floor, except the bottom and top floors, has two buttons: one to request an “up” elevator, and one to request a “down” elevator. These buttons illuminate when pressed. The illumination is canceled when the elevator visits the floor and is moving in the requested direction.

• When the elevator has no requests pending, it remains at its current floor with the doors closed.

To begin, we’ll need to create a Java project. The reason for starting out in Java is simply that UML tools seem much better integrated with Java. Change to the Java perspective and select File→New→Java Project. Name the project “elevator” and accept the defaults. Accept the defaults on the next screen and click Finish.

Expand the newly created elevator project and notice that there’s an src/directory under it. Right-click the src/directory and select New→Package. Name it “elevator” as well. The UML diagram files you will be creating can go anywhere. I suggest creating a new directory under the project to store them. With the elevator project selected in the Package Explorer view, select New→Folderand call it “models.” The project structure should now look like Figure 8.2.

Figure 82 Java project structure for UML 813 Use Case Diagram The first - фото 120

Figure 8.2: Java project structure for UML.

8.1.3 Use Case Diagram

The first UML diagram we’ll tackle is the use case. The role of the use case is to describe how an actor interacts with the system. It provides a generalized description of how the system will be used. In this case the actor is a passenger desiring to use the elevator.

The elevator system goes through a process something like this:

1. Passenger presses up or down button. Button illuminates.

2. Elevator detects button pressed and moves to passenger’s floor.

3. Doors open. Up/down button illumination turns off.

4. Passenger gets in and presses a floor button. Button illuminates.

5. Doors close.

6. Elevator moves to destination floor.

7. Doors open. Floor button illumination turns off.

8. Passenger gets out. Doors close.

Right-click on the elevator package and select New UML Diagram→UML Use Case Diagram. The suggested file name is elevatorUseCaseDiagram.uud. I chose to delete the elevator part. Select the models/ directory and click Finishto bring up the Use Case editor. Figure 8.3 shows the editor’s toolbar. The icons, starting from the left, are:

• Selection mode

• Zoom mode

• Create an actor

• Create a use case

• Create a system

• Add a generalization

• Add an includes

• Add an extends

• Add an association

• Create a package

• Create an indication

• Create a note

• Create a diagram link

• Create a text label

Figure 83 Use Case editor tool bar Lets start by creating an actor Click - фото 121

Figure 8.3: Use Case editor tool bar.

Let’s start by creating an actor. Click the Create an actoricon to bring up the Create an actor dialog. Name it “passenger.” The New Stereotypebutton in the dialog is a way of clarifying the role of the actor. For now, leave it blank. Click OKand the passenger shows up in the editor window (Figure 8.4).

Figure 84 The passenger actor Next lets add a use case Click Create a use - фото 122

Figure 8.4: The passenger actor.

Next, let’s add a use case. Click Create a use caseand name it “Press up/down button.” The use case dialog contains five tabs, the first four of which take free-form text input. In the Propertiestab, Abstractmeans a use case is not complete, but depends on other use cases. Pre conditionis the system state before the use case is called, and Post conditionis its state after this use case is called (Figure 8.5).

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «Embedded Linux development using Eclipse»

Представляем Вашему вниманию похожие книги на «Embedded Linux development using Eclipse» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «Embedded Linux development using Eclipse»

Обсуждение, отзывы о книге «Embedded Linux development using Eclipse» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x