Thursday, November 02, 2006

 

Testing TED Input

The GUI I am developing accepts commands as an event generated by an button push or through an TCP/IP port. The reason is the software can work as a standalone module or with an TED (Touch Entry Display) which communicates through TCP/IP (localhost). To test the software I did not had the TED. I had to simulate the command. The following code generates one such command over TCPIP socket on port 49000.

schakkere@shankar ~

$ echo fd 01 00 01 | xxd -r -p |nc localhost 49000 > response.bin

Explanation:

echo feeds in the command "fd 01 00 01" as string to xxd.
xxd converts it into hex.
nc (NetCat) sends the hex command as TCP/IP packets on localhost.

My GUI receives this command on socket 49000.

xxd is a small c program which can be complied on DJGPP or cygwin.

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?