SWD Software Ltd. - официальный дистрибьютор QNX на территории России и стран бывшего СССР Операционная система реального времени QNX
Инструменты для создания надёжных встраиваемых систем и
интеллектуальных устройств любой сложности
QNX Software Systems - разработчик встраиваемой операционной системы QNX
  Стандартная версия

Rhapsody in C Basic Rhapsody

Overview
Agenda
Objectives
Setting Up Rhapsody
Before We Start

Exercise 1 : Hello World

Creating a Project
The Browser
Drawing a Class
Remove from View / Delete from Model
Adding an Initializer
Display Options
Display Initializer (Constructor)
Adding an Implementation
#include
Renaming a Component
The Test Component
Initial Instance
Settings
Renaming our OMD
Generating Code
Hello World
The Generated Files
Editing the Code
The generated code
Auto generated operations
What’s this “me” pointer?
Modifying the Code
Displaying the Main and Make
Project Files
Extended Exercise
Customize

Exercise 2 : Count Down

Copying a Project
Adding an Attribute
The generated code
Additional code for an attribute
What’s an Accessor and a Mutator?
Attribute Visibility in C
Adding an operation
Arguments for operation print()
Adding Implementation
Operation printStr(char *)
Operation isDone()
Active Code View
Generated code
Using the print operation
Adding a Statechart
Editing a Statechart
Completing the Statechart
Transitions
The Timer Mechanism
Timeouts
Counting Down
Statechart Symbol
Generated Code : Display.h
Generated Code : Display.c
Virtual Table
Extended Exercise
Design Level Debugging
Animation
Multiple Configurations
Animating
Animation Tool Bar
Starting the Animation
Animated Browser
Animated Statechart
Go Idle / Go
Destructor
Sequence Diagram
Adding Instances
Drawing a Sequence Diagram
Animated Sequence Diagram
Extended Exercises

Properties

Properties Hierarchy
Project Properties
Properties View
A Useful Property
Overridden Properties
General::Graphics::MaintainWindowContent
Create and Destroy Operations
Overridden Properties
Locally overridden properties
Site.prp / SiteC.prp
Extended Exercise

Advanced Drawing Capabilities

Aligning Items to Common Edge

Exercise 3 : Dishwasher

Dishwasher
Attributes
Operations
Types
Creating a Component
Save / Generate / Make
Creating a Statechart
Creating Concurrent States
Naming the Concurrent States
Adding Nested States
Adding History and Diagram Connectors
Adding Default Transitions
Adding the Transitions
Action on Entry
Save / Generate / Make / Run
Animated Statechart
Injecting Events
Design Level Debugging
Intense / Quick
Extended Exercise
Breakpoints
Using the Simulated Time Model
Simulating
The Command Prompt
Creating a Test Script
TestScript.cfg
Script Contents
The Script
Running the Script
Reading TestScript.log
Events & Receptions
Extended Exercise

Exercise 4 : Dishwasher System

Aggregation & Association
Directed Aggregation
Role Names
The Motor Class
itsMotor
Motor_on() / Motor_off()
The FrontPanel
evKeyPress
Operation processKey()
CGEN macro
Instances
Solution 1: Initial instances
Solution 2 : Global Instances
Solution 3 : Composition
Solution 4 : Structured Class
DishwasherBuilder
Objects
Links
Component
Checking that the Relations are Initialized
Pressing a key
Generating a web page
«Web Managed»
Hyperlink
http://localhost/
Turning the Motor into an Interface Class
Interface Class
Realizing the Motor
Implementing the Base Class

Using the Derived class
Link
Running with the AC Motor
Realization of an interface class
Extended Exercise