Hi Michal,

I know how it is done in Ptolemy II, and the same techniques should work with Kepler.

The set of actors that are available are determined by ptolemy.actor.gui.Configuration.

If a model is running in a system that has a Configuration, then to get the Configuration:

<p>To access the configuration from a random place, if you have a
 NamedObj <code>foo</code>, then you can call:
 <pre>
 Effigy effigy = Configuration.findEffigy(foo.toplevel());
 Configuration configuration = effigy.toplevel();
 </pre>

Configuration.check() traverses the configuration for various tests, below are some fragments from it:

        // Check TypedAtomicActors and Attributes
        Iterator containedObjects = deepNamedObjList().iterator();
        while (containedObjects.hasNext()) {
            NamedObj containedObject = (NamedObj) containedObjects.next();
Or, to get just the composites:

for (CompositeEntity composite : deepCompositeEntityList()) {

or
        // Check atomic actors for clone problems related to types
        List entityList = allAtomicEntityList();
        Iterator entities = entityList.iterator();
        while (entities.hasNext()) {
            Object entity = entities.next();
            if (entity instanceof TypedAtomicActor) {

See ptolemy/configs/test/allConfigs.tcl for tests that read the various configurations and perform tests on them.

See https://kepler-project.org/developers/reference/what-happens-when-kepler-starts-up for information about how Kepler starts up and which configuration is read.

There is a chance that Kepler's database adds actors that are not accessible via the configuration.


_Christopher



On 9/13/13 1:45 AM, Michal Owsiak wrote:
Hi,

I have question regarding the list of actors available inside particular Kepler installation.

Let's assume that I have Kepler installation (default one) and I want to list all the actors that are available inside Kepler (the list you can see on the left where actors can be searched for).

Is there any way to retrieve this list? Is there any Kepler API for this task? Can I find this information inside Kepler's DB or inside cache system?

Thanks in advance for the info.

Michal



--
Christopher Brooks, PMP                       University of California
Academic Program Manager & Software Engineer  US Mail: 337 Cory Hall
CHESS/iCyPhy/Ptolemy/TerraSwarm               Berkeley, CA 94720-1774
[email protected], 707.332.0670           (Office: 545Q Cory)

_______________________________________________
Kepler-dev mailing list
[email protected]
http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev

Reply via email to