Using RoboCode to experiment with the Embedlet codebase has turned out to be a
good idea so far. I am in the process of making a JAPL RobotScanner peripheral
which will be used to allow an Embedlet to monitor/control the robot scanning
subsystem of the robot it is inside of.
Currently the Embedlets architecture discussion document shows an Embedlet
holding a reference to the JAPL peripheral it is interested in and so far this
ideas is working out well. The current problem I am having, however, is how
does one send JAPL events to an Embedlet?
My first thought was to use a JaplEventListener interface that Embedlets can
implement and then the Embedlet instance in question can register as an event
listener to the JAPL device it has a reference to. But of course the state of
an Embedlet is held within a ComponentContext object so how does one register a
ComponentContext object instance as a listener to JAPL events?
Ted
__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
|