"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Hi all, > > In many cases, a node in a wireless network needs to know its own > location, and sends its location to other nodes. Does anyone know how > to implement these in wireless domain? > I cannot find a direct way to get the location of a WirelessComposite > actor in the graph editor. > > thanks. > > Liu >
I believe the location information is stored in a property named "_location" that is of type ptolemy.kernel.util.Location For example, the moml looks like <property name="_location" class="ptolemy.kernel.util.Location" value="530.0, 515.0"> </property> See ptII/ptolemy/domains/wireless/demo/EvaderAndPursuer/Pursuer.java for an atomic actor that gets the _location parameter and sends the x and y location to outputs. You might find what I wrote in 2004 of interest: > Sounds like you would want something similar to the wireless sound > detection demo. > > See the wireless sound demo for a use of the GraphicalLocator actor > which extends the Locator actor: > > $PTII/ptolemy/domains/wireless/demo/WirelessSoundDetection/WirelessSoundDetection.htm > > There is an applet version at > http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII4.0/ptII4.0.1/ptolemy/... > > The wireless specific versoin of Ptolemy II is described in: > http://ptolemy.eecs.berkeley.edu/publications/papers/04/VisualSense/V... > and > http://ptolemy.eecs.berkeley.edu/papers/04/VisualSenseERLMemo0408/ind... > > For a model that moves an icon, see > $PTII/ptolemy/actor/parameters/demo/Bouncer/Bouncer.xml > > Double click on the Bouncer actor to see that > _location is set to [250.0, locationY] > and locationY is set to centerPoint _Christopher ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]