[Click] Scoping/naming issues

Eddie Kohler kohler at cs.ucla.edu
Mon Jan 17 19:35:48 EST 2011


Hi Philip,

I can see why you thought compound elements would work that way, but 
they don't.  They are very strictly encapsulated: all connections to 
other elements must take place through explicit inputs and outputs.

I admit it would make sense to do it the way you've imagined.  Patches 
welcome...

Eddie


On 1/15/11 2:53 PM, Philip Prindeville wrote:
> I've got a configuration where I do:
>
> ...
> arpfoo :: ARPQuerier(...);
>
> elementclass Bar {
> ...
>       class :: classifier(...);
> ...
>        class [2] ->   [1] arpfoo;
> ...
> }
>
>
> but it complains that "unknown element class 'arpfoo'" in a few places, and that input 1 isn't used...
>
> So I'm confused.  Everything is scoped globally... even stuff defined within an elementclass gets scoped globally.
>
> Why then can't I access a global variable from within an elementclass's scope?
>
> What am I missing?
>
> Thanks,
>
> -Philip
>
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list