[j-sim-users] Accessing node's caracteristics from application
helpcomm at yahoo.com
Tue Oct 10 06:00:35 CDT 2006
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
--- 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
> -----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
> 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:
> 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
> j-sim-users mailing list
> j-sim-users at cs.uiuc.edu
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
More information about the j-sim-users