On Mon, Jan 26, 2015 at 1:50 PM, Pablo Vasquez <[email protected]> wrote:
> Hi, > > I'm trying to get a 32 bits PIC controller to work with a ROACH. I'm > establishing communication through a standard TCP connection and getting > data from a socket opened between the PIC and the ROACH. About this I have > two questions: > > 1.- What is the package size, also know as maximum segment size, that the > ROACH/KATCP uses for transmission over the LAN port? > I need to know this so I can work with the same segment size on both > platforms and get proper data flow synchronization. > The control port of the roach is running a linux ip stack. I believe the MTU can be set using ifconfig, so this is configurable. If you are using the high-speed interfaces, then this is all going via the fpga 2.- Do you know where can I find more info about the way struct.pack works? > I need to "unpack" the data coming in the string from the ROACH, but since > I have no python libraries on the PIC I need to handle the unpacking > myself. Looking directly at the data I seem to recognize some patterns > (i.e. "/0" at the end of each integer per channel) but this patterns are > not behaving the same through the whole string. > Certain bytes are escaped, the escape sequences are \e \n \r \t \0 and \_ - the last one is unusual, it escapes space. There is also a sequence \@ which means no argument, but you may not encounter that. As Jason mentioned there is a C library on github which parses that for you - you may want to restrict yourself to the *_katcl functions if you are resource limited regards marc > > Any hints will help. > > Best regards. > > -- > Pablo Vasquez > Ingeniero Eléctrico > DAS Universidad de Chile > (+562)29771119 >

