Yes, you can get to the attributes and ports in the initialize()  
method (they're set up in the preinitialize() method, so I think  
initialize() is as soon as you can use them. Tokens, though, should  
all be sent after all actors have been fully initialized, so I don't  
think there's anything before the fire() method that you can do with  
tokens. I've attached an example below:

        @Override
        public void initialize() throws IllegalActionException {
                super.initialize();
                for (Object portObj : this.portList()) {
                        IOPort port = (IOPort) portObj;
                        System.out.println("port = " + port);
                }
                for (Object attObj : this.attributeList()) {
                        Attribute att = (Attribute) attObj;
                        System.out.println("attribute = " + att);
                }
        }

- Sean

On Aug 9, 2010, at 10:46 AM, Jamnagarwala, Arwa Mohmadi wrote:

> Hi All,
>
> Is there a way I can get the list of ports and parameters (and  
> possibly their tokens ) before the actor's fire() method ?
>
> Thanks!
> Arwa
>
>
>
> _______________________________________________
> Kepler-users mailing list
> Kepler-users at kepler-project.org
> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users

Reply via email to