Socket Data Format

RCP can interface with other machines using a socket interface instead of a serial line.

This format uses the serial data format with an additional 16–byte header added, as shown in the following table. Note that for the ASCII packet types, there are C–style #defines in the antenna_lib.h file with names of the form ANT_PKT_TYPE*.

This format uses multicast UDP packets. Typically the IP address is 224.0.0.3, port 30785 but it can be configured.

Note that with socket data, multiple packets can arrive as one, so the packet size is used to separate.

On a multicast address, the reader reads everything written. The first letter of the packet type is used to determine direction, and it ignores everything starting with an R.

If you write your own code to interface to this, note that on a computer with multiple network cards, you must explicitly specify which one to write out on. The destination address is not used at this time, you can fill it with htonl(INADDR_ANY).

Socket Header Format
Byte Function
1–4 4–char ASCII size of the packet in %04d format.
5–12 8–char ASCII packet type, 0 padded, choices are:
XMT01 Standard antenna XMTnn packets
XMT02
XMT05
RCV01 Standard antenna RCVnn packets
RCV02
RCV03
RCV05
XMTSA Scientific Atlanta controller
RCVSA
XCHAT Chat mode packet
RCHAT
RTIME Time packet
XBITEC BITE control/status packet
RBITES
XBINTROG BITE 'Interrogate' packet
RBINTROG
XBSAMPLE BITE 'Take Sample' packet
RBSAMPLE
XBSETVAL BITE 'Take Sample' packet
RBSETVAL
XBRESET BITE 'Reset' packet
RBRESET
12–16 4–byte destination address in network byte order (INADDR_ANY fine)