rational rhapsody workflow integration with visual studio

Post on 14-Apr-2017

314 Views

Category:

Software

10 Downloads

Preview:

Click to see full reader

TRANSCRIPT

IBM Rational Rhapsody and Visual Studio

Rhapsody and Visual Studio Workflow Integration

Frank Braun,

Managing Partner EVOCEAN Deutschland GmbH

2 - © EVOCEAN www.evocean.com

Visual Studio Rhapsody Plug-In

The Rhapsody Visual Studio plugin provides a tight Workflow

integration with Microsoft Visual Studio, simplifying and automating

the integration between the two.

The Features are:

• Create a Visual Studio Project within Rhapsody.

• Export Visual Studio solution to Rhapsody.

• Dynamic Model to Code synchronisation. - Rhapsody Model and Visual

Studio code are in Synch.

• Navigate from Rhapsody Model to Source Code in Visual Studio.

• Navigate from Source Code in Visual Studio to the model in Rhapsody.

3 - © EVOCEAN www.evocean.com

Hands-On

In the upcoming slides we’re going through the following topics:

• Create a Visual Studio Project within Rhapsody.

• Generate Code into the Visual Studio Project.

• Change Rhapsody model and Change Source Code in Visual Studio to

demonstrate Dynamic Model to Code synchronisation.

• Navigate from Rhapsody Model element to Source Code in Visual Studio.

• Navigate from Source Code in Visual Studio to Model element in

Rhapsody.

• Build Rhapsody Application in Visual Studio.

• Launch Application and perform Sourcelevel-debugging in Visual Studio.

4 - © EVOCEAN www.evocean.com

Create Visual Studio Project inside Rhapsody

Right Click on the Configuration and select Change to->Visual Studio

Configuration, then press Yes> to launch the VS new Project Wizard:

The Visual Studio New Project Wizard

appears:

• Select Win32 and Win32Console

Application, provide a name for the

Project then press OK>

5 - © EVOCEAN www.evocean.com

Configure Visual Studio Project

In the upcoming Application Wizard

press Next>

If no precompiled headers like StdAfx.h are required simply

select on Empty project then press

Finish>

6 - © EVOCEAN www.evocean.com

Connected Visual Studio Project

We have created an empty Visual Studio project.

• Note the Rhapsody Toolbar in the Visual Studio environment.

The Source Code of the

Rhapsody model is not yet

visible in Visual Studio.

We need to re-generate it first

inside Rhapsody.

7 - © EVOCEAN www.evocean.com

Generate code into Visual Studio Project

In Rhapsody press CTRL+F7 or select

Code->Generate->(NameofConfiuration)

Observe the log in the Rhapsody Output

window

Check your generated and added sources in

Visual Studio

8 - © EVOCEAN www.evocean.com

• In the IDE Tab of the Features dialog note, that this configuration is connected to

Visual Studio and observe the additional options:

Rhapsody Visual Studio Configuration

In Rhapsody observe the Configuration. It became a

Visual Studio Configuration.

The Property Enable Debug Integration (Debugger synchronisation between Rhapsody- and IDE Debugger) is not supported with Visual Studio

9 - © EVOCEAN www.evocean.com

Navigate from Rhapsody to Visual Studio

In Rhapsody right click a model element to navigate to the Source Code in

Visual Studio:

10 - © EVOCEAN www.evocean.com

Use Visual Studio Code Editor

In the Visual Studio Editor you can now change the code, add Operations,

Attributes, write implementation code etc. and also benefit from the Visual

Studio auto code complete function:

11 - © EVOCEAN www.evocean.com

Navigate from Visual Studio to Rhapsody

From the Source Code in Visual Studio you can directly navigate to the

corresponding model element in Rhapsody:

12 - © EVOCEAN www.evocean.com

Build Model

Launch the build process either in Rhapsody or Visual Studio by

pressing Make

In both cases the build process will be performed inside Visual Studio, if Build configuration in IDE is set,

13 - © EVOCEAN www.evocean.com

Run Application – Set Source Level Breakpoint

In Visual Studio you can start the

Application with or without

Debugging.

If Animation is switched on then

also press the Go> Button in the

Rhapsody animation toolbar.

Right click in the Visual Studio

Editor to create a Source level

Breakpoint.

14 - © EVOCEAN www.evocean.com

Source Level Debug Application

All Visual Studio debug features are available and at your disposal ;-)

Trouble Shooting

16 - © EVOCEAN www.evocean.com

Problem:

• Change to -> Visual Studio Configuration results in Error:

Solution:

• In Visual Studio make sure that Rhapsody Plugin is installed

• In Rhapsody make sure that the right Visual Studio Version is selected.

Failed to connect

17 - © EVOCEAN www.evocean.com

Problem

• Linker throws Error:

LNK2019: Unresolved external symbol in function _tmain

Solution

• In Rhapsody at Project Level change property CPP_CG::MSVC::EntryPoint from

_tmain to main.

Linker Error

18 - © EVOCEAN www.evocean.com

THANK YOU

Are you interested in a specific topic ?

Send an Email to:

Rhapsody@evocean.com

Want to receive our newsletter ?

Send “Newsletter” to

Info@evocean.com

19 - © EVOCEAN www.evocean.com

Interested in more…?

We periodically run the following Training Courses:

• IBM Rhapsody in C and C++ Training Course with UML (4 days)

• EVOCEAN Rhapsody in C++ Training Course with RaspberryPi (3 days)

• Rhapsody for System Engineers with SysML (4 days)

• Rhapsody MDSE with SysML ToolTraining (2 days)

Visit: www.evocean.com/events

World-Wide !

Project Support, In-house Trainings / Trainings in

Rhapsody in Autosar, Ada or Java , Design Manager ?

Send request to : info@evocean.com

top related