The Component Architecture

Seesoa Project

Presentation Siemens 04/04/02

Contact: werner.van.belle@vub.ac.be

david.urting@cs.kuleuven.ac.be

Requirement of Embedded Systems

Real Time Requirements

Concurrent Tasks

Small Memory Footprint

Different Processors

Reusable Small Components

Components Runtime

Can send messages to other components by means of ports

Have their own code & data space

Message sending is asynchronously

Reactive

Have their own 'virtual' thread of execution

Component Documentation

XML description of the messages (syntactic)

MSC which describes the required and provided control flow (semantic)

Textual description which documents the usage

Quality of service

Timing constraints/ required & provided

Memory constraints/ required & provided

Synchronisation description (???)

Locking interface

Transaction interface

Runtime Environment

Handles messages

Offers a naming service

Schedules threads

Tool Support

Precompiler

Converts .component to .java

Allows extraction of MSC's from the code

Better documentation

Writing components

Use componentclass

Componentclass Httpd

{

public Httpd(String name)

{super(name);}

}

Ports

A port is an entry point in a component where messagesw are received and messages can be send over

Ports can be mapped upon other objects

Multiports allows multiple connections

componentclass Httpd

{

port a;

multiport b;

...

}

Handling Messages

The CS takes care of delivery, we only have to implement the messages Html, HtmlDone, GenerateHtml

The 'port' identifier is the port over which the message came

The 'inmessage' identifier is the message which came in

componentclass Httpd

{

message Html()

message HtmlDone()

message RespondTo()

}

Retrieving Arguments

Message methods doesn't take any parameters. To retrieve the arguments use the <> notation.

componentclass Httpd

{...

message Html()

{System.out.println(<Data>)}

...}

Sending Messages

To contact another component the Httpd can send a message to another component using the special .. Notation

...{...

message RespondTo()

{dispatcher(URL)..GenerateHtml(<Url:URL>);}

...}

Connection

Connections are created between ports.

Connections are set up by the component system

Connections are rerouted by the componentsystem at the moment two ports proxies another port.

A good rule is to create all connections in one component.

This aliassing is a very important feature. This make glue-components possible.

A Simple Adaptor

componentclass adaptor

{

port left;

port right;

message handleMessage()

{

if (port==left)

right.sendMessage(inmessage);

else if (port==right)

right.sendMessage(inmessage);

}

}

Session Tracing

We can trace sessions by passing virtual information along with the >< notation

...{...

message RespondTo()

{dispatcher(URL)..GenerateHtml(

<Url:URL>,

>Socket:<Socket><);}

...}

Messages

Either

Actually copy them

When passing them by value make them read-only for sender and receiver

Messages should act as if they are passed by copy.

Advantages of Using a CS

Glue components can be written easily

Connections are set up at runtime

Depending on the processor multiple threads can be used

Runtime Constraints can be checked

Scheduling can be domain-dependent

Debugging/Profiling plugins

Very light weight

Werner Van Belle

2002-03-29T16:29:39