Hi all,

I wrote small pure-python kactp client class. It imitates most of the
behavior of the corr.katcp_wrapper.FpgaClient class, but exists in a single
standalone file (attached) and is compatible with python 2.4 and most
operating systems. It probably isn't a true KATCP client implementation,
but it does forward most of the requests described at
https://casper.berkeley.edu/wiki/KATCP

With luck, this will be useful to anyone who either needs ROACH controls
running on something really backwards (as we did) or new casperites who are
unfamiliar with python and are daunted by the task of setting up the
standard katcp library.

It isn't quite complete yet--I haven't implemented a tap-start call simply
because I have never used it and wouldn't know what sort of response to
expect back from tcpborphserver. If anyone can give this to me, I can put
this in the client in a few minutes--the whole thing is really just a
glorified tcp socket.

Anyone who wants to try it can just put roach_katcp.py in the working
directory and

    from roach_katcp import *
    roach = BlockingClient('some_ip')
    roach.progdev('some_file')
    data = roach.read('some_register',4)

much like the corr version, but without all the dependencies. More details
are in the code comments.

-Alex

Attachment: roach_katcp.py
Description: Binary data

Reply via email to