[j-sim-users] Accessing node's caracteristics from application
community help
helpcomm at yahoo.com
Tue Oct 10 06:00:35 CDT 2006
Hi sam,
Thank you for your answer.
But AppLayerObject is not recognized as a valid class
in tcl. I looked for it in the j-sim API, and didn't
find it.
--- Wesam Haboush <wsh3 at kent.ac.uk> wrote:
> You should be able to do it if you set a variable in
> the application layer
> to point to the energyModel component. You have to
> create the method
> obviously. Something like:
>
> ! AppLayerObject setEnergyModel em
>
>
> Of course this is in TCL, and then you can write
> whatever code you want and
> call whatever methods you 'd like from the em
> object. However, this is not a
> very clean way according to the principles of the
> ACA.
>
> Sam
>
> -----Original Message-----
> From: j-sim-users-bounces at cs.uiuc.edu
> [mailto:j-sim-users-bounces at cs.uiuc.edu] On Behalf
> Of community help
> Sent: 06 October 2006 13:44
> To: j-sim-users at cs.uiuc.edu
> Subject: [j-sim-users] Accessing node's
> caracteristics from application
>
> Hi,
>
> I would like to know how to access node's parameters
> from the java application running on it.
> In my case, i'm running a client/server socket
> application. I want that the
> client application can display the remaining energy.
> I can do this in TCL
> but i can't do it in java.
> i did the following:
> WirelessPhy phy = new WirelessPhy();
> EnergyModel em = phy.getEnergyModel();
> than i can display the remaining energy by:
> em.getEnergy().
> This does not work because it gives always the same
> initial value of 1000.
> is there any command of this form:
> phy = WirelessPhy of the node on which this
> application is running ?
>
> Thank you for advance
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
> _______________________________________________
> j-sim-users mailing list
> j-sim-users at cs.uiuc.edu
>
http://lists.cs.uiuc.edu/mailman/listinfo/j-sim-users
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the j-sim-users
mailing list