[kepler-dev] Retrieving all the actors available for particular Kepler installation

Michal Owsiak michalo at man.poznan.pl
Sat Sep 14 11:41:44 PDT 2013


Thanks for the info.

I will take a look at this and let you know whether this solves my issue.

Cheers
> 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
>>
>
>



More information about the Kepler-dev mailing list