On Mon, Apr 09, 2007 at 04:24:23PM -0400, George Nychis wrote: > Eric Blossom wrote: > >Uhh, 30 requests of .5 is only 15MB/s, so there would be no problem > >with additional requests up to an additional 17MB/s. The tx and rx > >channels are allocated indepently of each other, though all capacity > >requests are changed against the same pool. > > Right, it was part of the example. > > Based on your response... I think we have a problem with our interface.
Take a look at usrp/host/lib/inband/usrp_server.mbh. That's the real interface. FYI, I've put a note in inband-signaling-usb-host pointing to that file. ;; ---------------------------------------------------------------- ;; usrp-channel ;; ;; The protocol class is defined from the client's point-of-view. ;; (The client port is unconjugated, the server port is conjugated.) (define-protocol-class usrp-channel (:outgoing (cmd-allocate-channel invocation-handle capacity-reservation) ;; The cmd-allocate-channel message requests that the server ;; allocates a logical channel in the FPGA for use. ;; capacity-reservation specifies the number of bytes/s of ;; interconnect capacity (USB or ethernet) to reserve for this ;; channel. (The reservation is just a sanity check, no OS ;; specific mechanism is used.) (cmd-deallocate-channel invocation-handle channel) ;; The integer channel specifies the channel to deallocate. ) (:incoming (response-allocate-channel invocation-handle status channel) ;; If successful, a channel the specified capacity was allocated. ;; channel, an integer, indicates which channel was allocated. (response-deallocate-channel invocation-handle status) ;; If successful, the specified channel and associated interconnect ;; capacity were deallocated. ) ) > Regardless of whether we return a channel to the user, or the user > specifies a desired channel... > > How does cmd_deallocate_channel() know how much to de-allocate? It deallocates the amount that was originally allocated. What's the problem? > If these are hardware channels we are talking about (currently 2 in > hardware), and I > now want to deallocate my channel and i say cmd_deallocate_channel(blah, 1) > ... I am going to deallocate all of channel 1 which is incorrect. The > capacity I reserved should be deallocated. I think there's some confusion here. When a user requests an rx or tx channel with (cmd-allocate-channel invocation-handle capacity-reservation), they are given a channel on an exclusive basis. The returned channel number is given in the response-allocate-channel message. When they send (cmd-deallocate-channel invocation-handle channel) the server (after checking that this port actually _does_ own channel) frees the channel and gives the associated capacity reservation back to the pool. > So then is it required for the requester to keep track of how much they > requested to pass to our deallocation method? No, the server keeps track of how much it assigned to each rx and tx channel. Does this make sense? Eric _______________________________________________ Discuss-gnuradio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
