Hello

> I'm also going to look at another option which is with the mmap kernel I
> have access to the FPGA memory in /dev/roach/mem.  I think it should
> be fairly easy to write a custom server that runs on the roach that
> collects the bram data from the mem and then buffers if for sending
> over ethernet via udp. This is probably very similar to what the UDP
> option in tcpborphserver does but I'll be able to control the amount
> of buffering

So tcpborphserver3 provides a function

  register_every_ms_katcp(d, period, &callback, localstate);

which will arrange to call callback every period ms with
a pointer localstate. In that callback function you should be
able to read from the fpga and buffer/send out udp data at the rate
you wish (fpga can be found at raw_mode->r_map)

I'd recommend that you have a setup function (the one which
sets up localstate and calls register_every_ms_katcp). This
function should have the prototype

  int your_cmd(struct katcp_dispatch *d, int argc)

if that is the case, you can add a call

  register_flag_mode(d, "?your-cmd", "helpmessage", &your_cmd, 0, TBS_MODE_RAW);

and then you'll have an extra command which will launch
your data dumping logic to run periodically. The tgtap routines
use this approach - the end of tg.c shows this.

regards

marc

Reply via email to