On Sat, May 9, 2009 at 5:12 PM, Staz . <[email protected]> wrote: > By the way, Niclas, you wrote: > >> 5. The ControlProgrammer can modify the ControlProgram, by requesting >> the Controllers as ProgrammableControllers (i.e. WorldObjects). It is >> the same underlying entity state, and the ControlProgrammer have now >> access to make Wiring changes. It can also query for what >> Inputs/Outputs and Parameters(see below) are available. >> <snip> >> 8. A third role on the Controllers is the QueryableController, which >> basically allows you to retrieve the internal state of the Controller >> for display purposes. > > Is it possible to do something along the lines: > > QueryableController qc = <some way of obtaining a queryable controller>; > ProgrammableController pc = (ProgrammableController)((Object)qc); > > Basically, is controller same instance, passed around by different reference > types?
Not sure what you mean. QueryableController only means in my context that the client can request the internal state, normally not seen by other roles. For instance; A Regulator can be implemented with several algorithms. The ControlProgram doesn't care what the algorithm is or what the arguments for the algorithm are. Those are viewed and set as parameters via a QueryableController role. Since my controllers are aggregated entities, as part of ControlProgram, I can't query for them directly in Qi4j. Cheers -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/2qq9er I work here; http://tinyurl.com/2ymelc I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

