[Click] elements inside compound elements

David Fusté f2308030 at est.fib.upc.edu
Sat Jun 11 14:38:27 EDT 2005


Hi,
is it possible to use, inside a compound element, an element declared 
out of the scope of the compound? I tried to pass the element name by 
parameter but it doesn't work. Is the only solution flattening the 
compound element?

simple_example.click
------------------------------------
q0::Queue(10);

elementclass MyCompound
{
$q |
input -> $q -> output;
}

FromDevice(eth0) -> MyCompound(q0) -> Discard;
------------------------------------

$ click simple_example.click
simple_example.click:6: syntax error near '$q'
simple_example.click:6: syntax error near '->'
simple_example.click:10: no match for 'MyCompound[1 argument, 1 input, 1 
output]'
simple_example.click:5: candidates are:
simple_example.click:5:   MyCompound(<arg>)[0 inputs, 0 outputs]
simple_example.click:9: 'MyCompound at 3' has no input 0
simple_example.click:9: 'MyCompound at 3' has no output 0



More information about the click mailing list