[Olsr-users] Newbie Questions on OLSR Plugin Event & Scheduler
Henning Rogge
(spam-protected)
Wed Jun 9 08:29:29 CEST 2010
On Thu June 3 2010 05:59:59 Mahtab Hossain wrote:
> Hello Group,
>
> I could run my localization algorithm as a plugin which
> gives locations of the OLSR nodes for a given coordinate system. There
> were some issues raised by me in the earlier email which got clarified.
>
> I could create a thread in a normal way for the plugin as well - for
> example, my localization algorithm runs in a thread.
If you can prevent it, do not use threads in your plugin. You will be not able
to access to internal data structures of OLSRd in a sane way from a different
thread.
> I wanted
> the localization thread to be executed at every specified time interval.
> I did it without registering with the olsrd scheduler. In the thread,
> I just run my localization algorithm and sleep the remaining time
> interval after the execution.
You can do this easily by setting a timer in the OLSRd scheduler.
> However, I would like to know about
> the pcf_event function which I believe is executed whenever the topology
> of the ad-hoc network is changed. Any directions?
Yes.
You will find the register/unregister function in main.c. the pcf_listeners
get three boolean variables: "changes_neighborhood", "changes_topology" and
"changes_hna". The names should be selfexplaining.
Henning Rogge
--
Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
Kommunikation, Informationsverarbeitung und Ergonomie FKIE
Kommunikationssysteme (KOM)
Neuenahrer Straße 20, 53343 Wachtberg, Germany
Telefon +49 228 9435-961, Fax +49 228 9435 685
mailto:(spam-protected) http://www.fkie.fraunhofer.de
GPG: E1C6 0914 490B 3909 D944 F80D 4487 C67C 55EC CFE0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.olsr.org/pipermail/olsr-users/attachments/20100609/90c3ea18/attachment.sig>
More information about the Olsr-users
mailing list