[Click] Accessing element handlers from within a click script

Bart Braem bart.braem at ua.ac.be
Fri Aug 7 08:34:11 EDT 2009


Hi,

On 07 Aug 2009, at 14:15, david johnson wrote:

> 've got the following example code in which I'm continuously scanning
> for beacons and storing the results in bs.scan. I then want to send  
> the
> results of the scan to other nodes in the network when I get a certain
> request message.
>
> To do this I need to access the BeaconScanner handler "scan". I'm  
> new to
> click and maybe I'm breaking some fundamental rule in a click config
> script but is it possible to pass an element handler as a parameter to
> another element.


It will be easy to pass the whole BeaconScanner to your element and  
then call the public scan_string method.
Information on passing elements to element configurations and parsing  
them can be found in the tutorials on our website.

Regards,
Bart Braem
-- 
Bart Braem
PATS research group - IBBT
Dept. of Mathematics and Computer Sciences
University of Antwerp
Campus Middelheim, G3.27
Middelheimlaan 1
B-2020 Antwerpen, Belgium
Phone: +32 (0)3 265.38.82
Fax: +32 (0)3 265.37.77
Web: www.pats.ua.ac.be



More information about the click mailing list