Site Sponsors:
Rhapsody Examples + UML Use Cases 

Off to a Shaky Start?

This first thing to be aware of when using Rhapsody is that *it matters* how you start it! If you are using Rhapsody in C, do not start a new project in Rhapsody for C++ or Java. (The rest of that truth table is also true!)

While that observation might sound moronically simple, when completing the sample exercise (yes, they do indeed work fine!) more than a few of us have been unable to get them completed for 'unknown reasons.' If you have / are having trouble completing the sample exercises in Rhapsody, check your unit type. (Right click on the main project name in Rhapsody, then select 'Edit Unit'')

Do This First

From the main Rhapsody menu, you can also select 'Help', then 'List of Books.' Notice that from User's Guides and oh-too-much information and reference materials, there are also tutorials for each and every language of choice.

After ensuring that your 'Edit Unit' language is what is appropriate for the tutorial that you intend to complete, complete one or more of them. They work great.


Did you do the exercises? Good! You now have a 'bottom's up' view of what Rhapsody can do for you.

But wait ' Before settling into your cubicle to radiate within your newfound superpower, re-visit that 'why are we doing this' -thread from the previous blog entry. Aside from documenting what we have done (in ways that even you and I will have to struggle to understand a few months from now), how has what we have just learned changed anything? While using pictures to generate code is cool, what was all that stuff about re-use, patterns, (bla, blaa ...) and managing expectations?

Codeless Diagrams

To truly appreciate what architecture can do for you, we need to start at the top. Specifically, we need to be able to create designs that even our mothers can relate to.

Impossible you say? Well, even if you mother is not exactly Grace Hopper, the Use Case Diagram (without a doubt the top-most diagram on the UML totem-pole), can help.

Use Cases

A relative late-comer to the OMG inventory of pulp-only artifacts, Use Cases allow us to begin to define our systems in a way that everyone can understand. Buy focusing on nouns and verbs, (aka Actors and Scenarios), Use Cases allow us to capture the essence of what others will want our system(s) to do.

(click above to view)

Simple, eh? (Yes 'My Mom gets it, too.)

While there can be a lot more to completely understanding use cases in all of their trivial glory (documentation formalisms, include 'v- extend relationships, actor inventories & inheritance, etc.) there are entire books dedicated to the subject. Feel free to pick one up... or not. What we have above is all we need to know for the moment.

The nice thing about Use Cases is that we can use them to discuss anything ' and at any time.

(click above to view)

When overlapping versions and other such messages, the use of colors can help a lot.

Next: Sequence Diagrams

-Stay tuned!

[ view entry ] ( 31495 views )   |  permalink
Introduction To Modeling & Rhapsody 

Wherefore Rhapsody?

For those of you who might not know much about it, Telelogic's Rhapsody is a Model-Driven Architecture (MDA) way of bringing UML Models to life. Recently acquired by IBM, Rhapsody adds a decidedly firmware / embedded flavor to the avid C, C++, or Java developer's tool-kit.

For the new developer, tackling the list of Rhapsody-related acronyms can be a bit daunting. For example, when taken in context with task of learning a new notational convention (UML), the sheer onslaught of the most common permutations of the initial UML diagram types (Use Cases, State Charts, Activity and Sequence Diagrams) can make the chore of mastering a new RTOS on a new DSP seem trivial by comparison.

Add to that pile a list of frameworks and objected-oriented concepts (encapsulation, cohesion, coupling, design patterns, OSAL, IDF, OXF, platform adapters, and more), and many a firmware engineer will feel understandably overwhelmed. That's the bad news.

The good news is that if we tackle both UML and Rhapsody a little at a time, the entire process of both analyzing what we have to do, as well as understanding the best way to impellent our models, the overall journey can be completely logical.

Learning Curves

Having tackled the Rhapsody portion of the learning curve myself recently, I wanted to share what I have learned. The process will take a few blog posts.

Getting Started - Rhapsody

At the time of this writing, there are only two diagram types that actually generate code. While one might be tempted to focus on these types exclusively, it is massively important to realize, especially for the firmware developer, that merely using a software modeling tool does not guarantee that our designs will be any good!

While that observation might seem trite, I have been surprised at how many engineers make the mistake of viewing software models in much the same way as we might see circuit / VSAL designs. While bad circuit designs are possible, UML makes it far, far easier to shoot yourself in the foot.

Before we get started using any UML tool, we need to ask ourselves a few questions:

Question 1: Why Am I Modeling?

This first question is simple enough. What benefit does taking the time to model aNyTHinG bring to the table?

In general, using any modeling methodology allows us to:

* Analyze what we have done. (present)

* Analyze what we have to do. (future)

* Agree upon what we need to do. (triage)

* Document what we need to do. (codify)

* Discuss ways we can team-up to implement what we need to do. (maximize re-use)

Not a bad list to start. While some of those might apply to your team or project, some may not. In general, the fewer of the above activities that apply to your project, the less value we will realize from any modeling techniques (let alone UML).

Question 2: Why Am I Using Rhapsody?

In general, using Rhapsody allows us to:

* Write code in such a way so as to leverage many OO concepts.

* Use an abstract Framework to use Semaphores, Timers (etc) in a more portable way. (OXF / IDX / OSAL -v- TI / ATMEL / PIC)

* Allow our code to be moved to new platforms (via adapters), if and as required.

* Ensure that our Analysis Models are implemented properly.

* Avail ourselves of 'Rhapsody in C', a great way to generate procedural code in an object-oriented manner.

Here again, the more you can relate to the above, the more confident you should feel about this particular tool selection.

1 + 2 = ?

Here is a good bottom line: When taken together, UML and Rhapsody allow us to:

* Discover patterns that we can leverage / re-use.

* Cooperatively leverage the patterns to deploy code quicker.

* Maintain better-documented code (helps us to re-use code quicker.)

* Have a common way to manage our projects across many platforms.

* Quickly understand what others have / are doing in their code.

I plan on justifying each of those statements, as well as to show how to leverage Rhapsody to achieve each goal, over the upcoming holidays.

Stay tuned!

[ view entry ] ( 2679 views )   |  permalink
Adding Javadoc to NetBeans 

What is "Netbeans"?

Netbeans is a free Java developers environment from Sun. IMO is is much easier to use than Eclipse.

The best part of the deal is that NetBeans is 100% free. If you are new to Java Software Development, NetBeans is a great place to start before you upgrade to a professional IDE like JBuilder.


Once NetBeans is installed, most folks also want to install the on-line help for Java.

For the perplexed, to install the Java documentation (know as JavaDoc) all we have to do is:

(a) Download the official JDK docs from

(b) Unzip the doc into the JDK directory (on MS Windows, mine was under C:\Sun\SDK\jdk)

(c) From the main NetBeans Menu, select "Tools | Java Platform Manager".

(d) Select the platform you need to Javadoc in the left side of the Platform Manager.

(e) Click the Javadoc tab. Select Add ZIP/Folder. Type in the directory location of the newly unziped Javadoc files.

(f) Close the Dialog. Your changes will be saved automatically.


The hardest part can be finding the proper version of the help files you need. If you were looking for JavaHelp on version 1.5, then try

[ view entry ] ( 2840 views )   |  permalink  |  related link

<<First <Back | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |