CCA Wiki
CCA Software Resources
Menu [hide]

ComponentsAsPortCollections

print PDF
This is an area Ben and Craig noodled on a lot.
Version 0: static ports used and provided (name and type of each)
Improvement 1: dynamic ports used and provided (name and type of each)
Improvement 2: service ports provided (same type, multiple instances naming pattern)
Improvement 3: indicate delegation or direct (sidl inheritance) implementation

Put examples here.

Example 1. Goal, provide enough information to create setServices for the MonteCarloIntegrator? component.

// TODO
// 1. We need to specify a way to add namespaces.
// 2. We need bundle/package specification
// a. Need language/binding information for component instance.
// b. Need path information to input and output files.

component MonteCarloIntegrator?
{
uses Function as linear_function;
uses Function as cos_function;
uses RandomNumber? as random;
provides Integrator monte_carlo;
}

port Integrator
{
double integrate(double lowerBound, double upperBound, int count);
}

port Function
{
double evaluate(double x);
}

port RandomNumber?
{
double getRandomNumber( );
}

Created by: baallan last modification: Thursday 26 of October, 2006 [06:41:47 UTC] by mjsottile


Online users
17 online users