Cliff Frey wrote: > please always include the click mailing list in your replies (but I messed > this up too, so sorry about that). > > The documentation is confusing. Because you *can* sent arguments to a read > handler (and a read handler can modify state).
I agree that the docs here are a little confusing, but it's not clear immediately how to improve them. Should ReadHandler be called something else -- like SimpleReadHandler? It would perhaps be cleanest to remove it entirely, but too incompatible. Eddie > > I would grep for READ_PARAM in the elements/ directory. I would look at > IPRouteTable's 'lookup' handler for an example. > > Cliff > > > On Fri, May 14, 2010 at 10:25 AM, Sanhueza, Patricio < > [email protected]> wrote: > >> Hi Cliff >> >> >> >> Sorry, it stemmed from misreading/misinterpreting the following line on the >> click website >> >> >> >> There is currently no way to *pass data to a read handler *or *return data >> from a write handler*. Use LLRPCs if you need a more RPC-like read-write >> interface >> >> >> >> http://read.cs.ucla.edu/click/element >> >> >> >> I am kind of confused as how to pass data into a read handler? Or get data >> back from a write handler? How do the optional parameters work in >> >> *READ **handler** [**params…**]* >> >> Call a read *handler*, passing the *params*, if any, as arguments, and >> return the results. On success, responds with a "success" message (response >> code 2xy) followed by a line like "DATA *n*". Here, *n* is a decimal >> integer indicating the length of the read handler data. The *n* bytes >> immediately following (the CRLF that terminates) the DATA line are the >> handler's results. >> >> >> >> The callback signature for a read handler is >> >> >> >> String (*ReadHandler) (Element *element, void *thunk) //how to I get access >> to the parameters? >> >> >> >> >> >> Essentially I need an interface into an element that I can pass data into >> it, and it return data back, so that is why I was looking into the LLRPC >> mechanism instead. >> >> >> >> I looked at the ControlSocket documentation but I am looking for a concrete >> example. >> >> >> >> Example:: LLRPC counter#0xC004C001 4 ???? >> >> >> >> Thanks, >> >> >> >> Patricio >> >> >> >> *From:* Cliff Frey [mailto:[email protected]] >> *Sent:* Friday, May 14, 2010 11:01 AM >> *To:* Sanhueza, Patricio >> *Subject:* Re: [Click] LLRPC Examples >> >> >> >> look at the documentation for ControlSocket >> http://read.cs.ucla.edu/click/elements/controlsocket >> >> >> >> Although I'm curious why you are interested in the LLRPC mechanism. It is >> generally much easier to use read, write, or read+param handlers to >> implement this sort of functionality (these can also be accessed over >> controlsocket). >> >> >> >> Cliff >> >> On Fri, May 14, 2010 at 6:44 AM, Sanhueza, Patricio < >> [email protected]> wrote: >> >> Hello >> >> I am wondering if I can get an example of using LLRPC with say the >> Counter element? More specifically, what would be the server command >> message sent to the ControlSocket to get the count? I am trying to test >> this on the standard elements before implementing a custom one. Also, is >> there any documentation on LLRPC within click that I can get my hands >> on? There is paper on the Internet called "Programming the Click Modular >> Router", but the LLRPC section is empty. >> >> Patricio >> >> >> >> >> >> >> >> >> >> >> The information contained in this e-mail message is PRIVATE. It may contain >> confidential information and may be legally privileged. It is intended for >> the exclusive use of the addressee(s). If you are not the intended >> recipient, you are hereby notified that any dissemination, distribution or >> reproduction of this communication is strictly prohibited. If the intended >> recipient(s) cannot be reached or if a transmission problem has occurred, >> please notify the sender immediately by return e-mail and destroy all copies >> of this message. >> Thank you. >> >> >> _______________________________________________ >> click mailing list >> [email protected] >> https://amsterdam.lcs.mit.edu/mailman/listinfo/click >> >> >> >> The information contained in this e-mail message is PRIVATE. It may contain >> confidential information and may be legally privileged. It is intended for >> the exclusive use of the addressee(s). If you are not the intended >> recipient, you are hereby notified that any dissemination, distribution or >> reproduction of this communication is strictly prohibited. If the intended >> recipient(s) cannot be reached or if a transmission problem has occurred, >> please notify the sender immediately by return e-mail and destroy all copies >> of this message. >> Thank you. >> > _______________________________________________ > click mailing list > [email protected] > https://amsterdam.lcs.mit.edu/mailman/listinfo/click _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click
