From RTSC-Pedia

Jump to: navigation, search
revision tip
—— LANDSCAPE orientation
[printable version]  [offline version]offline version generated on 04-Aug-2010 21:08 UTC

RTSC Packaging Primer

Producing and consuming packaged content

This Primer puts RTSC packages front-and-center. Initially focusing on how you (playing the role of "client") would consume content delivered as RTSC packages within your programming environment, we'll eventually explain how you (playing the role of "supplier") could just as easily produce RTSC packages that would house your own programmatic content—consumed in turn by others as part of a larger RTSC application.

Along the way, the Primer will introduce two special-purpose languages which (working hand-in-hand with standard C) create a synergistic blending of programming capabilities that RTSC terms eXpanDed  C:

  • XDCspec serves as RTSC's specification language—used here to define the programmatic boundaries of packages and their content as a formal contract between client and supplier; and

  • XDCscript serves as RTSC's meta-language—used here by suppliers/clients to programmatically control host-based processes for producing/consuming packaged content throughout its life-cycle.

Acknowledging general industry trends towards fielding flexible, re-usable software components—but also recognizing the challenges of achieving these ideals with C alone—the eXpanDed  C model exemplified throughout the Primer effectively takes ever-familiar processes of building and running C programs to entirely new heights.

With C (still!) serving as the implementation language of choice for resource-constrained embedded systems, an overarching objective of RTSC becomes introducing higher-level programmatic constructs not found in the standard C language—such as packages—which ultimately enable embedded software developers to efficiently and effectively manage ever-more complex and sophisticated applications.

Contents

Who's the audience

Needless to say, we assume you know C. But we also assume you're a software practitioner quite comfortable with the overall flow of building and running C programs—especially on embedded hardware platforms. At the end of the day, RTSC starts with concepts and processes already familiar to C programmers—and then takes these to an entirely new level.

We don't, however, expect you've had any prior experience (or even exposure) to object-oriented programming using languages such as C++ or Java; and we certainly don't presume any knowledge of software components from an academic perspective. By the same token, those of you with some general background in modern software design techniques should find many of the principles underlying RTSC in general (and packaging in particular) familiar, natural, and almost obvious.

But as we've already said, RTSC starts and ends with C. For embedded C programmers who often ask "what's next" as their applications grow ever larger and more complex—and who recognize a growing gap between C and more modern programming languages like Java—RTSC may fill an important void for you.

What we'll cover

We've structured the Primer as a series of lessons that successively build upon one another, constantly reiterating and reinforcing concepts and idioms fundamental to producing and consuming RTSC packages and their content.

Lesson 0 Getting started — installing examples and tools
Lesson 1 Basic concepts — deploying the acme.utils package
Lesson 2 Repository management — deploying charlie_mathsuite_2_71
Lesson 3 Client Applications — consuming deployed package content
Lesson 4 Elementary Packages — producing charlie.sqrtlib.samples
Lesson 5 Package Build — compiling charlie.sqrtlib libraries
Lesson 6 Package Release — manufacturing charlie.sqrtlib archives
Lesson 7 Program Configuration — selecting charlie.sqrtlib libraries
Lesson 8 Package Test — managing a charlie.sqrtlib test suite
Lesson 9 Product Bundles — producing charlie_mathsuite_2_71
Lesson 10 Next steps — Learning more about RTSC

Except for the first and last lesson, the remaining lessons each center around small self-contained examples that illustrate common programming idioms used when producing or consuming any RTSC package. Lessons 1-3 initially focus on the client perspective of a package, covering the basics of installing and deploying RTSC packages as well as general programming patterns used when consuming C-based content (headers and libraries) delivered therein.

Lesson 4 switches gears, focusing now on RTSC packages from the supplier's perspective using the simplest of all packages as an illustration. Lessons 5-8 then address on one of real "sweet-spots" of RTSC—packaging C language headers and libraries that we can build, test, release, deliver, and deploy as an indivisible unit. Last but not least, Lesson 9 takes up the all-important topic of aggregating multiple RTSC packages into a single product bundle.

How to proceed

Iteratively.... This Primer actually packs quite a bit of (new) information inside each successive lesson, warranting several passes through the material. Start by simply navigating from one lesson to the next, picking up what you can by quickly skimming the content. And even when you circle back for a more thorough reading of each lesson, don't feel compelled to run any of the programming examples at that time—you can always operate in "read-only" mode and still learn quite a bit about the process of producing and consuming RTSC packages.

You might also find it helpful to slice the Primer into several pieces, first tackling the material in Lessons 1-3 on the client's view of RTSC packages before moving on to the supplier's perspective in Lesson 4-9; you should also pay particular attention to the fundamentals of package production laid out in Lessons 4 and 5 before diving into the more advanced material that follows. Having said all of this, we do not recommend skipping any of the latter lessons within the Primer:  producing robust RTSC packages that deliver programmatic content is simply too important—and too easy—for you not to master.

Though we've made the examples available as a separate download, you can generally just "copy-and-paste" source code fragments directly off the page:

prog.c
1
 
 
 
2
 
 
#include <stdio.h>
 
int main()
{
    printf("Hello World\n");
    return 0;
}

Throughout the lessons, we'll refer to individual lines in these examples using symbols like 1 or 2. Besides matching the corresponding labels tagging the example code, these symbols serve as live links that will return you to the original example should it have already scrolled off the screen.

FYI.... We'll occasionally interject some additional commentary on the material at hand in this format, usually providing deeper insights into a particular aspect of RTSC. In some cases, these inline comments provide a glimpse into the larger world of RTSC programming for which this Primer will prepare you.

And finally, other than resources listed in a See also section at end of each Lesson, you'll find virtually no links to other RTSC-Pedia documents until the final Lesson; we just want you to stay focused on the material at hand before jumping off elsewhere. If you are, however, looking for an overview of RTSC from 10,000 feet—something to read before hitting the ground—our Introducing RTSC white-paper should satisfy you. Else, if you're a C programmer ready to produce and consume some RTSC packages, proceed onward.

See also

Introducing RTSC Learning about Real-Time Software Components
High-Level FAQs General questions about Real-Time Software Components

[printable version]  [offline version]offline version generated on 04-Aug-2010 21:08 UTC
Copyright © 2008 The Eclipse Foundation. All Rights Reserved
Views
Personal tools
package reference