Re: [Embedlets-dev] JAPL callback experiment update
Status: Alpha
Brought to you by:
tkosan
|
From: Brill P. <bri...@ro...> - 2003-03-28 14:22:17
|
For an embedlet event;
Is there a list of Type ID's? Or can I use a JAPL event/action id instead?
For instance, I've got a TiniPortEmbedlet which controls the 8 bit Port on a
tini. Unfortunately the Dallas implementation is not very good and it have
no direction, polarity etc... however you can set it's value :)
So, I need to know if the event I've received is a polarity, direction or
value event.
Also, how would the port be read? I can receive an event telling the port to
change its value, but how would the remote app request the value from the
embedlet? (it looks to me as If I would have to receive a "get value" event,
then generate my own event listing the value.
- Brill Pappin
----- Original Message -----
From: "Ted Kosan" <tk...@ya...>
To: <emb...@li...>
Sent: Thursday, March 27, 2003 1:48 AM
Subject: [Embedlets-dev] JAPL callback experiment update
> Topic tags:[ARCH][JAPL][WIRING][DOCS][MGMT][STRATEGY][NEWBIE]
> _______________________________________________
>
> I have continued experimenting with having a JAPL peripheral use a simple
> callback to send information asynchronously back to the Embedlet that has
a
> reference to it and here is what I have come up with so far.
>
> 1) Have the Embedlet use a class variable to hold a reference to each
JAPL
> peripheral that it is interested in.
>
> 2) Have all JAPL event listeners implement the following interface if
they are
> interested in receiving JAPL events:
>
> package org.japl;
>
> public interface JaplEventListener
> {
> void receiveJaplEvent(Object japlEvent);
> }//end method
>
> 3) Create an inner class inside of the Embedlet called JaplListener and
have
> it implement the JaplEventListener interface. Have the Embedlet hold a
static
> singleton reference to this JaplListener.
>
> 4) Place public static setters and getters inside of the Embedlet so that
the
> JAPL peripherals can be set and obtained and also so that the JaplListener
> singleton instance can be obtained.
>
>
> The main difficulty that I have encountered so far is when to pass in the
> instances of the JAPL peripherals to the Embedlet (and also getting a
reference
> to the Embedlets JaplListener singleton so that it can be placed in the
JAPL
> peripheral's listener list). Right now I am kind of hacking this part
together
> by doing this after the outpost container has been started but this is
> definitely risky and a better technique must be available.
>
> Anyway, for the most part, the above configuration seems to work well and
I
> currently have a JaplScanner peripheral sending events into a
ScannerEmbedlet
> using a callback and then the ScannerEmbedlet controls the firing of the
tank
> cannon using a JaplCannon peripheral (right now the SittingDuck test robot
that
> comes with RoboCode is getting the snot knocked out of it by my
EmbedletBot!).
>
> My next step is to have the ScannerEmbedlet do some processing on the JAPL
> robot scanned event and then to publish this information into the
container. A
> FireControllerEmbedlet will then be created which will subscribe to this
event
> along with a ManeuversEmbedlet. More Embedlets should follow from here...
>
> RoboCode is certainly turning out to be a great way to exercise the
Embedlet
> Container in an intense, easily-deployed-to realtime environment.
>
>
> Ted
>
>
> PS, after looking through the Outpost code is it clear that each Embedlet
> receives its own conventional Embedlet instance along with its own
> ComponentContext object.
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by:
> The Definitive IT and Networking Event. Be There!
> NetWorld+Interop Las Vegas 2003 -- Register today!
> http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
> _______________________________________________
> Embedlets-developer mailing list
> Emb...@li...
> https://lists.sourceforge.net/lists/listinfo/embedlets-developer
>
|